From: Stefan Beller Date: Thu, 02 Mar 2017 00:47:44 GMT Subject: [PATCH 03/18] lib-submodule-update: teach test_submodule_content the -C flag Message-ID: <20170302004759.27852-4-sbeller@google.com> In-Reply-To: <20170302004759.27852-1-sbeller@google.com> Signed-off-by: Stefan Beller --- t/lib-submodule-update.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/t/lib-submodule-update.sh b/t/lib-submodule-update.sh index c0d6325133..a906c92cfb 100755 --- a/t/lib-submodule-update.sh +++ b/t/lib-submodule-update.sh @@ -193,6 +193,11 @@ test_superproject_content () { # Test that the given submodule at path "$1" contains the content according # to the submodule commit recorded in the superproject's commit "$2" test_submodule_content () { + if test "$1" == "-C" + then + cd "$2" + shift; shift; + fi if test $# != 2 then echo "test_submodule_content needs two arguments" -- 2.12.0.rc1.52.ge239d7e709.dirty