lib-submodule-update: teach test_submodule_content the -C <dir> flag

Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Stefan Beller 2017-03-14 14:46:28 -07:00 коммит произвёл Junio C Hamano
Родитель a70ef2dac4
Коммит 2f70edccb4
1 изменённых файлов: 5 добавлений и 0 удалений

Просмотреть файл

@ -193,6 +193,11 @@ test_superproject_content () {
# Test that the given submodule at path "$1" contains the content according # Test that the given submodule at path "$1" contains the content according
# to the submodule commit recorded in the superproject's commit "$2" # to the submodule commit recorded in the superproject's commit "$2"
test_submodule_content () { test_submodule_content () {
if test x"$1" = "x-C"
then
cd "$2"
shift; shift;
fi
if test $# != 2 if test $# != 2
then then
echo "test_submodule_content needs two arguments" echo "test_submodule_content needs two arguments"