summaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2007-09-05 23:37:02 -0700
committerJunio C Hamano <gitster@pobox.com>2007-09-05 23:37:02 -0700
commit7e2e69b7f67ba8b336be56508d0208117d9e22e3 (patch)
treef10cda2462596cb0939c5dd0d0373bff5a2aaee0 /contrib
parentad00a3b8f8cabcf20aa6ac84ac88bea035fa7ce7 (diff)
parent4e560158c6de154fafab9fc3f6028d9edcc53e6b (diff)
downloadgit-7e2e69b7f67ba8b336be56508d0208117d9e22e3.tar.gz
Merge branch 'maint'
* maint: Include a git-push example for creating a remote branch Cleanup unnecessary file modifications in t1400-update-ref Makefile: Add cache-tree.h to the headers list Don't allow contrib/workdir/git-new-workdir to trash existing dirs git-apply: do not read past the end of buffer
Diffstat (limited to 'contrib')
-rwxr-xr-xcontrib/workdir/git-new-workdir6
1 files changed, 6 insertions, 0 deletions
diff --git a/contrib/workdir/git-new-workdir b/contrib/workdir/git-new-workdir
index c6e154a84f..2838546d16 100755
--- a/contrib/workdir/git-new-workdir
+++ b/contrib/workdir/git-new-workdir
@@ -48,6 +48,12 @@ then
"a complete repository."
fi
+# don't recreate a workdir over an existing repository
+if test -e "$new_workdir"
+then
+ die "destination directory '$new_workdir' already exists."
+fi
+
# make sure the the links use full paths
git_dir=$(cd "$git_dir"; pwd)