lib-submodule-update: teach test_submodule_content the -C <dir> flag
[gitweb.git] / t / lib-submodule-update.sh
index c0d632513395cf0c4378b724da92fc4c6c829f78..00128f28b5a0f4df0d8ac97b19dcf3e7c316d38d 100755 (executable)
@@ -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 x"$1" = "x-C"
+       then
+               cd "$2"
+               shift; shift;
+       fi
        if test $# != 2
        then
                echo "test_submodule_content needs two arguments"