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

Re: [PATCH] Additional merge-base tests

From
A Large Angry SCM <gitzilla@gmail.com>
Date
Jul 5, 2006, 16:15 UTC
Message-ID
<44ABE596.40103@gmail.com>
In-Reply-To
<Pine.LNX.4.63.0607050952140.29667@wbgn013.biozentrum.uni-wuerzburg.de>
Johannes Schindelin wrote:
Show 35 quoted lines
> Hi,
> 
> On Tue, 4 Jul 2006, A Large Angry SCM wrote:
> 
>> Johannes Schindelin wrote:
>>> Hi,
>>>
>>> On Tue, 4 Jul 2006, Junio C Hamano wrote:
>>>
>>>> Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
>>>>
>>>>> We could introduce a time.maximumSkew variable, and just walk only that
>>>>> much further when traversing the commits.
>>>> We could have had "commit generation number" in the commit
>>>> object header, and use that instead of commit timestamps for
>>>> these traversal purposes.  The generation number for a commit is
>>>> defined to be max(generation number of its parents)+1 and we
>>>> prime the recursive this definition by defining the generation
>>>> number for the root commit to be one.
>>> Are you really, really sure this is a remedy? I, for one, am quite sure of
>>> the opposite. What you propose is just another time scale, only this time,
>>> it is not universally true (not even minus local incompetence to keep the
>>> clock accurate).
>> It works[*] and it does what using the timestamp was trying to do. Namely,
>> work from "more recent" (or "closer") commits toward "older" (or "farther")
>> commits until you've gone past the point you care about.
>>
>> It's a little late to be changing the structure of a commit and you'd have to
>> deal with some size/scale issues, but it's do-able. A better idea may be to
>> generate and keep the generation number on a per repository basis, and you'd
>> be able to work around changing grafts.
> 
> Like, inside the cache? I dunno. IMHO it is way too late to change the 
> structure of a commit in that particular manner, _plus_ you would get 
> overflow issues.

Your don't need to change the commit object, create some repository specific, local, auxiliary information. Overflow should not be a problem until a path length to a root commit exceeds the machine word size.

But is it really worth the work? Does it help anything other than merge-base?

Show 5 quoted lines
>> [*] Grafts do _really_ nasty things to this. Just like clock skew does now.
> 
> Grafts can do much nastier things to you, for example having a circular 
> history. _But_ they cannot do that nasty thing outside of your repo. Clock 
> skews can.

If grafts in your repository create a cycle, the misbehavior of merge-base should be among the least of your concerns.

Previous: Johannes SchindelinNext: Johannes Schindelin
Message 21 of 26 in “Additional merge-base tests”
  1. Additional merge-base testsA Large Angry SCM, Jul 4, 2006
  2. Junio C HamanoJul 4, 2006
  3. A Large Angry SCMJul 4, 2006
  4. Junio C HamanoJul 4, 2006
  5. Junio C HamanoJul 4, 2006
  6. Johannes SchindelinJul 4, 2006
  7. Junio C HamanoJul 4, 2006
  8. Jakub NarebskiJul 4, 2006
  9. Johannes SchindelinJul 4, 2006
  10. Johannes SchindelinJul 4, 2006
  11. A Large Angry SCMJul 4, 2006
  12. Junio C HamanoJul 4, 2006
  13. Johannes SchindelinJul 4, 2006
  14. Junio C HamanoJul 4, 2006
  15. A Large Angry SCMJul 4, 2006
  16. Jakub NarebskiJul 4, 2006
  17. Junio C HamanoJul 4, 2006
  18. A Large Angry SCMJul 5, 2006
  19. Junio C HamanoJul 5, 2006
  20. Johannes SchindelinJul 5, 2006
  21. A Large Angry SCMJul 5, 2006
  22. Johannes SchindelinJul 5, 2006
  23. Josef WeidendorferJul 5, 2006
  24. A Large Angry SCMJul 5, 2006
  25. A Large Angry SCMJul 4, 2006
  26. Junio C HamanoJul 5, 2006

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.