On Wednesday, April 16, 2014 7:25:22 PM UTC+2, Michael Power wrote:
> I think this is caused by the complicated nature of the merge I am doing.
> Here is the background. I start with a git project structured like the
> following. For the sake of description this was release branch R1
>> /pom.xml - for webapp
>> /src - for webapp
> I wanted to create sub modules but that is not possible as the root pom
> is actually a webapp. So I created a sub folder with a root pom inside of
>> /pom.xml - for webapp usring webapp-parent for root
>> /src - for webapp
>> /webapp-parent/pom.xml - root pom, adding ".." as module
> For the next release I decided to get ahead of this bad folder structure
> by moving things around. I did this on the new release branch R2
>> mkdir webapp
>> git mv pom.xml webapp/
>> git mv src/ webapp/
>> git mv webapp-parent/pom.xml .
>> git commit -m "Commit move without changing contents of file"
>> vim webapp/pom.xml - update parent path
>> vim pom.xml - update child path
>> git commit -m "Update files to match new path"
> This worked good at first. But did not work so well when I tried to merge
> R1 to R2. Since /pom.xml exists in both R1 and R2 git did not pickup that
> the original file was moved to /webapp/pom.xml in R2 and /pom.xml in R2
> actually mapped back to R1 /webapp-parent/pom.xml
This sounds a bit odd. Even if Git didn't detect a rename in this case,
it's still just files being changed. Sure, there might be some conflicts,
but they should be easy to resolve I guess. Why could you not complete this
> I decided I could resolve the problem with some incremental moves with
> branches inbetween R1 and R2. Currently I have a PostR1, PreR2, and ToR2
> branches. I merge from R1 to PostR1 then PostR1 to PreR2, then PreR2 to
> ToR2, then finally ToR2 to R2. It ran smoothly until I ran the merge ToR2
> to R2 then the BASE file was corrupted.
I doubt that any of this would help Git figure out which files were moved
to where. The steps you made above seem quite correct, so adding any more
moves in between won't help. I'm not sure what all these branches are
supposed to achieve..
> This method of merging through multiple merges worked several times until
> my OS was replaced. Then after reinstalling and switching from cygwin to
> msys I got this BASE file corruption.
This also sounds odd. Cygwin/Git and msysGit (Git for Windows) use the same
diff/merging machinery, as far as I'm aware. Of course it *could* be a bug
in Msysgit. The only way to say for sure is to recreate the problem in a
deterministic way (shell script, etc), and then test the various versions.
You received this message because you are subscribed to the Google Groups "Git
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email
For more options, visit https://groups.google.com/d/optout.