summaryrefslogtreecommitdiff
path: root/url.h
diff options
context:
space:
mode:
authorJohannes Sixt <j6t@kdbg.org>2014-01-08 16:33:44 (GMT)
committerJunio C Hamano <gitster@pobox.com>2014-01-10 19:28:12 (GMT)
commita8933469309c492ad69af3f25bfddc7b245ab9c3 (patch)
tree8adaa9ebe1c90de8e91f57463ed733cb24d09118 /url.h
parentc57f6281ff847db7094d708f5c5b939d378f7120 (diff)
downloadgit-a8933469309c492ad69af3f25bfddc7b245ab9c3.zip
git-a8933469309c492ad69af3f25bfddc7b245ab9c3.tar.gz
git-a8933469309c492ad69af3f25bfddc7b245ab9c3.tar.bz2
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>
Diffstat (limited to 'url.h')
0 files changed, 0 insertions, 0 deletions