зеркало из https://github.com/microsoft/git.git
git-sh-setup: add die_with_status
This behaves similar to "die" but can exit with status different from the usual 1. Signed-off-by: Fredrik Gustafsson <iveqy@iveqy.com> Mentored-by: Jens Lehmann <Jens.Lehmann@web.de> Mentored-by: Heiko Voigt <hvoigt@hvoigt.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Родитель
2c162b56f3
Коммит
adb231cfda
|
@ -39,9 +39,15 @@ git_broken_path_fix () {
|
|||
|
||||
# @@BROKEN_PATH_FIX@@
|
||||
|
||||
die() {
|
||||
echo >&2 "$@"
|
||||
exit 1
|
||||
die () {
|
||||
die_with_status 1 "$@"
|
||||
}
|
||||
|
||||
die_with_status () {
|
||||
status=$1
|
||||
shift
|
||||
echo >&2 "$*"
|
||||
exit "$status"
|
||||
}
|
||||
|
||||
GIT_QUIET=
|
||||
|
|
Загрузка…
Ссылка в новой задаче