Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jgit-dev] [egit-dev] release 1.2 ahead

2011/12/1 Robin Stocker <robin@xxxxxxxxx>
Matthias Sohn wrote:
> I tried testing this but couldn't find an example where I would
> see a difference when using this fix. Could you describe
> a simple example where I can see how it fails without your patch and
> succeeds with your patch ? Or provide a small test repository
> containing
> such an example.

It's a bit involved, but here goes:

1. Configure your Eclipse to use ISO-8859-1 as the workspace encoding. One way
  of doing that is to add -Dfile.encoding=ISO-8859-1 to eclipse.ini.

2. Clone the following repo:

3. Merge the Branch "origin/feature". There will be a conflict in test.xml.

4. Start the Merge Tool on the conflicting file, and select the HEAD radio

Now, the left side will have the encoding messed up, as it uses the workspace
encoding (ISO-8859-1) instead of the file encoding (UTF-8). The right side is
decoded correctly. If there are more lines in the file with non-ASCII
characters, they will all show differences, because the diff view works on the
decoded contents.

With the proposed change, the left side also uses the file encoding, which
leads to correct decoding, and no spurious diffs.

this worked nicely, I merge these patches, thanks Robin


Back to the top