merge-conflicts icon indicating copy to clipboard operation
merge-conflicts copied to clipboard

Merge staging seems to do whole file replace instead of tracking hunks

Open smiffy6969 opened this issue 8 years ago • 2 comments

Hi,

Just thought would give this a bash as i have a monster merge on my hands...

The one thing I am a bit concerned about is that if i pull confilcts up.... say edit mine with some of theirs and choose mine (so i have an edited version of mine), now the file has other hunks in it, but when i accept mine after editing it and stage changes, all changes are in one mass hunk, basically complete full file replace.

The issue is this losses visibility of the seperate hunks, I have no way of knowing what changes happend as it shows full text replace of whole file.

If i complete the change as above, save changes, then manually go mark file as resolved using git, all hunks are preserved and i can see individual changes....

Is this a result of using the stage button once changes complete, or is this just what git does on a stage of a conflicted file.... if so would a mark resolved button be a good addition?

This really needs some investigation (more than i can permit with my time) as I dont want to loose traceability of changes.

I will check file after my monster merge to see if the few i did show mass text change or hunks preserved, my guess is full text change, but i will update after i commit to let you know. Until then i will have to do it the old fashioned way ;)

Paul

smiffy6969 avatar Jan 15 '16 10:01 smiffy6969

Hey!

First of all: the Atom package doesn't actually place the conflict hunks - it just parses the conflict markers that git's native merge algorithm leaves in each file when conflicts exist.

Are you saying that you're seeing the conflict marker controls disappear and change positions after you edit and accept? That's weird and would definitely be a major bug. Is there any chance you have a case that reproduces this in a public repository?

smashwilson avatar Jan 15 '16 13:01 smashwilson

No no examples in public... my merge is huge and will take a few days, i will know by then when i commit if markers are lost or not (or wif source tree is just doing something wierd... will update then

smiffy6969 avatar Jan 15 '16 14:01 smiffy6969