projects
/
git.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add SubmittingPatches
[git.git]
/
git-prune-script
diff --git
a/git-prune-script
b/git-prune-script
index
ec9f72d
..
a8e338c
100755
(executable)
--- a/
git-prune-script
+++ b/
git-prune-script
@@
-1,4
+1,7
@@
#!/bin/sh
#!/bin/sh
+
+. git-sh-setup-script || die "Not a git archive"
+
dryrun=
while case "$#" in 0) break ;; esac
do
dryrun=
while case "$#" in 0) break ;; esac
do
@@
-11,15
+14,12
@@
do
shift;
done
shift;
done
-: ${GIT_DIR=.git}
-: ${GIT_OBJECT_DIRECTORY="${SHA1_FILE_DIRECTORY-"$GIT_DIR/objects"}"}
-
-git-fsck-cache --cache --unreachable "$@" |
+git-fsck-cache --full --cache --unreachable "$@" |
sed -ne '/unreachable /{
s/unreachable [^ ][^ ]* //
s|\(..\)|\1/|p
}' | {
cd "$GIT_OBJECT_DIRECTORY" || exit
sed -ne '/unreachable /{
s/unreachable [^ ][^ ]* //
s|\(..\)|\1/|p
}' | {
cd "$GIT_OBJECT_DIRECTORY" || exit
- xargs
-r
$dryrun rm -f
+ xargs $dryrun rm -f
}
}