Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGlen Choo <chooglen@google.com>2022-03-16 00:09:20 +0300
committerJunio C Hamano <gitster@pobox.com>2022-03-17 01:07:43 +0300
commit55b3f12cb54077463709b2ac20cc64eba7dbf673 (patch)
tree2b7b890b0188df201a63d2f0019dbd278fd6541e /git-submodule.sh
parent3c3558f0953dea2151d2cac92c8148681f9ae9b6 (diff)
submodule update: use die_message()
Use die_message() to print the "fatal: " prefix instead of doing it in git-submodule.sh and remove a now-unnecessary exit code from "git submodule--helper run-update-procedure". Also, since die_message() adds the newline for us, replace an invocation of die_with_status() with printf + exit invocations that do not add a newline, but are otherwise identical to die_with_status(). Helped-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Glen Choo <chooglen@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-submodule.sh')
-rwxr-xr-xgit-submodule.sh9
1 files changed, 5 insertions, 4 deletions
diff --git a/git-submodule.sh b/git-submodule.sh
index aa8bdfca9d..a84143daab 100755
--- a/git-submodule.sh
+++ b/git-submodule.sh
@@ -404,7 +404,7 @@ cmd_update()
# exit codes for run-update-procedure:
# 0: update was successful, say command output
# 1: update procedure failed, but should not die
- # 2 or 128: subcommand died during execution
+ # 128: subcommand died during execution
# 3: no update procedure was run
res="$?"
case $res in
@@ -412,11 +412,12 @@ cmd_update()
say "$out"
;;
1)
- err="${err};fatal: $out"
+ err="${err};$out"
continue
;;
- 2|128)
- die_with_status $res "fatal: $out"
+ 128)
+ printf >&2 "$out"
+ exit $res
;;
esac