Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJens Lehmann <Jens.Lehmann@web.de>2010-03-14 01:00:27 +0300
committerJunio C Hamano <gitster@pobox.com>2010-03-14 08:56:35 +0300
commit3bfc45047654c7dd38b32033321228e97fc8f60e (patch)
tree6899c722253819b7d29aa7abb7e0ac7716fa9079 /wt-status.c
parent85adbf2f751a91429de6b431c45737ba9d7e9e00 (diff)
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>
Diffstat (limited to 'wt-status.c')
-rw-r--r--wt-status.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/wt-status.c b/wt-status.c
index e0e915e46a..5848f1c908 100644
--- a/wt-status.c
+++ b/wt-status.c
@@ -304,6 +304,8 @@ static void wt_status_collect_changes_worktree(struct wt_status *s)
setup_revisions(0, NULL, &rev, NULL);
rev.diffopt.output_format |= DIFF_FORMAT_CALLBACK;
DIFF_OPT_SET(&rev.diffopt, DIRTY_SUBMODULES);
+ if (!s->show_untracked_files)
+ DIFF_OPT_SET(&rev.diffopt, IGNORE_UNTRACKED_IN_SUBMODULES);
rev.diffopt.format_callback = wt_status_collect_changed_cb;
rev.diffopt.format_callback_data = s;
rev.prune_data = s->pathspec;