{"push_id":651724301,"size":272,"distinct_size":14,"ref":"refs/heads/hv/fetch-submodules-recursive","head":"5477ce75bba67e3e892b41e185f62b7c48fea625","before":"c53b1c1734731a53de12252459fd20cf8866fd6d","commits":[{"sha":"51af1886c73f12b1e020db1aa03525e2d74bed93","author":{"email":"b0eeaac46e675e9f95bf68c0df1041cf581c26f4@mns.spb.ru","name":"Kirill Smelkov"},"message":"combine-diff: move show_log_first logic/action out of paths scanning\n\nJudging from sample outputs and tests nothing changes in diff -c output,\nand this change will help later patches, when we'll be refactoring paths\nscanning into its own function with several variants - the\nshow_log_first logic / code will stay common to all of them.\n\nNOTE: only now we have to take care to explicitly not show anything if\n    parents array is empty, as in fact there are some clients in Git code,\n    which calls diff_tree_combined() in such a way.\n\nSigned-off-by: Kirill Smelkov <kirr@mns.spb.ru>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>","distinct":false,"url":"https://api.github.com/repos/hvoigt/git/commits/51af1886c73f12b1e020db1aa03525e2d74bed93"},{"sha":"eeb3f32868862609b475122f3e0c2ef7c0dd3e79","author":{"email":"b0eeaac46e675e9f95bf68c0df1041cf581c26f4@mns.spb.ru","name":"Kirill Smelkov"},"message":"combine-diff: move changed-paths scanning logic into its own function\n\nMove code for finding paths for which diff(commit,parent_i) is not-empty\nfor all parents to separate function - at present we have generic (and\nslow) code for this job, which translates 1 n-parent problem to n\n1-parent problems and then intersect results, and will be adding another\nlimited, but faster, paths scanning implementation in the next patch.\n\nSigned-off-by: Kirill Smelkov <kirr@mns.spb.ru>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>","distinct":false,"url":"https://api.github.com/repos/hvoigt/git/commits/eeb3f32868862609b475122f3e0c2ef7c0dd3e79"},{"sha":"e197c2b650316f62e6dfee4fadcb4198a03b8325","author":{"email":"b0eeaac46e675e9f95bf68c0df1041cf581c26f4@mns.spb.ru","name":"Kirill Smelkov"},"message":"tree-diff: no need to manually verify that there is no mode change for a path\n\nBecause if there is, such two tree entries would never be compared as\nequal - the code in base_name_compare() explicitly compares modes, if\nthere is a change for dir bit, even for equal paths, entries would\ncompare as different.\n\nThe code I'm removing here is from 2005 April 262e82b4 (Fix diff-tree\nrecursion), which pre-dates base_name_compare() introduction in 958ba6c9\n(Introduce \"base_name_compare()\" helper function) by a month.\n\nSigned-off-by: Kirill Smelkov <kirr@mns.spb.ru>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>","distinct":false,"url":"https://api.github.com/repos/hvoigt/git/commits/e197c2b650316f62e6dfee4fadcb4198a03b8325"},{"sha":"e906612121bc9d436a3a64cd03be0537654e800c","author":{"email":"b0eeaac46e675e9f95bf68c0df1041cf581c26f4@mns.spb.ru","name":"Kirill Smelkov"},"message":"tree-diff: no need to pass match to skip_uninteresting()\n\nIt is neither used there as input, nor the output written through it, is\nused outside.\n\nSigned-off-by: Kirill Smelkov <kirr@mns.spb.ru>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>","distinct":false,"url":"https://api.github.com/repos/hvoigt/git/commits/e906612121bc9d436a3a64cd03be0537654e800c"},{"sha":"7e9003c1497d01f2e75a5f3df7303643fb2432c3","author":{"email":"b0eeaac46e675e9f95bf68c0df1041cf581c26f4@mns.spb.ru","name":"Kirill Smelkov"},"message":"tree-diff: show_tree() is not needed\n\nWe don't need special code for showing added/removed subtree, because we\ncan do the same via diff_tree_sha1, just passing NULL for absent tree.\n\nAnd compared to show_tree(), which was calling show_entry() for every\ntree entry, that would lead to the same show_entry() callings:\n\n    show_tree(t):\n        for e in t.entries:\n            show_entry(e)\n\n    diff_tree_sha1(NULL, new):  /* the same applies to (old, NULL) */\n        diff_tree(t1=NULL, t2)\n            ...\n            if (!t1->size)\n                show_entry(t2)\n            ...\n\nand possible overhead is negligible, since after the patch, timing for\n\n    `git log --raw --no-abbrev --no-renames`\n\nfor navy.git and `linux.git v3.10..v3.11` is practically the same.\n\nSo let's say goodbye to show_tree() - it removes some code, but also,\nand what is important, consolidates more code for showing/recursing into\ntrees into one place.\n\nSigned-off-by: Kirill Smelkov <kirr@mns.spb.ru>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>","distinct":false,"url":"https://api.github.com/repos/hvoigt/git/commits/7e9003c1497d01f2e75a5f3df7303643fb2432c3"},{"sha":"6453f7b34864c1a639cc367f576476ee3be1456f","author":{"email":"c9df6394cb541f693236245820fbe23866f1a3fe@linux-m68k.org","name":"Andreas Schwab"},"message":"grep: add grep.fullName config variable\n\nThis configuration variable sets the default for the --full-name option.\n\nSigned-off-by: Andreas Schwab <schwab@linux-m68k.org>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>","distinct":false,"url":"https://api.github.com/repos/hvoigt/git/commits/6453f7b34864c1a639cc367f576476ee3be1456f"},{"sha":"d00e980c224d4b65972dda4474fbd9294bdb185f","author":{"email":"b0eeaac46e675e9f95bf68c0df1041cf581c26f4@mns.spb.ru","name":"Kirill Smelkov"},"message":"tree-diff: consolidate code for emitting diffs and recursion in one place\n\nCurrently both compare_tree_entry() and show_entry() invoke opt diff\ncallbacks (opt->add_remove() and opt->change()), and also they both have\ncode which decides whether to recurse into sub-tree, and whether to emit\na tree as separate entry if DIFF_OPT_TREE_IN_RECURSIVE is set.\n\nI.e. we have code duplication and logic scattered on two places.\n\nLet's consolidate it - all diff emiting code and recurion logic moves\nto show_entry, which is now named as show_path, because it shows diff\nfor a path, based on up to two tree entries, with actual diff emitting\ncode being kept in new helper emit_diff() for clarity.\n\nWhat we have as the result, is that compare_tree_entry is now free from\ncode with logic for diff generation, and also performance is not\naffected as timings for\n\n    `git log --raw --no-abbrev --no-renames`\n\nfor navy.git and `linux.git v3.10..v3.11`, just like in previous patch,\nstay the same.\n\nSigned-off-by: Kirill Smelkov <kirr@mns.spb.ru>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>","distinct":false,"url":"https://api.github.com/repos/hvoigt/git/commits/d00e980c224d4b65972dda4474fbd9294bdb185f"},{"sha":"5dfb2bbd8d2e2e48aa3ad6c6a8f437bbe5d2a7fb","author":{"email":"b0eeaac46e675e9f95bf68c0df1041cf581c26f4@mns.spb.ru","name":"Kirill Smelkov"},"message":"tree-diff: don't assume compare_tree_entry() returns -1,0,1\n\nIt does, but we'll be reworking it in the next patch after it won't, and\nbesides it is better to stick to standard\nstrcmp/memcmp/base_name_compare/etc... convention, where comparison\nfunction returns <0, =0, >0\n\nRegarding performance, comparing for <0, =0, >0 should be a little bit\nfaster, than switch, because it is just 1 test-without-immediate\ninstruction and then up to 3 conditional branches, and in switch you\nhave up to 3 tests with immediate and up to 3 conditional branches.\n\nNo worry, that update_tree_entry(t2) is duplicated for =0 and >0 - it\nwill be good after we'll be adding support for multiparent walker and\nwill stay that way.\n\n=0 case goes first, because it happens more often in real diffs - i.e.\npaths are the same.\n\nSigned-off-by: Kirill Smelkov <kirr@mns.spb.ru>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>","distinct":false,"url":"https://api.github.com/repos/hvoigt/git/commits/5dfb2bbd8d2e2e48aa3ad6c6a8f437bbe5d2a7fb"},{"sha":"903bba68abb8153f181d854e9a7075b893f1303f","author":{"email":"b0eeaac46e675e9f95bf68c0df1041cf581c26f4@mns.spb.ru","name":"Kirill Smelkov"},"message":"tree-diff: move all action-taking code out of compare_tree_entry()\n\n- let it do only comparison.\n\nThis way the code is cleaner and more structured - cmp function only\ncompares, and the driver takes action based on comparison result.\n\nThere should be no change in performance, as effectively, we just move\nif series from on place into another, and merge it to was-already-there\nsame switch/if, so the result is maybe a little bit faster.\n\nSigned-off-by: Kirill Smelkov <kirr@mns.spb.ru>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>","distinct":false,"url":"https://api.github.com/repos/hvoigt/git/commits/903bba68abb8153f181d854e9a7075b893f1303f"},{"sha":"9bc0619655dfd183eb5d0d47b4d63a511acd5c64","author":{"email":"b0eeaac46e675e9f95bf68c0df1041cf581c26f4@mns.spb.ru","name":"Kirill Smelkov"},"message":"tree-diff: rename compare_tree_entry -> tree_entry_pathcmp\n\nSince previous commit, this function does not compare entry hashes, and\nmode are compared fully outside of it. So what it does is compare entry\nnames and DIR bit in modes. Reflect this in its name.\n\nAdd documentation stating the semantics, and move the note about\nfiles/dirs comparison to it.\n\nSigned-off-by: Kirill Smelkov <kirr@mns.spb.ru>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>","distinct":false,"url":"https://api.github.com/repos/hvoigt/git/commits/9bc0619655dfd183eb5d0d47b4d63a511acd5c64"},{"sha":"5acabd84a6656a4f568f0e934cc9e1b344ed39d4","author":{"email":"b0eeaac46e675e9f95bf68c0df1041cf581c26f4@mns.spb.ru","name":"Kirill Smelkov"},"message":"tree-diff: show_path prototype is not needed anymore\n\nWe moved all action-taking code below show_path() in recent HEAD~~\n(tree-diff: move all action-taking code out of compare_tree_entry).\n\nSigned-off-by: Kirill Smelkov <kirr@mns.spb.ru>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>","distinct":false,"url":"https://api.github.com/repos/hvoigt/git/commits/5acabd84a6656a4f568f0e934cc9e1b344ed39d4"},{"sha":"1a27a1545230a5a19a3c05ed41efb8530d2fd2cd","author":{"email":"b0eeaac46e675e9f95bf68c0df1041cf581c26f4@mns.spb.ru","name":"Kirill Smelkov"},"message":"tree-diff: simplify tree_entry_pathcmp\n\nSince an earlier \"Finally switch over tree descriptors to contain a\npre-parsed entry\", we can safely access all tree_desc->entry fields\ndirectly instead of first \"extracting\" them through\ntree_entry_extract.\n\nUse it. The code generated stays the same - only it now visually looks\ncleaner.\n\nSigned-off-by: Kirill Smelkov <kirr@mns.spb.ru>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>","distinct":false,"url":"https://api.github.com/repos/hvoigt/git/commits/1a27a1545230a5a19a3c05ed41efb8530d2fd2cd"},{"sha":"14d3bb4955a41e146b6f1cd6571602a6b46b2af9","author":{"email":"a6723cc3f76163bf7adb636a73ac3b0ceb3e6b9b@pobox.com","name":"Junio C Hamano"},"message":"apply --ignore-space-change: lines with and without leading whitespaces do not match\n\nThe fuzzy_matchlines() function is used when attempting to resurrect\na patch that is whitespace-damaged, or when applying a patch that\nwas produced against an old codebase to the codebase after\nindentation change.\n\nThe patch may want to change a line \"a_bc\" (\"_\" is used throught\nthis description for a whitespace to make it stand out) in the\noriginal into something else, and we may not find \"a_bc\" in the\ncurrent source, but there may be \"a__bc\" (two spaces instead of one\nthe whitespace-damaged patch claims to expect).  By ignoring the\namount of whitespaces, it forces \"git apply\" to consider that \"a_bc\"\nin the broken patch meant to refer to \"a__bc\" in reality.\n\nHowever, the implementation special cases a run of whitespaces at\nthe beginning of a line and makes \"abc\" match \"_abc\", even though a\nwhitespace in the middle of string never matches a 0-width gap,\ne.g. \"a_bc\" does not match \"abc\".  A run of whitespace at the end of\none string does not match a 0-width end of line on the other line,\neither, e.g. \"abc_\" does not match \"abc\".\n\nFix this inconsistency by making the code skip leading whitespaces\nonly when both strings begin with a whitespace.  This makes the\noption mean the same as the option of the same name in \"diff\" and\n\"git diff\".\n\nNote that I am not sure if anybody sane should use this option in\nthe first place.  The fuzzy match logic may be able to find the\noriginal line that the patch author may have meant to touch because\nit does not fully trust what the original lines say (i.e. context\nlines prefixed by \" \" and old lines prefixed by \"-\" does not have to\nexactly match the contents the patch is applied to).  There is no\nreason for us to trust what the replacement lines (i.e. new lines\nprefixed by \"+\") say, either, but with this option enabled, we end\nup copying these new lines with suspicious whitespace distributions\nliterally into the patched result.  But as long as we keep it, we\nshould make it do its insane thing consistently.\n\nSigned-off-by: Junio C Hamano <gitster@pobox.com>","distinct":false,"url":"https://api.github.com/repos/hvoigt/git/commits/14d3bb4955a41e146b6f1cd6571602a6b46b2af9"},{"sha":"6ca844e9f5ca93efd0a1323a9c9aaa882c0043e8","author":{"email":"b0eeaac46e675e9f95bf68c0df1041cf581c26f4@mns.spb.ru","name":"Kirill Smelkov"},"message":"tree-diff: remove special-case diff-emitting code for empty-tree cases\n\nWhile walking trees, we iterate their entries from lowest to highest in\nsort order, so empty tree means all entries were already went over.\n\nIf we artificially assign +infinity value to such tree \"entry\", it will\ngo after all usual entries, and through the usual driver loop we will be\ntaking the same actions, which were hand-coded for special cases, i.e.\n\n    t1 empty, t2 non-empty\n        pathcmp(+∞, t2) -> +1\n        show_path(/*t1=*/NULL, t2);     /* = t1 > t2 case in main loop */\n\n    t1 non-empty, t2-empty\n        pathcmp(t1, +∞) -> -1\n        show_path(t1, /*t2=*/NULL);     /* = t1 < t2 case in main loop */\n\nIn other words when we have t1 and t2, we return a sign that tells the\ncaller to indicate the \"earlier\" one to be emitted, and by returning the\nsign that causes the non-empty side to be emitted, we will automatically\ncause the entries from the remaining side to be emitted, without\nattempting to touch the empty side at all.  We can teach\ntree_entry_pathcmp() to pretend that an empty tree has an element that\nsorts after anything else to achieve this.\n\nRight now we never go to when compared tree descriptors are both\ninfinity, as this condition is checked in the loop beginning as\nfinishing criteria, but will do so in the future, when there will be\nseveral parents iterated simultaneously, and some pair of them would run\nto the end.\n\nSigned-off-by: Kirill Smelkov <kirr@mns.spb.ru>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>","distinct":false,"url":"https://api.github.com/repos/hvoigt/git/commits/6ca844e9f5ca93efd0a1323a9c9aaa882c0043e8"},{"sha":"ad6f3cc7d2eaec5247b39e9dca8e55a0f98123e7","author":{"email":"b0eeaac46e675e9f95bf68c0df1041cf581c26f4@mns.spb.ru","name":"Kirill Smelkov"},"message":"tree-diff: diff_tree() should now be static\n\nWe reworked all its users to use the functionality through\ndiff_tree_sha1 variant in recent patches (see \"tree-diff: allow\ndiff_tree_sha1 to accept NULL sha1\" and what comes next).\n\ndiff_tree() is now not used outside tree-diff.c - make it static.\n\nSigned-off-by: Kirill Smelkov <kirr@mns.spb.ru>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>","distinct":false,"url":"https://api.github.com/repos/hvoigt/git/commits/ad6f3cc7d2eaec5247b39e9dca8e55a0f98123e7"},{"sha":"52894e70951518e44c064cef2561aed38202fd36","author":{"email":"b0eeaac46e675e9f95bf68c0df1041cf581c26f4@mns.spb.ru","name":"Kirill Smelkov"},"message":"tree-diff: rework diff_tree interface to be sha1 based\n\nIn the next commit this will allow to reduce intermediate calls, when\nrecursing into subtrees - at that stage we know only subtree sha1, and\nit is natural for tree walker to start from that phase. For now we do\n\n    diff_tree\n        show_path\n            diff_tree_sha1\n                diff_tree\n                    ...\n\nand the change will allow to reduce it to\n\n    diff_tree\n        show_path\n            diff_tree\n\nAlso, it will allow to omit allocating strbuf for each subtree, and just\nreuse the common strbuf via playing with its len.\n\nThe above-mentioned improvements go in the next 2 patches.\n\nThe downside is that try_to_follow_renames(), if active, we cause\nre-reading of 2 initial trees, which was negligible based on my timings,\nand which is outweighed cogently by the upsides.\n\nNOTE To keep with the current interface and semantics, I needed to\nrename the function from diff_tree() to diff_tree_sha1(). As\ndiff_tree_sha1() was already used, and the function we are talking here\nis its more low-level helper, let's use convention for prefixing\nsuch helpers with \"ll_\". So the final renaming is\n\n    diff_tree() -> ll_diff_tree_sha1()\n\nSigned-off-by: Kirill Smelkov <kirr@mns.spb.ru>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>","distinct":false,"url":"https://api.github.com/repos/hvoigt/git/commits/52894e70951518e44c064cef2561aed38202fd36"},{"sha":"b9081a657446ac2c5e2129de183edb41d4b4f4fb","author":{"email":"b0eeaac46e675e9f95bf68c0df1041cf581c26f4@mns.spb.ru","name":"Kirill Smelkov"},"message":"tree-diff: no need to call \"full\" diff_tree_sha1 from show_path()\n\nAs described in previous commit, when recursing into sub-trees, we can\nuse lower-level tree walker, since its interface is now sha1 based.\n\nThe change is ok, because diff_tree_sha1() only invokes\nll_diff_tree_sha1(), and also, if base is empty, try_to_follow_renames().\nBut base is not empty here, as we have added a path and '/' before\nrecursing.\n\nSigned-off-by: Kirill Smelkov <kirr@mns.spb.ru>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>","distinct":false,"url":"https://api.github.com/repos/hvoigt/git/commits/b9081a657446ac2c5e2129de183edb41d4b4f4fb"},{"sha":"12cd81743dc4645ef909b0c38582f5714c9a8ff7","author":{"email":"b0eeaac46e675e9f95bf68c0df1041cf581c26f4@mns.spb.ru","name":"Kirill Smelkov"},"message":"tree-diff: reuse base str(buf) memory on sub-tree recursion\n\nInstead of allocating it all the time for every subtree in\nll_diff_tree_sha1, let's allocate it once in diff_tree_sha1, and then\nall callee just use it in stacking style, without memory allocations.\n\nThis should be faster, and for me this change gives the following\nslight speedups for\n\n    git log --raw --no-abbrev --no-renames --format='%H'\n\n                navy.git    linux.git v3.10..v3.11\n\n    before      0.618s      1.903s\n    after       0.611s      1.889s\n    speedup     1.1%        0.7%\n\nSigned-off-by: Kirill Smelkov <kirr@mns.spb.ru>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>","distinct":false,"url":"https://api.github.com/repos/hvoigt/git/commits/12cd81743dc4645ef909b0c38582f5714c9a8ff7"},{"sha":"61f76a3612db199a9eb9090c2605d8fc35ffc41c","author":{"email":"b0eeaac46e675e9f95bf68c0df1041cf581c26f4@mns.spb.ru","name":"Kirill Smelkov"},"message":"Portable alloca for Git\n\nIn the next patch we'll have to use alloca() for performance reasons,\nbut since alloca is non-standardized and is not portable, let's have a\ntrick with compatibility wrappers:\n\n1. at configure time, determine, do we have working alloca() through\n   alloca.h, and define\n\n    #define HAVE_ALLOCA_H\n\n   if yes.\n\n2. in code\n\n    #ifdef HAVE_ALLOCA_H\n    # include <alloca.h>\n    # define xalloca(size)      (alloca(size))\n    # define xalloca_free(p)    do {} while(0)\n    #else\n    # define xalloca(size)      (xmalloc(size))\n    # define xalloca_free(p)    (free(p))\n    #endif\n\n   and use it like\n\n   func() {\n       p = xalloca(size);\n       ...\n\n       xalloca_free(p);\n   }\n\nThis way, for systems, where alloca is available, we'll have optimal\non-stack allocations with fast executions. On the other hand, on\nsystems, where alloca is not available, this gracefully fallbacks to\nxmalloc/free.\n\nBoth autoconf and config.mak.uname configurations were updated. For\nautoconf, we are not bothering considering cases, when no alloca.h is\navailable, but alloca() works some other way - its simply alloca.h is\navailable and works or not, everything else is deep legacy.\n\nFor config.mak.uname, I've tried to make my almost-sure guess for where\nalloca() is available, but since I only have access to Linux it is the\nonly change I can be sure about myself, with relevant to other changed\nsystems people Cc'ed.\n\nNOTE\n\nSunOS and Windows had explicit -DHAVE_ALLOCA_H in their configurations.\nI've changed that to now-common HAVE_ALLOCA_H=YesPlease which should be\ncorrect.\n\nCc: Brandon Casey <drafnel@gmail.com>\nCc: Marius Storm-Olsen <mstormo@gmail.com>\nCc: Johannes Sixt <j6t@kdbg.org>\nCc: Johannes Schindelin <Johannes.Schindelin@gmx.de>\nCc: Ramsay Jones <ramsay@ramsay1.demon.co.uk>\nCc: Gerrit Pape <pape@smarden.org>\nCc: Petr Salinger <Petr.Salinger@seznam.cz>\nCc: Jonathan Nieder <jrnieder@gmail.com>\nAcked-by: Thomas Schwinge <thomas@codesourcery.com> (GNU Hurd changes)\nSigned-off-by: Kirill Smelkov <kirr@mns.spb.ru>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>","distinct":false,"url":"https://api.github.com/repos/hvoigt/git/commits/61f76a3612db199a9eb9090c2605d8fc35ffc41c"},{"sha":"b984d333a1367078c3631b8dfdd0d0ec7b332715","author":{"email":"c24c152f145c57791e809b126db9e61bd1c1782d@alum.mit.edu","name":"Michael Haggerty"},"message":"t1400: fix name and expected result of one test\n\nThe test\n\n    stdin -z create ref fails with zero new value\n\nactually passes an empty new value, not a zero new value.  So rename\nthe test s/zero/empty/, and change the expected error from\n\n    fatal: create $c given zero new value\n\nto\n\n    fatal: create $c missing <newvalue>\n\nOf course, this makes the test fail now, because although \"git\nupdate-ref\" tries to distinguish between these two errors, it does not\nsucceed in this situation.  Fixing it is more than a one-liner, so\nmark the test test_expect_failure for now.  The failure will be fixed\nlater in this patch series.\n\nSigned-off-by: Michael Haggerty <mhagger@alum.mit.edu>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>","distinct":false,"url":"https://api.github.com/repos/hvoigt/git/commits/b984d333a1367078c3631b8dfdd0d0ec7b332715"}]}