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"! -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html