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

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

From
Philippe Blain <levraiphilippeblain@gmail.com>
Date
Jul 7, 2020, 13:08 UTC
Message-ID
<11841F90-5F2B-4786-AFE9-7A2CA62C7A19@gmail.com>
In-Reply-To
<f55e0109-af9a-7c21-1cbf-41b2531560e4@iee.email>
Hi Philip,
Show 5 quoted lines
> Le 5 juil. 2020 à 16:42, Philip Oakley <philipoakley@iee.email> a écrit :
> 
> Hi Philippe,
> This had been sitting in my inbox..
> 
-----8<-----
Show 22 quoted lines
>> 
>> What I wanted to achieve with this patch is to make readers aware that 
>> they can write e.g.
>> 
>>    git log branch1 branch2 branch3 branch4 --not master
>> 
>> to see commits on each of branch1-4, that are not on master, 
>> since this is not immediately obvious (at least to me)
>> in the 'git log' man page. 
> 
> The whole revision walk stuff is tricky. Finding the right starting
> point for explanations is key, along with picking out where 'normal'
> errors are made, as these do help users who aren't simply 'checking the
> manual'. (the 20-20 hindsight problem)
> 
> For example, your "that are not on master", and what that means, needs
> to be brought out to the new reader rather than being buried
> mid-sentence. Most readers will miss those mid-sentence key points and
> they can't learn until they have some significant problem that points it
> out to them. Sometime we need to point at the 'wrong' things, not just
> the right things. (e.g. if branch3 had ben merged a couple of revisions
> ago...)

Yes, here I meant "on master" in the "not yet merged into master" sense, of course. I'd be more careful if I was writing a commit message or part of the doc itself.

Show 23 quoted lines
> 
>> Even following the link to gitrevisions[7], 
>> it is not explicitly mentioned in the "Specifying Ranges" section 
>> that a range denotes the set of all commits reachable by all given refs, 
>> minus the ones reachable by all given refs prefixed by '^' or '--not'.
>> However, this is really clear in the 'git rev-list' documentation, 
>> which uses  '<commit>...' in the synopsis
>> and clearly talks about the "set of commits" point of view:
>> 
>>    You can think of this as a set operation. Commits given on the command line form 
>>    a set of commits that are reachable from any of them, and then commits reachable 
>>    from any of the ones given with ^ in front are subtracted from that set. The remaining 
>>    commits are what comes out in the command’s output. Various other options and 
>>    paths parameters can be used to further limit the result.
>> 
> Set operations don't help everyone, just sayin'.
> 
> In some cases: The fact that we exclude any commit reachable from any of
> the "^" commits should be mentioned first, and then we select any left
> that are reachable from the named tips. This puts a different spin on
> the  understanding, and helps catch those that have not understood the
> other descriptions. It can then be easily linked to the 'two ranges'
> case producing otherwise unexpected results.
I'll try to tweak the wording for v3.

Thanks, Philippe.

Previous: Philip OakleyNext: Taylor Blau
Message 6 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.