diff options
author | Junio C Hamano <gitster@pobox.com> | 2009-02-04 22:49:07 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2009-02-04 22:49:07 +0300 |
commit | 745bc77604f56d9253958fbcab81c4a8cd3bf170 (patch) | |
tree | 304b5899cdea5a181afce74dc3d695eeddecf988 /t/t7001-mv.sh | |
parent | f0817310903312bbc243dd80f066e17a8e0e4b1d (diff) | |
parent | 5aed3c6ab834367292bd7a9b0894177a07afd910 (diff) |
Merge branch 'maint-1.6.0' into maint
* maint-1.6.0:
builtin-mv.c: check for unversionned files before looking at the destination.
Add a testcase for "git mv -f" on untracked files.
Missing && in t/t7001.sh.
Diffstat (limited to 't/t7001-mv.sh')
-rwxr-xr-x | t/t7001-mv.sh | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/t/t7001-mv.sh b/t/t7001-mv.sh index ef2e78f9df..8fb3a56838 100755 --- a/t/t7001-mv.sh +++ b/t/t7001-mv.sh @@ -55,9 +55,17 @@ test_expect_success \ git mv -k untracked1 untracked2 path0 && test -f untracked1 && test -f untracked2 && - test ! -f path0/untracked1 + test ! -f path0/untracked1 && test ! -f path0/untracked2' +test_expect_success \ + '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 \ |