Re: force deterministic trees on git push - exact sort-order of filenames

2 messages, 2 authors, 2021-10-15 · open the first message on its own page

Re: force deterministic trees on git push - exact sort-order of filenames

From: Junio C Hamano <hidden>
Date: 2021-10-15 18:03:48

milan hauth [off-list ref] writes:
fact: the sort-order of filenames in a tree is not strictly regulated
Untrue, sorry.

The rule is "a tree entry that describes a tree object sorts as if
its pathname component has a trailing slash '/'".  All your sample
trees should satisify that rule (or the implementation of Git that
created such a tree is broken).

In hindsight, if we used the collation order that puts '/' before
all other bytes when sorting the index entries and the tree entries,
it would have made a lot of implemenentation details clean and easier
to work with, but that would have been feasible in early 2005, and
not now.

Re: force deterministic trees on git push - exact sort-order of filenames

From: milan hauth <hidden>
Date: 2021-10-15 18:26:44

aah!

thanks for clarifying this implementation detail

so git trees are deterministic already.
this makes my life much easier : )
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help