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

Re: [PATCH] status: show in-progress info for short status

From
Junio C Hamano <gitster@pobox.com>
Date
Apr 17, 2017, 07:06 UTC
Message-ID
<xmqqwpajikd2.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<2c3c8028cd057428758bb1e21a064a264936de90.1490968428.git.git@grubix.eu>
Michael J Gruber <git@grubix.eu> writes:
Show 39 quoted lines
> Ordinary (long) status shows information about bisect, revert, am,
> rebase, cherry-pick in progress, and so does git-prompt.sh. status
> --short currently shows none of this information.
>
> Introduce an `--inprogress` argument to git status so that, when used with
> `--short --branch`, in-progress information is shown next to the branch
> information. Just like `--branch`, this comes with a config option.
>
> The wording for the in-progress information is taken over from
> git-prompt.sh.
>
> Signed-off-by: Michael J Gruber <git@grubix.eu>
> ---
> When used with --porcelain, this gives an easy way to amend the powerline-gitstatus
> prompt for example (in use locally here), and certainly others.
>
> I don't touch --porcelain=v2 - that one reads in-progress state but does not seem
> to display it. I don't know which parts are supposed to be stable for v2. 
>
>  Documentation/config.txt     |  4 +++
>  Documentation/git-status.txt |  5 ++++
>  builtin/commit.c             | 13 ++++++++++
>  t/t7512-status-help.sh       | 58 ++++++++++++++++++++++++++++++++++++++++----
>  wt-status.c                  | 32 +++++++++++++++++++++---
>  wt-status.h                  |  1 +
>  6 files changed, 105 insertions(+), 8 deletions(-)
>
> diff --git a/Documentation/config.txt b/Documentation/config.txt
> index 475e874d51..3adc65f9d3 100644
> --- a/Documentation/config.txt
> +++ b/Documentation/config.txt
> @@ -2957,6 +2957,10 @@ status.branch::
>  	Set to true to enable --branch by default in linkgit:git-status[1].
>  	The option --no-branch takes precedence over this variable.
>  
> +status.inprogress::
> +	Set to true to enable --inprogress by default in linkgit:git-status[1].
> +	The option --no-inprogress takes precedence over this variable.
> +

Has the name of the option been discussed already and the list reached a consensus? "in progress" is a two-word phrase, and I am wondering if this should be status.inProgress (and the option name should be "--in-progress").

Show 5 quoted lines
> +-p::
> +--inprogress::
> +	When showing branch and tracking info in short-format,
> +	show in-progress information (BISECTING, MERGING etc.), too.
> +

I do not think we want to give short-and-sweet "-p" to this option. "git log -p" gives a patch output, "git status -p" sounds like it does so, too (i.e. "git show" plus various status). Besides, for those who are lazy, you already have a configuration variable.

Previous: SZEDER Gábor
Message 13 of 13 in “status: show in-progress info for short status”
  1. status: show in-progress info for short statusMichael J Gruber, Mar 31, 2017
  2. Junio C HamanoMar 31, 2017
  3. Michael J GruberApr 7, 2017
  4. Jacob KellerApr 7, 2017
  5. Junio C HamanoApr 13, 2017
  6. Jacob KellerApr 13, 2017
  7. Junio C HamanoMay 11, 2017
  8. Jacob KellerApr 13, 2017
  9. brian m. carlsonApr 1, 2017
  10. SZEDER GáborApr 6, 2017
  11. Michael J GruberApr 7, 2017
  12. SZEDER GáborApr 13, 2017
  13. Junio C HamanoApr 17, 2017

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.