Message info
 
To:kde-commits@kde.org From:Parker Coates Subject:[kde-ruleset] bin: Add a trio of simple scripts to remove unwanted refs. Date:Sun, 18 Mar 2012 17:40:54 +0100 (CET)
 

Git commit d1f1a099862fec58fc64e7257f35c580c197182a by Parker Coates.
Committed on 18/03/2012 at 17:39.
Pushed by coates into branch 'master'.

Add a trio of simple scripts to remove unwanted refs.

Remembering stuff and typing it out is for suckers.

A +6 -0 bin/remove-fb-backup-refs.sh
A +3 -0 bin/remove-git2svn-backup-tags.sh
A +6 -0 bin/remove-workbranch-refs.sh

http://commits.kde.org/kde-ruleset/d1f1a099862fec58fc64e7257f35c580c197182a

diff --git a/bin/remove-fb-backup-refs.sh b/bin/remove-fb-backup-refs.sh
new file mode 100755
index 0000000..43b2b9a
--- /dev/null
+++ b/bin/remove-fb-backup-refs.sh
@@ -0,0 +1,6 @@
+#! /bin/sh
+
+git for-each-ref --format="%(refname)" ${1:-refs/original/} | \
+ xargs --no-run-if-empty -n 1 git update-ref -d
+
+git reflog expire --expire=now --all
diff --git a/bin/remove-git2svn-backup-tags.sh b/bin/remove-git2svn-backup-tags.sh
new file mode 100755
index 0000000..344ced2
--- /dev/null
+++ b/bin/remove-git2svn-backup-tags.sh
@@ -0,0 +1,3 @@
+#! /bin/sh
+
+git tag | grep -P "backups/.*@\d+$" | xargs --no-run-if-empty -n 1 git tag -d
diff --git a/bin/remove-workbranch-refs.sh b/bin/remove-workbranch-refs.sh
new file mode 100755
index 0000000..8998ef0
--- /dev/null
+++ b/bin/remove-workbranch-refs.sh
@@ -0,0 +1,6 @@
+#! /bin/sh
+
+git for-each-ref --format="%(refname)" ${1:-refs/workbranch/} | \
+ xargs --no-run-if-empty -n 1 git update-ref -d
+
+git reflog expire --expire=now --all