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

Re: [PATCH v2] rebase -i: add config to abbreviate command-names

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Apr 25, 2017, 21:23 UTC
Message-ID
<alpine.DEB.2.20.1704252318080.3480@virtualbox>
In-Reply-To
<87zif4q0cy.fsf@linux-m68k.org>
Hi Andreas,
On Tue, 25 Apr 2017, Andreas Schwab wrote:
Show 30 quoted lines
> On Apr 25 2017, Liam Beguin <liambeguin@gmail.com> wrote:
> 
> > diff --git a/Documentation/config.txt b/Documentation/config.txt
> > index 475e874d5155..8b1877f2df91 100644
> > --- a/Documentation/config.txt
> > +++ b/Documentation/config.txt
> > @@ -2614,6 +2614,25 @@ rebase.instructionFormat::
> >  	the instruction list during an interactive rebase.  The format will automatically
> >  	have the long commit hash prepended to the format.
> >  
> > +rebase.abbrevCmd::
> > +	If set to true, `git rebase -i` will abbreviate the command-names in the
> > +	instruction list. This means that instead of looking like this,
> > +
> > +-------------------------------------------
> > +	pick deadbee The oneline of this commit
> > +	pick fa1afe1 The oneline of the next commit
> > +	...
> > +-------------------------------------------
> > +
> > +	the list would use the short version of the command resulting in
> > +	something like this.
> > +
> > +-------------------------------------------
> > +	p deadbee The oneline of this commit
> > +	p fa1afe1 The oneline of the next commit
> > +	...
> > +-------------------------------------------
> 
> That doesn't explain the point of the option.

And what you forgot to say in order to make this a constructive criticism is: we probably want to add a sentence like this:

	Using the one-letter abbreviations will align the lines better
	in case that the non-abbreviated commands have different lengths.

Speaking of commands with different lengths, I just thought of fixup and squash. I do not think those are handled by the patch, but they should be (the `action` in the first loop of `rearrange_squash` should abbreviate via `test p != "$pickcmd" || action=${action%${action#?}}`).

Ciao, Johannes

Previous: Andreas SchwabNext: liam BEGUIN
Message 18 of 28 in “rebase -i: add config to abbreviate command name”
  1. rebase -i: add config to abbreviate command nameLiam Beguin, Apr 24, 2017
  2. Johannes SchindelinApr 24, 2017
  3. liam BEGUINApr 24, 2017
  4. liam BEGUINApr 25, 2017
  5. Johannes SchindelinApr 25, 2017
  6. liam BEGUINApr 25, 2017
  7. Jeff KingApr 24, 2017
  8. rebase -i: add config to abbreviate command-namesLiam Beguin, Apr 25, 2017
  9. Junio C HamanoApr 25, 2017
  10. Jacob KellerApr 25, 2017
  11. liam BeguinApr 25, 2017
  12. Junio C HamanoApr 26, 2017
  13. Andreas SchwabApr 25, 2017
  14. Mike RappazzoApr 25, 2017
  15. Philip OakleyApr 25, 2017
  16. rebase -i: add config to abbreviate command-namesLiam Beguin, Apr 25, 2017
  17. Andreas SchwabApr 25, 2017
  18. Johannes SchindelinApr 25, 2017
  19. liam BEGUINApr 25, 2017
  20. Johannes SchindelinApr 25, 2017
  21. liam BeguinApr 26, 2017
  22. Jeff KingApr 26, 2017
  23. Junio C HamanoApr 26, 2017
  24. Johannes SchindelinApr 26, 2017
  25. Junio C HamanoApr 27, 2017
  26. Johannes SchindelinApr 26, 2017
  27. Ævar Arnfjörð BjarmasonApr 26, 2017
  28. liam BeguinApr 27, 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.