builtin git-mv: support moving directories
This fixes the builtin mv for the test which Josef provided, and also fixes moving directories into existing directories, as noted by Jon Smirl. In case the destination exists, fail early (this cannot be overridden by -f). Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
This commit is contained in:

committed by
Junio C Hamano

parent
11be42a476
commit
ac64a72207
@ -74,4 +74,8 @@ test_expect_success \
|
||||
git-diff-tree -r -M --name-status HEAD^ HEAD | \
|
||||
grep -E "^R100.+path2/README.+path1/path2/README"'
|
||||
|
||||
test_expect_failure \
|
||||
'do not move directory over existing directory' \
|
||||
'mkdir path0 && mkdir path0/path2 && git-mv path2 path0'
|
||||
|
||||
test_done
|
||||
|
Reference in New Issue
Block a user