Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 7 Jan 2024 21:25:51 GMT
From:      Ed Maste <emaste@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: 72e6ffc21cc9 - stable/13 - freebsd-update: allow user to break out of conflict resolution loop
Message-ID:  <202401072125.407LPpcd083984@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by emaste:

URL: https://cgit.FreeBSD.org/src/commit/?id=72e6ffc21cc9760f1a3680bab542de5e991c7260

commit 72e6ffc21cc9760f1a3680bab542de5e991c7260
Author:     Ed Maste <emaste@FreeBSD.org>
AuthorDate: 2023-03-03 17:32:51 +0000
Commit:     Ed Maste <emaste@FreeBSD.org>
CommitDate: 2024-01-07 20:41:48 +0000

    freebsd-update: allow user to break out of conflict resolution loop
    
    When a conflict marker is found during update allow the user to confirm
    they want it to remain in the file.
    
    Suggested by:   Tim Hogard
    Reviewed by:    imp
    Sponsored by:   The FreeBSD Foundation
    Fixes: ceb5f28ba5fc ("freebsd-update: re-edit files if merge confli...")
    Differential Revision: https://reviews.freebsd.org/D38896
    
    (cherry picked from commit 3d44241546173de00852ab5e22263ba538cd8759)
    (cherry picked from commit 6561fec386a6cbe65b3f9661db797317ab6a99b4)
---
 usr.sbin/freebsd-update/freebsd-update.sh | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/usr.sbin/freebsd-update/freebsd-update.sh b/usr.sbin/freebsd-update/freebsd-update.sh
index 438e13a51154..f5289e1cd9fc 100644
--- a/usr.sbin/freebsd-update/freebsd-update.sh
+++ b/usr.sbin/freebsd-update/freebsd-update.sh
@@ -2544,7 +2544,11 @@ Press Enter to edit this file in ${EDITOR} and resolve the conflicts
 manually...
 			EOF
 			while true; do
-				read dummy </dev/tty
+				read response </dev/tty
+				if expr "${response}" : '[Aa][Cc][Cc][Ee][Pp][Tt]' > /dev/null; then
+					echo
+					break
+				fi
 				${EDITOR} `pwd`/merge/new/${F} < /dev/tty
 
 				if ! grep -qE '^(<<<<<<<|=======|>>>>>>>)([[:space:]].*)?$' $(pwd)/merge/new/${F} ; then
@@ -2555,7 +2559,8 @@ manually...
 Merge conflict markers remain in: ${F}
 These must be resolved for the system to be functional.
 
-Press Enter to return to editing this file.
+Press Enter to return to editing this file, or type "ACCEPT" to carry on with
+these lines remaining in the file.
 				EOF
 			done
 		done < failed.merges



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202401072125.407LPpcd083984>