From: Junio C Hamano <gitster@pobox.com>
To: Orgad Shaneh <orgads@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: Case rename not detected
Date: Mon, 04 May 2015 23:17:55 -0700 [thread overview]
Message-ID: <xmqqzj5jeeek.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <CAGHpTBJuRCrg5jL7Anm9kxGJEf5cUmPzDToZG0UXeT_xNMWfsg@mail.gmail.com> (Orgad Shaneh's message of "Tue, 5 May 2015 08:52:08 +0300")
Orgad Shaneh <orgads@gmail.com> writes:
> File case rename is not detected correctly on case-insensitive
> filesystems. git mv does support it though.
It is a very much deliberate design decision to keep the case
recorded in the index on case insensitive filesystems, where people
can screw up the case of files they obtained from the project
without even meaning to do so, as these filesystems and tools on
them can carelessly change cases---after all, the case doesn't
matter to these tools, but the people who interact with your work
result via Git do---so we trust what Git initially gave you
(e.g. via "checkout") more than the filesystem.
To effect the same as "git mv" at the end-user level, you would need
to remove the entry from the index and re-add it. I.e.
> git init
> echo hello > foo
> git add foo
> git commit -m initial
> mv foo Foo
> git status # No changes
git rm --cached foo ;# Foo should also work here, I think
git add Foo ;# you should not say 'foo' here
> git add . -A # Doesn't add anything
>
> - Orgad
next prev parent reply other threads:[~2015-05-05 6:18 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-05 5:52 Case rename not detected Orgad Shaneh
2015-05-05 6:17 ` Junio C Hamano [this message]
2015-05-05 6:27 ` Orgad Shaneh
2015-05-06 20:00 ` Torsten Bögershausen
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=xmqqzj5jeeek.fsf@gitster.dls.corp.google.com \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=orgads@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 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).