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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Am 20.05.2010 16:12, schrieb Alex Riesen:
> Maybe because we do a (kind of) gentle status run on submodules
> whether the status.SubmoduleSummary set or not.

Yup, because checking a submodule for its dirtiness has to be done
no matter if the summary output is also wanted.


> 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.

This patch seems to disable submodule output completely for the default
case (when status.SubmoduleSummary is false) and breaks 17 test cases.

So no thumbs up from me ;-)


> 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;

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]