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

Re: multiple-commit cherry-pick?

From
Junio C Hamano <gitster@pobox.com>
Date
Nov 10, 2008, 20:41 UTC
Message-ID
<7vabc75n5q.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<alpine.DEB.1.00.0811102054470.30769@pacific.mpi-cbg.de>
Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
Show 10 quoted lines
> On Sun, 9 Nov 2008, Alex Riesen wrote:
>
>> Oh, I am. But it is just so convenient to have range support for 
>> commands which just show commits. Besides, git-show just errors out, 
>> instead of producing the commits like git-log does.
>
> Have fun implementing the support, and then explaining to users why this 
> shows only one commit:
>
> 	git show HEAD^..HEAD HEAD~10

I find what Alex says somewhat silly because show is always "no walk", and range by definition means you need to walk.

But when you give that command line, Alex could also change the command to show the HEAD and HEAD~10, by changing the way series of range parameters are evaluated by the revision parsing machinery. You take HEAD^..HEAD and come up with one set (that has only one commit, HEAD), you take the next parameter HEAD~10 and come up with another set (that also has only one commit, HEAD~10, because show does not walk), then you take union.

I personally do not want to see that happen, though. The way multiple "ranges" that come from separate command line parameters combine using set operator semantics is so useful to do something like...

	git log ko/master..master ^maint

which is my way to ask "Which commits on master are the ones that I haven't pushed out? By the way, I have pushed out maint already so I do not want to see anything that is already in maint", where ko/master tracks what I pushed out to the public repository at k.org; this query is used to see if I can still rewrite commits when I find typo/thinko in them.

Previous: Francis GaliegueNext: Johannes Schindelin
Message 29 of 31 in “multiple-commit cherry-pick?”
  1. Miles BaderNov 6, 2008
  2. Deskin MillerNov 6, 2008
  3. Björn SteinbrinkNov 6, 2008
  4. Miles BaderNov 6, 2008
  5. Björn SteinbrinkNov 6, 2008
  6. Miles BaderNov 7, 2008
  7. Björn SteinbrinkNov 7, 2008
  8. Miles BaderNov 7, 2008
  9. Alex RiesenNov 6, 2008
  10. Linus TorvaldsNov 7, 2008
  11. Miles BaderNov 7, 2008
  12. Alex RiesenNov 7, 2008
  13. Junio C HamanoNov 7, 2008
  14. Alex RiesenNov 7, 2008
  15. Linus TorvaldsNov 7, 2008
  16. Alex RiesenNov 9, 2008
  17. Johannes SchindelinNov 10, 2008
  18. Alex RiesenNov 10, 2008
  19. Johannes SchindelinNov 10, 2008
  20. Chris FreyNov 14, 2008
  21. Johannes SchindelinNov 14, 2008
  22. Linus TorvaldsNov 14, 2008
  23. Johannes SchindelinNov 14, 2008
  24. Junio C HamanoNov 14, 2008
  25. Linus TorvaldsNov 14, 2008
  26. Linus TorvaldsNov 14, 2008
  27. Pierre HabouzitNov 16, 2008
  28. Francis GaliegueNov 14, 2008
  29. Junio C HamanoNov 10, 2008
  30. Johannes SchindelinNov 10, 2008
  31. Michael RadziejNov 7, 2008

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.