From: Junio C Hamano <junkio@cox.net>
To: "Michael Cassar" <m.e.cassar@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: [BUG] 'git mv a/fileA b/fileB' causes 'c/fileC' to be deleted
Date: Sun, 01 Oct 2006 10:34:04 -0700 [thread overview]
Message-ID: <7vpsdc0wkz.fsf@assigned-by-dhcp.cox.net> (raw)
In-Reply-To: <750170aa0610010721p66899ba5pcc7efa13be4cd10a@mail.gmail.com> (Michael Cassar's message of "Mon, 2 Oct 2006 00:21:38 +1000")
"Michael Cassar" <m.e.cassar@gmail.com> writes:
> Is this just me being an idiot, or could there be a bigger problem
> here?
>
> Please CC me in any replies.
There could be a bigger problem, but it does not seem to easily
reproduce as you noted in the message. It could be that some
unrelated thing in the working tree is playing a role in this
breakage, but I do not think of offhand what that is.
Here is what I just ran.
-- >8 cut >8 --
#!/bin/sh
report () {
echo
echo "* $*"
echo
}
rm -fr test0
mkdir test0
cd test0
report working tree preparation
mkdir -p partA papers/unsorted papers/all-papers
echo outline >partA/outline.txt
echo Thesis >papers/unsorted/Thesis.pdf
report repository initialization
git init-db
report initial import
git add papers partA
git commit -m 'initial'
git show --root --stat --summary
report run mv
git mv papers/unsorted/Thesis.pdf papers/all-papers/Thesis.pdf
report before commit
git diff --stat HEAD
report make a commit
git commit -m 'moved a file'
report final result
git show --stat --summary
-- 8< cut 8< --
and I did not see the breakage. Care to show a bit more details
on your working tree? I do not think this depends on any
contents of the individual files, but
> Here is a transcript. These results are reproducable using the same
> files, but I can't seem to reproduce with different files.
>
> ## Create initial respository
>
> [mike@simba ~] git version
> git version 1.4.2.1
>
> [mike@simba ~] mkdir repos; cd repos
>
> [mike@simba ~/repos] git init-db
> defaulting to local storage area
>
> [mike@simba ~/repos] cp -r ~/thesis_work/* .
>
> [mike@simba ~/repos] ls -a
> . .. .git metathesis notes papers partA
>
> [mike@simba ~/repos] git add metathesis notes papers partA
output from "find metathesis notes papers partA -ls" and "git
ls-files -s" at this step may be a starter.
next prev parent reply other threads:[~2006-10-01 17:34 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-01 14:21 [BUG] 'git mv a/fileA b/fileB' causes 'c/fileC' to be deleted Michael Cassar
2006-10-01 17:34 ` Junio C Hamano [this message]
2006-10-02 1:33 ` Michael Cassar
2006-10-02 5:05 ` Junio C Hamano
2006-10-02 5:20 ` Junio C Hamano
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=7vpsdc0wkz.fsf@assigned-by-dhcp.cox.net \
--to=junkio@cox.net \
--cc=git@vger.kernel.org \
--cc=m.e.cassar@gmail.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).