From: Kevin Daudt <me@ikke.info>
To: Bill Okara <billokara@gmail.com>
Cc: git@vger.kernel.org, Junio C Hamano <gitster@pobox.com>,
Stefan Beller <sbeller@google.com>
Subject: Re: git mv messed up file mapping if folders contain identical files
Date: Thu, 25 Feb 2016 12:49:58 +0100 [thread overview]
Message-ID: <20160225114958.GC15324@ikke.info> (raw)
In-Reply-To: <CADsr5c_Hk34KBN06dM9Hk5HPW9-Mt3eZLMgvyes8sSgxCA-k0w@mail.gmail.com>
On Wed, Feb 24, 2016 at 04:38:11PM -0700, Bill Okara wrote:
> Hi,
>
> I noticed the following 'git mv' issue with:
> git version 2.6.4
>
>
> If there are identical files in different subfolders, 'git mv' the
> root folder (and/or each file individually) will mess up the file path
> mapping. that is, if having identical 'content.txt' file under
> gitmvtest
> |--demo/content.txt
> |--dev/content.txt
> |--prod/content.txt
>
> after doing the "git mv gitmvtest/resources
> gitmvtest/src/main/resources", the 'git status' will show:
>
> renamed: gitmvtest/resources/demo/content.txt ->
> gitmvtest/src/main/resources/demo/content.txt
> renamed: gitmvtest/resources/prod/content.txt ->
> gitmvtest/src/main/resources/dev/content.txt <== NOTE:
> wrongly mapped the prod/content.txt to dev/content.txt
> renamed: gitmvtest/resources/dev/content.txt ->
> gitmvtest/src/main/resources/prod/content.txt <== NOTE:
> wrongly mapped the dev/content.txt to prod/content.txt
>
> I tried running 'git mv' on each file individually, got the same problem:
> > git mv gitmvtest/resources/demo/content.txt gitmvtest/src/main/resources/demo/content.txt
> > git mv gitmvtest/resources/dev/content.txt gitmvtest/src/main/resources/dev/content.txt
> > git mv gitmvtest/resources/prod/content.txt gitmvtest/src/main/resources/prod/content.txt
>
> > git status
> renamed: gitmvtest/resources/demo/content.txt ->
> gitmvtest/src/main/resources/demo/content.txt
> renamed: gitmvtest/resources/prod/content.txt ->
> gitmvtest/src/main/resources/dev/content.txt <== WRONG
> renamed: gitmvtest/resources/dev/content.txt ->
> gitmvtest/src/main/resources/prod/content.txt <== WRONG
>
>
> NOTE:
> =======
> if modified the content.txt in the 3 folders to contain different
> data, then repeating the above 'git mv' will produce correct result,
>
> renamed: gitmvtest/resources/demo/content.txt ->
> gitmvtest/src/main/resources/demo/content.txt <== CORRECT
> renamed: gitmvtest/resources/dev/content.txt ->
> gitmvtest/src/main/resources/dev/content.txt <== CORRECT
> renamed: gitmvtest/resources/prod/content.txt ->
> gitmvtest/src/main/resources/prod/content.txt <== CORRECT
>
>
>
> just want to see if this is a bug, user error (on my end), or??
>
This looks like the same issue as submodule--helper list has:
http://article.gmane.org/gmane.comp.version-control.git/287227
next prev parent reply other threads:[~2016-02-25 11:50 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-24 23:38 git mv messed up file mapping if folders contain identical files Bill Okara
2016-02-24 23:39 ` Junio C Hamano
2016-02-24 23:51 ` Bill Okara
2016-02-25 0:03 ` Bill Okara
2016-02-25 11:49 ` Kevin Daudt [this message]
2016-02-25 13:56 ` Stefan Beller
2016-02-25 16:25 ` Bill Okara
2016-02-26 11:50 ` SZEDER Gábor
2016-02-26 15:48 ` Bill Okara
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=20160225114958.GC15324@ikke.info \
--to=me@ikke.info \
--cc=billokara@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=sbeller@google.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.