std.c: Improve some comments
[sunny256-utils.git] / git-delete-banned
blobc9a48dc8758ed4901b425ac153b0c140de5b7dbb
1 #!/usr/bin/env bash
3 #=======================================================================
4 # git-delete-banned
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"
22 done