Created
November 15, 2012 14:32
-
-
Save webmozart/4078901 to your computer and use it in GitHub Desktop.
Script to find the merge and PR a commit occurred in
This file contains hidden or 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/bash | |
COMMIT=$1 | |
BRANCH=$2 | |
if [ -z $BRANCH ]; then | |
BRANCH="master" | |
fi | |
perl -ne 'print if ($seen{$_} .= @ARGV) =~ /10$/' \ | |
<(git rev-list --ancestry-path --oneline $COMMIT..$BRANCH) \ | |
<(git rev-list --first-parent --oneline $COMMIT..$BRANCH) \ | |
| tail -n 1 |
This file contains hidden or 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/bash | |
git-find-merge $1 $2 \ | |
| cut -d '#' -f2 \ | |
| cut -c1-4 \ | |
| sed 's/^/https:\/\/github.com\/symfony\/symfony\/pull\//' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Nudge @fabpot 😄