Created
November 14, 2014 11:35
-
-
Save jmosbech/e44bcf59333e6ca4f6fc to your computer and use it in GitHub Desktop.
Find JIRA items in Git commits
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
RANGE=$1 | |
git log --grep="[A-Z]\+-[0-9]\+" --format=%s $RANGE \ | |
| awk 'match($0, /[A-Z]+-[0-9]+/) {print substr($0, RSTART, RLENGTH)}' \ | |
| sort -t "-" -k1,1 -k2,1n \ | |
| uniq |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment