Anonymous committed a6ec3c1

git-rebase: Use --ignore-if-in-upstream option when executing git-format-patch.

This reduces the number of conflicts when rebasing after a series of
patches to the same piece of code is committed upstream.

Signed-off-by: Robert Shearman <>
Signed-off-by: Junio C Hamano <>

Comments (0)

Files changed (1)

 if test -z "$do_merge"
-	git-format-patch -k --stdout --full-index "$upstream"..ORIG_HEAD |
+	git-format-patch -k --stdout --full-index --ignore-if-in-upstream "$upstream"..ORIG_HEAD |
 	git am --binary -3 -k --resolvemsg="$RESOLVEMSG" \
 	exit $?