Subject: Re: [PATCH v4] git-new-workdir: Don't fail if the target directory is empty

From: Paul Smith <[email-masked]>
Date: Fri, 28 Nov 2014 13:34:05 -0500

On Wed, 2014-11-26 at 15:16 -0800, Junio C Hamano wrote:
> > $ ./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"!
> 
> ;-)  That comes from mkdir || fail which is indeed sufficient.

Right.  Often I find it simpler/clearer to let the underlying commands
give the errors: they use perror() and can often provide more specific
error messages than my script can, unless I spend a lot of effort trying
to determine exactly what the problem is (permissions, disk space, bad
symlink, existing file, whatever).

Should I respin this with the \"$new_workdir\" -> '$new_workdir' change
(I actually prefer the latter myself but the former was used somewhere
so I kept it)?