Skip to content

Commit 272220f

Browse files
committed
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
2 parents a65a53b + a893346 commit 272220f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

builtin/mv.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,8 @@ int cmd_mv(int argc, const char **argv, const char *prefix)
214214
}
215215
} else if (string_list_has_string(&src_for_dst, dst))
216216
bad = _("multiple sources for the same target");
217+
else if (is_dir_sep(dst[strlen(dst) - 1]))
218+
bad = _("destination directory does not exist");
217219
else
218220
string_list_insert(&src_for_dst, dst);
219221

0 commit comments

Comments
 (0)