Last active
December 11, 2015 01:49
-
-
Save joar/4526590 to your computer and use it in GitHub Desktop.
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/zsh | |
# | |
# Outputs the diff between the git logs for two branches | |
# | |
### USAGE | |
# log-diff.sh branch1 branch2 | |
# | |
# Written by Elvenlord Elrond from Samba-TNG <http://samba-tng.org> / GNU MediaGoblin <http://mediagoblin.org> | |
# No warranty what so ever. | |
# | |
# - 2013, colordiff and less `-R` flag added by Joar Wandborg <http://wandborg.se> | |
base="$(git merge-base "$1" "$2")^" | |
diff -c -C 4 -d -I'^commit' <(git whatchanged -p "${base}..$1") <(git whatchanged -p "${base}..$2") \ | |
| colordiff \ | |
| less -SR |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment