1
0
mirror of https://github.com/git/git.git synced 2025-03-23 14:56:41 +00:00
git/builtin
Johannes Sixt a893346930 mv: let 'git mv file no-such-dir/' error out on Windows, too
The previous commit c57f628 (mv: let 'git mv file no-such-dir/' error out)
relies on that rename("file", "no-such-dir/") fails if the directory does not
exist (note the trailing slash).  This does not work as expected on Windows:
This rename() call does not fail, but renames "file" to "no-such-dir" (not to
"no-such-dir/file"). Insert an explicit check for this case to force an error.

This changes the error message from

   $ git mv file no-such-dir/
   fatal: renaming 'file' failed: Not a directory

to

   $ git mv file no-such-dir/
   fatal: destination directory does not exist, source=file, destination=no-such-dir/

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-01-10 11:28:12 -08:00
..
2013-09-17 11:42:34 -07:00
2013-10-23 13:21:31 -07:00
2013-09-09 14:36:15 -07:00
2013-10-31 13:47:35 -07:00
2013-10-31 13:48:09 -07:00
2013-09-17 11:42:31 -07:00
2013-09-09 14:30:29 -07:00
2013-09-20 12:36:12 -07:00
2013-09-17 11:37:33 -07:00
2013-10-23 13:21:31 -07:00
2013-10-23 13:21:31 -07:00
2013-09-09 14:36:15 -07:00
2013-10-31 11:12:24 -07:00
2013-10-23 13:21:26 -07:00
2013-09-11 14:56:59 -07:00
2013-09-20 12:36:12 -07:00
2013-07-15 10:56:07 -07:00
2013-09-20 12:36:12 -07:00
2013-09-09 14:36:15 -07:00