From: Junio C Hamano <gitster@pobox.com>
To: Johannes Sixt <j6t@kdbg.org>
Cc: Matthieu Moy <Matthieu.Moy@imag.fr>,
git@vger.kernel.org, Duy Nguyen <pclouds@gmail.com>
Subject: Re: [PATCH mm/mv-file-to-no-such-dir-with-slash] mv: let 'git mv file no-such-dir/' error out on Windows, too
Date: Fri, 10 Jan 2014 11:30:54 -0800 [thread overview]
Message-ID: <xmqqd2jz8wi9.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <52D04856.9070005@kdbg.org> (Johannes Sixt's message of "Fri, 10 Jan 2014 20:21:58 +0100")
Johannes Sixt <j6t@kdbg.org> writes:
> The file is renamed to no-such-dir without the slash at the end. The
> updated commit message would be:
>
> 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("src", "dst/") fails if directory dst does not
> exist (note the trailing slash). This does not work as expected on Windows:
> The rename() call does not fail, but renames src to dst (without the
> trailing slash). 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>
Thanks.
prev parent reply other threads:[~2014-01-10 19:31 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-03 8:32 [PATCH] mv: let 'git mv file no-such-dir/' error out Matthieu Moy
2013-12-03 10:06 ` Duy Nguyen
2013-12-04 8:44 ` Matthieu Moy
2013-12-04 13:10 ` Duy Nguyen
2013-12-04 17:37 ` [PATCH v2] " Matthieu Moy
2013-12-04 17:44 ` [PATCH] " Junio C Hamano
2013-12-04 17:48 ` Matthieu Moy
2014-01-08 16:33 ` [PATCH mm/mv-file-to-no-such-dir-with-slash] mv: let 'git mv file no-such-dir/' error out on Windows, too Johannes Sixt
2014-01-09 22:42 ` Junio C Hamano
2014-01-10 19:21 ` Johannes Sixt
2014-01-10 19:30 ` Junio C Hamano [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqqd2jz8wi9.fsf@gitster.dls.corp.google.com \
--to=gitster@pobox.com \
--cc=Matthieu.Moy@imag.fr \
--cc=git@vger.kernel.org \
--cc=j6t@kdbg.org \
--cc=pclouds@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.