)]}'
{
  "commit": "1dcb0688c7c229501e6a486c03ffe251d5ed2761",
  "tree": "87a673b2175be803b76134c5fd1ef76874b2ccb3",
  "parents": [
    "bb5dab961344e58ea6c211a73f735f4e8265580b"
  ],
  "author": {
    "name": "Marco Miller",
    "email": "marco.miller@ericsson.com",
    "time": "Thu Jun 21 14:18:48 2018 -0400"
  },
  "committer": {
    "name": "Marco Miller",
    "email": "marco.miller@ericsson.com",
    "time": "Thu Jun 21 15:38:56 2018 -0400"
  },
  "message": "ResolveMerger: Fix encoding with string; use bytes\n\nThis change fixes the issue [1]. Before this fix, a merge involving\nthe caching of consecutive yet similar filenames with Norwegian\ncharacters [2] used to throw an IllegalStateException: Duplicate\nstages not allowed. This was caused by inaccurate decoding of the\nfilenames, using string values assuming default encoding. In the\ntoString method of DirCacheEntry, used before through getPathString,\nUTF-8 encoding is used, but the end result becomes default encoding,\nthrough Object\u0027s default toString usage. The special characters in\nthose two consecutive (particular) filenames [2] were becoming the\nvery same decoded /single character, lending consecutive -but then\nidentical- filenames. Thus the perceived duplicate 0-staging of the\nfile(s).\n\nReplace getPathString usage with getRawPath for this specific case,\nor use byte array representations of cached entries instead of string.\n\nAdding a test for this change is not possible, as there is no known\nway to change the default encoding for filenames such as [2] (e.g.).\nJGitTestUtil does write file contents through UTF-8, but encoding like\nso does not apply to the actual file name. Hence there is no way to\ncreate files with names properly made of special characters such as\n[2]\u0027s. And the test that is necessary for this case assumes such\nNorwegian (or similar characters) filenames. Changing the default\nlocale programmatically in a test has no effect either. And changing\nthe LANG value passed to the JVM is only possible upon starting it.\n\n[1] https://bugs.chromium.org/p/gerrit/issues/detail?id\u003d9153\n\n[2] \u003c\u003d\u003e\n(...)\n\"a/b/SíÒr-Norge.map\",\n\"a/b/Sør-Norge.map\",\n(...)\n\nChange-Id: Ib9f2f5297932337c9817064cc09d9f774dd168f4\nSigned-off-by: Marco Miller \u003cmarco.miller@ericsson.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "f667af278a74b65012558a495eb0c2cc88a01996",
      "old_mode": 33188,
      "old_path": "org.eclipse.jgit/src/org/eclipse/jgit/merge/ResolveMerger.java",
      "new_id": "90107be2edd9cca3e3e5bce81787f214b2496675",
      "new_mode": 33188,
      "new_path": "org.eclipse.jgit/src/org/eclipse/jgit/merge/ResolveMerger.java"
    }
  ]
}
