Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 23 Oct 2023 23:36:56 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: 6561fec386a6 - stable/14 - freebsd-update: allow user to break out of conflict resolution loop
Message-ID:  <202310232336.39NNaurN087584@gitrepo.freebsd.org>

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

URL: https://cgit.FreeBSD.org/src/commit/?id=6561fec386a6cbe65b3f9661db797317ab6a99b4

commit 6561fec386a6cbe65b3f9661db797317ab6a99b4
Author:     Ed Maste <emaste@FreeBSD.org>
AuthorDate: 2023-03-03 17:32:51 +0000
Commit:     Ed Maste <emaste@FreeBSD.org>
CommitDate: 2023-10-23 23:35:57 +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)
---
 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 c6432dcd6b0e..0cfd29731126 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?202310232336.39NNaurN087584>