diff --git a/builtin/submodule--helper.c b/builtin/submodule--helper.c index d76ee0323e..d6a827366d 100644 --- a/builtin/submodule--helper.c +++ b/builtin/submodule--helper.c @@ -2445,7 +2445,7 @@ static int update_submodule(struct update_data *update_data) update_data->displaypath); if (ret == 128) exit(ret); - return 1; + return ret; } return 0; diff --git a/t/t7406-submodule-update.sh b/t/t7406-submodule-update.sh index 6cc07460dd..c5f5dbe55e 100755 --- a/t/t7406-submodule-update.sh +++ b/t/t7406-submodule-update.sh @@ -769,7 +769,7 @@ test_expect_success 'submodule update continues after recursive checkout error' echo "" > file ) ) && - test_must_fail git submodule update --recursive && + test_expect_code 1 git submodule update --recursive && (cd submodule2 && git rev-parse --verify HEAD >../actual ) &&