From: Junio C Hamano <gitster@pobox.com>
To: "Johannes Schindelin via GitGitGadget" <gitgitgadget@gmail.com>
Cc: git@vger.kernel.org, Johannes Schindelin <johannes.schindelin@gmx.de>
Subject: Re: [PATCH v3 1/1] abspath_part_inside_repo: respect core.fileMode
Date: Tue, 25 Dec 2018 17:46:52 +0900 [thread overview]
Message-ID: <xmqqa7kuat8j.fsf@gitster-ct.c.googlers.com> (raw)
In-Reply-To: <xmqqftumb8zv.fsf@gitster-ct.c.googlers.com> (Junio C. Hamano's message of "Tue, 25 Dec 2018 12:06:28 +0900")
Junio C Hamano <gitster@pobox.com> writes:
> the resulting index entry is "blub" or "BLUB". Shouldn't we verify
> that "git add" adds an expected path to the index, instead of
> blindly trusting that it says "Yeah, I did as I was told" with its
> exit status? Would we be adding 'blub' as that is what we told
> 'git' to add, or would it be 'BLUB' as that is what exists on the
> filesystem that is case insensitive but case preserving?
Needless to say, the last part of the above is a mere thetorical
question, and I am not questioning the established behaviour or
suggesting to "improve" it. On a case insensitive filesystem, we
trust what readdir() gave us (but match them with pathspec case
insensitively) for a new path that is not in the index. When we
update the contents of a path that is already in the index, we
preserve the case in the index, even when readdir() reports the same
path in different case (iow, we trust the case in the index more
than what readdir() gives us)..
What I am wondering in the above is if we should document that in
the test, perhaps with a simple
git ls-files blub >actual &&
echo BLUB >expect &&
test_cmp expect actual
or something like that.
next prev parent reply other threads:[~2018-12-25 8:46 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-21 11:32 [PATCH 0/1] Make abspath() aware of case-insensitive filesystems Johannes Schindelin via GitGitGadget
2018-12-21 11:32 ` [PATCH 1/1] abspath_part_inside_repo: respect core.fileMode Johannes Schindelin via GitGitGadget
2018-12-22 18:11 ` Carlo Arenas
2018-12-24 18:54 ` Johannes Schindelin
2018-12-24 22:34 ` [PATCH v2 0/1] Make abspath() aware of case-insensitive filesystems Johannes Schindelin via GitGitGadget
2018-12-24 22:34 ` [PATCH v2 1/1] abspath_part_inside_repo: respect core.fileMode Johannes Schindelin via GitGitGadget
2018-12-25 10:42 ` Torsten Bögershausen
2019-01-18 12:58 ` Johannes Schindelin
2018-12-24 22:56 ` [PATCH v3 0/1] Make abspath() aware of case-insensitive filesystems Johannes Schindelin via GitGitGadget
2018-12-24 22:56 ` [PATCH v3 1/1] abspath_part_inside_repo: respect core.fileMode Johannes Schindelin via GitGitGadget
2018-12-25 3:06 ` Junio C Hamano
2018-12-25 8:46 ` Junio C Hamano [this message]
2019-01-18 12:55 ` Johannes Schindelin
2019-01-18 13:24 ` [PATCH v4 0/1] Make abspath() aware of case-insensitive filesystems Johannes Schindelin via GitGitGadget
2019-01-18 13:24 ` [PATCH v4 1/1] abspath_part_inside_repo: respect core.ignoreCase Johannes Schindelin via GitGitGadget
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=xmqqa7kuat8j.fsf@gitster-ct.c.googlers.com \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=gitgitgadget@gmail.com \
--cc=johannes.schindelin@gmx.de \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).