Merge branch 'cb/maint-mergetool-no-tty'
* cb/maint-mergetool-no-tty: mergetool: Remove explicit references to /dev/tty Conflicts: git-mergetool.sh
This commit is contained in:
commit
1998f4c096
@ -35,7 +35,7 @@ check_unchanged () {
|
|||||||
while true; do
|
while true; do
|
||||||
echo "$MERGED seems unchanged."
|
echo "$MERGED seems unchanged."
|
||||||
printf "Was the merge successful? [y/n] "
|
printf "Was the merge successful? [y/n] "
|
||||||
read answer < /dev/tty
|
read answer
|
||||||
case "$answer" in
|
case "$answer" in
|
||||||
y*|Y*) status=0; break ;;
|
y*|Y*) status=0; break ;;
|
||||||
n*|N*) status=1; break ;;
|
n*|N*) status=1; break ;;
|
||||||
|
@ -289,6 +289,10 @@ if test $# -eq 0 ; then
|
|||||||
echo "No files need merging"
|
echo "No files need merging"
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Save original stdin
|
||||||
|
exec 3<&0
|
||||||
|
|
||||||
printf "Merging:\n"
|
printf "Merging:\n"
|
||||||
printf "$files\n"
|
printf "$files\n"
|
||||||
|
|
||||||
@ -296,10 +300,10 @@ if test $# -eq 0 ; then
|
|||||||
while IFS= read i
|
while IFS= read i
|
||||||
do
|
do
|
||||||
if test $last_status -ne 0; then
|
if test $last_status -ne 0; then
|
||||||
prompt_after_failed_merge < /dev/tty || exit 1
|
prompt_after_failed_merge <&3 || exit 1
|
||||||
fi
|
fi
|
||||||
printf "\n"
|
printf "\n"
|
||||||
merge_file "$i" < /dev/tty > /dev/tty
|
merge_file "$i" <&3
|
||||||
last_status=$?
|
last_status=$?
|
||||||
if test $last_status -ne 0; then
|
if test $last_status -ne 0; then
|
||||||
rollup_status=1
|
rollup_status=1
|
||||||
|
Loading…
Reference in New Issue
Block a user