3 . git-sh-setup || die "Not a git archive"
7 while case "$#" in 0) break ;; esac
10 -n) dryrun=-n echo=echo ;;
12 -*) echo >&2 "usage: git-prune [ -n ] [ heads... ]"; exit 1 ;;
19 git-fsck-objects --full --cache --unreachable "$@" |
20 sed -ne '/unreachable /{
21 s/unreachable [^ ][^ ]* //
24 cd "$GIT_OBJECT_DIRECTORY" || exit
26 rmdir 2>/dev/null [0-9a-f][0-9a-f]
29 git-prune-packed $dryrun
31 redundant=$(git-pack-redundant --all)
32 if test "" != "$redundant"
34 if test "" = "$dryrun"
36 echo "$redundant" | xargs rm -f
38 echo rm -f "$redundant"