Created
November 9, 2018 18:30
-
-
Save erochest/9fd48fd37becad6e988799dbb2510f78 to your computer and use it in GitHub Desktop.
Walks through the merge commits from the last day, and the diffs of what was merged.
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 | |
since=yesterday | |
branch=$(git branch | grep \* | cut -d ' ' -f2) | |
while (( "$#" )); do | |
case "$1" in | |
-s|--since) | |
since="$2" | |
shift 2 | |
;; | |
--) | |
shift | |
break | |
;; | |
*) | |
branch="$1" | |
shift | |
;; | |
esac | |
done | |
for commit_hash in $(git --no-pager log --since ${since} --merges --format="%H" ${branch}); do | |
parents=($(git --no-pager log $commit_hash -1 --format="%P")) | |
git --no-pager log -1 --format=fuller $commit_hash | |
git --no-pager diff "${parents[0]}"..."${parents[1]}" | |
echo | |
done | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment