Re: [PATCHv4 2/2] pull --rebase: Avoid spurious conflicts and reapplying unnecessary patches
- From
Elijah Newren <newren@gmail.com>
- Date
- Aug 12, 2010, 21:02 UTC
- Message-ID
- <AANLkTinqW4h-SG21ZEAvhKEPJ46WfBRyYboUsfXjy7Zn@mail.gmail.com>
- In-Reply-To
- <AANLkTikLhe9+6ovLT99qG9wwDjXVmT8_81xuN8P31eve@mail.gmail.com>
Hi,
On Thu, Aug 12, 2010 at 8:37 AM, Santi Béjar <santi@agolina.net> wrote:
Show 14 quoted lines
> 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"
> + fiHow does this help? I've been trying to scratch my head trying to figure out a case where it could affect the outcome, and am struggling to come up with one.
Show 12 quoted lines
> @@ -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 > +
This was indeed my original patch, then I just (incorrectly, as you pointed out) moved other bits of code to be with this so that the determination of oldremoteref was all in one place.