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

Re: Suggestion: make --left-right work with --merge

From
Linus Torvalds <torvalds@linux-foundation.org>
Date
Feb 29, 2008, 21:05 UTC
Message-ID
<alpine.LFD.1.00.0802291228560.17889@woody.linux-foundation.org>
In-Reply-To
<18375.58359.687664.855599@cargo.ozlabs.ibm.com>
On Fri, 29 Feb 2008, Paul Mackerras wrote:
> 
> Well, it does, except for --merge, which is perhaps a special case.

Well, clearly --merge is a special case, but it probably really shouldn't be.

If you want to parse revisions, then --merge should do that. But --merge is really special in that it expands into *both* a revision range *and* a set of files, so it doesn't really work wonderfully well for the trivial kind of parsing that git-rev-parse does.

So we certainly *could* just add "--merge" to the list of magic flags that is known about by is_rev_argument(), since that's a trivial one-liner. But that's really only ok for the case where we are supposed to output both revisions *and* flags, and even then it should also suppress the default HEAD generation (although it won't actually hurt, since the revision output from --merge will include HEAD in teh "HEAD...MERGE_HEAD" logic anyway, so with --default always being HEAD in practice..)

So yeah, I think git-rev-list has trouble handling --merge sanely the way it is currently written.

		Linus
Previous: Paul MackerrasNext: Junio C Hamano
Message 12 of 13 in “Suggestion: make --left-right work with --merge”
  1. Paul MackerrasFeb 27, 2008
  2. Junio C HamanoFeb 27, 2008
  3. Paul MackerrasFeb 27, 2008
  4. Junio C HamanoFeb 27, 2008
  5. Paul MackerrasFeb 28, 2008
  6. Junio C HamanoFeb 29, 2008
  7. Paul MackerrasFeb 29, 2008
  8. Junio C HamanoFeb 29, 2008
  9. Paul MackerrasMar 1, 2008
  10. Junio C HamanoMar 1, 2008
  11. Paul MackerrasMar 1, 2008
  12. Linus TorvaldsFeb 29, 2008
  13. Junio C HamanoFeb 29, 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.