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

Re: DEVEL: Help with feature implementation

From
Junio C Hamano <gitster@pobox.com>
Date
Jan 18, 2021, 22:54 UTC
Message-ID
<xmqqzh15j1ot.fsf@gitster.c.googlers.com>
In-Reply-To
<C8MIWAN0N50F.235740W7QGT05@localhost>
"Aiyee Bee" <shane.880088.supw@gmail.com> writes:
> Maybe a more practical (but still pretty unusual) solution would be adding
> counters to each commit that tell us how many times they have been traversed
> Through various histories?

The "--show-forkpoints" output shown there at http://ix.io/2Ms6 looks interesting. I think you'd need only 1 bit counter (i.e. "have we visited it only once, or more than once" bit) for your purpose? You traverse from F and Z and the first time you reach C (probably through the F->E->D->C path), you see no SEEN flag on the object so leave the new bit alone, and then when the traverse reaches C again (this time through the Z->Y->C path), while stopping further traversal because you notice C is already SEEN, you mark it with the new bit so record that it has been visited at least twice.

Previous: Aiyee BeeNext: Aiyee Bee
Message 5 of 16 in “DEVEL: Help with feature implementation”
  1. Aiyee BeeJan 18, 2021
  2. Antonio RussoJan 18, 2021
  3. Derrick StoleeJan 18, 2021
  4. Aiyee BeeJan 18, 2021
  5. Junio C HamanoJan 18, 2021
  6. Aiyee BeeJan 18, 2021
  7. Aiyee BeeJan 18, 2021
  8. Derrick StoleeJan 18, 2021
  9. Antonio RussoJan 19, 2021
  10. Junio C HamanoJan 19, 2021
  11. Antonio RussoJan 19, 2021
  12. Derrick StoleeJan 20, 2021
  13. Derrick StoleeJan 19, 2021
  14. Aiyee BeeJan 19, 2021
  15. Aiyee BeeJan 19, 2021
  16. Antonio RussoJan 19, 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.