File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change 1010# Don't be strict. Script has own error control handle
1111set +e
1212
13+ difffilter=${1:- " ACDMRTUXB" }
14+
1315# Verify everything is set
1416required=" gitcmd gitdir initialcommit finalcommit"
1517for var in $required ; do
@@ -46,5 +48,5 @@ if [[ ${PIPESTATUS[0]} -ne 0 ]]; then
4648fi
4749
4850# get all the files changed between both commits (no matter the diffs are empty)
49- git log --name-only --pretty=oneline --full-index ${initialcommit} ..${finalcommit} | \
51+ git log --diff-filter= ${difffilter} --find-renames=100% -- name-only --pretty=oneline --full-index ${initialcommit} ..${finalcommit} | \
5052 grep -vE ' ^[0-9a-f]{40} ' | sort | uniq
Original file line number Diff line number Diff line change @@ -46,7 +46,9 @@ echo "Validating using $validator"
4646
4747export initialcommit=${GIT_PREVIOUS_COMMIT}
4848export finalcommit=${GIT_COMMIT}
49- if mfiles=$( ${mydir} /../list_changed_files/list_changed_files.sh)
49+ # Fetch all files, excluding files which are renames.
50+ # There is no need to check renames.
51+ if mfiles=$( ${mydir} /../list_changed_files/list_changed_files.sh r)
5052then
5153 echo " Running mustache lint from $initialcommit to $finalcommit :"
5254else
You can’t perform that action at this time.
0 commit comments