From: Junio C Hamano Date: Wed, 20 Apr 2016 21:43:53 +0000 (-0700) Subject: Meta/CB: help culling stale topic branches X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6b7ee47089e8bd4ea84ed69df52c89906b963044;p=thirdparty%2Fgit.git Meta/CB: help culling stale topic branches --- diff --git a/CB b/CB new file mode 100755 index 0000000000..685d96b973 --- /dev/null +++ b/CB @@ -0,0 +1,13 @@ +#!/bin/sh +# Cull topic branches + +git for-each-ref --merged maint 'refs/heads/*/*' | +while read commit type name +do + git for-each-ref --count=1 --sort=version:refname \ + --contains "$name" \ + --format="%(taggerdate:iso) #%(refname:strip=2) $name" \ + refs/tags/ +done | +sort | +sed -e 's/[^#]*#//'