Make "git-checkout" create files with O_EXCL
[gitweb.git] / git-prune-script
index ec9f72de793f88a82ea7b9780c76c4f665264d02..97646685b70ac18210be130566b2c36395120385 100755 (executable)
@@ -1,4 +1,7 @@
 #!/bin/sh
+
+. git-sh-setup-script || die "Not a git archive"
+
 dryrun=
 while case "$#" in 0) break ;; esac
 do
@@ -11,9 +14,6 @@ do
     shift;
 done
 
-: ${GIT_DIR=.git}
-: ${GIT_OBJECT_DIRECTORY="${SHA1_FILE_DIRECTORY-"$GIT_DIR/objects"}"}
-
 git-fsck-cache --cache --unreachable "$@" |
 sed -ne '/unreachable /{
     s/unreachable [^ ][^ ]* //