resolve_symlink_merge () {
while true; do
printf "Use (l)ocal or (r)emote, or (a)bort? "
- read ans
+ read ans || return 1
case "$ans" in
[lL]*)
git checkout-index -f --stage=2 -- "$MERGED"
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"
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
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
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]*)
exit 0
fi
-# Save original stdin
-exec 3<&0
-
printf "Merging:\n"
printf "$files\n"
IFS='
-'; for i in $files
+'
+for i in $files
do
if test $last_status -ne 0; then
- prompt_after_failed_merge <&3 || exit 1
+ prompt_after_failed_merge || exit 1
fi
printf "\n"
- merge_file "$i" <&3
+ merge_file "$i"
last_status=$?
if test $last_status -ne 0; then
rollup_status=1