From: Junio C Hamano <gitster@pobox.com>
To: milan hauth <milahu@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: force deterministic trees on git push - exact sort-order of filenames
Date: Fri, 15 Oct 2021 11:03:39 -0700 [thread overview]
Message-ID: <xmqq1r4m6u84.fsf@gitster.g> (raw)
In-Reply-To: <CAGiEHCtdjA+cVXjN43NPbSZfrDtr-kDtPMN4x_VTGSJuPZ8bcg@mail.gmail.com> (milan hauth's message of "Fri, 15 Oct 2021 18:04:57 +0200")
milan hauth <milahu@gmail.com> 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.
next prev parent reply other threads:[~2021-10-15 18:03 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-15 16:04 force deterministic trees on git push - exact sort-order of filenames milan hauth
2021-10-15 17:47 ` René Scharfe
2021-10-15 18:03 ` Junio C Hamano [this message]
2021-10-15 18:26 ` milan hauth
2021-10-17 16:10 ` Ævar Arnfjörð Bjarmason
2021-10-18 5:38 ` Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqq1r4m6u84.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=milahu@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.