Skip to content

Instantly share code, notes, and snippets.

@bgamari
Created March 1, 2017 18:41
Show Gist options
  • Save bgamari/0a3b11f62f95d3c4789ac0c144b07bae to your computer and use it in GitHub Desktop.
Save bgamari/0a3b11f62f95d3c4789ac0c144b07bae to your computer and use it in GitHub Desktop.
#!/bin/bash -e
# e.g. git rev-set A..C X master gives you the union of all of these commits/ranges
for i in $@; do
if echo "$i" | grep '\.\.' >/dev/null; then
git rev-list $i
else
git rev-parse $i
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment