Martin Langhoff [off-list ref] 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.
On Wed, Aug 23, 2017 at 4:34 PM, Junio C Hamano [off-list ref] wrote:
Between these two steps:
quoted
- 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.
Hi Junio!
thanks for the quick response.
Questions
- when I tell it to forget, won't it forget the pre-resolution state?
my read of the rerere docs imply that it gets called during the merge
to record the conflicted state.
- would it be a feature if it updated its resolution db
automagically? rerere is plenty automagic already...
cheers,
m
--
martin.langhoff@gmail.com
- ask interesting questions ~ http://linkedin.com/in/martinlanghoff
- don't be distracted ~ http://github.com/martin-langhoff
by shiny stuff
Hi Martin,
On Wed, 23 Aug 2017, Martin Langhoff wrote:
On Wed, Aug 23, 2017 at 4:34 PM, Junio C Hamano [off-list ref] wrote:
quoted
Between these two steps:
quoted
- 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.
Questions
- when I tell it to forget, won't it forget the pre-resolution state?
my read of the rerere docs imply that it gets called during the merge
to record the conflicted state.
In my hands, I need to tell rerere to forget, *and then recreate the merge
conflict* before I can resolve it again and let rerere learn the new
resolution.
- would it be a feature if it updated its resolution db
automagically? rerere is plenty automagic already...
That would most likely be a very welcome feature here.
Thanks,
Johannes