)]}'
{
  "commit": "4f6d26b16703e59e009fe5dde923b87793c5f561",
  "tree": "845da1e4fe86e63b5ea131cb65fda1d1a98b2dec",
  "parents": [
    "f1f5de442faf85724e67917cd24df6b7275ca360"
  ],
  "author": {
    "name": "Derrick Stolee",
    "email": "dstolee@microsoft.com",
    "time": "Wed Jan 16 10:25:58 2019 -0800"
  },
  "committer": {
    "name": "Junio C Hamano",
    "email": "gitster@pobox.com",
    "time": "Thu Jan 17 13:44:39 2019 -0800"
  },
  "message": "list-objects: consume sparse tree walk\n\nWhen creating a pack-file using \u0027git pack-objects --revs\u0027 we provide\na list of interesting and uninteresting commits. For example, a push\noperation would make the local topic branch be interesting and the\nknown remote refs as uninteresting. We want to discover the set of\nnew objects to send to the server as a thin pack.\n\nWe walk these commits until we discover a frontier of commits such\nthat every commit walk starting at interesting commits ends in a root\ncommit or unintersting commit. We then need to discover which\nnon-commit objects are reachable from  uninteresting commits. This\ncommit walk is not changing during this series.\n\nThe mark_edges_uninteresting() method in list-objects.c iterates on\nthe commit list and does the following:\n\n* If the commit is UNINTERSTING, then mark its root tree and every\n  object it can reach as UNINTERESTING.\n\n* If the commit is interesting, then mark the root tree of every\n  UNINTERSTING parent (and all objects that tree can reach) as\n  UNINTERSTING.\n\nAt the very end, we repeat the process on every commit directly\ngiven to the revision walk from stdin. This helps ensure we properly\ncover shallow commits that otherwise were not included in the\nfrontier.\n\nThe logic to recursively follow trees is in the\nmark_tree_uninteresting() method in revision.c. The algorithm avoids\nduplicate work by not recursing into trees that are already marked\nUNINTERSTING.\n\nAdd a new \u0027sparse\u0027 option to the mark_edges_uninteresting() method\nthat performs this logic in a slightly different way. As we iterate\nover the commits, we add all of the root trees to an oidset. Then,\ncall mark_trees_uninteresting_sparse() on that oidset. Note that we\ninclude interesting trees in this process. The current implementation\nof mark_trees_unintersting_sparse() will walk the same trees as\nthe old logic, but this will be replaced in a later change.\n\nAdd a \u0027--sparse\u0027 flag in \u0027git pack-objects\u0027 to call this new logic.\nAdd a new test script t/t5322-pack-objects-sparse.sh that tests this\noption. The tests currently demonstrate that the resulting object\nlist is the same as the old algorithm. This includes a case where\nboth algorithms pack an object that is not needed by a remote due to\nlimits on the explored set of trees. When the sparse algorithm is\nchanged in a later commit, we will add a test that demonstrates a\nchange of behavior in some cases.\n\nSigned-off-by: Derrick Stolee \u003cdstolee@microsoft.com\u003e\nSigned-off-by: Junio C Hamano \u003cgitster@pobox.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "40c825c38197f4e335ebfb162415cdcc52bbdf1e",
      "old_mode": 33188,
      "old_path": "Documentation/git-pack-objects.txt",
      "new_id": "e45f3e680d3632c8122db01b2a51cc3971c27922",
      "new_mode": 33188,
      "new_path": "Documentation/git-pack-objects.txt"
    },
    {
      "type": "modify",
      "old_id": "487675c67249a3164294aae71c1c2a650f3c4947",
      "old_mode": 33188,
      "old_path": "bisect.c",
      "new_id": "842f8b4b8f373a29880f7248bc8a4f5b6cb1f543",
      "new_mode": 33188,
      "new_path": "bisect.c"
    },
    {
      "type": "modify",
      "old_id": "411aefd6875b2d35ee4a12d1a043ba50027021b3",
      "old_mode": 33188,
      "old_path": "builtin/pack-objects.c",
      "new_id": "7d5b0735e396985c82dfa64bdd5d43badb6eb1ce",
      "new_mode": 33188,
      "new_path": "builtin/pack-objects.c"
    },
    {
      "type": "modify",
      "old_id": "2880ed37e3f97193d2374657346b4de52bc44954",
      "old_mode": 33188,
      "old_path": "builtin/rev-list.c",
      "new_id": "9663cbfae0b8edc7fc12ff993d9e368c16127689",
      "new_mode": 33188,
      "new_path": "builtin/rev-list.c"
    },
    {
      "type": "modify",
      "old_id": "cd485909127a79afcbb58ef18cd28977b65efb79",
      "old_mode": 33188,
      "old_path": "http-push.c",
      "new_id": "ea52d6f9f6481657aa0c4591d193ab1fe4864ae0",
      "new_mode": 33188,
      "new_path": "http-push.c"
    },
    {
      "type": "modify",
      "old_id": "c41cc80db5bc86279bcf560109f599a9783b2755",
      "old_mode": 33188,
      "old_path": "list-objects.c",
      "new_id": "fb728f784267268594777e6a15d7f94ae4e6fb71",
      "new_mode": 33188,
      "new_path": "list-objects.c"
    },
    {
      "type": "modify",
      "old_id": "ad407629269a7e7c77953390beccf036fd2452f6",
      "old_mode": 33188,
      "old_path": "list-objects.h",
      "new_id": "a952680e46671db2543bc4abff78a2d898cd1408",
      "new_mode": 33188,
      "new_path": "list-objects.h"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "30aef6498af9e76abac668aad99e92f7105b26a6",
      "new_mode": 33261,
      "new_path": "t/t5322-pack-objects-sparse.sh"
    }
  ]
}
