From: Mike Hommey <mh@glandium.org>
To: git@vger.kernel.org
Subject: fast-import should not care about core.ignorecase
Date: Tue, 9 Dec 2014 09:12:11 +0900 [thread overview]
Message-ID: <20141209001211.GA13386@glandium.org> (raw)
Hi,
As you now know, I'm working on a mercurial remote helper for git. As
such, it uses fast-import.
In the mercurial history of mozilla-central, there have been various
renames of files with only case changes, and it so happens that my
remote helper blows things up on case insensitive file systems. The
reason is git clone probing the file system and setting core.ignorecase
appropriately.
While it makes sense for checkouts and local commits, it doesn't make
sense to me that using git fast-import with the same import script would
have a different behavior depending on whether the file system is
case-sensitive or not.
Reduced testcase:
$ git init
$ git fast-import <<EOF
blob
mark :1
data 2
a
commit refs/FOO
committer <foo@foo> 0 +0000
data 0
M 644 :1 a
commit refs/FOO
committer <foo@foo> 0 +0000
data 0
R a A
EOF
This is what you get on a case sensitive FS:
$ git log refs/FOO -p -M
commit be1497308f30f883343eefd0da7ddf1e747133f8
Author: <foo@foo>
Date: Thu Jan 1 00:00:00 1970 +0000
diff --git a/a b/A
similarity index 100%
rename from a
rename to A
commit 8d37f958cfc0702c577b918c86769a902fe109f8
Author: <foo@foo>
Date: Thu Jan 1 00:00:00 1970 +0000
diff --git a/a b/a
new file mode 100644
index 0000000..7898192
--- /dev/null
+++ b/a
@@ -0,0 +1 @@
+a
This is what you get on a case insensitive FS:
$ git log refs/FOO -p -M
commit 208c0c4cf58cd54512301e0de33ccb8a78d6b226
Author: <foo@foo>
Date: Thu Jan 1 00:00:00 1970 +0000
commit 8d37f958cfc0702c577b918c86769a902fe109f8
Author: <foo@foo>
Date: Thu Jan 1 00:00:00 1970 +0000
diff --git a/a b/a
new file mode 100644
index 0000000..7898192
--- /dev/null
+++ b/a
@@ -0,0 +1 @@
+a
Note, this applies equally to filerename commands or filedelete +
filemodify combinations.
Mike
next reply other threads:[~2014-12-09 0:12 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-09 0:12 Mike Hommey [this message]
2014-12-09 0:22 ` fast-import should not care about core.ignorecase Mike Hommey
2014-12-09 1:07 ` Joshua Jensen
2014-12-09 1:31 ` Jonathan Nieder
2014-12-09 3:20 ` Joshua Jensen
2014-12-09 20:19 ` Junio C Hamano
2015-04-17 11:52 ` [PATCH] fast-import: add options to enable/disable case folding Mike Hommey
2015-04-17 16:56 ` Torsten Bögershausen
2015-04-17 18:44 ` Junio C Hamano
2015-04-18 7:36 ` Mike Hommey
2015-04-24 9:42 ` Luke Diamand
2015-04-17 19:57 ` Eric Sunshine
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=20141209001211.GA13386@glandium.org \
--to=mh@glandium.org \
--cc=git@vger.kernel.org \
/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).