diff options
author | Junio C Hamano <gitster@pobox.com> | 2011-09-11 21:53:39 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2011-09-11 21:53:39 -0700 |
commit | b3038a5adb00a42afed69da31b6a8d85d5e3fad1 (patch) | |
tree | a730e36b3a5dfb0439fb53369e3aac22f1d18579 | |
parent | eff7c32cfd12867000d6449d335fad0e7c9751f1 (diff) | |
parent | 6b445773b78544032262b897c9aa3b5bd4405dd3 (diff) | |
download | git-b3038a5adb00a42afed69da31b6a8d85d5e3fad1.tar.gz |
Merge branch 'jc/maint-mergetool-read-fix' into maint
* jc/maint-mergetool-read-fix:
mergetool: check return value from read
-rwxr-xr-x | git-mergetool.sh | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/git-mergetool.sh b/git-mergetool.sh index 3aab5aae84..3c157bcd26 100755 --- a/git-mergetool.sh +++ b/git-mergetool.sh @@ -100,7 +100,7 @@ resolve_deleted_merge () { else printf "Use (c)reated or (d)eleted file, or (a)bort? " fi - read ans + read ans || return 1 case "$ans" in [mMcC]*) git add -- "$MERGED" @@ -122,7 +122,7 @@ resolve_deleted_merge () { resolve_submodule_merge () { while true; do printf "Use (l)ocal or (r)emote, or (a)bort? " - read ans + read ans || return 1 case "$ans" in [lL]*) if ! local_present; then @@ -249,7 +249,7 @@ merge_file () { describe_file "$remote_mode" "remote" "$REMOTE" if "$prompt" = true; then printf "Hit return to start merge resolution tool (%s): " "$merge_tool" - read ans + read ans || return 1 fi if base_present; then @@ -320,7 +320,7 @@ done prompt_after_failed_merge() { while true; do printf "Continue merging other unresolved paths (y/n) ? " - read ans + read ans || return 1 case "$ans" in [yY]*) |