{"push_id":943820227,"size":51,"distinct_size":0,"ref":"refs/heads/jk/ignore-have","head":"9ca36343042f1be25dd6d2cc9b361db34935ad21","before":"3be2a5a39d583fdc980ea4a9f609265e91ea9903","commits":[{"sha":"a62bc310bf033f38a23fb80f5ab2c9f6f05cd161","author":{"email":"024f400cd820cb2ddbe54c7fecfd01e45f30bb96@gmail.com","name":"Nguyễn Thái Ngọc Duy"},"message":"blame: remove obsolete comment\n\nThat \"someday\" in the comment happened two years later in\nb65982b (Optimize \"diff-index --cached\" using cache-tree - 2009-05-20)\n\nSigned-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>","distinct":false,"url":"https://api.github.com/repos/peff/git/commits/a62bc310bf033f38a23fb80f5ab2c9f6f05cd161"},{"sha":"895ff3b2c73c737b699a921fe71cea4dadefab7b","author":{"email":"024f400cd820cb2ddbe54c7fecfd01e45f30bb96@gmail.com","name":"Nguyễn Thái Ngọc Duy"},"message":"add and use a convenience macro ce_intent_to_add()\n\nSigned-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>","distinct":false,"url":"https://api.github.com/repos/peff/git/commits/895ff3b2c73c737b699a921fe71cea4dadefab7b"},{"sha":"f4015337daf130944393296550dd7d8a9c172325","author":{"email":"696e3fbcf235d40b6ea1ebd61c87cbea79d444e7@peff.net","name":"Jeff King"},"message":"pack-revindex: drop hash table\n\nThe main entry point to the pack-revindex code is\nfind_pack_revindex(). This calls revindex_for_pack(), which\nlazily computes and caches the revindex for the pack.\n\nWe store the cache in a very simple hash table. It's created\nby init_pack_revindex(), which inserts an entry for every\npackfile we know about, and we never grow or shrink the\nhash. If we ever need the revindex for a pack that isn't in\nthe hash, we die() with an internal error.\n\nThis can lead to a race, because we may load more packs\nafter having called init_pack_revindex(). For example,\nimagine we have one process which needs to look at the\nrevindex for a variety of objects (e.g., cat-file's\n\"%(objectsize:disk)\" format).  Simultaneously, git-gc is\nrunning, which is doing a `git repack -ad`. We might hit a\nsequence like:\n\n  1. We need the revidx for some packed object. We call\n     find_pack_revindex() and end up in init_pack_revindex()\n     to create the hash table for all packs we know about.\n\n  2. We look up another object and can't find it, because\n     the repack has removed the pack it's in. We re-scan the\n     pack directory and find a new pack containing the\n     object. It gets added to our packed_git list.\n\n  3. We call find_pack_revindex() for the new object, which\n     hits revindex_for_pack() for our new pack. It can't\n     find the packed_git in the revindex hash, and dies.\n\nYou could also replace the `repack` above with a push or\nfetch to create a new pack, though these are less likely\n(you would have to somehow learn about the new objects to\nlook them up).\n\nPrior to 1a6d8b9 (do not discard revindex when re-preparing\npackfiles, 2014-01-15), this was safe, as we threw away the\nrevindex whenever we re-scanned the pack directory (and thus\nre-created the revindex hash on the fly). However, we don't\nwant to simply revert that commit, as it was solving a\ndifferent race.\n\nSo we have a few options:\n\n  - We can fix the race in 1a6d8b9 differently, by having\n    the bitmap code look in the revindex hash instead of\n    caching the pointer. But this would introduce a lot of\n    extra hash lookups for common bitmap operations.\n\n  - We could teach the revindex to dynamically add new packs\n    to the hash table. This would perform the same, but\n    would mean adding extra code to the revindex hash (which\n    currently cannot be resized at all).\n\n  - We can get rid of the hash table entirely. There is\n    exactly one revindex per pack, so we can just store it\n    in the packed_git struct. Since it's initialized lazily,\n    it does not add to the startup cost.\n\n    This is the best of both worlds: less code and fewer\n    hash table lookups.  The original code likely avoided\n    this in the name of encapsulation. But the packed_git\n    and reverse_index code are fairly intimate already, so\n    it's not much of a loss.\n\nThis patch implements the final option. It's a minimal\nconversion that retains the pack_revindex struct. No callers\nneed to change, and we can do further cleanup in a follow-on\npatch.\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/f4015337daf130944393296550dd7d8a9c172325"},{"sha":"9d98bbf5785708da4effc9b8f34ba6e18d726625","author":{"email":"696e3fbcf235d40b6ea1ebd61c87cbea79d444e7@peff.net","name":"Jeff King"},"message":"pack-revindex: store entries directly in packed_git\n\nA pack_revindex struct has two elements: the revindex\nentries themselves, and a pointer to the packed_git. We need\nboth to do lookups, because only the latter knows things\nlike the number of objects in the pack.\n\nNow that packed_git contains the pack_revindex struct it's\njust as easy to pass around the packed_git itself, and we do\nnot need the extra back-pointer.\n\nWe can instead just store the entries directly in the pack.\nAll functions which took a pack_revindex now just take a\npacked_git. We still lazy-load in find_pack_revindex, so\nmost callers are unaffected.\n\nThe exception is the bitmap code, which computes the\nrevindex and caches the pointer when we load the bitmaps. We\ncan continue to load, drop the extra cache pointer, and just\naccess bitmap_git.pack.revindex directly.\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/9d98bbf5785708da4effc9b8f34ba6e18d726625"},{"sha":"ec3de38da9a89a7f4efba1c9f8fe3fedf6acf654","author":{"email":"a6723cc3f76163bf7adb636a73ac3b0ceb3e6b9b@pobox.com","name":"Junio C Hamano"},"message":"Merge branch 'nd/stop-setenv-work-tree' into nd/clear-gitenv-upon-use-of-alias\n\n* nd/stop-setenv-work-tree:\n  Revert \"setup: set env $GIT_WORK_TREE when work tree is set, like $GIT_DIR\"","distinct":false,"url":"https://api.github.com/repos/peff/git/commits/ec3de38da9a89a7f4efba1c9f8fe3fedf6acf654"},{"sha":"0d5466d24436ac87ab69214251b004ecc809c8c1","author":{"email":"024f400cd820cb2ddbe54c7fecfd01e45f30bb96@gmail.com","name":"Nguyễn Thái Ngọc Duy"},"message":"git.c: make it clear save_env() is for alias handling only\n\nSigned-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>","distinct":false,"url":"https://api.github.com/repos/peff/git/commits/0d5466d24436ac87ab69214251b004ecc809c8c1"},{"sha":"86d26f240fcb4f287258ad459efc2b5e30e60cfd","author":{"email":"024f400cd820cb2ddbe54c7fecfd01e45f30bb96@gmail.com","name":"Nguyễn Thái Ngọc Duy"},"message":"setup.c: re-fix d95138e (setup: set env $GIT_WORK_TREE when ..\n\nCommit d95138e [1] attempted to fix a .git file problem by\nsetting GIT_WORK_TREE whenever GIT_DIR is set. It sounded harmless\nbecause we handle GIT_DIR and GIT_WORK_TREE side by side for most\ncommands, with two exceptions: git-init and git-clone.\n\n\"git clone\" is not happy with d95138e. This command ignores GIT_DIR\nbut respects GIT_WORK_TREE [2] [3] which means it used to run fine\nfrom a hook, where GIT_DIR was set but GIT_WORK_TREE was not (*).\nWith d95138e, GIT_WORK_TREE is set all the time and git-clone\ninterprets that as \"I give you order to put the worktree here\",\nusually against the user's intention.\n\nThe solution in d95138e is reverted earlier, and instead we reuse\nthe solution from c056261 [4].  It fixed another setup-messed-\nup-by-alias by saving and restoring env and spawning a new process,\nbut for git-clone and git-init only.\n\nNow we conclude that setup-messed-up-by-alias is always evil. So the\nenv restoration is done for _all_ commands, including external ones,\nwhenever aliases are involved. It fixes what d95138e tried to fix,\nwithout upsetting git-clone-inside-hooks.\n\nThe test from d95138e remains to verify it's not broken by this. A new\ntest is added to make sure git-clone-inside-hooks remains happy.\n\n(*) GIT_WORK_TREE was not set _most of the time_. In some cases\n    GIT_WORK_TREE is set and git-clone will behave differently. The\n    use of GIT_WORK_TREE to direct git-clone to put work tree\n    elsewhere looks like a mistake because it causes surprises this\n    way. But that's a separate story.\n\n[1] d95138e (setup: set env $GIT_WORK_TREE when work tree is set, like\n             $GIT_DIR - 2015-06-26)\n[2] 2beebd2 (clone: create intermediate directories of destination\n             repo - 2008-06-25)\n[3] 20ccef4 (make git-clone GIT_WORK_TREE aware - 2007-07-06)\n[4] c056261 (git potty: restore environments after alias expansion -\n             2014-06-08)\n\nReported-by: Anthony Sottile <asottile@umich.edu>\nSigned-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>","distinct":false,"url":"https://api.github.com/repos/peff/git/commits/86d26f240fcb4f287258ad459efc2b5e30e60cfd"},{"sha":"57ea7123c86771f47f34e7d92d1822d8b429897a","author":{"email":"024f400cd820cb2ddbe54c7fecfd01e45f30bb96@gmail.com","name":"Nguyễn Thái Ngọc Duy"},"message":"git.c: make sure we do not leak GIT_* to alias scripts\n\nThe unfortunate commit d95138e (setup: set env $GIT_WORK_TREE when\nwork tree is set, like $GIT_DIR - 2015-06-26) exposes another problem,\nbesides git-clone that's described in the previous commit. If\nGIT_WORK_TREE (or even GIT_DIR) is exported to an alias script, it may\nmislead git commands in the script where the repo is. Granted, most\nscripts work on the repo where the alias is summoned from. But nowhere\ndo we forbid the script to visit another repository.\n\nThe revert of d95138e in the previous commit is sufficient as a\nfix. However, to protect us from accidentally leaking GIT_*\nenvironment variables again, we restore certain sensitive env before\ncalling the external script.\n\nGIT_PREFIX is let through because there's another setup side effect\nthat we simply accepted so far: current working directory is\nmoved. Maybe in future we can introduce a new alias format that\nguarantees no cwd move, then we can unexport GIT_PREFIX.\n\nReported-by: Gabriel Ganne <gabriel.ganne@gmail.com>\nSigned-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>","distinct":false,"url":"https://api.github.com/repos/peff/git/commits/57ea7123c86771f47f34e7d92d1822d8b429897a"},{"sha":"4d552005323034c1d6311796ac1074e9a4b4b57e","author":{"email":"024f400cd820cb2ddbe54c7fecfd01e45f30bb96@gmail.com","name":"Nguyễn Thái Ngọc Duy"},"message":"grep: make it clear i-t-a entries are ignored\n\nThe expression \"!S_ISREG(ce)\" covers i-t-a entries as well because\nce->ce_mode would be zero then. I could make a comment saying that, but\nit's probably better just to comment with code, in case i-t-a entry\ncontent changes in future.\n\nSigned-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>","distinct":false,"url":"https://api.github.com/repos/peff/git/commits/4d552005323034c1d6311796ac1074e9a4b4b57e"},{"sha":"2653a8c6fa0466828061a3132421cf13a5d6d924","author":{"email":"024f400cd820cb2ddbe54c7fecfd01e45f30bb96@gmail.com","name":"Nguyễn Thái Ngọc Duy"},"message":"dir.c: clean the entire struct in clear_exclude_list()\n\nMake sure \"el\" can be reuseable again. The problem was el->alloc is\nnot cleared and may cause segfaults next time because add_exclude()\nthinks el->excludes (being NULL) has enough space. Just clear the\nentire struct to be safe.\n\nSigned-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>","distinct":false,"url":"https://api.github.com/repos/peff/git/commits/2653a8c6fa0466828061a3132421cf13a5d6d924"},{"sha":"1de2e442af45acf52ad45f9ac86d4c19f6475590","author":{"email":"5b1aa8048ca15eb13769ec53de5782168f5fdb45@cox.net","name":"Stephen P. Smith"},"message":"user-manual: remove temporary branch entry from todo list\n\nIn the section on \"How to check out a different version of a\nproject\" the \"new\" branch is used as a temporary branch.  A detached\nHEAD was not used since it was a new feature introduced just a\ncouple weeks prior.\n\nThe section could be changed to use and explain a detached HEAD,\nexcept that would increase the learning curve early in the manual.\nDetached HEADs are discussed a couple sections later under\n\"Examining an old version without creating a new branch\".\n\nLet's declare that it is a bad idea to rewrite the example that\nuses a temporary branch to do the sightseeing on a detached HEAD.\n\nSigned-off-by: Stephen P. Smith <ischis2@cox.net>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>","distinct":false,"url":"https://api.github.com/repos/peff/git/commits/1de2e442af45acf52ad45f9ac86d4c19f6475590"},{"sha":"ac78663b0da0a5b0ad1b87cfe70eecebc0c8a68d","author":{"email":"696e3fbcf235d40b6ea1ebd61c87cbea79d444e7@peff.net","name":"Jeff King"},"message":"run-command: don't warn on SIGPIPE deaths\n\nWhen git executes a sub-command, we print a warning if the\ncommand dies due to a signal, but make an exception for\n\"uninteresting\" cases like SIGINT and SIGQUIT (since the\nuser presumably just hit ^C).\n\nWe should make a similar exception for SIGPIPE, because it's\nan expected and uninteresting return in most cases; it\ngenerally means the user quit the pager before git had\nfinished generating all output.  This used to be very hard\nto trigger in practice, because:\n\n  1. We only complain if we see a real SIGPIPE death, not\n     the shell-induced 141 exit code. This means that\n     anything we run via the shell does not trigger the\n     warning, which includes most non-trivial aliases.\n\n  2. The common case for SIGPIPE is the user quitting the\n     pager before git has finished generating all output.\n     But if the user triggers a pager with \"-p\", we redirect\n     the git wrapper's stderr to that pager, too.  Since the\n     pager is dead, it means that the message goes nowhere.\n\n  3. You can see it if you run your own pager, like\n     \"git foo | head\". But that only happens if \"foo\" is a\n     non-builtin (so it doesn't work with \"log\", for\n     example).\n\nHowever, it may become more common after 86d26f2, which\nteaches alias to re-exec builtins rather than running them\nin the same process. This case doesn't trigger (1), as we\ndon't need a shell to run a git command. It doesn't trigger\n(2), because the pager is not started by the original git,\nbut by the inner re-exec of git. And it doesn't trigger (3),\nbecause builtins are treated more like non-builtins in this\ncase.\n\nGiven how flaky this message already is (e.g., you cannot\neven know whether you will see it, as git optimizes out some\nshell invocations behind the scenes based on the contents of\nthe command!), and that it is unlikely to ever provide\nuseful information, let's suppress it for all cases of\nSIGPIPE.\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/ac78663b0da0a5b0ad1b87cfe70eecebc0c8a68d"},{"sha":"bac58749bb2cd04720a4d5a1f58ebc428869f9a2","author":{"email":"5b1aa8048ca15eb13769ec53de5782168f5fdb45@cox.net","name":"Stephen P. Smith"},"message":"glossary: define the term shallow clone\n\nThere are several places in the documentation that\nthe term shallow clone is used. Defining the term\nenables its use elsewhere with a known definition.\n\nSigned-off-by: Stephen P. Smith <ischis2@cox.net>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>","distinct":false,"url":"https://api.github.com/repos/peff/git/commits/bac58749bb2cd04720a4d5a1f58ebc428869f9a2"},{"sha":"9cfde9ee8f6dc82365f1e977935960f34108076b","author":{"email":"5b1aa8048ca15eb13769ec53de5782168f5fdb45@cox.net","name":"Stephen P. Smith"},"message":"user-manual: add section documenting shallow clones\n\nSigned-off-by: Stephen P. Smith <ischis2@cox.net>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>","distinct":false,"url":"https://api.github.com/repos/peff/git/commits/9cfde9ee8f6dc82365f1e977935960f34108076b"},{"sha":"99487cf228ecba869d2f87f1b55f281fdd1342db","author":{"email":"5b1aa8048ca15eb13769ec53de5782168f5fdb45@cox.net","name":"Stephen P. Smith"},"message":"user-manual: add addition gitweb information\n\nRework the section on gitweb to add information about the cgi script\nand the instaweb command.\n\nSigned-off-by: Stephen P. Smith <ischis2@cox.net>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>","distinct":false,"url":"https://api.github.com/repos/peff/git/commits/99487cf228ecba869d2f87f1b55f281fdd1342db"},{"sha":"9a93c6686f56086fe5280a85513041bbfebf41d0","author":{"email":"696e3fbcf235d40b6ea1ebd61c87cbea79d444e7@peff.net","name":"Jeff King"},"message":"avoid shifting signed integers 31 bits\n\nWe sometimes use 32-bit unsigned integers as bit-fields.\nIt's fine to access the MSB, because it's unsigned. However,\ndoing so as \"1 << 31\" is wrong, because the constant \"1\" is\na signed int, and we shift into the sign bit, causing\nundefined behavior.\n\nWe can fix this by using \"1U\" as the constant.\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/9a93c6686f56086fe5280a85513041bbfebf41d0"},{"sha":"a0df2e5a7efe90e932af66e70ba6c863a5826833","author":{"email":"696e3fbcf235d40b6ea1ebd61c87cbea79d444e7@peff.net","name":"Jeff King"},"message":"bswap: add NO_UNALIGNED_LOADS define\n\nThe byte-swapping code automatically decides, based on the\nplatform, whether it is sensible to cast and do a potentially\nunaligned ntohl(), or to pick individual bytes out of an\narray.\n\nIt can be handy to override this decision, though, when\nturning on compiler flags that will complain about unaligned\nloads (such as -fsanitize=undefined). This patch adds a\nmacro check to make this possible.\n\nThere's no nice Makefile knob here; this is for prodding at\nGit's internals, and anybody using it can set\n\"-DNO_UNALIGNED_LOADS\" in the same place they are setting up\n\"-fsanitize\".\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/a0df2e5a7efe90e932af66e70ba6c863a5826833"},{"sha":"2c510f21cd2c571549cf75ff94061a2a6717851f","author":{"email":"8c2951295f8292b0c03727bc4652981172298eae@yhbt.net","name":"Eric Wong"},"message":"git-send-email: do not double-escape quotes from mutt\n\nmutt saves aliases with escaped quotes in the form of:\n\n\talias dot \\\"Dot U. Sir\\\" <somebody@example.org>\n\nWhen we pass through our sanitize_address routine,\nwe end up with double-escaping:\n\n\t To: \"\\\\\\\"Dot U. Sir\\\\\\\" <somebody@example.org>\n\nRemove the escaping in mutt only for now, as I am not sure\nif other mailers can do this or if this is better fixed in\nsanitize_address.\n\nCc: Remi Lespinet <remi.lespinet@ensimag.grenoble-inp.fr>\nCc: Matthieu Moy <Matthieu.Moy@imag.fr>\nSigned-off-by: Eric Wong <normalperson@yhbt.net>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>","distinct":false,"url":"https://api.github.com/repos/peff/git/commits/2c510f21cd2c571549cf75ff94061a2a6717851f"},{"sha":"e914ef0d03d189611fe02e0fd26f5f964594767e","author":{"email":"8c2951295f8292b0c03727bc4652981172298eae@yhbt.net","name":"Eric Wong"},"message":"for-each-ref: document `creatordate` and `creator` fields\n\nThese were introduced back in 2006 at 3175aa1ec28c but\nnever documented.\n\nSigned-off-by: Eric Wong <normalperson@yhbt.net>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>","distinct":false,"url":"https://api.github.com/repos/peff/git/commits/e914ef0d03d189611fe02e0fd26f5f964594767e"},{"sha":"36fc7d8a7979b4e75d36b4eab77782beb7d93533","author":{"email":"46692b1f0516358b02a6405518c0a52aa8fb3e94@ira.uka.de","name":"SZEDER Gábor"},"message":"t6050-replace: make failing editor test more robust\n\n'git replace --edit' should error out when the invoked editor fails,\nbut the test checking this behavior would not notice if this weren't\nthe case.\n\nThe test in question, ever since it was added in 85f98fc037ae\n(replace: add tests for --edit, 2014-05-17), has simulated a failing\neditor in an unconventional way:\n\n  test_must_fail env GIT_EDITOR='./fakeeditor;false' git replace --edit\n\nI presume the reason for this unconventional editor was the fact that\n'git replace --edit' requires the edited object to be different from\nthe original, but a mere 'false' as editor would leave the object\nunchanged and 'git replace --edit' would error out anyway complaining\nabout the new and the original object files being the same.  Running\n'fakeeditor' before 'false' was supposed to ensure that the object\nfile is modified and thus 'git replace --edit' errors out because of\nthe failed editor.\n\nHowever, this editor doesn't actually modify the edited object,\nbecause start_command() turns this editor into:\n\n  /bin/sh -c './fakeeditor;false \"$@\"' './fakeeditor;false' \\\n          '.../.git/REPLACE_EDITOBJ'\n\nThis means that the test's fakeeditor script doesn't even get the path\nof the object to be edited as argument, triggering error messages from\nthe commands executed inside the script ('sed' and 'mv'), and\nultimately leaving the object file unchanged.\n\nIf a patch were to remove the die() from the error path after\nlaunch_editor(), the test would not catch it, because 'git replace'\nwould continue execution past launch_editor() and would error out a\nbit later due to the unchanged edited object.  Though 'git replace'\nwould error out for the wrong reason, this would satisfy\n'test_must_fail' just as well, and the test would succeed leaving the\nundesired change unnoticed.\n\nCreate a proper failing fake editor script for this test to ensure\nthat the edited object is in fact modified and 'git replace --edit'\nwon't error out because the new and original object files are the\nsame.\n\nSigned-off-by: SZEDER Gábor <szeder@ira.uka.de>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>","distinct":false,"url":"https://api.github.com/repos/peff/git/commits/36fc7d8a7979b4e75d36b4eab77782beb7d93533"}]}