From: "Alexey Feldgendler" <alexeyf@opera.com>
To: git@vger.kernel.org
Subject: Directory replaced with a file confuses cherry-pick
Date: Fri, 18 Feb 2011 15:06:52 +0100 [thread overview]
Message-ID: <op.vq3qtqtj56e9f9@xman.eng.oslo.osa> (raw)
Hello!
I think I've found a bug. Here is how to reproduce.
1. Create an empty repo.
2. Add the following: file.txt containing "before" and directory problem/
with file problem/content containing "data". Commit this.
3. From here, create a branch and commit a change to file.txt: change it
to say "after".
4. Checkout master.
5. Remove directory problem/ and add a file with the same name (problem)
containing "newdata". Commit this.
6. Try to cherry-pick the commit you made on the side branch on step 3.
Here is what you see:
Automatic cherry-pick failed. After resolving the conflicts,
mark the corrected paths with 'git add <paths>' or 'git rm <paths>'
and commit the result with:
git commit -c 64f21a85fa3deb4d3952b0471f442a76e5147b05
And git-status says:
# On branch master
# Changes to be committed:
# (use "git reset HEAD <file>..." to unstage)
#
# modified: file.txt
#
# Unmerged paths:
# (use "git reset HEAD <file>..." to unstage)
# (use "git add/rm <file>..." as appropriate to mark resolution)
#
# added by us: problem
#
# Untracked files:
# (use "git add <file>..." to include in what will be committed)
#
# problem~HEAD
Expected result: the cherry-pick goes smoothly. The change I'm
cherry-picking (modification of file.txt) has nothing to do with the
problem file/directory. Trying to cherry-pick anything from branches that
stem off from before the change of a directory to a file fails like this.
Known? Is replacing directories with files maybe a taboo?
--
Alexey Feldgendler
Software Developer, Desktop Team, Opera Software ASA
[ICQ: 115226275] http://my.opera.com/feldgendler/
next reply other threads:[~2011-02-18 14:20 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-18 14:06 Alexey Feldgendler [this message]
2011-02-18 14:44 ` Directory replaced with a file confuses cherry-pick Johan Herland
2011-02-18 14:49 ` Alexey Feldgendler
2011-02-18 15:17 ` Johan Herland
2011-02-18 15:30 ` Nick
2011-02-18 20:00 ` Junio C Hamano
-- strict thread matches above, loose matches on Subject: below --
2011-02-18 14:24 Alexey Feldgendler
2011-02-18 14:27 ` Alexey Feldgendler
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=op.vq3qtqtj56e9f9@xman.eng.oslo.osa \
--to=alexeyf@opera.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.
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).