Re: Should rerere auto-update a merge resolution?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Martin Langhoff <martin.langhoff@xxxxxxxxx> writes:

> Hi List!
>
> Let's say...
>  - git v2.9.4
>  - rerere is enabled.
>  - I merge maint into master, resolve erroneously, commit
>  - I publish my merge in a temp branch, a reviewer points out my mistake
>  - I reset hard, retry the merge, using --no-commit, rerere  applies
> what it knows
>  - I fix things up, then commit
>
> So far so good.
>
> Oops! One of the branches has moved forward in the meantime, so
>
>  - git fetch
>  - git reset --hard master
>  - git merge maint
> ... rerere applies the first (incorrect) resolution...
>
> Am I doing it wrong? {C,Sh}ould rerere have done better?

Between these two steps:

>  - I reset hard, retry the merge, using --no-commit, rerere applies what it knows
>  - I fix things up, then commit

You'd tell rerere to forget what it knows because it is wrong.  Then
after these two (eh, now "three" because there is the "forget"
step), "rerere" notices that an updated resolution needs to be
recorded, so it remembers it.  Later re-resolution will replay the
corrected one, simply because the old incorrect one is forgotten and
replaced by the updated correct one.



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux