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 26, 2017, 09:28 UTC
Message-ID
<alpine.DEB.2.20.1704261126130.3480@virtualbox>
In-Reply-To
<1493165607.29673.31.camel@gmail.com>
Hi Liam,
On Tue, 25 Apr 2017, liam Beguin wrote:
Show 22 quoted lines
> On Tue, 2017-04-25 at 22:08 +0200, Johannes Schindelin wrote:
> > 
> > On Tue, 25 Apr 2017, Liam Beguin wrote:
> > 
> > > diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh
> > > index 2c9c0165b5ab..9f3e82b79615 100644
> > > --- a/git-rebase--interactive.sh
> > > +++ b/git-rebase--interactive.sh
> > > @@ -1210,6 +1210,10 @@ else
> > >  	revisions=$onto...$orig_head
> > >  	shortrevisions=$shorthead
> > >  fi
> > > +
> > > +rebasecmd=pick
> > > +test "$(git config --bool --get rebase.abbrevCmd)" = true && rebasecmd=p
> > 
> > A better name would be "pickcmd", as there are more rebase commands than
> > just `pick` and what we want here is really only associated with one of
> > those commands.
> 
> Wouldn't that make it confusing when the patch starts to handle other
> commands?

Only if you use that variable to hold other values than `pick` or `p`. But you do not plan on that, right? You plan to use this variable only to hold the value `pick` by default and `p` in case the user asked for abbreviated commands. Therefore, I think it makes sense to reflect in the variable name that the purpose is really only to reflect the string used for the `pick` command (as opposed to any other todo command).

Ciao, Johannes

Previous: Junio C HamanoNext: Ævar Arnfjörð Bjarmason
Message 26 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.