Last active
May 23, 2019 12:06
-
-
Save mmodrow/1494a3cb36164ca095979a05191e034f to your computer and use it in GitHub Desktop.
List all files in the current git repository that changed in the current commit compared to the origin master
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 | |
filter="ACDM" | |
for i in "$@" | |
do | |
case $i in | |
-A) | |
filter="${filter//A}" | |
;; | |
-C) | |
filter="${filter//C}" | |
;; | |
-D) | |
filter="${filter//D}" | |
;; | |
-M) | |
filter="${filter//M}" | |
;; | |
esac | |
done | |
git diff --diff-filter=$filter --name-only origin/master HEAD |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment