{"push_id":2368057571,"size":82,"distinct_size":0,"ref":"refs/heads/jk/child-cleanup","head":"8474b9ba92831c593773c4d053f46916b8c3d656","before":"fbf71838f1a0730cf95a67a1de91d1aefc540073","commits":[{"sha":"ce0330cad88cdcbb4b151a6dc0064d98757a928e","author":{"name":"Ævar Arnfjörð Bjarmason","email":"f39cfd0b24e0a81f65944956d2eafe947e5be136@gmail.com"},"message":"status: add a failing test showing a core.untrackedCache bug\n\nThe untracked cache gets confused when a directory is swapped out for\na file. It is easiest to reproduce this by swapping out a directory\nwith a symlink to another directory, and as the tests show the symlink\ncase is the only case we've found where \"git status\" will subsequently\nreport incorrect information, even though it's possible to otherwise\nget the untracked cache into a state where its internal data\nstructures don't reflect reality.\n\nIn the symlink case, whatever files are inside the target of the\nsymlink will be incorrectly shown as untracked. This issue does not\nhappen if the symlink links to another file, only if it links to\nanother directory.\n\nA stand-alone testcase for copying into a terminal:\n\n    (\n        rm -rf /tmp/testrepo &&\n        git init /tmp/testrepo &&\n        cd /tmp/testrepo &&\n        mkdir x y &&\n        touch x/a y/b &&\n        git add x/a y/b &&\n        git commit -msnap &&\n        git rm -rf y &&\n        ln -s x y &&\n        git add y &&\n        git commit -msnap2 &&\n        git checkout HEAD~ &&\n        git status &&\n        git checkout master &&\n        sleep 1 &&\n        git status &&\n        git status\n    )\n\nThis will incorrectly show y/a as an untracked file. Both the \"git\nstatus\" call right before \"git checkout master\" and the \"sleep 1\"\nafter the \"checkout master\" are needed to reproduce this, presumably\ndue to the untracked cache tracking on the basis of cached whole\nseconds from stat(2).\n\nWhen git gets into this state, a workaround to fix it is to issue a\none-off:\n\n    git -c core.untrackedCache=false status\n\nFor the non-symlink case, the bug is that the output of\ntest-dump-untracked-cache should not include:\n\n   /one/ 0000000000000000000000000000000000000000 recurse valid\n\nIt being in the output implies that cached traversal of root includes\nthe directory \"one\" which does not exist on disk anymore.\n\nSigned-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>\nSigned-off-by: Junio C Hamano <gitster@pobox.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/ce0330cad88cdcbb4b151a6dc0064d98757a928e"},{"sha":"2523c4be855af84460e70ab5c8375534f8cefed5","author":{"name":"Nguyễn Thái Ngọc Duy","email":"d0e3b15a74ff6c70e81434a55b9c843230dc3715@gmail.com"},"message":"dir.c: avoid stat() in valid_cached_dir()\n\nstat() may follow a symlink and return stat data of the link's target\ninstead of the link itself. We are concerned about the link itself.\n\nIt's kind of hard to demonstrate the bug. I think when path->buf is a\nsymlink, we most likely find that its target's stat data does not\nmatch our cached one, which means we ignore the cache and fall back to\nslow path.\n\nThis is performance issue, not correctness (though we could still\ncatch it by verifying test-dump-untracked-cache. The less unlikely\ncase is, link target stat data matches the cached version and we\nincorrectly go fast path, ignoring real data on disk. A test for this\nmay involve manipulating stat data, which may be not portable.\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/2523c4be855af84460e70ab5c8375534f8cefed5"},{"sha":"b640313110ab5117b3c45b3445da4ce28967a386","author":{"name":"Nguyễn Thái Ngọc Duy","email":"d0e3b15a74ff6c70e81434a55b9c843230dc3715@gmail.com"},"message":"dir.c: fix missing dir invalidation in untracked code\n\nLet's start with how create a new directory cache after the last one\nbecomes invalid (e.g. because its dir mtime has changed...). In\nopen_cached_dir():\n\n1. We start out with valid_cached_dir() returning false, which should\n   call invalidate_directory() to put a directory state back to\n   initial state, no untracked entries (untracked_nr zero), no sub\n   directory traversal (dirs[].recurse zero).\n\n2. Since the cache cannot be used, we go the slow path opendir() and\n   go through items one by one via readdir(). All the directories on\n   disk will be added back to the cache (if not already exist in\n   dirs[]) and its flag \"recurse\" gets changed to one to note that\n   it's part of the cached dir travesal next time.\n\n3. By the time we reach close_cached_dir() we should have a good\n   subdir list in dirs[]. Those with \"recurse\" flag set are the ones\n   present in the on-disk directory. The directory is now marked\n   \"valid\".\n\nNext time read_directory() is called, since the directory is marked\nvalid, it will skip readdir(), go fast path and traverse through\ndirs[] array instead.\n\nSteps one and two need some tight cooperation. If a subdir is removed,\nreaddir() will not find it and of course we cannot examine/invalidate\nit. To make sure removed directories on disk are gone from the cache,\nstep one must make sure recurse flag of all subdirs are zero.\n\nBut that's not true. If \"valid\" flag is already false, there is a\nchance we go straight to the end of valid_cached_dir() without calling\ninvalidate_directory(). Or we fail to meet the \"if (untracked-valid)\"\ncondition and skip over the invalidate_directory().\n\nAfter step 3, we mark the cache valid. Any stale subdir with incorrect\nrecurse flag becomes a real subdir next time we traverse the directory\nusing dirs[] array.\n\nWe could avoid this by making sure invalidate_directory() is always\ncalled (therefore dirs[].recurse cleared) at the beginning of\nopen_cached_dir(). Which is what this patch does.\n\nAs to how we get into this situation, the key in the test is this\ncommand\n\n    git checkout master\n\nwhere \"one/file\" is replaced with \"one\" in the index. This index\nupdate triggers untracked_cache_invalidate_path(), which clears valid\nflag of the root directory while keeping \"recurse\" flag on the subdir\n\"one\" on. On the next git-status, we go through steps 1-3 above and\nsave an incorrect cache on disk. The second git-status blindly follows\nthe bad cache data and shows the problem.\n\nThis is arguably because of a bad design where \"recurse\" flag plays\ndouble roles: whether a directory should be saved on disk, and whether\nit is part of a directory traversal.\n\nWe need to keep recurse flag set at \"checkout master\" because of the\nfirst role: we need to keep subdir caches (dir \"two\" for example has\nnot been touched at all, no reason to throw its cache away).\n\nAs long as we make sure to ignore/reset \"recurse\" flag at the\nbeginning of a directory traversal, we're good. But maybe eventually\nwe should separate these two roles.\n\nSigned-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>\nSigned-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>","distinct":false,"url":"https://api.github.com/repos/peff/git/commits/b640313110ab5117b3c45b3445da4ce28967a386"},{"sha":"b6731550749c7326f0dcf26211e7c2e55de00e28","author":{"name":"Nguyễn Thái Ngọc Duy","email":"d0e3b15a74ff6c70e81434a55b9c843230dc3715@gmail.com"},"message":"dir.c: stop ignoring opendir() error in open_cached_dir()\n\nA follow-up to the recently fixed bugs in the untracked\ninvalidation. If opendir() fails it should show a warning, perhaps\nthis should die, but if this ever happens the error is probably\nrecoverable for the user, and dying would just make things worse.\n\nSigned-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>\nSigned-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>","distinct":false,"url":"https://api.github.com/repos/peff/git/commits/b6731550749c7326f0dcf26211e7c2e55de00e28"},{"sha":"0cacebf099dd6467845419f212acdcfe5f8d923f","author":{"name":"Nguyễn Thái Ngọc Duy","email":"d0e3b15a74ff6c70e81434a55b9c843230dc3715@gmail.com"},"message":"dir.c: ignore paths containing .git when invalidating untracked cache\n\nread_directory() code ignores all paths named \".git\" even if it's not\na valid git repository. See treat_path() for details. Since \".git\" is\nbasically invisible to read_directory(), when we are asked to\ninvalidate a path that contains \".git\", we can safely ignore it\nbecause the slow path would not consider it anyway.\n\nThis helps when fsmonitor is used and we have a real \".git\" repo at\nworktree top. Occasionally .git/index will be updated and if the\nfsmonitor hook does not filter it, untracked cache is asked to\ninvalidate the path \".git/index\".\n\nWithout this patch, we invalidate the root directory unncessarily,\nwhich:\n\n- makes read_directory() fall back to slow path for root directory\n  (slower)\n\n- makes the index dirty (because UNTR extension is updated). Depending\n  on the index size, writing it down could also be slow.\n\nA note about the new \"safe_path\" knob. Since this new check could be\nrelatively expensive, avoid it when we know it's not needed. If the\npath comes from the index, it can't contain \".git\". If it does\ncontain, we may be screwed up at many more levels, not just this one.\n\nNoticed-by: Ævar Arnfjörð Bjarmason <avarab@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/0cacebf099dd6467845419f212acdcfe5f8d923f"},{"sha":"0c668f559cc149720b999d7bd1c0060e9fd7caf3","author":{"name":"Junio C Hamano","email":"3228067b6039a0d99bddaf967dafdecd5cc61600@pobox.com"},"message":"blame: tighten command line parser\n\nThe command line parser of \"git blame\" is prepared to take an\nancient odd argument order \"blame <path> <rev>\" in addition to the\nusual \"blame [<rev>] <path>\".  It has at least two negative\nramifications:\n\n - In order to tell these two apart, it checks if the last command\n   line argument names a path in the working tree, using\n   file_exists().  However, \"blame <rev> <path>\" is a request to\n   explain each and every line in the contents of <path> stored in\n   revision <rev> and does not need to have a working tree version\n   of the file.  A check with file_exists() is simply wrong.\n\n - To coerce that mistaken file_exists() check to work, the code\n   calls setup_work_tree() before doing so, because the path it has\n   is relative to the top-level of the project tree.  However,\n   \"blame <rev> <path>\" MUST be usable even in a bare repository,\n   and there is no reason for letting setup_work_tree() complain\n   and die with \"This operation must be run in a work tree\".\n\nTo correct the former, switch to check if the last token is a\nrevision (and if so, parse arguments using \"blame <path> <rev>\"\nrule).  Correct the latter by getting rid of setup_work_tree() and\nfile_exists() check--the only case the call to this function matters\nis when we are running \"blame <path>\" (i.e. no starting revision and\nasking to blame the working tree file at <path>, digging through the\nHEAD revision), but there is a call in setup_scoreboard() just\nbefore it calls fake_working_tree_commit().\n\nSigned-off-by: Junio C Hamano <gitster@pobox.com>","distinct":false,"url":"https://api.github.com/repos/peff/git/commits/0c668f559cc149720b999d7bd1c0060e9fd7caf3"},{"sha":"1cdc62f6f16e6dae4343824f08286015c8c4b9c2","author":{"name":"Jeff King","email":"7e57302763bea699aee296fb53304dc616ab92d5@peff.net"},"message":"t0205: drop redundant test\n\nWe check that a shell variable is non-empty, and then we\ncheck that it's equal to a particular value. Just checking\nthe latter covers both cases.\n\nI suspect the original was trying to give better output when\nthe test fails, but using \"-x\" covers that these days.\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/1cdc62f6f16e6dae4343824f08286015c8c4b9c2"},{"sha":"373803158198310ba6ce68bfa054191038d87352","author":{"name":"Jeff King","email":"7e57302763bea699aee296fb53304dc616ab92d5@peff.net"},"message":"git-sh-i18n: check GETTEXT_POISON before USE_GETTEXT_SCHEME\n\nRunning \"make NO_GETTEXT=1 GETTEXT_POISON=1\" currently fails\nt0205.\n\nWhile it might seem nonsensical at first glance to both\npoison and disable gettext, it's useful to be able to do a\npoison test-run on a system that doesn't have gettext at\nall. And it works fine for C programs; the problem is only\nwith the shell code.\n\nThe issue is that we check the baked-in USE_GETTEXT_SCHEME\nvalue before GETTEXT_POISON. And when NO_GETTEXT is set, the\nMakefile sets USE_GETTEXT_SCHEME to \"fallthrough\".\n\nSo one fix would be to have the Makefile just set\nUSE_GETTEXT_SCHEME to \"poison\" if GETTEXT_POISON is set.\nBut there are two problems with that:\n\n  1. USE_GETTEXT_SCHEME is actually a user-facing knob, so\n     conceivably somebody could override it with:\n\n       make USE_GETTEXT_SCHEME=gnu GETTEXT_POISON=1\n\n     which would do the wrong thing (though that's much less\n     likely than them having the variable set in their\n     config.mak and just overriding GETTEXT_POISON on the\n     command-line for a one-off test).\n\n  2. We don't actually bake GETTEXT_POISON in to the shell\n     library like we do for the C code. It checks\n     $GIT_GETTEXT_POISON at runtime, which is set up by the\n     test suite. So it makes sense to put the fix in the\n     runtime code, too, which would cover something like:\n\n       GIT_GETTEXT_POISON=foo git foo\n\n     It's not likely that people use the poison code outside\n     of running the test suite, but it's easy enough to make\n     this case work.\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/373803158198310ba6ce68bfa054191038d87352"},{"sha":"c95525e90d2f3c75b879ce51fd17d263a6452de3","author":{"name":"Ben Peart","email":"245d18737bd52fa108c37eccdaa9225bc987d090@microsoft.com"},"message":"name-hash: properly fold directory names in adjust_dirname_case()\n\nCorrect the pointer arithmetic in adjust_dirname_case() so that it calls\nfind_dir_entry() with the correct string length.  Previously passing in\n\"dir1/foo\" would pass a length of 6 instead of the correct 4.  This resulted in\nfind_dir_entry() never finding the entry and so the subsequent memcpy that would\nfold the name to the version with the correct case never executed.\n\nAdd a test to validate the corrected behavior with name folding of directories.\n\nSigned-off-by: Ben Peart <benpeart@microsoft.com>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>","distinct":false,"url":"https://api.github.com/repos/peff/git/commits/c95525e90d2f3c75b879ce51fd17d263a6452de3"},{"sha":"bc9d4dc5b07c05c7b26a4e781b7538db7c775fc3","author":{"name":"Jeff King","email":"7e57302763bea699aee296fb53304dc616ab92d5@peff.net"},"message":"correct error messages for NULL packet_read_line()\n\nThe packet_read_line() function dies if it gets an\nunexpected EOF. It only returns NULL if we get a flush\npacket (or technically, a zero-length \"0004\" packet, but\nnobody is supposed to send those, and they are\nindistinguishable from a flush in this interface).\n\nLet's correct error messages which claim an unexpected EOF;\nit's really an unexpected flush packet.\n\nWhile we're here, let's also check \"!line\" instead of\n\"!len\" in the second case. The two events should always\ncoincide, but checking \"!line\" makes it more obvious that we\nare not about to dereference NULL.\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/bc9d4dc5b07c05c7b26a4e781b7538db7c775fc3"},{"sha":"bb1356dc643e1488ccc1924ab674f6cbbe615f74","author":{"name":"Jon Simons","email":"1bde51fb45d31234a937eabeae454399af21dc56@jonsimons.org"},"message":"always check for NULL return from packet_read_line()\n\nThe packet_read_line() function will die if it sees any\nprotocol or socket errors. But it will return NULL for a\nflush packet; some callers which are not expecting this may\ndereference NULL if they get an unexpected flush. This would\ninvolve the other side breaking protocol, but we should\nflag the error rather than segfault.\n\nSigned-off-by: Jon Simons <jon@jonsimons.org>\nReviewed-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/bb1356dc643e1488ccc1924ab674f6cbbe615f74"},{"sha":"89a9f2c862db52d99e4dd78e799f4b36dac597ac","author":{"name":"Jeff King","email":"7e57302763bea699aee296fb53304dc616ab92d5@peff.net"},"message":"CodingGuidelines: mention \"static\" and \"extern\"\n\nIt perhaps goes without saying that file-local stuff should\nbe marked static, but it does not hurt to remind people.\n\nLess obvious is that we are settling on \"do not include\nextern in function declarations\". It is already the default\nunless the function was previously declared static (but if\nyou are following a static declaration with an unmarked one,\nyou should think about why you are declaring the thing\ntwice). And so it just becomes an extra noise-word in our\nheader files.\n\nWe used to give the opposite advice, so there are quite a\nfew \"extern\" markers in early Git code. But this at least\nmakes a concrete suggestion that we can follow going\nforward.\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/89a9f2c862db52d99e4dd78e799f4b36dac597ac"},{"sha":"ed5144d7eb63a0e0e71d3b281e69e953abbf0365","author":{"name":"Gregory Herrero","email":"a15665badd589df897fc491c1c6a71e3a8762be6@oracle.com"},"message":"rebase -p: fix incorrect commit message when calling `git merge`.\n\nSince commit dd6fb0053 (\"rebase -p: fix quoting when calling `git\nmerge`\"), commit message of the merge commit being rebased is passed to\nthe merge command using a subshell executing 'git rev-parse --sq-quote'.\n\nDouble quotes are needed around this subshell so that, newlines are\nkept for the git merge command.\n\nBefore this patch, following merge message:\n\n    \"Merge mybranch into mynewbranch\n\n    Awesome commit.\"\n\nbecomes:\n\n    \"Merge mybranch into mynewbranch Awesome commit.\"\n\nafter a rebase -p.\n\nFixes: \"dd6fb0053 rebase -p: fix quoting when calling `git merge`\"\nReported-by: Jamie Iles <jamie.iles@oracle.com>\nSuggested-by: Vegard Nossum <vegard.nossum@oracle.com>\nSuggested-by: Quentin Casasnovas <quentin.casasnovas@oracle.com>\nSigned-off-by: Gregory Herrero <gregory.herrero@oracle.com>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>","distinct":false,"url":"https://api.github.com/repos/peff/git/commits/ed5144d7eb63a0e0e71d3b281e69e953abbf0365"},{"sha":"9b978691b1940024beeccaf8944f7125c746a628","author":{"name":"Ævar Arnfjörð Bjarmason","email":"f39cfd0b24e0a81f65944956d2eafe947e5be136@gmail.com"},"message":"update-index doc: note a fixed bug in the untracked cache\n\nDocument the bug tested for in my \"status: add a failing test showing\na core.untrackedCache bug\" and fixed in Duy's \"dir.c: fix missing dir\ninvalidation in untracked code\".\n\nSince this is very likely something others will encounter in the\nfuture on older versions, and it's not obvious how to fix it let's\ndocument both that it exists, and how to \"fix\" it with a one-off\ncommand.\n\nAs noted in that commit, even though this bug gets the untracked cache\ninto a bad state, we have not yet found a case where this is user\nvisible, and thus it makes sense for these docs to focus on the\nsymlink case only.\n\nSigned-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>\nSigned-off-by: Junio C Hamano <gitster@pobox.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/9b978691b1940024beeccaf8944f7125c746a628"},{"sha":"7bf0be75016058e43181ecc22c65b363beb6d24b","author":{"name":"Ævar Arnfjörð Bjarmason","email":"f39cfd0b24e0a81f65944956d2eafe947e5be136@gmail.com"},"message":"update-index doc: note the caveat with \"could not open...\"\n\nNote the caveat where 2.17 is stricter about index validation\npotentially causing \"could not open directory\" warnings when git is\nupgraded. See the preceding \"dir.c: stop ignoring opendir() error in\nopen_cached_dir()\" change.\n\nThis caused some mayhem when I upgraded git to a version with this\nseries at Booking.com, and other users have doubtless enabled the UC\nextension and are in for a surprise when they upgrade. Let's give them\na headsup in the docs.\n\nSigned-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>","distinct":false,"url":"https://api.github.com/repos/peff/git/commits/7bf0be75016058e43181ecc22c65b363beb6d24b"},{"sha":"12e31a6b12b0a8497f35b327219c348186e0a666","author":{"name":"SZEDER Gábor","email":"2d7398648c7656faf78ca9ed84ec90025e532b11@gmail.com"},"message":"t: document 'test_must_fail ok=<signal-name>'\n\nSince 'test_might_fail' is implemented as a thin wrapper around\n'test_must_fail', it also accepts the same options.  Mention this in\nthe docs as well.\n\nSigned-off-by: SZEDER Gábor <szeder.dev@gmail.com>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>","distinct":false,"url":"https://api.github.com/repos/peff/git/commits/12e31a6b12b0a8497f35b327219c348186e0a666"},{"sha":"dedfdb9c60035eb1b8fd5da1afd6002e841daf19","author":{"name":"Jeff King","email":"7e57302763bea699aee296fb53304dc616ab92d5@peff.net"},"message":"t0002: simplify error checking\n\nThis ancient test script does a lot of manual checking of\ntest conditions with \"if\" blocks. We can simplify this\nby relying on helpers like test_must_fail.\n\nNote that a failing \"grep\" call here won't produce any\nverbose output, but that's OK. These days we rely on \"-x\" to\ntell us about such commands. And in addition, these greps\nare soon to be converted to test_i18ngrep (which is itself\nsoon learning to be more verbose).\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/dedfdb9c60035eb1b8fd5da1afd6002e841daf19"},{"sha":"6bc8606be389aeb6e3a3f245b36de7b7ad11e9cb","author":{"name":"Ramsay Jones","email":"5f27f63ff4a7d14be74386ad2c8a8b5eb52d0e05@ramsayjones.plus.com"},"message":"config.mak.uname: remove SPARSE_FLAGS setting for cygwin\n\nSince commit f66450ae9 (\"cygwin: Remove the Win32 l/stat() implementation\",\n2013-06-22), the cygwin build has not used the WIN32 API/header files.\nThis means that the '-isystem /usr/include/w32api' option to sparse is\nno longer necessary (to allow sparse to find the WIN32 header files).\nIn addition, the '-Wno-one-bit-signed-bitfield' option can be removed,\nsince the warning suppressed by that option was only provoked by a WIN32\nheader file.\n\nSigned-off-by: Ramsay Jones <ramsay@ramsayjones.plus.com>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>","distinct":false,"url":"https://api.github.com/repos/peff/git/commits/6bc8606be389aeb6e3a3f245b36de7b7ad11e9cb"},{"sha":"54360a19566f38b6d21dfd9e77ca0cc62b60ad84","author":{"name":"Ramsay Jones","email":"5f27f63ff4a7d14be74386ad2c8a8b5eb52d0e05@ramsayjones.plus.com"},"message":"Makefile: suppress a sparse warning for pack-revindex.c\n\nSparse has, for a long time, been issuing the following warning against\nthe pack-revindex.c file:\n\n      SP pack-revindex.c\n  pack-revindex.c:64:23: warning: memset with byte count of 262144\n\nThis results from a unconditional check, with a hard-coded limit, which\nis really only appropriate for the kernel source code. (The check is for\na 'large' byte count in a call to memcpy(), memset(), copy_from_user()\nand copy_to_user() functions).\n\nA recent release of sparse (v0.5.1) has introduced some options to allow\nthis check to be turned off (-Wno-memcpy-max-count) or to specify the\nactual limit used (-fmemcpy-max-count=COUNT), rather than a hard-coded\nlimit of 100000.\n\nIn order to suppress the warning, add a target for pack-revindex.sp that\nadds the '-Wno-memcpy-max-count' option to the SPARSE_FLAGS variable.\n\nSigned-off-by: Ramsay Jones <ramsay@ramsayjones.plus.com>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>","distinct":false,"url":"https://api.github.com/repos/peff/git/commits/54360a19566f38b6d21dfd9e77ca0cc62b60ad84"},{"sha":"a8e7a2bf0fe843836f4ec286c6cdba24bf40fac8","author":{"name":"Jeff King","email":"7e57302763bea699aee296fb53304dc616ab92d5@peff.net"},"message":"describe: confirm that blobs actually exist\n\nPrior to 644eb60bd0 (builtin/describe.c: describe a blob,\n2017-11-15), we noticed and complained about missing\nobjects, since they were not valid commits:\n\n  $ git describe 0000000000000000000000000000000000000000\n  fatal: 0000000000000000000000000000000000000000 is not a valid 'commit' object\n\nAfter that commit, we feed any non-commit to lookup_blob(),\nand complain only if it returns NULL. But the lookup_*\nfunctions do not actually look at the on-disk object\ndatabase at all. They return an entry from the in-memory\nobject hash if present (and if it matches the requested\ntype), and otherwise auto-create a \"struct object\" of the\nrequested type.\n\nA missing object would hit that latter case: we create a\nbogus blob struct, walk all of history looking for it, and\nthen exit successfully having produced no output.\n\nOne reason nobody may have noticed this is that some related\ncases do still work OK:\n\n  1. If we ask for a tree by sha1, then the call to\n     lookup_commit_referecne_gently() would have parsed it,\n     and we would have its true type in the in-memory object\n     hash.\n\n  2. If we ask for a name that doesn't exist but isn't a\n     40-hex sha1, then get_oid() would complain before we\n     even look at the objects at all.\n\nWe can fix this by replacing the lookup_blob() call with a\ncheck of the true type via sha1_object_info(). This is not\nquite as efficient as we could possibly make this check. We\nknow in most cases that the object was already parsed in the\nearlier commit lookup, so we could call lookup_object(),\nwhich does auto-create, and check the resulting struct's\ntype (or NULL).  However it's not worth the fragility nor\ncode complexity to save a single object lookup.\n\nThe new tests cover this case, as well as that of a\ntree-by-sha1 (which does work as described above, but was\nnot explicitly tested).\n\nNoticed-by: Michael Haggerty <mhagger@alum.mit.edu>\nSigned-off-by: Jeff King <peff@peff.net>\nAcked-by: Stefan Beller <sbeller@google.com>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>","distinct":false,"url":"https://api.github.com/repos/peff/git/commits/a8e7a2bf0fe843836f4ec286c6cdba24bf40fac8"}]}
{"actor":{"display_login":"peff"}}