git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* fast-import should not care about core.ignorecase
@ 2014-12-09  0:12 Mike Hommey
  2014-12-09  0:22 ` Mike Hommey
  2014-12-09  1:07 ` Joshua Jensen
  0 siblings, 2 replies; 12+ messages in thread
From: Mike Hommey @ 2014-12-09  0:12 UTC (permalink / raw)
  To: git

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

^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2015-04-24  9:42 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-12-09  0:12 fast-import should not care about core.ignorecase Mike Hommey
2014-12-09  0:22 ` 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

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).