git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Philippe Martens" <philippe.martens@metrum.lu>
To: <git@vger.kernel.org>, <msysgit@googlegroups.com>
Subject: bug: git fast-import should ignore configuration variable core.ignorecase (plain text format)
Date: Sun, 22 Apr 2012 20:12:12 +0200	[thread overview]
Message-ID: <001e01cd20b3$70b72ce0$522586a0$@metrum.lu> (raw)

[-- Attachment #1: Type: text/plain, Size: 1269 bytes --]

Hello,

I’m not quite sure if this is to be considered a Windows specific bug. I’m
using Git-1.7.10-preview20120409 on Windows, but the problem exists in
previous versions.

When fast-exporting | fast-importing on Windows a repository with case only
renames, the resulting repository isn’t a copy of the initial repository.
This is because Windows repositories are created with core.ignorecase = true
by default.

The included script shows the problem: it creates a repository with
SomeFile.txt renamed to SOMEFILE.txt, then fast-export it and fast-import it
in two different repositories, with core.ignorecase=false and
core.ignorecase=true. The sha-1 of the second commit in the repository with
core.ignorecase=true is different from the initial repository because the
rename is ignored.
The situation is worse without rename detection on fast-export : the rename
becomes a delete.

I think the configuration variable core.ignorecase should be ignored by
fast-import, and case always taken into account in that case.

Kind regards,

Philippe Martens
Lead Architect

METRUM
Rue du Kiem, 163
L-8030 Strassen
Tél : +352 26 00 87 01
Fax : +352 26 00 87 02
GSM : +352 661 26 00 37
Email : philippe.martens@metrum.lu
Web : www.metrum.lu

[-- Attachment #2: test-fast-import.sh --]
[-- Type: application/octet-stream, Size: 612 bytes --]

git init export
cd export
git config core.ignorecase true
echo "With some content in it..." > SomeFile.txt
git add .
git commit -m "Add some file"
git mv -f SomeFile.txt SOMEFILE.txt
git commit -m "Rename it (case only)"
git fast-export --all -M -C > ../git.fast-export
git log --oneline

git init ../ignorecase.false
cd ../ignorecase.false
git config core.ignorecase false
git fast-import --quiet < ../git.fast-export
git log --oneline

git init ../ignorecase.true
cd ../ignorecase.true
git config core.ignorecase true
git fast-import --quiet < ../git.fast-export
git log --oneline
cd ..

                 reply	other threads:[~2012-04-22 18:12 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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='001e01cd20b3$70b72ce0$522586a0$@metrum.lu' \
    --to=philippe.martens@metrum.lu \
    --cc=git@vger.kernel.org \
    --cc=msysgit@googlegroups.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).