)]}'
{
  "commit": "7d2b3b9e25a430241a2d277e0cb222ad40cd0c2c",
  "tree": "15157f6150889fb24070b249f300dfa6086121d6",
  "parents": [
    "53ea86cd7be3859ff741ea2b9760396ffabf5fe0"
  ],
  "author": {
    "name": "Hugo Arès",
    "email": "hugo.ares@ericsson.com",
    "time": "Fri Sep 18 14:05:23 2015 -0400"
  },
  "committer": {
    "name": "Matthias Sohn",
    "email": "matthias.sohn@sap.com",
    "time": "Thu Apr 07 13:00:50 2016 +0200"
  },
  "message": "Remove repository from cache when it\u0027s closed\n\nRepositoryCache has 2 methods to remove a repository from the cache but\nthey are never called when a repository is closed. Users of the cache\nwere expected to call one of those 2 methods but how could they have\ncalled them at proper time without having visibility of the repository\nusage count.\n\nIdeally, I would have reworked the RepositoryCache to wrap any\nrepository it opens in a class that would be responsible to unregister\nthem from the cache when it\u0027s really closed, i.e. when usage counter\nreaches 0. The problem preventing the wrapping solution is the\nRepositoryCache.register method that allows to register an already\nopened repository in the cache. Such repositories cannot be wrapped\nbecause callers are still holding a reference on the unwrapped\nrepository.\n\nDocument that RepositoryCache.close method is removing the repository\nfrom the cache as well as closing it and rework\nRepositoryCache.unregister method to only remove the repository from the\ncache. Use the latter to unregister repository when Repository.doClose\nis getting executed.\n\nChange-Id: Ia364816e4da8d7b6cfa72f10758ca31aa8a1f9db\nSigned-off-by: Hugo Arès \u003chugo.ares@ericsson.com\u003e\nSigned-off-by: Matthias Sohn \u003cmatthias.sohn@sap.com\u003e",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "8f30fd0821e64ff377d2881d51e3a4c9e731dd87",
      "old_mode": 33188,
      "old_path": "org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/RepositoryCacheTest.java",
      "new_id": "a1cec2d9142ea5f64637eb5d46bba7fd0ce943f4",
      "new_mode": 33188,
      "new_path": "org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/RepositoryCacheTest.java"
    },
    {
      "type": "modify",
      "old_id": "5546b790e8cac193ab9c3f81cc2e897b3b121187",
      "old_mode": 33188,
      "old_path": "org.eclipse.jgit/src/org/eclipse/jgit/lib/Repository.java",
      "new_id": "ba0dea39f504e637d237d9cd2683e07f80646da9",
      "new_mode": 33188,
      "new_path": "org.eclipse.jgit/src/org/eclipse/jgit/lib/Repository.java"
    },
    {
      "type": "modify",
      "old_id": "58771857b6e2404fa5a8293552ad8e33a78a6ac5",
      "old_mode": 33188,
      "old_path": "org.eclipse.jgit/src/org/eclipse/jgit/lib/RepositoryCache.java",
      "new_id": "22b5fcd1128af517bab5bd3276cb91bc32b87143",
      "new_mode": 33188,
      "new_path": "org.eclipse.jgit/src/org/eclipse/jgit/lib/RepositoryCache.java"
    }
  ]
}
