{"thread":{"id":"23856","subject":"[PATCH] Don't do status in submodules if status.SubmoduleSummary unset","startedAt":"2010-05-20T14:12:31Z","lastAt":"2010-05-20T20:14:01Z","messageCount":4,"participants":["Alex Riesen","Jens Lehmann"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"141965","messageId":"AANLkTil1QHA3G2VaITdm7DkDmN1IhZ_u2SWLrelyxkF2@mail.gmail.com","threadId":"23856","inReplyTo":null,"subject":"[PATCH] Don't do status in submodules if status.SubmoduleSummary unset","fromName":"Alex Riesen","fromEmail":"raa.lkml@gmail.com","sentAt":"2010-05-20T14:12:31Z","receivedAt":"2010-05-20T14:12:31Z","isPatch":true,"sender":{"key":"raa.lkml@gmail.com","avatar":"https://avatars.githubusercontent.com/u/324101?v=4"},"body":"Noticed-by: Andy Parkins\nSigned-off-by: Alex Riesen <raa.lkml@gmail.com>\n\n--\n\nOn Thu, May 20, 2010 at 15:28, Junio C Hamano <gitster@pobox.com> wrote:\n> As to the not-working-configuration I don't remember the codepath well, so\n> sorry but no answer from me right now.\n\nMaybe because we do a (kind of) gentle status run on submodules\nwhether the status.SubmoduleSummary set or not. Usually a background\nrun of \"git status\" for every submodules goes unnoticed, just\nsometimes a submodule is a little too big.\n\nI tried this, but feels like a bit of overkill.\n\ndiff --git a/wt-status.c b/wt-status.c\nindex 8ca59a2..d5bcdf9 100644\n--- a/wt-status.c\n+++ b/wt-status.c\n@@ -303,7 +303,10 @@ static void\nwt_status_collect_changes_worktree(struct wt_status *s)\n \tinit_revisions(&rev, NULL);\n \tsetup_revisions(0, NULL, &rev, NULL);\n \trev.diffopt.output_format |= DIFF_FORMAT_CALLBACK;\n-\tDIFF_OPT_SET(&rev.diffopt, DIRTY_SUBMODULES);\n+\tif (s->submodule_summary)\n+\t\tDIFF_OPT_SET(&rev.diffopt, DIRTY_SUBMODULES);\n+\telse\n+\t\tDIFF_OPT_SET(&rev.diffopt, IGNORE_SUBMODULES);\n \tif (!s->show_untracked_files)\n \t\tDIFF_OPT_SET(&rev.diffopt, IGNORE_UNTRACKED_IN_SUBMODULES);\n \trev.diffopt.format_callback = wt_status_collect_changed_cb;\n\n\nFrom 6b7a5e0ac560e1187d8ff359bad8c04927d0b599 Mon Sep 17 00:00:00 2001\nFrom: Alex Riesen <raa.lkml@gmail.com>\nDate: Thu, 20 May 2010 16:04:11 +0200\nSubject: [PATCH] Don't do status in submodules if status.SubmoduleSummary unset\n\nNoticed-by: Andy Parkins\nSigned-off-by: Alex Riesen <raa.lkml@gmail.com>\n\ndiff --git a/wt-status.c b/wt-status.c\nindex 8ca59a2..d5bcdf9 100644\n--- a/wt-status.c\n+++ b/wt-status.c\n@@ -303,7 +303,10 @@ static void wt_status_collect_changes_worktree(struct wt_status *s)\n \tinit_revisions(&rev, NULL);\n \tsetup_revisions(0, NULL, &rev, NULL);\n \trev.diffopt.output_format |= DIFF_FORMAT_CALLBACK;\n-\tDIFF_OPT_SET(&rev.diffopt, DIRTY_SUBMODULES);\n+\tif (s->submodule_summary)\n+\t\tDIFF_OPT_SET(&rev.diffopt, DIRTY_SUBMODULES);\n+\telse\n+\t\tDIFF_OPT_SET(&rev.diffopt, IGNORE_SUBMODULES);\n \tif (!s->show_untracked_files)\n \t\tDIFF_OPT_SET(&rev.diffopt, IGNORE_UNTRACKED_IN_SUBMODULES);\n \trev.diffopt.format_callback = wt_status_collect_changed_cb;\n"},{"id":"141976","messageId":"4BF57538.5040204@web.de","threadId":"23856","inReplyTo":"AANLkTil1QHA3G2VaITdm7DkDmN1IhZ_u2SWLrelyxkF2@mail.gmail.com","subject":"Re: [PATCH] Don't do status in submodules if status.SubmoduleSummary unset","fromName":"Jens Lehmann","fromEmail":"jens.lehmann@web.de","sentAt":"2010-05-20T17:45:28Z","receivedAt":"2010-05-20T17:45:28Z","isPatch":true,"sender":{"key":"jens.lehmann@web.de","avatar":"https://avatars.githubusercontent.com/u/135220?v=4"},"body":"Am 20.05.2010 16:12, schrieb Alex Riesen:\n> Maybe because we do a (kind of) gentle status run on submodules\n> whether the status.SubmoduleSummary set or not.\n\nYup, because checking a submodule for its dirtiness has to be done\nno matter if the summary output is also wanted.\n\n\n> Usually a background\n> run of \"git status\" for every submodules goes unnoticed, just\n> sometimes a submodule is a little too big.\n> \n> I tried this, but feels like a bit of overkill.\n\nThis patch seems to disable submodule output completely for the default\ncase (when status.SubmoduleSummary is false) and breaks 17 test cases.\n\nSo no thumbs up from me ;-)\n\n\n> diff --git a/wt-status.c b/wt-status.c\n> index 8ca59a2..d5bcdf9 100644\n> --- a/wt-status.c\n> +++ b/wt-status.c\n> @@ -303,7 +303,10 @@ static void\n> wt_status_collect_changes_worktree(struct wt_status *s)\n>  \tinit_revisions(&rev, NULL);\n>  \tsetup_revisions(0, NULL, &rev, NULL);\n>  \trev.diffopt.output_format |= DIFF_FORMAT_CALLBACK;\n> -\tDIFF_OPT_SET(&rev.diffopt, DIRTY_SUBMODULES);\n> +\tif (s->submodule_summary)\n> +\t\tDIFF_OPT_SET(&rev.diffopt, DIRTY_SUBMODULES);\n> +\telse\n> +\t\tDIFF_OPT_SET(&rev.diffopt, IGNORE_SUBMODULES);\n>  \tif (!s->show_untracked_files)\n>  \t\tDIFF_OPT_SET(&rev.diffopt, IGNORE_UNTRACKED_IN_SUBMODULES);\n>  \trev.diffopt.format_callback = wt_status_collect_changed_cb;\n"},{"id":"141987","messageId":"AANLkTikQDEwA7Iih9hniYzLfSGnPvZ9PTDNtSKfJPa9d@mail.gmail.com","threadId":"23856","inReplyTo":"4BF57538.5040204@web.de","subject":"Re: [PATCH] Don't do status in submodules if status.SubmoduleSummary unset","fromName":"Alex Riesen","fromEmail":"raa.lkml@gmail.com","sentAt":"2010-05-20T19:34:18Z","receivedAt":"2010-05-20T19:34:18Z","isPatch":true,"sender":{"key":"raa.lkml@gmail.com","avatar":"https://avatars.githubusercontent.com/u/324101?v=4"},"body":"On Thu, May 20, 2010 at 19:45, Jens Lehmann <Jens.Lehmann@web.de> wrote:\n> Am 20.05.2010 16:12, schrieb Alex Riesen:\n>> Maybe because we do a (kind of) gentle status run on submodules\n>> whether the status.SubmoduleSummary set or not.\n>\n> Yup, because checking a submodule for its dirtiness has to be done\n> no matter if the summary output is also wanted.\n\nYeah. Why?\n\n>> Usually a background\n>> run of \"git status\" for every submodules goes unnoticed, just\n>> sometimes a submodule is a little too big.\n>>\n>> I tried this, but feels like a bit of overkill.\n>\n> This patch seems to disable submodule output completely for the default\n> case (when status.SubmoduleSummary is false) and breaks 17 test cases.\n\nThat's why I said it feels like overkill\n"},{"id":"141988","messageId":"4BF59809.7080706@web.de","threadId":"23856","inReplyTo":"AANLkTikQDEwA7Iih9hniYzLfSGnPvZ9PTDNtSKfJPa9d@mail.gmail.com","subject":"Re: [PATCH] Don't do status in submodules if status.SubmoduleSummary unset","fromName":"Jens Lehmann","fromEmail":"jens.lehmann@web.de","sentAt":"2010-05-20T20:14:01Z","receivedAt":"2010-05-20T20:14:01Z","isPatch":true,"sender":{"key":"jens.lehmann@web.de","avatar":"https://avatars.githubusercontent.com/u/135220?v=4"},"body":"Am 20.05.2010 21:34, schrieb Alex Riesen:\n> On Thu, May 20, 2010 at 19:45, Jens Lehmann <Jens.Lehmann@web.de> wrote:\n>> Am 20.05.2010 16:12, schrieb Alex Riesen:\n>>> Maybe because we do a (kind of) gentle status run on submodules\n>>> whether the status.SubmoduleSummary set or not.\n>>\n>> Yup, because checking a submodule for its dirtiness has to be done\n>> no matter if the summary output is also wanted.\n> \n> Yeah. Why?\n\nBecause summary output only describes what commits happened in the\nsubmodule (that operation is rather cheap). The status run is done\nto tell what changes in the submodules work tree have occurred since\nthe last commit there (and for that we have to scan the whole tree).\n\n\n>>> Usually a background\n>>> run of \"git status\" for every submodules goes unnoticed, just\n>>> sometimes a submodule is a little too big.\n>>>\n>>> I tried this, but feels like a bit of overkill.\n>>\n>> This patch seems to disable submodule output completely for the default\n>> case (when status.SubmoduleSummary is false) and breaks 17 test cases.\n> \n> That's why I said it feels like overkill\n\nI just wanted to confirm your feeling ;-)\n"}]}