summaryrefslogtreecommitdiff
path: root/t/lib-submodule-update.sh
diff options
context:
space:
mode:
authorStefan Beller <sbeller@google.com>2018-06-20 22:32:53 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-06-25 16:06:15 (GMT)
commitba95d4e4bdf03badef6bc5c44bc059464f3e79d3 (patch)
tree4663a81fbe40f08c48973a19ee502ff5d694e91c /t/lib-submodule-update.sh
parenta42a58d7b62cc1d6301440e81a83feed9d7c118c (diff)
downloadgit-ba95d4e4bdf03badef6bc5c44bc059464f3e79d3.zip
git-ba95d4e4bdf03badef6bc5c44bc059464f3e79d3.tar.gz
git-ba95d4e4bdf03badef6bc5c44bc059464f3e79d3.tar.bz2
submodule.c: report the submodule that an error occurs in
When an error occurs in updating the working tree of a submodule in submodule_move_head, tell the user which submodule the error occurred in. The call to read-tree contains a super-prefix, such that the read-tree will correctly report any path related issues, but some error messages do not contain a path, for example: ~/gerrit$ git checkout --recurse-submodules origin/master ~/gerrit$ fatal: failed to unpack tree object 07672f31880ba80300b38492df9d0acfcd6ee00a Give the hint which submodule has a problem. Signed-off-by: Stefan Beller <sbeller@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/lib-submodule-update.sh')
-rwxr-xr-xt/lib-submodule-update.sh3
1 files changed, 2 insertions, 1 deletions
diff --git a/t/lib-submodule-update.sh b/t/lib-submodule-update.sh
index 1f38a85..4ee5432 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
)