Document the --(no-)edit switch of git-revert and git-cherry-pick
[git.git] / git-prune.sh
index ef31bd2..1fd8c73 100755 (executable)
@@ -1,6 +1,6 @@
 #!/bin/sh
 
-. git-sh-setup || die "Not a git archive"
+. git-sh-setup
 
 dryrun=
 echo=
@@ -27,3 +27,14 @@ sed -ne '/unreachable /{
 }
 
 git-prune-packed $dryrun
+
+redundant=$(git-pack-redundant --all)
+if test "" != "$redundant"
+then
+       if test "" = "$dryrun"
+       then
+               echo "$redundant" | xargs rm -f
+       else
+               echo rm -f "$redundant"
+       fi
+fi