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

Re: topological index field for commit objects

From
Stefan Beller <sbeller@google.com>
Date
Jun 29, 2016, 20:20 UTC
Message-ID
<CAGZ79kY6Ry+DfO90wza_RrVbCRAgNB4N=0W6svuJgvGNxeFh5Q@mail.gmail.com>
In-Reply-To
<CAPc5daVC-+0Vr30L_pbcL0GN2OmnGm-+V4tE2WTos_vPRb_S1g@mail.gmail.com>
On Wed, Jun 29, 2016 at 11:59 AM, Junio C Hamano <gitster@pobox.com> wrote:
Show 8 quoted lines
> On Wed, Jun 29, 2016 at 11:31 AM, Marc Strapetz
> <marc.strapetz@syntevo.com> wrote:
>> This is no RFE but rather recurring thoughts whenever I'm working with
>> commit graphs: a topological index attribute for commit objects would be
>> incredible useful. By "topological index" I mean a simple integer for which
>> following condition holds true:
>
> Look for "generation numbers" in the list archive, perhaps?
Thanks for the pointer to the interesting discussions.

In http://www.spinics.net/lists/git/msg161363.html Linus wrote in a discussion with Jeff:

> Right now, we do *have* a "generation number". It's just that it's
> very easy to corrupt even by mistake. It's called "committer date". We
> could improve on it.

Would it make sense to refuse creating commits that have a commit date prior to its parents commit date (except when the user gives a `--dammit-I-know-I-break-a-wildy-used-heuristic`)?

With the proposal to refuse an earlier committer date we would avoid
the corruption by mistake and only allow for corruption by actual
users intention. And then going forward we could rely more on the
committer date than we do today (i.e. some algorithms can go faster)?
For that we'd
 * need to document, what stuff actually breaks if the user overwrites
    the committer date to be earlier
 * and add a switch `--go-slow-because-dates-are-broken`

This seems to be the easiest fix in 2016 to me as that would require to make just a very small change in commit creation, and we can postpone the second part (relying even more on dates) until someone wants to fix it?

Thanks, Stefan

> --
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous: Junio C HamanoNext: Junio C Hamano
Message 3 of 31 in “topological index field for commit objects”
  1. Marc StrapetzJun 29, 2016
  2. Junio C HamanoJun 29, 2016
  3. Stefan BellerJun 29, 2016
  4. Junio C HamanoJun 29, 2016
  5. Jeff KingJun 29, 2016
  6. Jakub NarębskiJun 29, 2016
  7. Jeff KingJun 29, 2016
  8. Junio C HamanoJun 29, 2016
  9. Jeff KingJun 29, 2016
  10. Johannes SchindelinJul 5, 2016
  11. Jakub NarębskiJul 5, 2016
  12. Jakub NarębskiJun 30, 2016
  13. Linus TorvaldsJun 30, 2016
  14. Jakub NarębskiJun 30, 2016
  15. Mike HommeyJun 30, 2016
  16. Jeff KingJul 1, 2016
  17. Marc StrapetzJul 1, 2016
  18. Jakub NarębskiJul 1, 2016
  19. Junio C HamanoJul 1, 2016
  20. Jeff KingJul 1, 2016
  21. Jakub NarębskiJul 1, 2016
  22. Jakub NarębskiJul 20, 2016
  23. Jeff KingJul 20, 2016
  24. Jakub NarębskiFeb 4, 2017
  25. Jeff KingFeb 17, 2017
  26. Jakub NarębskiFeb 17, 2017
  27. Stefan BellerJun 29, 2016
  28. Stefan BellerJun 29, 2016
  29. Jeff KingJun 29, 2016
  30. Marc StrapetzJun 29, 2016
  31. Jakub NarębskiJun 29, 2016

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.