Created
September 5, 2017 06:06
-
-
Save 0cjs/a3b9d7d1a5edaecb30961dfa7fb41145 to your computer and use it in GitHub Desktop.
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
#!/usr/bin/env bash | |
# | |
# describe-pr - print a Pull Request description | |
# | |
type xsel >/dev/null 2>&1 || { | |
echo 1>&2 "$(basename $0): xsel command not found; please install it." | |
exit 1 | |
} | |
# (This doesn't currently work on a Mac, where we'd use the `pbpaste` | |
# tool, which is the equivalant of `xsel --clipboard --input`.) | |
[ -z "$1" ] && { | |
echo 1>&2 "Usage: $(basename $0) <start-commit>" | |
exit 2 | |
} | |
start_commit="$1"; shift | |
git log --reverse --pretty=format:'* %s%n%n%b' $start_commit^..HEAD \ | |
| xsel --input --clipboard |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment