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:
parent
2c162b56f3
commit
adb231cfda
@ -40,8 +40,14 @@ git_broken_path_fix () {
|
|||||||
# @@BROKEN_PATH_FIX@@
|
# @@BROKEN_PATH_FIX@@
|
||||||
|
|
||||||
die () {
|
die () {
|
||||||
echo >&2 "$@"
|
die_with_status 1 "$@"
|
||||||
exit 1
|
}
|
||||||
|
|
||||||
|
die_with_status () {
|
||||||
|
status=$1
|
||||||
|
shift
|
||||||
|
echo >&2 "$*"
|
||||||
|
exit "$status"
|
||||||
}
|
}
|
||||||
|
|
||||||
GIT_QUIET=
|
GIT_QUIET=
|
||||||
|
Loading…
Reference in New Issue
Block a user