Skip to content

Commit

Permalink
Merge branch 'jc/maint-mergetool-read-fix' into maint
Browse files Browse the repository at this point in the history
* jc/maint-mergetool-read-fix:
  mergetool: check return value from read
  • Loading branch information
Junio C Hamano committed Sep 12, 2011
2 parents eff7c32 + 6b44577 commit b3038a5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions git-mergetool.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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]*)
Expand Down

0 comments on commit b3038a5

Please sign in to comment.