Thread (2 messages) 2 messages, 2 authors, 2023-05-11

Re: Proposal: tell git a file has been renamed

From: Erik Cervin Edin <hidden>
Date: 2023-05-11 13:45:34

Another example of where the current implementation isn't working great

  A - B - C

commit A makes changes to foo
commit B changes the name of foo to bar
commit C symlinks foo => bar

Rebasing the commits and reordering them

  commit B changes the name of foo to bar
  commit C symlinks foo => bar
  commit A makes changes to foo

is going to result in merge conflicts. The best way to achieve this
ordering is actually doing multiple rebases.

  commit B changes the name of foo to bar
  commit A makes changes to foo
  commit C symlinks foo => bar

followed by

  commit B changes the name of foo to bar
  commit C symlinks foo => bar
  commit A makes changes to foo

I guess the difficulty that arises from reordering commits like this
isn't unique to renames but it arguably results in a more hostile user
experience. It requires an unusual amount of discipline and
understanding of what is going on to resolve as well as how to avoid
it.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help