git status: ignoring untracked files must apply to submodules too
Since 1.7.0 submodules are considered dirty when they contain untracked files. But when git status is called with the "-uno" option, the user asked to ignore untracked files, so they must be ignored in submodules too. To achieve this, the new flag DIFF_OPT_IGNORE_UNTRACKED_IN_SUBMODULES is introduced. Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
committed by
Junio C Hamano
parent
85adbf2f75
commit
3bfc450476
@ -71,7 +71,7 @@ static int match_stat_with_submodule(struct diff_options *diffopt,
|
||||
if (S_ISGITLINK(ce->ce_mode)
|
||||
&& !DIFF_OPT_TST(diffopt, IGNORE_SUBMODULES)
|
||||
&& (!changed || DIFF_OPT_TST(diffopt, DIRTY_SUBMODULES))) {
|
||||
*dirty_submodule = is_submodule_modified(ce->name);
|
||||
*dirty_submodule = is_submodule_modified(ce->name, DIFF_OPT_TST(diffopt, IGNORE_UNTRACKED_IN_SUBMODULES));
|
||||
}
|
||||
return changed;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user