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

Re: [PATCH] [GSOC][RFC] format-patch: pass --right-only to range-diff

From
Junio C Hamano <gitster@pobox.com>
Date
Mar 12, 2021, 22:09 UTC
Message-ID
<xmqqv99w58iq.fsf@gitster.g>
In-Reply-To
<xmqq1rck6nr8.fsf@gitster.g>
Junio C Hamano <gitster@pobox.com> writes:
Show 21 quoted lines
> Taylor Blau <ttaylorr@github.com> writes:
>
>> Note that I think (and Johannes--cc'd--could confirm) that what you want
>> is '--left-only' to discard rebased changes from the upstream branch:
>
> Does that mean range-diff got --left-only and --right-only
> backwards?  IOW, doesn't
>
> $ git log --left-only A...B
>
> show what is shown in "git log B..A", and if so, shouldn't
>
> $ git range-diff --left-only A...B
>
> which is a synonym for
>
> $ git range-diff B..A A..B
>
> also give commits in the B..A range?
>
> Puzzled....

Ah, it was only that "range-diff --help" uses confusing double-negative phrasing. I.e.

    --left-only::
            Suppress commits that are missing from the first specified range
            (or the "left range" when using the `<rev1>...<rev2>` format).

If you "suppress those that are missing from X", you are effectively including only those that appear in X, so two conclusions I draw are

 - "range-diff" does not get "--left/right-only" backwards;
 - its documentation should be improved.
Perhaps
    --left-only::
	Include only commits that are in the first range (or the
	"left range" when using the `<rev1>...<rev2>` format).
wouldn't have made me puzzled.
Thanks.
Previous: Junio C HamanoNext: ZheNing Hu via GitGitGadget
Message 5 of 16 in “[GSOC][RFC] format-patch: pass --right-only to range-diff”
  1. [GSOC][RFC] format-patch: pass --right-only to range-diffZheNing Hu via GitGitGadget, Mar 7, 2021
  2. Taylor BlauMar 8, 2021
  3. ZheNing HuMar 9, 2021
  4. Junio C HamanoMar 12, 2021
  5. Junio C HamanoMar 12, 2021
  6. [GSOC][RFC] format-patch: pass --left-only to range-diffZheNing Hu via GitGitGadget, Mar 9, 2021
  7. Eric SunshineMar 9, 2021
  8. ZheNing HuMar 9, 2021
  9. [GSOC][RFC] format-patch: pass --left-only to range-diffZheNing Hu via GitGitGadget, Mar 9, 2021
  10. Junio C HamanoMar 12, 2021
  11. ZheNing HuMar 13, 2021
  12. Junio C HamanoMar 13, 2021
  13. ZheNing HuMar 14, 2021
  14. ZheNing HuMar 14, 2021
  15. ZheNing HuMar 14, 2021
  16. [GSOC] format-patch: pass --left-only to range-diffZheNing Hu via GitGitGadget, Mar 14, 2021

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.