summaryrefslogtreecommitdiff
path: root/find_danglers.sh
blob: 0fc40bbb5219cb656bc35baef5ac5b278739a5a1 (plain)
1
2
3
4
5
6
7
8
9
10
11
#!/bin/bash

# prints a table of commit sha1:gerrit change id:commit date

for x in $(git fsck --dangling|cut -f3 -d' '); do 
	id=$(git show --format=raw $x|grep Change-Id:|cut -f2 -d:)
	if [ "x$id" != "x" ];
	then
		echo $x:$id:$(git show --format=medium $x|grep Date:| awk '{$1=""; print}')
        fi
done