From: "Constantine Plotnikov" <constantine.plotnikov@gmail.com>
To: git@vger.kernel.org
Subject: Move-delete merge conflict is not displayed using git ls-files --unmerged
Date: Mon, 22 Dec 2008 17:29:02 +0300 [thread overview]
Message-ID: <85647ef50812220629o46134a70waf159bb6cd6d6e72@mail.gmail.com> (raw)
Lets consider repository state created with the following script (git
version 1.6.0.4).
mkdir test-move-delete
cd test-move-delete
git init
echo test1 >file.txt
echo test2 >>file.txt
echo test3 >>file.txt
echo test4 >>file.txt
git add file.txt
git commit -m "start"
git checkout -b moved master
git mv file.txt copy.txt
git commit -m "moved"
git checkout -b deleted master
git rm file.txt
git commit -m "deleted"
git merge moved
The last merge command fails with move-delete conflict.
CONFLICT (rename/delete): Renamed file.txt->copy.txt in moved and
deleted in HEAD
Automatic merge failed; fix conflicts and then commit the result.
However git ls-files --unmerged does not list any conflict in that
case and it is possible to execute git commit command right away
without doing anything with the repository.
I think that if git merge reports the conflicts, such conflicts should
be discoverable using git ls-files and prevent commit with resolving
the conflict like it is done with modify-delete conflicts.
Regards,
Constantine
next reply other threads:[~2008-12-22 14:30 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-12-22 14:29 Constantine Plotnikov [this message]
2008-12-22 20:48 ` Move-delete merge conflict is not displayed using git ls-files --unmerged Junio C Hamano
2008-12-22 22:10 ` [PATCH] merge-recursive: mark rename/delete conflict as unmerged Johannes Schindelin
2008-12-22 23:12 ` Junio C Hamano
2008-12-23 16:20 ` Johannes Schindelin
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=85647ef50812220629o46134a70waf159bb6cd6d6e72@mail.gmail.com \
--to=constantine.plotnikov@gmail.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).