Skip to content

Instantly share code, notes, and snippets.

@timabell
Created July 8, 2010 09:42
Show Gist options
  • Save timabell/467814 to your computer and use it in GitHub Desktop.
Save timabell/467814 to your computer and use it in GitHub Desktop.
scan git revision list for bug #s in the comments
#!/bin/bash
#scan revision list for bug #s in the comments
#convert into comma separated values
bugs=`git log $1..$2 --pretty=oneline | grep -o " bug *[0-9]*" | \
cut -d " " -f 3 | sort -n | uniq | while read x; do echo -n $x,; done;`
#strip final comma
bugs=${bugs%,}
#send output to console
echo -n "http://bugzilla/buglist.cgi?quicksearch="; \
echo $bugs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment