From: Paul Smith <paul@mad-scientist.net>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH v4] git-new-workdir: Don't fail if the target directory is empty
Date: Wed, 26 Nov 2014 17:31:55 -0500 [thread overview]
Message-ID: <1417041115.23650.69.camel@homebase> (raw)
In-Reply-To: <xmqq8uixpqyx.fsf@gitster.dls.corp.google.com>
On Wed, 2014-11-26 at 13:55 -0800, Junio C Hamano wrote:
> The comment in the original is somewhat misleading, but "test -e"
> was "test -e" and not "test -d" to stop when an existing file was
> given by mistake as $new_workdir, I think. I do not know what
> happens in the new code in that case.
I did test that. I have a little set of tests with a no directory,
empty directory, non-empty directory, plus various permissions issues
(existing directory without write privs, no write privs to the parent
directory), and also if the new directory name is a file, a symlink
pointing to something, a symlink pointing to nothing, etc.
This is what happens for a file:
$ rm -f foo
$ touch foo
$ ./src/git/contrib/workdir/git-new-workdir src/git foo master
mkdir: cannot create directory ‘foo’: Not a directory
unable to create new workdir "foo"!
next prev parent reply other threads:[~2014-11-26 22:32 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-26 20:38 [PATCH v4] git-new-workdir: Don't fail if the target directory is empty Paul Smith
2014-11-26 21:55 ` Junio C Hamano
2014-11-26 22:31 ` Paul Smith [this message]
2014-11-26 23:16 ` Junio C Hamano
2014-11-28 18:34 ` Paul Smith
2014-12-10 17:16 ` Paul Smith
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=1417041115.23650.69.camel@homebase \
--to=paul@mad-scientist.net \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.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.