Subject: Re: [PATCHv4 1/3] wt-status.*: better advices for git status added

From: Matthieu Moy <[email-masked]>
Date: Thu, 31 May 2012 08:29:14 +0200

Kong Lucien <[email-masked]> writes:

> The new messages are not shown when using options such as
> -s or --porcelain.The messages about the current

space between . and The (normally, 2 spaces in english).

> --- a/Documentation/config.txt
> +++ b/Documentation/config.txt
> @@ -176,6 +179,7 @@ advice.*::
>  		Advice shown when you used linkgit:git-checkout[1] to
>  		move to the detach HEAD state, to instruct how to create
>  		a local branch after the fact.
> +
>  --

Why add a blank line here?

> +	if (state->merge_in_progress) {
> +		wt_status_merge_in_progress(s, state, state_color);
> +	}
> +	else if (state->am_in_progress) {
> +		wt_status_am_in_progress(s, state, state_color);
> +	}
> +
> +	else if (state->rebase_in_progress || state->rebase_interactive_in_progress) {
> +		wt_status_rebase_in_progress(s, state, state_color);
> +	}
> +
> +	else if (state->cherry_pick_in_progress) {
> +		wt_status_cherry_pick_in_progress(s, state, state_color);
> +	}
> +
> +	if (state->bisect_in_progress) {
> +		wt_status_bisect_in_progress(s, state, state_color);
> +	}

Do these have to be if/else if/... ?

In most cases, the user will have only one of these at the same time,
but in the few cases where there's, e.g. a rebase during a bisect or so,
I think it makes more sense to show both advices to the user (probably
as a sign that something's wrong).

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/