From 722c49cd6feee44bead83c28d829b5003bb10c06 Mon Sep 17 00:00:00 2001 From: Parker Moore Date: Sat, 12 Aug 2017 16:08:10 -0400 Subject: [PATCH] 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. --- script/backport-pr | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/script/backport-pr b/script/backport-pr index 7c74edea..a2b2c33f 100755 --- a/script/backport-pr +++ b/script/backport-pr @@ -53,7 +53,9 @@ git log -1 $commit 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) conflicts="\n\nConflicting files:" for file in $unmerged; do