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

Re: [PATCH] gitk: fix --all behavior combined with --not

From
Johannes Sixt <j6t@kdbg.org>
Date
Jul 11, 2019, 17:11 UTC
Message-ID
<ca11f7c4-d6d4-3813-3066-37775ce3f48f@kdbg.org>
In-Reply-To
<xmqqa7dlu40d.fsf@gitster-ct.c.googlers.com>
Am 10.07.19 um 20:40 schrieb Junio C Hamano:
Show 33 quoted lines
> Heiko Voigt <hvoigt@hvoigt.net> writes:
> 
>> behavior. How about '--all-include-head'. Then e.g.
>>
>>     git rev-parse --all-include-head --all --not origin/master
>>
>> would include the head ref like you proposed below?
>>
>> What do you think? Or would you rather go the route of changing
>> rev-parse behavior?
> 
> Depends on what you mean by the above.  Do you mean that now the end
> user needs to say
> 
> 	gitk --all-include-head --not origin/master
> 
> to get a rough equivalent of
> 
> 	git log --graph --oneline --all --not origin/master
> 
> due to the discrepancy between how "rev-parse" and "rev-list" treat
> their "--all" option?  Or do you mean that the end user still says
> "--all", and after (reliably by some means) making sure that "--all"
> given by the end-user is a request for "all refs and HEAD", we turn
> that into the above internal rev-parse call?
> 
> If the former, then quite honestly, we shouldn't doing anything,
> perhaps other than reverting 4d5e1b1319.  The users can type
> 
> 	$ gitk --all HEAD --not origin/master
> 	$ gitk $commit --not --all HEAD
> 
> themselves, instead of --all-include-head.

When --all is in the game, HEAD of the current worktree isn't all that special among the heads of all worktrees, I would think. What if we added a new option --heads that incorporates all worktree heads?

If we require users to type something to tell what they mean, then I think a more generally useful command line option would be preferable over an option that modifies the meaning of another option.

-- Hannes
Previous: Junio C HamanoNext: Heiko Voigt
Message 11 of 12 in “gitk: fix --all behavior combined with --not”
  1. gitk: fix --all behavior combined with --notHeiko Voigt, Jul 4, 2019
  2. Johannes SchindelinJul 4, 2019
  3. Heiko VoigtJul 4, 2019
  4. Junio C HamanoJul 8, 2019
  5. Junio C HamanoJul 9, 2019
  6. Junio C HamanoJul 9, 2019
  7. Heiko VoigtJul 10, 2019
  8. Junio C HamanoJul 10, 2019
  9. Heiko VoigtJul 11, 2019
  10. Junio C HamanoJul 11, 2019
  11. Johannes SixtJul 11, 2019
  12. Heiko VoigtJul 10, 2019

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.