]> git.ipfire.org Git - thirdparty/git.git/commit
git-mv: improve error message for conflicted file
authorChris Torek <chris.torek@gmail.com>
Mon, 20 Jul 2020 06:17:52 +0000 (06:17 +0000)
committerJunio C Hamano <gitster@pobox.com>
Mon, 20 Jul 2020 21:35:43 +0000 (14:35 -0700)
commit9b906af657d4ec0bc8fc01c5cbbbddb582a8cac6
tree7fed6466b79861f967bf3460a4070314012a294b
parentaf6b65d45ef179ed52087e80cb089f6b2349f4ec
git-mv: improve error message for conflicted file

'git mv' has always complained about renaming a conflicted
file, as it cannot handle multiple index entries for one file.
However, the error message it uses has been the same as the
one for an untracked file:

    fatal: not under version control, src=...

which is patently wrong.  Distinguish the two cases and
add a test to make sure we produce the correct message.

Signed-off-by: Chris Torek <chris.torek@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/mv.c
t/t7001-mv.sh