From: Junio C Hamano Date: Wed, 26 Nov 2014 23:16:43 GMT Subject: Re: [PATCH v4] git-new-workdir: Don't fail if the target directory is empty Message-ID: In-Reply-To: <1417041115.23650.69.camel@homebase> Paul Smith writes: > 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"! ;-) That comes from mkdir || fail which is indeed sufficient.