Thread (4 messages) flat view 4 messages, 2 authors, 2016-06-15
STALE3734d

[PATCH] Don't do status in submodules if status.SubmoduleSummary unset

From: Alex Riesen <hidden>
Date: 2016-06-15 22:48:49
Subsystem: the rest · Maintainer: Linus Torvalds

Noticed-by: Andy Parkins
Signed-off-by: Alex Riesen <redacted>

--

On Thu, May 20, 2010 at 15:28, Junio C Hamano [off-list ref] wrote:
As to the not-working-configuration I don't remember the codepath well, so
sorry but no answer from me right now.
Maybe because we do a (kind of) gentle status run on submodules
whether the status.SubmoduleSummary set or not. Usually a background
run of "git status" for every submodules goes unnoticed, just
sometimes a submodule is a little too big.

I tried this, but feels like a bit of overkill.
diff --git a/wt-status.c b/wt-status.c
index 8ca59a2..d5bcdf9 100644
--- a/wt-status.c
+++ b/wt-status.c
@@ -303,7 +303,10 @@ static void
wt_status_collect_changes_worktree(struct wt_status *s)
 	init_revisions(&rev, NULL);
 	setup_revisions(0, NULL, &rev, NULL);
 	rev.diffopt.output_format |= DIFF_FORMAT_CALLBACK;
-	DIFF_OPT_SET(&rev.diffopt, DIRTY_SUBMODULES);
+	if (s->submodule_summary)
+		DIFF_OPT_SET(&rev.diffopt, DIRTY_SUBMODULES);
+	else
+		DIFF_OPT_SET(&rev.diffopt, IGNORE_SUBMODULES);
 	if (!s->show_untracked_files)
 		DIFF_OPT_SET(&rev.diffopt, IGNORE_UNTRACKED_IN_SUBMODULES);
 	rev.diffopt.format_callback = wt_status_collect_changed_cb;

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help