Skip to content

Instantly share code, notes, and snippets.

@jameswomack
Created June 27, 2014 06:51
Show Gist options
  • Save jameswomack/9e19283bde4b9fce8d20 to your computer and use it in GitHub Desktop.
Save jameswomack/9e19283bde4b9fce8d20 to your computer and use it in GitHub Desktop.
merges-introducing() {
local introducing;
if introducing=`git rev-parse $1`; then
shift
git rev-list --ancestry-path --parents --reverse $introducing...$2 \
| awk '{seen[$1]=1} NR>1 && !seen[$2] {print $1}' \
| xargs git show --oneline --no-patch
fi
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment