git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Alex Riesen <raa.lkml@gmail.com>
Date
May 20, 2010, 14:12 UTC
Message-ID
<AANLkTil1QHA3G2VaITdm7DkDmN1IhZ_u2SWLrelyxkF2@mail.gmail.com>
Noticed-by: Andy Parkins
Signed-off-by: Alex Riesen <raa.lkml@gmail.com>
--
On Thu, May 20, 2010 at 15:28, Junio C Hamano <gitster@pobox.com> 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;


From 6b7a5e0ac560e1187d8ff359bad8c04927d0b599 Mon Sep 17 00:00:00 2001
From: Alex Riesen <raa.lkml@gmail.com>
Date: Thu, 20 May 2010 16:04:11 +0200
Subject: [PATCH] Don't do status in submodules if status.SubmoduleSummary unset

Noticed-by: Andy Parkins
Signed-off-by: Alex Riesen <raa.lkml@gmail.com>

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;
Next: Jens Lehmann
Message 1 of 4 in “Don't do status in submodules if status.SubmoduleSummary unset”
  1. Don't do status in submodules if status.SubmoduleSummary unsetAlex Riesen, May 20, 2010
  2. Jens LehmannMay 20, 2010
  3. Alex RiesenMay 20, 2010
  4. Jens LehmannMay 20, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.