ngcp pull: abort if merge conflict during automatic

This commit is contained in:
2026-06-08 16:26:56 +02:00
parent 8e68a8473c
commit 785b747ebc
+8 -1
View File
@@ -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"