)]}'
{
  "commit": "c7976cc7f52d74ae9a4abcbe829b9d02b0f6c287",
  "tree": "d109e27d7cacb2d0c535f4fd8ee73ebee7bba03f",
  "parents": [
    "7ba621f951cd5ea2cebea7c19b13e141be3fd833"
  ],
  "author": {
    "name": "Hongkai Liu",
    "email": "hongkai.liu@ericsson.com",
    "time": "Wed Nov 30 14:14:12 2016 -0500"
  },
  "committer": {
    "name": "Hector Oswaldo Caballero",
    "email": "hector.caballero@ericsson.com",
    "time": "Thu Feb 09 10:28:12 2017 -0500"
  },
  "message": "Calculate repository disk usage by adding size of git objects\n\nOriginally, the size of a repository is computed by adding up the size\nof the files on disk. This calculation can be larger than the size of\nthe objects in the repository in some cases, like for example:\n\n * Repository folders are mounted on NFS volumes so that files in .nfs\n   folders are added in quota.\n * Size of bitmap files generated by GC are added in quota.\n * Garbage files in the repository are added in quota.\n\nThis change adds the option of calculating the size of a repository by\nadding the size of the git objects in the repository. Even if this\ncalculation have some limitations (see below), it can give a more\naccurate approximation in the cases mentioned before.\n\nThis option is also useful to avoid blocking access to a dirty\nrepository, e.g., when GC does not run in time.\n\n---Limitations \u0026 Q\u0026A---\nTested with JGit version 4.1.2.201602141800-r\n\n * Q: Does it consider only reachable objects?\n   A: No. Any git object present in the repository is accounted in the\n      final calculation.\n\n * Q: If an object is present in more than one pack file, is its size\n      computed only once?\n   A: No. Given JGit calculates the size of the packed objects as the\n      size of the pack files, if an object is present in two different\n      packs it will be counted twice.\n\n * Q: If an object is present in a pack file and also as a loose object,\n      is its size computed only once?\n   A: No. JGit calculates the size of packed objects as the size of pack\n      files and the size of loose objects as the sum of the sizes of all\n      files present in the \u0027objects\u0027 directory excluding \u0027pack\u0027 and\n      \u0027info\u0027 folders. So, if an object is present in a pack file and also\n      as a loose object it will be counted twice.\n\nChange-Id: Icc5bc6fdf8fa5c4635eabc1cd61870890e5277c9\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "f23d11fda5a3bf23a98523b71584dc7e5c446f0e",
      "old_mode": 33188,
      "old_path": "src/main/java/com/googlesource/gerrit/plugins/quota/MaxRepositorySizeQuota.java",
      "new_id": "90f348354c1e4177a98778038b2690eb5dc69656",
      "new_mode": 33188,
      "new_path": "src/main/java/com/googlesource/gerrit/plugins/quota/MaxRepositorySizeQuota.java"
    },
    {
      "type": "modify",
      "old_id": "ea254a78f463e78d5df558ef200075f4e1872a44",
      "old_mode": 33188,
      "old_path": "src/main/resources/Documentation/config.md",
      "new_id": "31c32b9e5ee894ccd5b1eaabe952f3398eca5bef",
      "new_mode": 33188,
      "new_path": "src/main/resources/Documentation/config.md"
    }
  ]
}
