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

Re: [PATCH] doc: log takes multiple revision ranges

From
Junio C Hamano <gitster@pobox.com>
Date
Mar 29, 2020, 01:34 UTC
Message-ID
<xmqqd08wc5bd.fsf@gitster.c.googlers.com>
In-Reply-To
<pull.590.git.1585429894378.gitgitgadget@gmail.com>
"Philippe Blain via GitGitGadget" <gitgitgadget@gmail.com> writes:
Show 5 quoted lines
> From: Philippe Blain <levraiphilippeblain@gmail.com>
>
> `git log` accepts multiple revision ranges, but makes no mention of that
> in its documentation. Currently readers have to go to the `git
> rev-list` documentation to discover this useful feature.
I have a mixed feeling about this change.  Surely you can write
	git log   v1.0..v2.0   v4.0..v5.0 -- Makefile

and you can explain that the command appears to take two "ranges", but I do not think we want to encourage it to those who do not understand what the above actually *means*.

Specifially, it does *NOT* list commits between v1.0 and v2.0, or between v4.0 and v5.0, that touch the path Makefile. In other words, you didn't really give two ranges with the syntax. What the A..B notation means could be called a range, only when it appears alone.

And we have *no* intention of changing the semantics.

"A..B" is a mere short-hand for ^A B, and it may appear to be a range, but "A..B C..D" does not make "two ranges". It still merely is a short-hand for ^A B ^C D, and if C reaches A and B (in the above example, v4.0 is very likely to reach both v1.0 and v2.0), it means the same thing as "C..D", i.e. "git log v4.0..v5.0 -- Makefile".

So I have a mildly strong opinion against the change to the synopsys and the short-help; it is a bad change that does not help users. If there are not sufficient explanation on the equivalence between A..B and ^A B on "git log" documentation but there is one elsewhere, adding a reference to help users learn is very much appreciated, though, and I initially was hoping that the second hunk of this patch was such a change, but it appears that it is not (it just adds the misleading "you can have more than one" without making readers aware of what it means to write "A..B C..D").

Thanks.
Previous: Philippe Blain via GitGitGadgetNext: Philippe Blain
Message 2 of 23 in “doc: log takes multiple revision ranges”
  1. doc: log takes multiple revision rangesPhilippe Blain via GitGitGadget, Mar 28, 2020
  2. Junio C HamanoMar 29, 2020
  3. Philippe BlainMar 30, 2020
  4. Junio C HamanoMar 30, 2020
  5. Philip OakleyJul 5, 2020
  6. Philippe BlainJul 7, 2020
  7. Taylor BlauMar 31, 2020
  8. 0/4 doc: include git rev-list description in git log docPhilippe Blain via GitGitGadget, Jul 3, 2020
  9. 1/4 git-log.txt: add links to 'rev-list' and 'diff' docsPhilippe Blain via GitGitGadget, Jul 3, 2020
  10. Junio C HamanoJul 7, 2020
  11. Philippe BlainJul 7, 2020
  12. 3/4 git-log.txt: include rev-list-description.txtPhilippe Blain via GitGitGadget, Jul 3, 2020
  13. 2/4 git-rev-list.txt: move description to separate filePhilippe Blain via GitGitGadget, Jul 3, 2020
  14. 4/4 rev-list-description.txt: fix Asciidoc syntaxPhilippe Blain via GitGitGadget, Jul 3, 2020
  15. Junio C HamanoJul 7, 2020
  16. Philippe BlainJul 7, 2020
  17. 0/6 doc: include git rev-list description in git log docPhilippe Blain via GitGitGadget, Jul 9, 2020
  18. 1/6 git-log.txt: add links to 'rev-list' and 'diff' docsPhilippe Blain via GitGitGadget, Jul 9, 2020
  19. 4/6 git-rev-list.txt: tweak wording in set operationsPhilippe Blain via GitGitGadget, Jul 9, 2020
  20. 2/6 revisions.txt: describe 'rev1 rev2 ...' meaning for rangesPhilippe Blain via GitGitGadget, Jul 9, 2020
  21. 3/6 git-rev-list.txt: fix Asciidoc syntaxPhilippe Blain via GitGitGadget, Jul 9, 2020
  22. 5/6 git-rev-list.txt: move description to separate filePhilippe Blain via GitGitGadget, Jul 9, 2020
  23. 6/6 git-log.txt: include rev-list-description.txtPhilippe Blain via GitGitGadget, Jul 9, 2020

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.