Skip to content

Commit

Permalink
Correctly augment path to toplevel git folder
Browse files Browse the repository at this point in the history
  • Loading branch information
rhaschke authored and mathias-luedtke committed Apr 24, 2021
1 parent 44c26c3 commit e51bbf4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion industrial_ci/src/tests/source_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ function run_clang_tidy {
pushd "$src_dir" > /dev/null || true
if git fetch -q origin "$CLANG_TIDY_BASE_REF" 2> /dev/null; then # git might fail, e.g. operating on catkin_tools_prebuild
# Filter for changed files, using sed to augment full path again (which git strips away)
mapfile -t files < <(git diff --name-only --diff-filter=MA FETCH_HEAD..HEAD -- "${files[@]}" | sed "s#^#$PWD/#")
mapfile -t files < <(git diff --name-only --diff-filter=MA FETCH_HEAD..HEAD -- "${files[@]}" | sed "s#^#$(git rev-parse --show-toplevel)/#")
fi
popd > /dev/null || true
fi
Expand Down

0 comments on commit e51bbf4

Please sign in to comment.