{"thread":{"id":"30174","subject":"What's cooking in git.git (Apr 2012, #03; Fri, 6)","startedAt":"2012-04-06T21:02:56Z","lastAt":"2012-04-09T19:46:50Z","messageCount":4,"participants":["Junio C Hamano","Jeff King"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"188690","messageId":"7vwr5szi7z.fsf@alter.siamese.dyndns.org","threadId":"30174","inReplyTo":null,"subject":"What's cooking in git.git (Apr 2012, #03; Fri, 6)","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2012-04-06T21:02:56Z","receivedAt":"2012-04-06T21:02:56Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"What's cooking in git.git (Apr 2012, #03; Fri, 6)\n--------------------------------------------------\n\nHere are the topics that have been cooking.  Commits prefixed with '-' are\nonly in 'pu' (proposed updates) while commits prefixed with '+' are in 'next'.\n\nAfter slipping for about a week, 1.7.10 final has been tagged.  Let's wait\nfor a few days to give time for the dust to settle and then open the new\ndevelopment cycle sometime next week.\n\nYou can find the changes described here in the integration branches of the\nrepositories listed at\n\n    http://git-blame.blogspot.com/p/git-public-repositories.html\n\n--------------------------------------------------\n[Stalled]\n\n* lp/maint-diff-three-dash-with-graph (2012-03-20) 3 commits\n - t4202: add test for \"log --graph --stat -p\" separator lines\n - log --graph: fix break in graph lines\n - log --graph --stat: three-dash separator should come after graph lines\n\nThe combination of two options \"log --graph --stat\" was an obscure corner\ncase nobody cared about, and did not correctly show the ancestry graph\nlines.\n\nI've split the original patch into three pieces, one for fixes to two\ndifferent issues and a test.  Also the test is adjusted so that the series\ncan be back-merged to older codebase that did not have 7f81463 (Use\ncorrect grammar in diffstat summary line, 2012-02-01) that first appeared\nin v1.7.9.2\n\nWith a review from Zbigniew, I would expect that this would be rerolled\nagain.\n\n* cn/apply-fix-ws-can-lengthen-lines (2012-03-11) 1 commit\n . apply: reallocate the postimage buffer when needed\n\nAttempts to address an ancient bug that dates back to the addition\nof an oddball \"tab-in-indent\" whitespace breakage class that wants\nto have longer lines than the original when fixing things up.\n\nNeeds more work; results in double-frees.\n\n* nd/columns (2012-03-13) 12 commits\n - column: support grouping entries\n - column: support \"denser\" mode\n - ls-files: support --column\n - tag: add --column\n - column: support piping stdout to external git-column process\n - status: add --column\n - branch: add --column\n - help: reuse print_columns() for help -a\n - column: add dense layout support\n - column: add columnar layout\n - Stop starting pager recursively\n - Add column layout skeleton and git-column\n\nRerolled again.  Modulo minor nits, looked nicer than the previous round.\n\n* nd/threaded-index-pack (2012-03-11) 2 commits\n - index-pack: support multithreaded delta resolving\n - index-pack: split second pass obj handling into own function\n\nAnother reroll after a bugreport on pthread usage discovered by Ramsey,\nbut it seems the topic is cooking between Ramsay and Duy out of tree.\nWaiting for resolution.\n\n* jh/apply-free-patch (2012-03-28) 7 commits\n - apply.c: WIP ownership audit\n - apply: free unused fragments for submodule patch\n - apply: free patch->result\n - apply: release memory for fn_table\n - apply: free patch->{def,old,new}_name fields\n - apply: rename free_patch() to free_patch_list()\n - apply: do not leak patches and fragments\n\nValgrind reports quite a lot of discarded memory inside apply.  I started\nauditing the memory ownership rules in the command, and am almost done.\n\nWill defer til 1.7.10.\n\n* ss/git-svn-prompt-sans-terminal (2012-01-04) 3 commits\n - fixup! 15eaaf4\n - git-svn, perl/Git.pm: extend Git::prompt helper for querying users\n - perl/Git.pm: \"prompt\" helper to honor GIT_ASKPASS and SSH_ASKPASS\n\nThe bottom one has been replaced with a rewrite based on comments\nfrom Ævar. The second one needs more work, both in perl/Git.pm and\nprompt.c, to give precedence to tty over SSH_ASKPASS when terminal\nis available.\n\n* jc/split-blob (2012-04-03) 7 commits\n - chunked-object: streaming checkout\n - chunked-object: fallback checkout codepaths\n - bulk-checkin: support chunked-object encoding\n - bulk-checkin: allow the same data to be multiply hashed\n - new representation types in the packstream\n - packfile: use varint functions\n - varint: make it available outside the context of pack\n (this branch is tangled with jc/index-v4.)\n\nNot ready.\n\nI finished the streaming checkout codepath, but as explained in\n127b177 (bulk-checkin: support chunked-object encoding, 2011-11-30),\nthese are still early steps of a long and painful journey. At least\npack-objects and fsck need to learn the new encoding for the series\nto be usable locally, and then index-pack/unpack-objects needs to\nlearn it to be used remotely.\n\nGiven that I heard a lot of noise that people want large files, and\nthat I was asked by somebody at GitTogether'11 privately for an\nadvice on how to pay developers (not me) to help adding necessary\nsupport, I am somewhat dissapointed that the original patch series\nthat was sent almost two months ago still remains here without much\ncomments and updates from the developer community. I even made the\ninterface to the logic that decides where to split chunks easily\nreplaceable, and I deliberately made the logic in the original patch\nextremely stupid to entice others, especially the \"bup\" fanboys, to\ncome up with a better logic, thinking that giving people an easy\ntarget to shoot for, they may be encouraged to help out. The plan is\nnot working :-(.\n\n--------------------------------------------------\n[Cooking]\n\n* jc/index-v4 (2012-04-04) 10 commits\n - update-index: upgrade/downgrade on-disk index version\n - read-cache.c: write prefix-compressed names in the index\n - read-cache.c: read prefix-compressed names in index on-disk version v4\n - read-cache.c: move code to copy incore to ondisk cache to a helper function\n - read-cache.c: move code to copy ondisk to incore cache to a helper function\n - read-cache.c: report the header version we do not understand\n - read-cache.c: make create_from_disk() report number of bytes it consumed\n - read-cache.c: allow unaligned mapping of the index file\n - cache.h: hide on-disk index details\n - varint: make it available outside the context of pack\n (this branch is tangled with jc/split-blob.)\n\nTrivially shrinks the on-disk size of the index file to save both I/O and\nchecksum overhead.  The \"v4\" format represented here may not be what we\neventually want to have, but the preparatory refactoring steps and the way\nhow backward compatibility is retained should give plenty to learn to GSoC\nstudent-hopefuls.\n\n* jk/add-p-skip-conflicts (2012-04-05) 1 commit\n - add--interactive: ignore unmerged entries in patch mode\n\nExcludes conflicted paths from \"add -p\" processing, as it is not prepared\nto handle them.\n\n* bw/spawn-via-shell-path (2012-04-03) 1 commit\n - Use SHELL_PATH from build system in run_command.c:prepare_shell_cmd\n\n\"sh\" on the user's PATH may be utterly broken on some systems;\nconsistently use SHELL_PATH even from inside run-command API.\n\n* jc/commit-unedited-template (2012-04-03) 5 commits\n - Documentation/git-commit: rephrase the \"initial-ness\" of templates\n - git-commit.txt: clarify -t requires editing message\n - commit: rephrase the error when user did not touch templated log message\n - commit: do not trigger bogus \"has templated message edited\" check\n - t7501: test the right kind of breakage\n\nWhen \"git commit --template F\" errors out because the user did not touch\nthe message, it claimed that it aborts due to \"empty message\", which was\nutterly wrong.\n\n* jc/push-upstream-sanity (2012-04-05) 1 commit\n - push: error out when the \"upstream\" semantics does not make sense\n\nFix broken 'push to upstream' implementation.  \"git push $there\" without\nrefspec, when the current branch is set to push to a remote different from\n$there, used to push to $there using the upstream information to a remote\nunreleated to $there.\n\n* jk/http-backend-keep-committer-ident-env (2012-03-30) 1 commit\n - http-backend: respect existing GIT_COMMITTER_* variables\n\nThe smart-http backend used to always override GIT_COMMITTER_* variables\nwith REMOTE_USER and REMOTE_ADDR.\n\n* mk/gitweb-diff-hl (2012-04-05) 8 commits\n - gitweb: Refinement highlightning in combined diffs\n - gitweb: Highlight interesting parts of diff\n - gitweb: Push formatting diff lines to print_diff_chunk()\n - gitweb: Use print_diff_chunk() for both side-by-side and inline diffs\n - gitweb: Extract print_sidebyside_diff_lines()\n - gitweb: Pass esc_html_hl_regions() options to esc_html()\n - gitweb: esc_html_hl_regions(): Don't create empty <span> elements\n - gitweb: Use descriptive names in esc_html_hl_regions()\n\nRerolled.\n\n* it/fetch-pack-many-refs (2012-04-02) 5 commits\n - remote-curl: main test case for the OS command line overflow\n - fetch-pack: test cases for the new --stdin option\n - fixup? no longer need flex argv[]\n - remote-curl: send the refs to fetch-pack on stdin\n - fetch-pack: new --stdin option to read refs from stdin\n\nWill squash the fix-up one and then requeue.\n\n* jn/debian-customizes-default-editor (2012-03-31) 3 commits\n - fixup? do not hide the \"usual\" default from readers\n - var doc: advertise current DEFAULT_PAGER and DEFAULT_EDITOR settings\n - var doc: default editor and pager are configurable at build time\n\nHaven't heard anything back for the fix-up suggestion, but otherwise\nlooked sane.\n\n* rs/commit-list-sort-in-batch (2012-04-02) 3 commits\n - revision: insert unsorted, then sort in prepare_revision_walk()\n - commit: use mergesort() in commit_list_sort_by_date()\n - add mergesort() for linked lists\n\n* hv/submodule-recurse-push (2012-03-30) 3 commits\n - push: teach --recurse-submodules the on-demand option\n - Refactor submodule push check to use string list instead of integer\n - Teach revision walking machinery to walk multiple times sequencially\n\n* dg/subtree (2012-03-25) 112 commits\n - Add 'contrib/subtree/' from commit '2e63f75b8f49abe220ef55ec4e978e7a3b8dc351'\n - Add Subtree Test Makefile\n - Build Subtree\n - Use Project Config Files\n - Remove Unneeded Files\n - ...\n\nA test merge of the 'subtree'.\nWaiting for an updated pull request.\n\n* jk/branch-quiet (2012-03-26) 2 commits\n - teach \"git branch\" a --quiet option\n - checkout: suppress tracking message with \"-q\"\n\nEven with \"-q\"uiet option, \"checkout\" used to report setting up tracking.\nAlso \"branch\" learns \"-q\"uiet option to squelch informational message.\n\n* jk/run-command-eacces (2012-04-05) 2 commits\n - run-command: treat inaccessible directories as ENOENT\n - compat/mingw.[ch]: Change return type of exec functions to int\n\nWhen PATH contains an unreadable directory, alias expansion code did not\nkick in, and failed with an error that said \"git-subcmd\" was not found.\n\n* jb/am-include (2012-03-28) 1 commit\n - am: support --include option\n\n* jc/am-report-3way (2012-03-28) 1 commit\n - am -3: list the paths that needed 3-way fallback\n\n* rs/combine-diff-zero-context-at-the-beginning (2012-03-25) 1 commit\n - combine-diff: fix loop index underflow\n\nFixes an age old corner case bug in combine diff (only triggered with -U0\nand the hunk at the beginning of the file needs to be shown).\n\n* sl/autoconf (2012-03-26) 3 commits\n - configure: be more idiomatic\n - configure: avoid some code repetitions thanks to m4_{push,pop}def\n - configure: move definitions of private m4 macros before AC_INIT invocation\n\nUpdates our configure.ac to follow a better \"autoconf\" style.\n\n* wk/gitweb-snapshot-use-if-modified-since (2012-03-30) 3 commits\n - gitweb: add If-Modified-Since handling to git_snapshot().\n - gitweb: refactor If-Modified-Since handling\n - gitweb: add `status` headers to git_feed() responses.\n\nMakes 'snapshot' request to \"gitweb\" honor If-Modified-Since: header,\nbased on the commit date.\n\n* jk/diff-no-rename-empty (2012-03-23) 4 commits\n - merge-recursive: don't detect renames of empty files\n - teach diffcore-rename to optionally ignore empty content\n - make is_empty_blob_sha1 available everywhere\n - drop casts from users EMPTY_TREE_SHA1_BIN\n\nForbids rename detection logic from matching two empty files as renames\nduring merge-recursive to prevent mismerges.\n\n* th/difftool-diffall (2012-04-04) 8 commits\n - difftool: print list of valid tools with '--tool-help'\n - difftool: teach difftool to handle directory diffs\n - difftool: eliminate setup_environment function\n - difftool: stop appending '.exe' to git\n - difftool: remove explicit change of PATH\n - difftool: exit(0) when usage is printed\n - difftool: add '--no-gui' option\n - difftool: parse options using Getopt::Long\n\nRolls the two-directory-diff logic from diffall script (in contrib/) into\n\"git difftool\" framework. \n\n* jc/maint-clean-nested-worktree-in-subdir (2012-03-15) 2 commits\n  (merged to 'next' on 2012-03-20 at fb5485e)\n + clean: preserve nested git worktree in subdirectories\n + remove_dir_recursively(): Add flag for skipping removal of toplevel dir\n (this branch is tangled with jh/notes-merge-in-git-dir-worktree.)\n\n\"git clean -d -f\" (not \"-d -f -f\") is supposed to protect nested working\ntrees of independent git repositories that exist in the current project\nworking tree from getting removed, but the protection applied only to such\nworking trees that are at the top-level of the current project by mistake.\n\nNot urgent.\n\n* ct/advise-push-default (2012-03-26) 2 commits\n  (merged to 'next' on 2012-03-28 at 62764ae)\n + clean up struct ref's nonfastforward field\n + push: Provide situational hints for non-fast-forward errors\n\nBreaks down the cases in which \"git push\" fails due to non-ff into three\ncategories, and gives separate advise messages.  This should be a good\nchange regardless of mm/push-default-switch-warning topic.\n\n* nl/rebase-i-cheat-sheet (2012-03-20) 1 commit\n  (merged to 'next' on 2012-03-20 at 3092a2b)\n + rebase -i: remind that the lines are top-to-bottom\n\nNot urgent.\n\n* da/difftool-test (2012-03-19) 1 commit\n  (merged to 'next' on 2012-03-20 at 0ada7d4)\n + t7800: Test difftool passing arguments to diff\n\nMakes sure \"difftool\" options can be given in any order.\n\n* jh/notes-merge-in-git-dir-worktree (2012-03-15) 4 commits\n  (merged to 'next' on 2012-03-20 at 0c1b1de)\n + notes-merge: Don't remove .git/NOTES_MERGE_WORKTREE; it may be the user's cwd\n + notes-merge: use opendir/readdir instead of using read_directory()\n + t3310: illustrate failure to \"notes merge --commit\" inside $GIT_DIR/\n + remove_dir_recursively(): Add flag for skipping removal of toplevel dir\n (this branch is tangled with jc/maint-clean-nested-worktree-in-subdir.)\n\nRunning \"notes merge --commit\" failed to perform correctly when run\nfrom any directory inside $GIT_DIR/.  When \"notes merge\" stops with\nconflicts, $GIT_DIR/NOTES_MERGE_WORKTREE is the place a user edits\nto resolve it.\n\nNot urgent.\n\n* jn/diffstat-tests (2012-03-13) 7 commits\n  (merged to 'next' on 2012-03-20 at 8791b2f)\n + diffstat summary line varies by locale: miscellany\n + test: use numstat instead of diffstat in binary-diff test\n + test: use --numstat instead of --stat in \"git stash show\" tests\n + test: test cherry-pick functionality and output separately\n + test: modernize funny-names test style\n + test: use numstat instead of diffstat in funny-names test\n + test: use test_i18ncmp when checking --stat output\n\nSome tests checked the \"diff --stat\" output when they do not have to,\nwhich unnecessarily made things harder to verify under GETTEXT_POISON.\n\nNot urgent.\n\n* tr/maint-word-diff-regex-sticky (2012-03-14) 3 commits\n  (merged to 'next' on 2012-03-20 at b3f67cd)\n + diff: tweak a _copy_ of diff_options with word-diff\n + diff: refactor the word-diff setup from builtin_diff_cmd\n + t4034: diff.*.wordregex should not be \"sticky\" in --word-diff\n\nThe regexp configured with wordregex was incorrectly reused across\nfiles.\nNot urgent.\n\n* zj/test-cred-helper-nicer-prove (2012-03-15) 2 commits\n  (merged to 'next' on 2012-03-20 at b675ec1)\n + t0303: resurrect commit message as test documentation\n + t0303: immediately bail out w/o GIT_TEST_CREDENTIAL_HELPER\n\nMinor improvement to t0303.\nNot urgent.\n\n* jc/commit-hook-authorship (2012-03-11) 3 commits\n  (merged to 'next' on 2012-03-12 at 05ca7f8)\n + commit: pass author/committer info to hooks\n + t7503: does pre-commit-hook learn authorship?\n + ident.c: add split_ident_line() to parse formatted ident line\n (this branch is tangled with jc/run-hook-env-1.)\n\n\"git commit --author=$name\" did not tell the name that was being\nrecorded in the resulting commit to hooks, even though it does do so\nwhen the end user overrode the authorship via the \"GIT_AUTHOR_NAME\"\nenvironment variable.  This is a simpler of the two approaches.\n\nWill defer til 1.7.10.\n\n* jc/run-hook-env-1 (2012-03-11) 3 commits\n - run_hook(): enhance the interface to pass arbitrary environment\n + t7503: does pre-commit-hook learn authorship?\n + ident.c: add split_ident_line() to parse formatted ident line\n (this branch is tangled with jc/commit-hook-authorship.)\n\nNot urgent.\n\nUpdates run_hook() API to be much less specific to \"commit\".  It would\nonly be useful if people start doing more interesting things with hooks.\n\n* jc/diff-algo-cleanup (2012-02-19) 2 commits\n  (merged to 'next' on 2012-03-15 at cca0032)\n + xdiff: PATIENCE/HISTOGRAM are not independent option bits\n + xdiff: remove XDL_PATCH_* macros\n\nResurrects the preparatory clean-up patches from another topic that was\ndiscarded, as this would give a saner foundation to build on diff.algo\nconfiguration option series.\n\nNot urgent.\n\n* rs/unpack-trees-leakfix (2012-03-06) 1 commit\n  (merged to 'next' on 2012-03-07 at 69a69cd)\n + unpack-trees: plug minor memory leak\n\nWill defer til 1.7.10.\n\n* mm/push-default-switch-warning (2012-03-09) 1 commit\n  (merged to 'next' on 2012-03-28 at 074b16b)\n + push: start warning upcoming default change for push.default\n\nNot urgent.\n\nThis resurrects an ancient patch I wrote during a discussion we had in the\n1.6.3-1.6.4 era.  This should probably come after ct/advise-push-default\ntopic and at that point the advise messages need to be rephrased, taking\nthe future default change into account.\n\n* jc/fmt-merge-msg-people (2012-03-13) 1 commit\n - fmt-merge-msg: show those involved in a merged series\n\nThe \"fmt-merge-msg\" command learns to list the primary contributors\ninvolved in the side topic you are merging.\n\nWill defer til 1.7.10.\n\n* nl/http-proxy-more (2012-03-15) 5 commits\n  (merged to 'next' on 2012-03-20 at c004001)\n + http: rename HTTP_REAUTH to HTTP_AUTH_RETRY\n + http: Avoid limit of retrying request only twice\n + http: handle proxy authentication failure (error 407)\n + http: handle proxy proactive authentication\n + http: try http_proxy env var when http.proxy config option is not set\n\nThe code to talk to http proxies learn to use the same credential\nAPI used to talk to the final http destinations.\n\nWill defer til 1.7.10.\n\n* nd/stream-more (2012-03-07) 7 commits\n  (merged to 'next' on 2012-03-07 at 7325922)\n + update-server-info: respect core.bigfilethreshold\n + fsck: use streaming API for writing lost-found blobs\n + show: use streaming API for showing blobs\n + parse_object: avoid putting whole blob in core\n + cat-file: use streaming API to print blobs\n + Add more large blob test cases\n + streaming: make streaming-write-entry to be more reusable\n\nUse API to read blob data in smaller chunks in more places to\nreduce the memory footprint.  In general, looked fairly good.\n\nWill defer til 1.7.10.\n\n--------------------------------------------------\n[Discarded]\n\n* tb/maint-remove-irrelevant-i18n-test (2012-03-06) 1 commit\n  (merged to 'next' on 2012-03-07 at 23f2dd1)\n + t0204: remove a test that checks undefined behaviour\n\nI tentatively parked this in 'next' but later reverted the merge.\n\n* dg/test-from-elsewhere (2012-03-04) 2 commits\n . Support out-of-tree Valgrind tests\n . Allow overriding GIT_BUILD_DIR\n\nNo immediate need; dropped.\n"},{"id":"188721","messageId":"20120407072724.GA818@sigill.intra.peff.net","threadId":"30174","inReplyTo":"7vwr5szi7z.fsf@alter.siamese.dyndns.org","subject":"rs/commit-list-sort-in-batch","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2012-04-07T07:27:25Z","receivedAt":"2012-04-07T07:27:25Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Fri, Apr 06, 2012 at 02:02:56PM -0700, Junio C Hamano wrote:\n\n> * rs/commit-list-sort-in-batch (2012-04-02) 3 commits\n>  - revision: insert unsorted, then sort in prepare_revision_walk()\n>  - commit: use mergesort() in commit_list_sort_by_date()\n>  - add mergesort() for linked lists\n\nLooks like you applied these patches right on v1.7.9. However, they need\nThomas's 5e8617f to compile, which comes later. There's no textual\nconflict, but test-mergesort.c need strbuf_getwholeline_fd, which is\nmade public by 5e8617f.\n\nHowever, I don't think there's any reason to prefer the fd version over\nthe stdio one (in fact, it is much less efficient). So this could be\nsquashed in to the first patch instead of rebasing:\n\ndiff --git a/test-mergesort.c b/test-mergesort.c\nindex 02441ab..1dd82fd 100644\n--- a/test-mergesort.c\n+++ b/test-mergesort.c\n@@ -28,7 +28,7 @@ int main(int argc, const char **argv)\n \tstruct strbuf sb = STRBUF_INIT;\n \n \tfor (;;) {\n-\t\tif (strbuf_getwholeline_fd(&sb, 0, '\\n'))\n+\t\tif (strbuf_getwholeline(&sb, stdin, '\\n'))\n \t\t\tbreak;\n \t\tline = xmalloc(sizeof(struct line));\n \t\tline->text = strbuf_detach(&sb, NULL);\n\n-Peff\n"},{"id":"188722","messageId":"20120407073232.GA13076@sigill.intra.peff.net","threadId":"30174","inReplyTo":"20120407072724.GA818@sigill.intra.peff.net","subject":"Re: rs/commit-list-sort-in-batch","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2012-04-07T07:32:32Z","receivedAt":"2012-04-07T07:32:32Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Sat, Apr 07, 2012 at 03:27:24AM -0400, Jeff King wrote:\n\n> On Fri, Apr 06, 2012 at 02:02:56PM -0700, Junio C Hamano wrote:\n> \n> > * rs/commit-list-sort-in-batch (2012-04-02) 3 commits\n> >  - revision: insert unsorted, then sort in prepare_revision_walk()\n> >  - commit: use mergesort() in commit_list_sort_by_date()\n> >  - add mergesort() for linked lists\n> \n> Looks like you applied these patches right on v1.7.9. However, they need\n> Thomas's 5e8617f to compile, which comes later. There's no textual\n> conflict, but test-mergesort.c need strbuf_getwholeline_fd, which is\n> made public by 5e8617f.\n\nBy the way, building on top of René's patches[1], I was able to drop the\ntime of a particular fetch into a repository with many refs from:\n\n    real    0m2.081s\n    user    0m2.180s\n    sys     0m0.712s\n\nto:\n\n    real    0m1.784s\n    user    0m1.936s\n    sys     0m0.652s\n\nwith this patch:\n\ndiff --git a/builtin/fetch-pack.c b/builtin/fetch-pack.c\nindex 7124c4b..5d80e65 100644\n--- a/builtin/fetch-pack.c\n+++ b/builtin/fetch-pack.c\n@@ -503,7 +503,7 @@ static int mark_complete(const char *refname, const unsigned char *sha1, int fla\n \t\tstruct commit *commit = (struct commit *)o;\n \t\tif (!(commit->object.flags & COMPLETE)) {\n \t\t\tcommit->object.flags |= COMPLETE;\n-\t\t\tcommit_list_insert_by_date(commit, &complete);\n+\t\t\tcommit_list_insert(commit, &complete);\n \t\t}\n \t}\n \treturn 0;\n@@ -615,6 +615,7 @@ static int everything_local(struct ref **refs, int nr_match, char **match)\n \tif (!args.depth) {\n \t\tfor_each_ref(mark_complete, NULL);\n \t\tfor_each_alternate_ref(mark_alternate_complete, NULL);\n+\t\tcommit_list_sort_by_date(&complete);\n \t\tif (cutoff)\n \t\t\tmark_recent_complete_commits(cutoff);\n \t}\n\nI'm not sure if that vindicates the patches, or implies that these\nthings are lurking everywhere and that we should really move to a better\ndata structure so we don't have to fix them all manually. :)\n\n-Peff\n\n[1] Actually, it was René's patches merged into v1.7.10. My ccdc603\n    (parse_object: try internal cache before reading object db,\n    2012-01-05) makes such a huge difference it is not worth timing\n    without it.\n"},{"id":"188812","messageId":"7vty0svgb9.fsf@alter.siamese.dyndns.org","threadId":"30174","inReplyTo":"20120407073232.GA13076@sigill.intra.peff.net","subject":"Re: rs/commit-list-sort-in-batch","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2012-04-09T19:46:50Z","receivedAt":"2012-04-09T19:46:50Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Jeff King <peff@peff.net> writes:\n\n> I'm not sure if that vindicates the patches, or implies that these\n> things are lurking everywhere and that we should really move to a better\n> data structure so we don't have to fix them all manually. :)\n\n;-).\n\nI do not know offhand how widespread the assumption of \"list\"-ness of the\ncommit_list is in the codebase.  The last time I looked at it was when I\nwas wondering if we could give a custom allocator to \"struct commit_list\",\nas we seemed to liberally malloc()/free() quite many of them, with the\nhope to reduce memory footprint, but I didn't finish it, so...\n\nBut at least inside revision walking machinery, your earlier heap based\nimplementation to optimize for time based priority queue access pattern\nlooked a very sensible approach to me.\n"}]}