Skip to content

Commit

Permalink
Add a testcase for "git mv -f" on untracked files.
Browse files Browse the repository at this point in the history
This currently fails with:
git: builtin-mv.c:217: cmd_mv: Assertion `pos >= 0' failed.

Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Matthieu Moy authored and Junio C Hamano committed Feb 4, 2009
1 parent 720ec6b commit c8ba6b1
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions t/t7001-mv.sh
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,14 @@ test_expect_success \
test ! -f path0/untracked1 &&
test ! -f path0/untracked2'

test_expect_failure \
'checking -f on untracked file with existing target' \
'touch path0/untracked1 &&
git mv -f untracked1 path0
test ! -f .git/index.lock &&
test -f untracked1 &&
test -f path0/untracked1'

# clean up the mess in case bad things happen
rm -f idontexist untracked1 untracked2 \
path0/idontexist path0/untracked1 path0/untracked2 \
Expand Down

0 comments on commit c8ba6b1

Please sign in to comment.