mirror of
https://github.com/tomasriveral/Nix-Git-Cherry-Picker.git
synced 2026-08-12 10:40:47 +02:00
ngcp pull: abort if merge conflict during automatic
This commit is contained in:
@@ -63,7 +63,14 @@ if [[ "$1" == "pick" ]]; then
|
|||||||
git -C "$nixConfigPath" checkout -b "$remoteBranch" "origin/$remoteBranch"
|
git -C "$nixConfigPath" checkout -b "$remoteBranch" "origin/$remoteBranch"
|
||||||
fi
|
fi
|
||||||
echo "Pulling latest commits before cherry-picking..."
|
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 "Merge conflict detected during pull."
|
||||||
echo "Resolve conflicts and run:"
|
echo "Resolve conflicts and run:"
|
||||||
echo " git rebase --continue"
|
echo " git rebase --continue"
|
||||||
|
|||||||
Reference in New Issue
Block a user