Thread (1 message) 1 message, 1 author, 2021-05-12
  • (off-list ancestor, not in this archive)
  • Re: Rebase Question · Junio C Hamano <hidden> · 2021-05-12

Re: Rebase Question

From: Junio C Hamano <hidden>
Date: 2021-05-12 06:22:31

Jeff King [off-list ref] writes:
I don't think rerere helps here. In a rebase like this, the problem is
that it _isn't_ the same conflict.

Imagine a case like this:
...
Applying the first commit gets this conflict (in diff3 form)

  <<<<<<< ours
  base
  another
  ||||||| base
  base
  =======
  one
  >>>>>>> theirs

After we fix that up to "one\nanother", the second conflict is:

  <<<<<<< ours
  one
  another
  ||||||| base
  one
  =======
  two
  >>>>>>> theirs

Likewise, even if you had done the original merge between branch tips,
you'd have seen yet another conflict:

  <<<<<<< ours
  two
  ||||||| base
  base
  =======
  base
  another
  >>>>>>> theirs

The actual lines changed are the same, but as the nearby context is
continually shifting, we don't consider these to be the "same" conflict.
Correct.  The conflict you see at each step may be trivial to
resolve, but would not "replay" at all, exactly because they are not
the same conflicts.  Knowing that the user would resolve

    base --> base/another
        \                \
         ---> one--------- one/another

does not help us to decide that

    base --> two -----------
        \                   \
         ---> base/another---???

is resolved to two/another.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help