3 #=======================================================================
5 # File ID: 8363d7d8-10b2-11e5-9153-000df06acc56
7 # Delete banned commits, tags and blobs. Mostly used by git-dangling to
8 # remove unwanted commits.
10 # Author: Øyvind A. Holm <sunny@sunbase.org>
11 # License: GNU General Public License version 2 or later.
12 #=======================================================================
14 progname
=git-delete-banned
15 bannedfile
=$HOME/.git-dangling-banned
17 if test -e $bannedfile; then
18 for ban
in $
(cut
-f1 -d ' ' $bannedfile |
grep -E '^[0-9a-f]{40}'); do
19 git br
-D commit-
$ban 2>/dev
/null
20 git tag
-d tag-
$ban 2>/dev
/null
21 test -e "blob-$ban" && rm "blob-$ban"