Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[egit-dev] Fwd: Fwd: Should I be able to Merge content when Synchronizing?


---------- Forwarded message ----------
From: Christian Halstrick <christian.halstrick@xxxxxxxxx>
Date: Thu, Apr 7, 2011 at 09:46
Subject: Re: [egit-dev] Fwd: Should I be able to Merge content when
To: Thomas Fletcher <thomas@xxxxxxxxxxxxxxxxx>


> I haven't experimented, but how does git deal with merging changes to
> binary content such as images?  Obviously there would be no sensible
> automated merge strategy in those cases so they must fall into the same
> situation as hitting the SimpleTwoWayInCore code path?

That's a good one. Of course we should not event try a content merge for
binary files and in that case the merge algorithm would do what you want.
But I don't think EGit/JGit is behaving like that. JGit will currently try to
content-merge even two jpg's adding conflict markers into those files.

Of course it's tricky in your case because the problematic files are not binary
if we use any heuristics to determine filetype. I searched native git docs and
I think there we have the chance to tell with gitattributes that files
with certain
file-names should be treated binary. Maybe we could enhance JGit
support gitattributes (at least for this binary-setting) and MergeAlgorithm
should be enhanced to honor this. I'll open a bug for this.


Back to the top