)]}'
{
  "commit": "cb9f058f9b260dfa0878f7b8bf42936a7e330d35",
  "tree": "44aa7dbdf036f693dc29b469a373a3a78698f276",
  "parents": [
    "ce0c739f214f225b144e9fe425ad2d1f93275978"
  ],
  "author": {
    "name": "Dmitrii Filippov",
    "email": "dmfilippov@google.com",
    "time": "Mon Jun 27 20:03:53 2022 +0200"
  },
  "committer": {
    "name": "Matthias Sohn",
    "email": "matthias.sohn@sap.com",
    "time": "Tue Nov 29 10:49:27 2022 +0100"
  },
  "message": "Fix crashes on rare combination of file names\n\nThe NameConflictTreeWalk class is used in merge for iterating over\nentries in commits. The class uses a separate iterator for each\ncommit\u0027s tree. In rare cases it can incorrectly report the same entry\ntwice. As a result, duplicated entries are added to the merge result\nand later jgit throws an exception when it tries to process merge\nresult.\n\nThe problem appears only when there is a directory-file conflict for\nthe last item in trees. Example from the bug:\nCommit 1:\n* subtree - file\n* subtree-0 - file\nCommit 2:\n* subtree - directory\n* subtree-0 - file\nHere the names are ordered like this:\n\"subtree\" file \u003c\"subtree-0\" file \u003c \"subtree\" directory.\n\nThe NameConflictTreeWalk handles similar cases correctly if there are\nother files after subtree... in commits - this is processed in the\nAbstractTreeIterator.min function. Existing code has a special\noptimization for the case, when all trees are pointed to the same\nentry name - it skips additional checks. However, this optimization\nincorrectly skips checks if one of trees reached the end.\n\nThe fix processes a situation when some trees reached the end, while\nothers are still point to an entry.\n\nbug: 535919\nChange-Id: I62fde3dd89779fac282479c093400448b4ac5c86\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "dc119c90fffbe78db6d877ef840a2033796439ee",
      "old_mode": 33188,
      "old_path": "org.eclipse.jgit.test/tst/org/eclipse/jgit/merge/MergerTest.java",
      "new_id": "022e8cd55e7828bf16d986f3f4bbf4784207cf6a",
      "new_mode": 33188,
      "new_path": "org.eclipse.jgit.test/tst/org/eclipse/jgit/merge/MergerTest.java"
    },
    {
      "type": "modify",
      "old_id": "f03163d491c7212c2f56fe5dc2d2a4e66a74ab43",
      "old_mode": 33188,
      "old_path": "org.eclipse.jgit.test/tst/org/eclipse/jgit/treewalk/NameConflictTreeWalkTest.java",
      "new_id": "69d90aae9009742ac1eae87011d1e90e5237117d",
      "new_mode": 33188,
      "new_path": "org.eclipse.jgit.test/tst/org/eclipse/jgit/treewalk/NameConflictTreeWalkTest.java"
    },
    {
      "type": "modify",
      "old_id": "2fd945b03f8454c13e5d6edf16b137a7c04e66ee",
      "old_mode": 33188,
      "old_path": "org.eclipse.jgit/src/org/eclipse/jgit/treewalk/NameConflictTreeWalk.java",
      "new_id": "ffb41379bd559539118c0c277689428fb9b3e4fb",
      "new_mode": 33188,
      "new_path": "org.eclipse.jgit/src/org/eclipse/jgit/treewalk/NameConflictTreeWalk.java"
    }
  ]
}
