Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion src/patch
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ echo "Base Branch: $BASE"
echo "Selected Items: $ITEMS"

# From here on everything is destructive (but reversible) so we want hard stops
set -ex
set -e

# Create a blank branch to work on
git switch --orphan tatter/scratch
Expand Down Expand Up @@ -176,7 +176,11 @@ rm composer.*
# Create the new branch from base
git switch -c tatter/patches "$BASE"

# Restore the original state of vendor/
composer install > /dev/null

# Attempt the merge
set +e
git cherry-pick tatter/scratch

if [ $? -eq 0 ]; then
Expand All @@ -188,8 +192,10 @@ fi
git status

# Conflict: explain and exit
echo ""
echo "Conflicts detected during patch! Follow the git instructions for resolution."
echo "Once resolution is complete your changes will be available on branch tatter/patches"
echo "and you should remove the old working branch at tatter/scratch."
echo ""

exit 1