script/backport-pr: cherry-pick the commit properly

We used to do traditional merges but since we started doing squash merges,
we don't want the -m1 flag for git-cherry-pick.
This commit is contained in:
Parker Moore 2017-08-12 16:08:10 -04:00
parent c810d761f7
commit 722c49cd6f
No known key found for this signature in database
GPG Key ID: 193CDEBA72063C58
1 changed files with 3 additions and 1 deletions

View File

@ -53,7 +53,9 @@ git log -1 $commit
conflicts="" conflicts=""
git cherry-pick -x --allow-empty -m1 $commit &> /dev/null || { # If we used regular merges, we'd use the `-m 1` flag for the cherry-pick
# command, but since we do squash-merges, we don't want this.
git cherry-pick -x --allow-empty $commit &> /dev/null || {
unmerged=$(git ls-files --unmerged --stage | cut -f 2 -d$'\t' | uniq) unmerged=$(git ls-files --unmerged --stage | cut -f 2 -d$'\t' | uniq)
conflicts="\n\nConflicting files:" conflicts="\n\nConflicting files:"
for file in $unmerged; do for file in $unmerged; do