diff options
author | Stefan Beller <sbeller@google.com> | 2018-06-21 01:32:53 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-06-25 19:06:15 +0300 |
commit | ba95d4e4bdf03badef6bc5c44bc059464f3e79d3 (patch) | |
tree | 4663a81fbe40f08c48973a19ee502ff5d694e91c /submodule.c | |
parent | a42a58d7b62cc1d6301440e81a83feed9d7c118c (diff) |
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 'submodule.c')
-rw-r--r-- | submodule.c | 2 |
1 files changed, 1 insertions, 1 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; } |