summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--submodule.c2
-rwxr-xr-xt/lib-submodule-update.sh3
2 files changed, 3 insertions, 2 deletions
diff --git a/submodule.c b/submodule.c
index 47ddc9b273..1b950f9627 100644
--- a/submodule.c
+++ b/submodule.c
@@ -1663,7 +1663,7 @@ int submodule_move_head(const char *path,
argv_array_push(&cp.args, new ? new : EMPTY_TREE_SHA1_HEX);
if (run_command(&cp)) {
- ret = -1;
+ ret = error(_("Submodule '%s' could not be updated."), path);
goto out;
}
diff --git a/t/lib-submodule-update.sh b/t/lib-submodule-update.sh
index 1f38a85371..4ee54325bc 100755
--- a/t/lib-submodule-update.sh
+++ b/t/lib-submodule-update.sh
@@ -781,7 +781,8 @@ test_submodule_recursing_with_args_common() {
(
cd submodule_update &&
git branch -t invalid_sub1 origin/invalid_sub1 &&
- test_must_fail $command invalid_sub1 &&
+ test_must_fail $command invalid_sub1 2>err &&
+ test_i18ngrep sub1 err &&
test_superproject_content origin/add_sub1 &&
test_submodule_content sub1 origin/add_sub1
)