1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-06-08 14:46:11 +02:00

Merge branch 'sb/submodule-move-head-error-msg'

"git checkout --recurse-submodules another-branch" did not report
in which submodule it failed to update the working tree, which
resulted in an unhelpful error message.

* sb/submodule-move-head-error-msg:
  submodule.c: report the submodule that an error occurs in
This commit is contained in:
Junio C Hamano 2018-07-24 14:50:43 -07:00
commit 392b3dde51
2 changed files with 3 additions and 2 deletions

View File

@ -1682,7 +1682,7 @@ int submodule_move_head(const char *path,
argv_array_push(&cp.args, new_head ? new_head : empty_tree_oid_hex());
if (run_command(&cp)) {
ret = -1;
ret = error(_("Submodule '%s' could not be updated."), path);
goto out;
}

View File

@ -782,7 +782,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
)