{"push_id":679782823,"size":5,"distinct_size":0,"ref":"refs/heads/jk/pack-stat-validity","head":"7d9fece4c418ef8b3e464fd91d194e6df140e890","before":"5f8a05be247a52e323add48e756ac369f702d926","commits":[{"sha":"fa73a582b5e7e01184171dc310c7ee0bd9bb2721","author":{"email":"696e3fbcf235d40b6ea1ebd61c87cbea79d444e7@peff.net","name":"Jeff King"},"message":"t7063: hide stderr from setup inside prereq\n\nWhen t7063 starts, it runs \"update-index --untracked-cache\"\nto see if we support the untracked cache. Its output goes\nstraight to stderr, even if the test is not run with \"-v\".\nLet's wrap it in a prereq that will hide the output by\ndefault, but show it with \"-v\".\n\nSigned-off-by: Jeff King <peff@peff.net>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>","distinct":false,"url":"https://api.github.com/repos/peff/git/commits/fa73a582b5e7e01184171dc310c7ee0bd9bb2721"},{"sha":"77bd3ea9f54f1584147b594abc04c26ca516d987","author":{"email":"a6723cc3f76163bf7adb636a73ac3b0ceb3e6b9b@pobox.com","name":"Junio C Hamano"},"message":"Merge branch 'nd/untracked-cache'\n\n* nd/untracked-cache:\n  t7063: hide stderr from setup inside prereq","distinct":false,"url":"https://api.github.com/repos/peff/git/commits/77bd3ea9f54f1584147b594abc04c26ca516d987"},{"sha":"fb90801e5c080ed172854a599b8801ccff821520","author":{"email":"696e3fbcf235d40b6ea1ebd61c87cbea79d444e7@peff.net","name":"Jeff King"},"message":"stat_validity: handle non-regular files\n\nThe stat_validity code was originally written to avoid\nre-reading the packed-refs file when it has not changed. It\nmakes sure that the file continues to match S_ISREG() when\nwe check it.\n\nHowever, we can use the same concept on a directory to see\nwhether it has been modified. Even though we still have to\ntouch the filesystem to do the stat, this can provide a\nspeedup even over opendir/readdir/closedir, especially on\nhigh-latency filesystems like NFS.\n\nThis patch adds a \"mode\" field to stat_validity, which lets\nus check that the mode has stayed the same (rather than\nexplicitly checking that it is a regular file).\n\nAs a bonus cleanup, we can stop allocating the embedded\n\"stat_data\" on the heap. Prior to this patch, we needed to\nrepresent the case where the file did not exist, and we used\n\"sv->sd == NULL\" for that. Now we can simply check that\n\"sv->mode\" is 0.","distinct":false,"url":"https://api.github.com/repos/peff/git/commits/fb90801e5c080ed172854a599b8801ccff821520"},{"sha":"eba9ab67e2f1103d78a495ec4f753cb584ffb761","author":{"email":"696e3fbcf235d40b6ea1ebd61c87cbea79d444e7@peff.net","name":"Jeff King"},"message":"cache.h: move stat_validity definition up\n\nIt would be nice to embed stat_validity structs inside other\nstructs defined in cache.h. We cannot get away with a\nforward declaration, because using it in a struct definition\nmeans the compilers needs the real size.","distinct":false,"url":"https://api.github.com/repos/peff/git/commits/eba9ab67e2f1103d78a495ec4f753cb584ffb761"},{"sha":"7d9fece4c418ef8b3e464fd91d194e6df140e890","author":{"email":"696e3fbcf235d40b6ea1ebd61c87cbea79d444e7@peff.net","name":"Jeff King"},"message":"prepare_packed_git: use stat_validity to avoid re-reading packs\n\nWhen we try to read an object and fail, we call\nreprepare_packed_git() to re-scan the list of packfiles.\nThis catches any \"racy\" cases in which somebody is repacking\nor making new objects. The performance implications of\nre-scanning the pack directory are not usually a big deal,\nbecause failing to find an object is the unlikely case;\nwe typically die if the re-scan does not help.\n\nSince 45e8a74 (has_sha1_file: re-check pack directory before\ngiving up, 2013-08-30), we do the same thing for\nhas_sha1_file.  Some calls to has_sha1_file are in the same\nboat: they expect most calls to return true. But some sites,\nsuch as the collision test in index-pack.c, may make a large\nnumber of calls, most of which they expect to be false. On a\nlocal system, this can cause a performance slowdown of\naround 5%. But on a system with high-latency system calls\n(like NFS), it can be much worse.\n\nSince the common case is that the pack directory has _not_\nchanged, we can improve the performance by using stat()\nbefore doing the opendir()/readdir()/closedir() to re-scan\nthe directory. It's valid to check stat() for just the\nsingle \"objects/pack\" directory because:\n\n  1. We know that packfiles themselves are not changed in\n     place; only new files are written, which would update\n     the mtime of the directory.\n\n  2. There are no subdirectories inside the pack directory.\n     Checking the single top-level directory can tell us\n     whether anything changed.","distinct":false,"url":"https://api.github.com/repos/peff/git/commits/7d9fece4c418ef8b3e464fd91d194e6df140e890"}]}