7 while case "$#" in 0) break ;; esac
10 -n) dryrun
=-n echo=echo ;;
12 -*) echo >&2 "usage: git-prune [ -n ] [ heads... ]"; exit 1 ;;
20 0) git-fsck-objects
--full --cache --unreachable ;;
21 *) git-fsck-objects
--full --cache --unreachable $
(git-rev-parse
--all) "$@" ;;
24 sed -ne '/unreachable /{
25 s/unreachable [^ ][^ ]* //
28 cd "$GIT_OBJECT_DIRECTORY" ||
exit
30 rmdir 2>/dev
/null
[0-9a-f][0-9a-f]
33 git-prune-packed
$dryrun
35 redundant
=$
(git-pack-redundant
--all)
36 if test "" != "$redundant"
38 if test "" = "$dryrun"
40 echo "$redundant" |
xargs rm -f
42 echo rm -f "$redundant"