Commit da992ebc authored by Jim Harris's avatar Jim Harris Committed by Ben Walker
Browse files

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: default avatarJim Harris <james.r.harris@intel.com>
Change-Id: Id9be9ce87569004c426d02c6cd44d645f3ff859f

Reviewed-on: https://review.gerrithub.io/c/440808


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarSeth Howell <seth.howell5141@gmail.com>
Reviewed-by: default avatarShuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: default avatarDarek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: default avatarBen Walker <benjamin.walker@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
parent f823b7f5
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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
+1 −1
Original line number Diff line number Diff line
@@ -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

+1 −1
Original line number Diff line number Diff line
@@ -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)