summaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2014-01-13 11:33:51 -0800
committerLibravatar Junio C Hamano <gitster@pobox.com>2014-01-13 11:33:51 -0800
commit272220ff67d7c7210047af0e3ad79b1e3df6529a (patch)
tree5844363332833cdf7f7eeb1af2874e31ca0fbe38 /builtin
parentMerge branch 'jl/submodule-mv-checkout-caveat' (diff)
parentmv: let 'git mv file no-such-dir/' error out on Windows, too (diff)
downloadtgif-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 08fbc033e4..21c46d1636 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);