{"push_id":787468766,"size":5,"distinct_size":0,"ref":"refs/heads/jk/archive-reachability","head":"09ad72ed75457041de7284f847475c3a6da20119","before":"0395a6e7514b220093446ccff5f3a1945f9dc412","commits":[{"sha":"7a2c4af7a82eebf2ed0e60a2b36c31e70c619264","author":{"email":"a6723cc3f76163bf7adb636a73ac3b0ceb3e6b9b@pobox.com","name":"Junio C Hamano"},"message":"Release Notes: typofix\n\nThanks to Andreas Schwab for careful reading.\n\nSigned-off-by: Junio C Hamano <gitster@pobox.com>","distinct":false,"url":"https://api.github.com/repos/peff/git/commits/7a2c4af7a82eebf2ed0e60a2b36c31e70c619264"},{"sha":"2d08ec652e8db8d770e3d989e780178deb27b901","author":{"email":"696e3fbcf235d40b6ea1ebd61c87cbea79d444e7@peff.net","name":"Jeff King"},"message":"upload-archive: restrict remote objects with reachability check\n\nWhen serving a remote request, git-upload-archive tries to\nrestrict access to unreachable objects, which matches the\nbehavior of upload-pack. However, we did so by restricting\nthe requested tree to \"<ref>[:<path>]\", because it is fast.\nThat covers the common cases, but does not allow requesting\nitems by a specific sha1 (either a tree or a commit sha1).\n\nInstead, let's do the correct-but-slower method of actually\nwalking back from the tips to see if the requested object is\nreachable. The performance impact of this is roughly:\n\n  1. For a recent commit, the speed is about the same (we\n     traverse in reverse chronological order, so we see it\n     almost immediately).\n\n  2. For an older commit, even one pointed at directly by a\n     ref (e.g., an old tag), we are slower, because we\n     traverse from the more recent tips. We are bounded in\n     this case by the time to look at all commits (i.e.,\n     \"time git rev-list --all\").\n\n  3. When we see \"$ref:$path\", we typically perform much\n     worse, because our traversal looks at all commits\n     first, followed by all trees.\n\n  4. The worst case (which we hit for an unreachable object)\n     is equivalent to \"time rev-list --objects --all\", which\n     is about the same amount of time pack-objects spends\n     preparing a full clone (which can be in the tens of\n     seconds for a large repository).\n\nThe implementation is a fairly straightforward application\nof the traverse_commit_list function. Using the\nmark_objects_reachable function would seem more appropriate,\nbut it has no mechanism for looking for a specific object,\nwhich lets us end the traversal early in common cases.","distinct":false,"url":"https://api.github.com/repos/peff/git/commits/2d08ec652e8db8d770e3d989e780178deb27b901"},{"sha":"e99664700fd16b965d6352b9dc7908fefb5aa604","author":{"email":"696e3fbcf235d40b6ea1ebd61c87cbea79d444e7@peff.net","name":"Jeff King"},"message":"list-objects: optimize \"revs->blob_objects = 0\" case\n\nIf we are traversing trees during a \"--objects\"\ntraversal, we may skip blobs if the \"blob_objects\" field of\nrev_info is not set. But we do so as the first thing in\nprocess_blob(), only after we have actually created the\n\"struct blob\" object, incurring a hash lookup. We can\noptimize out this no-op call completely.\n\nThis does not actually affect any current code, as all of\nthe current traversals always set blob_objects when looking\nat objects, anyway.","distinct":false,"url":"https://api.github.com/repos/peff/git/commits/e99664700fd16b965d6352b9dc7908fefb5aa604"},{"sha":"27e856f6a60165cd1c2f81005ca79255cbaf441f","author":{"email":"696e3fbcf235d40b6ea1ebd61c87cbea79d444e7@peff.net","name":"Jeff King"},"message":"archive: ignore blob objects when checking reachability\n\nWe cannot create an archive from a blob object, so we would\nnot expect anyone to provide one to us. And if they do, we\nwill fail anyway just after the reachability check.  We can\ntherefore optimize our reachability check to ignore blobs\ncompletely, and not even create a \"struct blob\" for them.\n\nDepending on the repository size and the exact place we find\nthe reachable object in the traversal, this can save 20-25%,\na we can avoid many lookups in the object hash.\n\nThe downside of this is that a blob provided to a remote\narchive process will fail with \"no such object\" rather than\n\"object is not a tree\" (we could organize the code to retain\nthe old message, but since we no longer know whether the\nblob is reachable or not, we would potentially be leaking\ninformation about the existence of unreachable objects).","distinct":false,"url":"https://api.github.com/repos/peff/git/commits/27e856f6a60165cd1c2f81005ca79255cbaf441f"},{"sha":"09ad72ed75457041de7284f847475c3a6da20119","author":{"email":"696e3fbcf235d40b6ea1ebd61c87cbea79d444e7@peff.net","name":"Jeff King"},"message":"t5000: drop tag to supposedly unreachable object\n\nWe try to create an unreachable commit, but test_commit will\nretain a tag pointing to it. Oops.","distinct":false,"url":"https://api.github.com/repos/peff/git/commits/09ad72ed75457041de7284f847475c3a6da20119"}]}