summaryrefslogtreecommitdiff
path: root/git-prune-script
diff options
context:
space:
mode:
Diffstat (limited to 'git-prune-script')
-rwxr-xr-xgit-prune-script6
1 files changed, 3 insertions, 3 deletions
diff --git a/git-prune-script b/git-prune-script
index ec9f72de79..97646685b7 100755
--- a/git-prune-script
+++ b/git-prune-script
@@ -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 [^ ][^ ]* //