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

Re: [PATCH] patch-ids: handle duplicate hashmap entries

From
Junio C Hamano <gitster@pobox.com>
Date
Jan 13, 2021, 19:28 UTC
Message-ID
<xmqqk0sgy6tz.fsf@gitster.c.googlers.com>
In-Reply-To
<20210113092448.GE32482@sync>
Arnaud Morin <arnaud.morin@gmail.com> writes:
Show 17 quoted lines
> Without this patch, that's even worst, consistency is broken.
> Let me explain.
>
> With your history example:
>
>      ---o---o---M---o---o---W---o---o---M---o--- branch
>          \
>           o---o---o---M---o--- master
>
> # WITHOUT PATCH
> If we imagine that master is having more commits count than branch.
> The result of rev-list will be like you described:
> $ git rev-list --left-right --cherry-pick branch...master
> <M
> <W
>
> In other words, it's showing both W and M.

So, at least they cancel out and the reader can tell that the net effect was none --- that is "sort of understandable" result.

Show 5 quoted lines
> BUT, if we imagine now that master is having less commits count than branch.
> $ git rev-list --left-right --cherry-pick branch...master
> <W
>
> It's only showing W!
Which is what I felt misleading.
Show 5 quoted lines
> # WITH PATCH
> With the patch, everything is consistent, and only W is kept in ouptut,
> no matter the size of history:
> $ git.p rev-list --left-right --cherry-pick branch...master
> <W

So with the patch, the former case is made the same as the latter misleading result, which would mean that they are consistently misleading?

I guess that it is better to be misleading all the time than being "sort of understandable" half the time and misleading the rest of time. At least that is consistent.

Thanks.
Previous: Jeff King
Message 15 of 15 in “rev-list with multiple commits sharing same patch-id”
  1. Arnaud MorinJan 9, 2021
  2. Arnaud MorinJan 11, 2021
  3. Christian CouderJan 11, 2021
  4. Arnaud MorinJan 11, 2021
  5. Jeff KingJan 12, 2021
  6. Jeff KingJan 12, 2021
  7. Arnaud MorinJan 12, 2021
  8. patch-ids: handle duplicate hashmap entriesJeff King, Jan 12, 2021
  9. Arnaud MorinJan 12, 2021
  10. Junio C HamanoJan 12, 2021
  11. Arnaud MorinJan 13, 2021
  12. Jeff KingJan 13, 2021
  13. Junio C HamanoJan 13, 2021
  14. Jeff KingJan 13, 2021
  15. Junio C HamanoJan 13, 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.