aboutsummaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2014-01-13 11:33:51 -0800
committerJunio C Hamano <gitster@pobox.com>2014-01-13 11:33:51 -0800
commit272220ff67d7c7210047af0e3ad79b1e3df6529a (patch)
tree5844363332833cdf7f7eeb1af2874e31ca0fbe38 /builtin
parenta65a53bf04c56ae2365f57702a810af0551899a1 (diff)
parenta8933469309c492ad69af3f25bfddc7b245ab9c3 (diff)
downloadgit-272220ff67d7c7210047af0e3ad79b1e3df6529a.tar.gz
git-272220ff67d7c7210047af0e3ad79b1e3df6529a.tar.xz
Merge branch 'mm/mv-file-to-no-such-dir-with-slash'
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
Diffstat (limited to 'builtin')
-rw-r--r--builtin/mv.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/builtin/mv.c b/builtin/mv.c
index 08fbc033e..21c46d163 100644
--- 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);