)]}'
{
  "commit": "8cdaaaf2906d565e6c072d433e1f031fb3dab373",
  "tree": "8f029c1a5d975c29cf2339d2b774b98c8bc3259b",
  "parents": [
    "429cd04f6f8b5eca3200d3119d6ac30da41e5271"
  ],
  "author": {
    "name": "Andrey Loskutov",
    "email": "loskutov@gmx.de",
    "time": "Wed Nov 20 16:58:41 2019 +0100"
  },
  "committer": {
    "name": "Andrey Loskutov",
    "email": "loskutov@gmx.de",
    "time": "Wed Nov 20 16:58:41 2019 +0100"
  },
  "message": "Bug 553269 - Eclipse detects changed ENCODING on opening a project with\nexplicit encoding set\n\nAfter closing and opening a project we do not expect ENCODING flag to be\nin the resource delta send, but the code does exactly that *if* the\nproject encoding was modified at least once during the current Eclipse\nsession. This problem was introduced in bug 84350.\n\nResourceInfo.incrementCharsetGenerationCount() writes two parts of an\nint into charsetAndContentId (and\nResourceInfo.getCharsetGenerationCount() uses the upper part), but\nResourceInfo.writeTo(DataOutput) and ResourceInfo.readFrom(int,\nDataInput) read/write only the lower part.\n\nSo every time Container.setDefaultCharset(String, IProgressMonitor) is\ncalled (for example after reading\n.settings/org.eclipse.core.resources.prefs with encoding set), the\n\"current\" (in memory) project info differs from saved/loaded project\ninfo.\n\nSince the \"current\" project info remains in memory after closing the\nproject, its charsetAndContentId content will be always different\ncompared to the data read back from disk.\n\nAfter Eclipse restart, where *all* the data is loaded from disk,\ncharsetAndContentId will be consistent (it will not have\n\"CharsetGenerationCount\" part anymore), and the troubles start again\nonly after someone touches .settings/org.eclipse.core.resources.prefs in\nsome way (either by changing encoding settings via UI or via git/other\ndirect resource operations).\n\nSafest way to fix that would be NOT to change the way how the tree is\nsaved to disk (so do NOT save \"CharsetGenerationCount\" part of\nResourceInfo.charsetAndContentId), but instead, clean up this part on\nclosing the project in Project.internalClose(IProgressMonitor), similar\nwhat is done via ResourceInfo.clearModificationStamp().\n\nChange-Id: I77cd8c0af2e3283191e185a8683162b77e544f39\nSigned-off-by: Andrey Loskutov \u003closkutov@gmx.de\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "5a61ab91dc3848a4658a98198807fb788adac6f5",
      "old_mode": 33188,
      "old_path": "bundles/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/Project.java",
      "new_id": "f907db7c4283c629826fdca4b3f54b099f5eb70e",
      "new_mode": 33188,
      "new_path": "bundles/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/Project.java"
    },
    {
      "type": "modify",
      "old_id": "1fbd4845d4274438878d4f50b369ec868882d8bc",
      "old_mode": 33188,
      "old_path": "bundles/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/ResourceInfo.java",
      "new_id": "f8c2e7aca5f41526e1d6a12c58217702d3f2866a",
      "new_mode": 33188,
      "new_path": "bundles/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/ResourceInfo.java"
    },
    {
      "type": "modify",
      "old_id": "aa95f69c14c3da75482b31165440a928d0a8a2b3",
      "old_mode": 33188,
      "old_path": "tests/org.eclipse.core.tests.resources/src/org/eclipse/core/tests/resources/regression/IResourceTest.java",
      "new_id": "8e14a6f11e3167fdcd852429ac25e491e3152404",
      "new_mode": 33188,
      "new_path": "tests/org.eclipse.core.tests.resources/src/org/eclipse/core/tests/resources/regression/IResourceTest.java"
    }
  ]
}
