Re: Proposal: tell git a file has been renamed

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

 



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.



[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