From 785b747ebca67f3e11b49ef5a85f9d3635bfe85d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Rivera?= Date: Mon, 8 Jun 2026 16:26:56 +0200 Subject: [PATCH] ngcp pull: abort if merge conflict during automatic --- ngcp.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/ngcp.sh b/ngcp.sh index 680ac8d..6af74ae 100755 --- a/ngcp.sh +++ b/ngcp.sh @@ -63,7 +63,14 @@ if [[ "$1" == "pick" ]]; then git -C "$nixConfigPath" checkout -b "$remoteBranch" "origin/$remoteBranch" fi echo "Pulling latest commits before cherry-picking..." - if ! git -C "$nixConfigPath" pull --rebase ; then + if git -C "$nixConfigPath" pull --rebase ; then + echo "Pull successful." + elif (( automatic )); then + echo "Merge conflict detected during pull. Please run ngcp pull manually" + notify-send "Merge conflict detected during ngcp pull." "Please run ngcp pull manually" + git -C "$nixConfigPath" rebase --abort + exit 1 + else echo "Merge conflict detected during pull." echo "Resolve conflicts and run:" echo " git rebase --continue"