Created
February 19, 2014 19:42
-
-
Save timblair/9099984 to your computer and use it in GitHub Desktop.
Show the point where a given commit was merged into master
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 | |
# Displays the point at which a given commit SHA was merged | |
# | |
# Usage: git merge-point SHA <TARGET> | |
TARGET=${2-master} | |
git rev-list --ancestry-path $1..$TARGET | | |
grep -f <(git rev-list --first-parent $1..$TARGET) | | |
tail -n 1 | | |
xargs git --no-pager show --shortstat |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment