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

Re: logging disjoint sets of commits in a single command

From
Junio C Hamano <gitster@pobox.com>
Date
Feb 1, 2012, 00:48 UTC
Message-ID
<7vobtj5qf9.fsf@alter.siamese.dyndns.org>
In-Reply-To
<CB4DC442.72F%bryano@fb.com>
"Bryan O'Sullivan" <bryano@fb.com> writes:
> Here's a sample command line against a kernel tree:
>
> git log 373af0c^..373af0c 590dfe2^..590dfe2
This command line is _defined_ to be the same as this.
	git log ^373af0c^ 373af0c ^590dfe2^ 590dfe2
Hence,
> Is there some way around this, or would a patch to fix it be acceptable?

the answer to the second question is "no, that is not a fix but is a breakage for the *current* Git users".

The answer to the first question is that you may be able to do something like this:

        (
            git rev-list 373af0c^..373af0c
            git rev-list 590dfe2^..590dfe2
        ) |
        sort -u |
        xargs git show

Having said all that, for users of Git 2.0, giving richer meaning to the explicit range notation to make your original command line work just like the above scripted way would be more intuitive. While an unconditional change to break the current users would totally be unacceptable, we would want to see somebody come up with a clean migration path toward that goal without hurting existing users in the longer term.

Previous: Bryan O'Sullivan
Message 8 of 8 in “logging disjoint sets of commits in a single command”
  1. Bryan O'SullivanFeb 1, 2012
  2. Bryan O'SullivanFeb 1, 2012
  3. Carlos Martín NietoFeb 1, 2012
  4. Jeff KingFeb 1, 2012
  5. Bryan O'SullivanFeb 1, 2012
  6. Jeff KingFeb 1, 2012
  7. Bryan O'SullivanFeb 1, 2012
  8. Junio C HamanoFeb 1, 2012

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.