Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion list_changed_files/list_changed_files.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
# Don't be strict. Script has own error control handle
set +e

difffilter=${1:-"ACDMRTUXB"}

# Verify everything is set
required="gitcmd gitdir initialcommit finalcommit"
for var in $required; do
Expand Down Expand Up @@ -46,5 +48,5 @@ if [[ ${PIPESTATUS[0]} -ne 0 ]]; then
fi

# get all the files changed between both commits (no matter the diffs are empty)
git log --name-only --pretty=oneline --full-index ${initialcommit}..${finalcommit} | \
git log --diff-filter=${difffilter} --find-renames=100% --name-only --pretty=oneline --full-index ${initialcommit}..${finalcommit} | \
grep -vE '^[0-9a-f]{40} ' | sort | uniq
4 changes: 3 additions & 1 deletion mustache_lint/mustache_lint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,9 @@ echo "Validating using $validator"

export initialcommit=${GIT_PREVIOUS_COMMIT}
export finalcommit=${GIT_COMMIT}
if mfiles=$(${mydir}/../list_changed_files/list_changed_files.sh)
# Fetch all files, excluding files which are renames.
# There is no need to check renames.
if mfiles=$(${mydir}/../list_changed_files/list_changed_files.sh r)
then
echo "Running mustache lint from $initialcommit to $finalcommit:"
else
Expand Down
Loading