Re: [PATCHv4 2/2] pull --rebase: Avoid spurious conflicts and reapplying unnecessary patches
And now the attachment.
Santi
diff --git c/git-pull.sh w/git-pull.sh
index a09a44e..c1617d5 100755
--- c/git-pull.sh
+++ w/git-pull.sh
@@ -214,7 +214,10 @@ test true = "$rebase" && {
do
if test "$reflog" = "$(git merge-base $reflog $curr_branch)"
then
- oldremoteref="$reflog"
+ if test "$reflog" != $(git merge-base $reflog $remoteref)
+ then
+ oldremoteref="$reflog"
+ fi
break
fi
done
@@ -273,6 +276,14 @@ then
exit
fi
+if test true = "$rebase"
+then
+ if test "$oldremoteref" = $(git merge-base $oldremoteref $merge_head)
+ then
+ unset oldremoteref
+ fi
+fi
+
merge_name=$(git fmt-merge-msg $log_arg <"$GIT_DIR/FETCH_HEAD") || exit
case "$rebase" in
true)