Michael J Gruber <git@xxxxxxxxx> writes: > 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@xxxxxxxxx> > --- > 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"). > +-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.