Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
Merge branch 'mm/mv-file-to-no-such-dir-with-slash'
author
Junio C Hamano
<gitster@pobox.com>
Mon, 13 Jan 2014 19:33:51 +0000
(11:33 -0800)
committer
Junio C Hamano
<gitster@pobox.com>
Mon, 13 Jan 2014 19:33:51 +0000
(11:33 -0800)
Finishing touches to do the same on windows.
* mm/mv-file-to-no-such-dir-with-slash:
mv: let 'git mv file no-such-dir/' error out on Windows, too
builtin/mv.c
patch
|
blob
|
history
raw
(from parent 1:
a65a53b
)
diff --git
a/builtin/mv.c
b/builtin/mv.c
index 08fbc033e45bba4880c8de797ef5ac0dc0b6259d..21c46d1636e6e87dd9eaaca60ac08ebbbc4efec3 100644
(file)
--- a/
builtin/mv.c
+++ b/
builtin/mv.c
@@
-214,6
+214,8
@@
int cmd_mv(int argc, const char **argv, const char *prefix)
}
} else if (string_list_has_string(&src_for_dst, dst))
bad = _("multiple sources for the same target");
+ else if (is_dir_sep(dst[strlen(dst) - 1]))
+ bad = _("destination directory does not exist");
else
string_list_insert(&src_for_dst, dst);