always ignore submodules with git-status
In a couple of cases, we do specify --ignore-submodules for the actual check, but when dumping the results to the console, we omit the --ignore-submodules. Fix that. Same for check_format.sh - don't consider submodules for files changes that suggest a CHANGELOG.md update. This is in preparation for adding isa-l as an SPDK submodule. isa-l doesn't use any .gitignore files, so I want to make sure we're just ignoring anything related to isa-l build artifacts. We could probably remove our local DPDK submodule patch to its .gitignore after this patch but will leave that for another time. Signed-off-by: Jim Harris <james.r.harris@intel.com> Change-Id: Id9be9ce87569004c426d02c6cd44d645f3ff859f Reviewed-on: https://review.gerrithub.io/c/440808 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Seth Howell <seth.howell5141@gmail.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
This commit is contained in:
parent
f823b7f5c1
commit
da992ebcc4
@ -84,7 +84,7 @@ timing_exit "$make_timing_label"
|
||||
timing_enter generated_files_check
|
||||
if [ `git status --porcelain --ignore-submodules | wc -l` -ne 0 ]; then
|
||||
echo "Generated files missing from .gitignore:"
|
||||
git status --porcelain
|
||||
git status --porcelain --ignore-submodules
|
||||
exit 1
|
||||
fi
|
||||
timing_exit generated_files_check
|
||||
|
@ -16,7 +16,7 @@ $MAKE clean
|
||||
|
||||
if [ `git status --porcelain --ignore-submodules | wc -l` -ne 0 ]; then
|
||||
echo make clean left the following files:
|
||||
git status --porcelain
|
||||
git status --porcelain --ignore-submodules
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
@ -210,7 +210,7 @@ fi
|
||||
# are detected.
|
||||
echo -n "Checking whether CHANGELOG.md should be updated..."
|
||||
staged=$(git diff --name-only --cached .)
|
||||
working=$(git status -s --porcelain | grep -iv "??" | awk '{print $2}')
|
||||
working=$(git status -s --porcelain --ignore-submodules | grep -iv "??" | awk '{print $2}')
|
||||
files="$staged $working"
|
||||
if [[ "$files" = " " ]]; then
|
||||
files=$(git diff-tree --no-commit-id --name-only -r HEAD)
|
||||
|
Loading…
Reference in New Issue
Block a user