From 7620582e41a953bff72efdfd9f8881df232d77fc Mon Sep 17 00:00:00 2001 From: Javi Merino Date: Tue, 13 Sep 2016 10:04:29 +0100 Subject: [PATCH] lisa_shell: don't fail when running "lisa-update" if submodules aren't synced "lisa-update all" can fail if submodules are not pointing at the current tracked head. This can happen if you have worked on a submodule's branch. This happens because "git diff-index" reports changes to submodules as uncommitted changes, which is not what we want. Add "--ignore-submodules" to its invocation to make it ignore changes to submodules. Note that this won't report uncommitted changes to a submodule that can't be merged, but that is not an issue. The purpose of this "git diff-index" is to make sure we can run the subsequent "git pull" and that doesn't affect the submodules. If you have outstanding uncommitted changes in one of the submodules, then _lisa-update-submodules will fail (or rather "git submodule update" will fail) but that is the correct behaviour: lisa-update all has updated all it could (lisa, and as many modules as possible) and the submodule command that fails and asks you to "Please, commit your changes or stash them" because it is "Unable to checkout $COMMIT_ID in submodule path 'libs/trappy'". --- src/shell/lisa_shell | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/shell/lisa_shell b/src/shell/lisa_shell index 08e0ab7e9..614199a37 100755 --- a/src/shell/lisa_shell +++ b/src/shell/lisa_shell @@ -105,7 +105,7 @@ if [ $ret -ne 0 ]; then return $ret fi -git diff-index --quiet HEAD +git diff-index --quiet --ignore-submodules HEAD ret=$? if [ $ret -ne 0 ]; then echo "There are outstanding uncommitted changes." -- GitLab