{"push_id":1061853051,"size":114,"distinct_size":106,"ref":"refs/heads/pu","head":"21a7a3bf0b0fe1a06672874b427e5c6f194bbaeb","before":"ad03c42bca1d7caddc0e3f2b14df4b32abd81848","commits":[{"sha":"24041d6be54d89b5fb0b2bbf70df04bbbff6ba9e","author":{"email":"a6723cc3f76163bf7adb636a73ac3b0ceb3e6b9b@pobox.com","name":"Junio C Hamano"},"message":"setup.c: do not feed NULL to \"%.*s\" even with precision 0\n\nA recent update 75faa45a (replace trivial malloc + sprintf / strcpy\ncalls with xstrfmt, 2015-09-24) rewrote\n\n\tprepare an empty buffer\n\tif (len)\n        \tappend the first len bytes of \"prefix\" to the buffer\n\tappend \"path\" to the buffer\n\nthat computed \"path\", optionally prefixed by \"prefix\", into\n\n\txstrfmt(\"%.*s%s\", len, prefix, path);\n\nHowever, passing a NULL pointer to the printf(3) family of functions\nto format it with %s conversion, even with the precision set to 0,\ni.e.\n\n\txstrfmt(\"%.*s\", 0, NULL)\n\nyields undefined results, at least on some platforms.\n\nAvoid this problem by substituting prefix with \"\" when len==0, as\nprefix can legally be NULL in that case.  This would mimick the\nintent of the original code better.\n\nReported-by: Tom G. Christensen <tgc@jupiterrise.com>\nHelped-by: Jeff King <peff@peff.net>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>","distinct":true,"url":"https://api.github.com/repos/sunny256/git/commits/24041d6be54d89b5fb0b2bbf70df04bbbff6ba9e"},{"sha":"178e8143b4f79290b3ffe40fe2ebf769fccc1ab7","author":{"email":"0e18f44c1fec03ec4083422cb58ba6a09ac4fb2a@dinwoodie.org","name":"Adam Dinwoodie"},"message":"commit: --amend -m '' silently fails to wipe message\n\n`git commit --amend -m ''` seems to be an unambiguous request to blank a\ncommit message, but it actually leaves the commit message as-is.  That's\nthe case regardless of whether `--allow-empty-message` is specified, and\ndoesn't so much as drop a non-zero return code.\n\nAdd failing tests to show this behaviour.\n\nSigned-off-by: Adam Dinwoodie <adam@dinwoodie.org>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>","distinct":true,"url":"https://api.github.com/repos/sunny256/git/commits/178e8143b4f79290b3ffe40fe2ebf769fccc1ab7"},{"sha":"27014cbc04e369624f6c1754b72ef4eddb911166","author":{"email":"696e3fbcf235d40b6ea1ebd61c87cbea79d444e7@peff.net","name":"Jeff King"},"message":"commit: do not ignore an empty message given by -m ''\n\nWhen f9568530 (builtin-commit: resurrect behavior for multiple -m\noptions, 2007-11-11) converted a \"char *message\" to \"struct strbuf\nmessage\" to hold the messages given with the \"-m\" option, it\nincorrectly changed the checks \"did we get a message with the -m\noption?\" to \"is message.len 0?\".  Later, we noticed one breakage\nfrom this change and corrected it with 25206778 (commit: don't start\neditor if empty message is given with -m, 2013-05-25).\n\nHowever, \"we got a message with -m, even though an empty one, so we\nshouldn't be launching an editor\" was not the only breakage.\n\n * \"git commit --amend -m '' --allow-empty\", even though it looks\n   strange, is a valid request to amend the commit to have no\n   message at all.  Due to the misdetection of the presence of -m on\n   the command line, we ended up keeping the log messsage from the\n   original commit.\n\n * \"git commit -m \"$msg\" -F file\" should be rejected whether $msg is\n   an empty string or not, but due to the same bug, was not rejected\n   when $msg is empty.\n\n * \"git -c template=file -m \"$msg\"\" should ignore the template even\n   when $msg is empty, but it didn't and instead used the contents\n   from the template file.\n\nCorrect these by checking have_option_m, which the earlier 25206778\nintroduced to fix the same bug.\n\nReported-by: Adam Dinwoodie <adam@dinwoodie.org>\nSigned-off-by: Jeff King <peff@peff.net>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>","distinct":true,"url":"https://api.github.com/repos/sunny256/git/commits/27014cbc04e369624f6c1754b72ef4eddb911166"},{"sha":"ce20bd4defec30f2d84ace9ffab0f94612771e53","author":{"email":"a13b1135e6f2f8530e85bc2896cd5ed89a6ed863@twopensource.com","name":"David Turner"},"message":"refs: move head_ref{,_submodule} to the common code\n\nThese don't use any backend-specific functions.  These were previously\ndefined in terms of the do_head_ref helper function, but since they\nare otherwise identical, we don't need that function.\n\nSigned-off-by: David Turner <dturner@twopensource.com>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>","distinct":true,"url":"https://api.github.com/repos/sunny256/git/commits/ce20bd4defec30f2d84ace9ffab0f94612771e53"},{"sha":"64da03365e2e3efb69108d3dcc42500612769667","author":{"email":"a13b1135e6f2f8530e85bc2896cd5ed89a6ed863@twopensource.com","name":"David Turner"},"message":"refs: move for_each_*ref* functions into common code\n\nMake do_for_each_ref take a submodule as an argument instead of a\nref_cache.  Since all for_each_*ref* functions are defined in terms of\ndo_for_each_ref, we can then move them into the common code.\n\nLater, we can simply make do_for_each_ref into a backend function.\n\nSigned-off-by: David Turner <dturner@twopensource.com>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>","distinct":true,"url":"https://api.github.com/repos/sunny256/git/commits/64da03365e2e3efb69108d3dcc42500612769667"},{"sha":"7a217f48c3aa246d57070d97896adc5f55a95faa","author":{"email":"024f400cd820cb2ddbe54c7fecfd01e45f30bb96@gmail.com","name":"Nguyễn Thái Ngọc Duy"},"message":"read-cache.c: fix constness of verify_hdr()\n\nSigned-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>","distinct":true,"url":"https://api.github.com/repos/sunny256/git/commits/7a217f48c3aa246d57070d97896adc5f55a95faa"},{"sha":"8907c1c42ec53f03f9c0402e0afe3a8d0bdc945b","author":{"email":"024f400cd820cb2ddbe54c7fecfd01e45f30bb96@gmail.com","name":"Nguyễn Thái Ngọc Duy"},"message":"read-cache: allow to keep mmap'd memory after reading\n\nLater, we will introduce git index-helper to share this memory with\nother git processes.\n\nSince the memory will be shared, it will never be unmapped (although\nthe kernel may of course choose to page it out).\n\nSigned-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>","distinct":true,"url":"https://api.github.com/repos/sunny256/git/commits/8907c1c42ec53f03f9c0402e0afe3a8d0bdc945b"},{"sha":"12909da47dfa77a2b499698aec619aba16ee9623","author":{"email":"024f400cd820cb2ddbe54c7fecfd01e45f30bb96@gmail.com","name":"Nguyễn Thái Ngọc Duy"},"message":"index-helper: new daemon for caching index and related stuff\n\nInstead of reading the index from disk and worrying about disk\ncorruption, the index is cached in memory (memory bit-flips happen\ntoo, but hopefully less often). The result is faster read. Read time\nis reduced by 70%.\n\nThe biggest gain is not having to verify the trailing SHA-1, which\ntakes lots of time especially on large index files. But this also\nopens doors for further optimiztions:\n\n - we could create an in-memory format that's essentially the memory\n   dump of the index to eliminate most of parsing/allocation\n   overhead. The mmap'd memory can be used straight away. Experiment\n   [1] shows we could reduce read time by 88%.\n\n - we could cache non-index info such as name hash\n\nThe shared memory's name folows the template \"git-<object>-<SHA1>\"\nwhere <SHA1> is the trailing SHA-1 of the index file. <object> is\n\"index\" for cached index files (and may be \"name-hash\" for name-hash\ncache). If such shared memory exists, it contains the same index\ncontent as on disk. The content is already validated by the daemon and\ngit won't validate it again (except comparing the trailing SHA-1s).\n\nWe keep this daemon's logic as thin as possible. The \"brain\" stays in\ngit. So the daemon can read and validate stuff, but that's all it's\nallowed to do. It does not add/create new information. It doesn't even\naccept direct updates from git.\n\nGit can poke the daemon via unix domain sockets to tell it to refresh\nthe index cache, or to keep it alive some more minutes. It can't give\nany real index data directly to the daemon. Real data goes to disk\nfirst, then the daemon reads and verifies it from there. Poking only\nhappens for $GIT_DIR/index, not temporary index files.\n\n$GIT_DIR/index-helper.path is a symlink to the socket for the daemon\nprocess. The daemon reads from the socket and executes commands.\n\nNamed pipes were considered for portability reasons, but then commands\nthat need replies from the daemon would have open their own pipes,\nsince a named pipe should only have one reader.  Unix domain sockets\ndon't have this problem.\n\nindex-helper requires POSIX realtime extension. POSIX shm interface\nhowever is abstracted away so that Windows support can be added later.\n\nOn webkit.git with index format v2, duplicating 8 times to 1.4m\nentries and 200MB in size:\n\n(vanilla)      0.986986364 s: read_index_from .git/index\n(index-helper) 0.267850279 s: read_index_from .git/index\n\nInterestingly with index v4, we get less out of index-helper. It makes\nsense as v4 requires more processing after loading the index:\n\n(vanilla)      0.722496666 s: read_index_from .git/index\n(index-helper) 0.302741500 s: read_index_from .git/index\n\n[1] http://thread.gmane.org/gmane.comp.version-control.git/247268/focus=248771\n\nSigned-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>\nSigned-off-by: David Turner <dturner@twopensource.com>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>","distinct":true,"url":"https://api.github.com/repos/sunny256/git/commits/12909da47dfa77a2b499698aec619aba16ee9623"},{"sha":"beb2237723a318acba3f64f229652c9fd19fee7f","author":{"email":"024f400cd820cb2ddbe54c7fecfd01e45f30bb96@gmail.com","name":"Nguyễn Thái Ngọc Duy"},"message":"index-helper: add --strict\n\nThere are \"holes\" in the index-helper approach because the shared\nmemory is not verified again by git. If $USER is compromised, shared\nmemory could be modified. But anyone who could do this could already\nmodify $GIT_DIR/index. A more realistic risk is some bugs in\nindex-helper that produce corrupt shared memory. --strict is added to\navoid that.\n\nStrictly speaking there's still a very small gap where corrupt shared\nmemory could still be read by git: after we write the trailing SHA-1 in\nthe shared memory (thus signaling \"this shm is ready\") and before\nverify_shm() detects an error.\n\nSigned-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>","distinct":true,"url":"https://api.github.com/repos/sunny256/git/commits/beb2237723a318acba3f64f229652c9fd19fee7f"},{"sha":"793e65f6093cb4dada61f3b6ecb386793891b407","author":{"email":"024f400cd820cb2ddbe54c7fecfd01e45f30bb96@gmail.com","name":"Nguyễn Thái Ngọc Duy"},"message":"daemonize(): set a flag before exiting the main process\n\nThis allows signal handlers and atexit functions to realize this\nsituation and not clean up.\n\nSigned-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>","distinct":true,"url":"https://api.github.com/repos/sunny256/git/commits/793e65f6093cb4dada61f3b6ecb386793891b407"},{"sha":"b1985ea4469abadf7da904863380c751b791188f","author":{"email":"024f400cd820cb2ddbe54c7fecfd01e45f30bb96@gmail.com","name":"Nguyễn Thái Ngọc Duy"},"message":"index-helper: add --detach\n\nWe detach after creating and opening the socket, because otherwise\nwe might return control to the shell before index-helper is ready to\naccept commands.  This might lead to flaky tests.\n\nSigned-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>","distinct":true,"url":"https://api.github.com/repos/sunny256/git/commits/b1985ea4469abadf7da904863380c751b791188f"},{"sha":"72d8ceef25dfe0b17d1ffef264038c94483aee6b","author":{"email":"024f400cd820cb2ddbe54c7fecfd01e45f30bb96@gmail.com","name":"Nguyễn Thái Ngọc Duy"},"message":"read-cache: add watchman 'WAMA' extension\n\nThe extension contains a bitmap, one bit for each entry in the\nindex. If the n-th bit is zero, the n-th entry is considered\nunchanged, we can ce_mark_uptodate() it without refreshing. If the bit\nis non-zero and we found out the corresponding file is clean after\nrefresh, we can clear the bit.\n\nIn addition, there's a list of directories in the untracked-cache\nto invalidate (because they have new or modified entries).\n\nThe 'skipping refresh' bit is not in this patch yet as we would need\nwatchman. More details in later patches.\n\nSigned-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>","distinct":true,"url":"https://api.github.com/repos/sunny256/git/commits/72d8ceef25dfe0b17d1ffef264038c94483aee6b"},{"sha":"7f41ffd05c51d9c69c67445b8cc8ce98ef35ed57","author":{"email":"024f400cd820cb2ddbe54c7fecfd01e45f30bb96@gmail.com","name":"Nguyễn Thái Ngọc Duy"},"message":"add watchman support to reduce index refresh cost\n\nThe previous patch has the logic to clear bits in 'WAMA' bitmap. This\npatch has logic to set bits as told by watchman. The missing bit,\n_using_ these bits, are not here yet.\n\nA lot of this code is written by David Turner originally, mostly from\n[1]. I'm just copying and polishing it a bit.\n\n[1] http://article.gmane.org/gmane.comp.version-control.git/248006\n\nSigned-off-by: David Turner <dturner@twopensource.com>\nSigned-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>","distinct":true,"url":"https://api.github.com/repos/sunny256/git/commits/7f41ffd05c51d9c69c67445b8cc8ce98ef35ed57"},{"sha":"116ec7a76c77b12ddde79904d9a7caed55bd19d9","author":{"email":"024f400cd820cb2ddbe54c7fecfd01e45f30bb96@gmail.com","name":"Nguyễn Thái Ngọc Duy"},"message":"index-helper: use watchman to avoid refreshing index with lstat()\n\nWatchman is hidden behind index-helper. Before git tries to read the\nindex from shm, it notifies index-helper through the socket and\nwaits for index-helper to prepare shm. index-helper then contacts\nwatchman, updates 'WAMA' extension and put it in a separate shm and\nwakes git up with a reply to git's socket.\n\nGit uses this extension to not lstat unchanged entries. Git only\ntrusts the 'WAMA' extension when it's received from the separate shm,\nnot from disk. Unmarked entries are \"clean\". Marked entries are dirty\nfrom watchman point of view. If it finds out some entries are\n'watchman-dirty', but are really unchanged (e.g. the file was changed,\nthen reverted back), then Git will clear the marking in 'WAMA' before\nwriting it down.\n\nHiding watchman behind index-helper means you need both daemons. You\ncan't run watchman alone. Not so good. But on the other hand, 'git'\nbinary is not linked to watchman/json libraries, which is good for\npackaging. Core git package will run fine without watchman-related\npackages. If they need watchman, they can install git-index-helper and\ndependencies.\n\nThis also lets us trust anything in the untracked cache that we haven't\nmarked invalid, saving those stat() calls.\n\nAnother reason for tying watchman to index-helper is, when used with\nuntracked cache, we need to keep track of $GIT_WORK_TREE file\nlisting. That kind of list can be kept in index-helper.\n\nSigned-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>\nSigned-off-by: David Turner <dturner@twopensource.com>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>","distinct":true,"url":"https://api.github.com/repos/sunny256/git/commits/116ec7a76c77b12ddde79904d9a7caed55bd19d9"},{"sha":"a6ec6abbfea50d906297cbb4361493a888b2140b","author":{"email":"024f400cd820cb2ddbe54c7fecfd01e45f30bb96@gmail.com","name":"Nguyễn Thái Ngọc Duy"},"message":"update-index: enable/disable watchman support\n\nSigned-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>","distinct":true,"url":"https://api.github.com/repos/sunny256/git/commits/a6ec6abbfea50d906297cbb4361493a888b2140b"},{"sha":"c94f5cf1915215cc3c2cac7d3f790d0c4d69a945","author":{"email":"a13b1135e6f2f8530e85bc2896cd5ed89a6ed863@twopensource.com","name":"David Turner"},"message":"unpack-trees: preserve index extensions\n\nMake git checkout (and other unpack_tree operations) preserve the\nuntracked cache and watchman status. This is valuable for two reasons:\n\n1. Often, an unpack_tree operation will not touch large parts of the\nworking tree, and thus most of the untracked cache will continue to be\nvalid.\n\n2. Even if the untracked cache were entirely invalidated by such an\noperation, the user has signaled their intention to have such a cache,\nand we don't want to throw it away.\n\nThe same logic applies to the watchman state.\n\nSigned-off-by: David Turner <dturner@twopensource.com>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>","distinct":true,"url":"https://api.github.com/repos/sunny256/git/commits/c94f5cf1915215cc3c2cac7d3f790d0c4d69a945"},{"sha":"d3d36154499070b8f78daaa3bea1e50fa6335f71","author":{"email":"a13b1135e6f2f8530e85bc2896cd5ed89a6ed863@twopensource.com","name":"David Turner"},"message":"index-helper: kill mode\n\nAdd a new command (and command-line arg) to allow index-helpers to\nexit cleanly.\n\nThis is mainly useful for tests.\n\nSigned-off-by: David Turner <dturner@twopensource.com>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>","distinct":true,"url":"https://api.github.com/repos/sunny256/git/commits/d3d36154499070b8f78daaa3bea1e50fa6335f71"},{"sha":"b8ad4386ae6651435498a8a5ef17f24eef6163a9","author":{"email":"a13b1135e6f2f8530e85bc2896cd5ed89a6ed863@twopensource.com","name":"David Turner"},"message":"index-helper: don't run if already running\n\nSigned-off-by: David Turner <dturner@twopensource.com>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>","distinct":true,"url":"https://api.github.com/repos/sunny256/git/commits/b8ad4386ae6651435498a8a5ef17f24eef6163a9"},{"sha":"305c70c21abc37a656e972bd43f44d30cff3078b","author":{"email":"a13b1135e6f2f8530e85bc2896cd5ed89a6ed863@twopensource.com","name":"David Turner"},"message":"index-helper: autorun mode\n\nSoon, we'll want to automatically start index-helper, so we need\na mode that silently exits if it can't start up (either because\nit's not in a git dir, or because another one is already running).\n\nSigned-off-by: David Turner <dturner@twopensource.com>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>","distinct":true,"url":"https://api.github.com/repos/sunny256/git/commits/305c70c21abc37a656e972bd43f44d30cff3078b"},{"sha":"9d2086647af03664807293557c701f50d2e6d8b2","author":{"email":"a13b1135e6f2f8530e85bc2896cd5ed89a6ed863@twopensource.com","name":"David Turner"},"message":"index-helper: optionally automatically run\n\nIntroduce a new config option, indexhelper.autorun, to automatically\nrun git index-helper before starting up a builtin git command.  This\nenables users to keep index-helper running without manual\nintervention.\n\nSigned-off-by: David Turner <dturner@twopensource.com>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>","distinct":true,"url":"https://api.github.com/repos/sunny256/git/commits/9d2086647af03664807293557c701f50d2e6d8b2"}]}