git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Simeon Maxein <smaxein@googlemail.com>
To: git@vger.kernel.org
Subject: Problems with extra files on git filter-branch when core.ignorecase is true
Date: Sun, 29 Aug 2010 00:21:41 +0200	[thread overview]
Message-ID: <AANLkTinEYNxKAAhq2O3joNYYrAmr=zRrUR3BakircnJW@mail.gmail.com> (raw)

Today when trying to change the contents of a repository with git
filter-branch, a tool that was run on a part of the working tree for
each version reported an extra file that couldn't be accounted for.
After some testing and a small discussion on the irc channel, I was
able to come up with the following scenario to reproduce the issue.
The test was performed under Ubuntu with Git 1.7.0.4 on a case
sensitive file system:

> ~$ mkdir gittest
> ~$ cd gittest
> ~/gittest$ git init
> Initialized empty Git repository in /home/user/gittest/.git/
> ~/gittest$ git config core.ignorecase true
> ~/gittest$ echo 'foo' > testfile.txt
> ~/gittest$ git add testfile.txt
> ~/gittest$ git commit -m "initial commit"
> [master (root-commit) 794888c] initial commit
>  1 files changed, 1 insertions(+), 0 deletions(-)
>  create mode 100644 testfile.txt
> ~/gittest$ git rm testfile.txt
> rm 'testfile.txt'
> ~/gittest$ echo 'bar' > testFile.txt
> ~/gittest$ git add testFile.txt
> ~/gittest$ git commit -m "additional commit"
> [master a669956] additional commit
>  2 files changed, 1 insertions(+), 1 deletions(-)
>  create mode 100644 testFile.txt
>  delete mode 100644 testfile.txt
> ~/gittest$ git filter-branch --tree-filter 'ls' master
> Rewrite 794888cdbe107aa7408cc5ed4132dcd3bc2753c8 (1/2)testfile.txt
> Rewrite a66995628af5710828a6a59628553938bc30ee37 (2/2)testfile.txt  testFile.txt
>
> WARNING: Ref 'refs/heads/master' is unchanged

In the second rewrite line, I would only expect testFile.txt to
appear, regardless of the core.ignorecase setting. On a case
insensitive filesystem the above example works correctly.

It might seem strange to set core.ignorecase to true on a case
sensitive filesystem, however, this issue also appears when using a
(case sensitive) tmpfs temp directory to filter a case insensitive
repository.

Thanks in advance for your help.

Simeon

                 reply	other threads:[~2010-08-28 22:21 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

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='AANLkTinEYNxKAAhq2O3joNYYrAmr=zRrUR3BakircnJW@mail.gmail.com' \
    --to=smaxein@googlemail.com \
    --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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).