{"thread":{"id":"21541","subject":"What's cooking in git.git (Nov 2009, #02; Sun, 08)","startedAt":"2009-11-09T05:18:20Z","lastAt":"2009-11-15T09:08:09Z","messageCount":7,"participants":["Junio C Hamano","Tarmigan","Shawn O. Pearce"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"127116","messageId":"7vzl6wz36r.fsf@alter.siamese.dyndns.org","threadId":"21541","inReplyTo":null,"subject":"What's cooking in git.git (Nov 2009, #02; Sun, 08)","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2009-11-09T05:18:20Z","receivedAt":"2009-11-09T05:18:20Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Here are the topics that have been cooking.  Commits prefixed with '-' are\nonly in 'pu' while commits prefixed with '+' are in 'next'.  The ones\nmarked with '.' do not appear in any of the integration branches, but I am\nstill holding onto them.\n\nIn 1.7.0, we plan to correct handful of warts in the interfaces everybody\nagrees that they were mistakes.  The resulting system may not be strictly\nbackward compatible.  Currently planeed changes are:\n\n * refuse push to update the checked out branch in a non-bare repo by\n   default\n\n   Make \"git push\" into a repository to update the branch that is checked\n   out fail by default.  You can countermand this default by setting a\n   configuration variable in the receiving repository.\n\n   http://thread.gmane.org/gmane.comp.version-control.git/107758/focus=108007\n\n * refuse push to delete the current branch by default\n\n   Make \"git push $there :$killed\" to delete the branch that is pointed at\n   by its HEAD fail by default.  You can countermand this default by\n   setting a configuration variable in the receiving repository.\n\n   http://thread.gmane.org/gmane.comp.version-control.git/108862/focus=108936\n\n * git-send-email won't make deep threads by default\n\n   Many people said that by default when sending more than 2 patches the\n   threading git-send-email makes by default is hard to read, and they\n   prefer the default be one cover letter and each patch as a direct\n   follow-up to the cover letter.  You can countermand this by setting a\n   configuration variable.\n\n   http://article.gmane.org/gmane.comp.version-control.git/109790\n\n * git-status won't be \"git-commit --dry-run\" anymore\n\n   http://thread.gmane.org/gmane.comp.version-control.git/125989/focus=125993\n\n * \"git-diff -w --exit-code\" will exit success if only differences it\n   found are whitespace changes that are stripped away from the output.\n\n   http://thread.gmane.org/gmane.comp.version-control.git/119731/focus=119751\n\n--------------------------------------------------\n[New Topics]\n\n* bw/autoconf-more (2009-11-04) 2 commits\n - configure: add settings for gitconfig, editor and pager\n - configure: add macro to set arbitrary make variables\n\n* em/commit-claim (2009-11-04) 1 commit\n - commit -c/-C/--amend: reset timestamp and authorship to committer with --reset-author\n\nI just picked better bits from both versions.\n\n* jk/maint-format-patch-p-suppress-stat (2009-11-04) 1 commit.\n  (merged to 'next' on 2009-11-08 at 0943296)\n + format-patch: make \"-p\" suppress diffstat\n (this branch is used by bg/format-patch-doc-update.)\n\n* bg/format-patch-doc-update (2009-11-07) 3 commits.\n - format-patch documentation: Fix formatting\n - format-patch documentation: Remove diff options that are not useful\n - format-patch: Always generate a patch\n (this branch uses jk/maint-format-patch-p-suppress-stat.)\n\n* rj/maint-simplify-cygwin-makefile (2009-10-27) 1 commit.\n - Makefile: merge two Cygwin configuration sections into one\n (this branch is used by rj/cygwin-msvc.)\n\nThis is one of the most obviously correct bit from \"Compiling on Cygwin\nusing MSVC fails\" topic.\n\n* rj/cygwin-msvc (2009-11-07) 3 commits.\n - Add explicit Cygwin check to guard WIN32 header inclusion\n - MSVC: Add support for building with NO_MMAP\n - Makefile: keep MSVC and Cygwin configuration separate\n (this branch uses rj/maint-simplify-cygwin-makefile.)\n\n* vl/maint-openssl-signature-change (2009-10-31) 1 commit.\n  (merged to 'next' on 2009-10-31 at 0e1ce6b)\n + imap-send.c: fix compiler warnings for OpenSSL 1.0\n\nPrepare ourselves before newer versions of OpenSSL hits more platforms.\n\n* bg/fetch-multi (2009-11-08) 4 commits.\n - Re-implement 'git remote update' using 'git fetch'\n - Add the configure variable skipFetchAll\n - Teach the --multiple option to 'git fetch'\n - Teach the --all option to 'git fetch'\n\n* bs/maint-pre-commit-hook-sample (2009-11-05) 1 commit.\n  (merged to 'next' on 2009-11-06 at d70f646)\n + pre-commit.sample: Diff against the empty tree when HEAD is invalid\n\n* cc/bisect-doc (2009-11-08) 1 commit\n - Documentation: add \"Fighting regressions with git bisect\" article\n\n* jn/add-h-to-all-commands (2009-11-08) 1 commit.\n - Show usage string for 'git grep -h'\n\n* pb/maint-gitweb-blob-lineno (2009-11-06) 1 commit.\n  (merged to 'next' on 2009-11-06 at 27b86ec)\n + gitweb: Fix blob linenr links in pathinfo mode\n\n* sb/tutorial-test (2009-11-06) 4 commits\n - t1200: prepare for merging with Fast-forward bikeshedding\n - t1200: further modernize test script style\n - t1200: Make documentation and test agree\n - t1200: cleanup and modernize test style\n\n* pb/gitweb-no-project-list (2009-11-06) 3 commits.\n . gitweb: Polish the content tags support\n . gitweb: Support for no project list on gitweb front page\n . gitweb: Refactor project list routines\n\nI picked these up but didn't queue as Warthog9's comments made certain\namount of sense to me.\n\n--------------------------------------------------\n[Stalled]\n\n* tr/filter-branch (2009-10-28) 2 commits.\n - filter-branch: nearest-ancestor rewriting outside subdir filter\n - filter-branch: stop special-casing $filter_subdir argument\n\nJ6t had some comments on this.\n\n* jl/submodule-add-noname (2009-09-22) 1 commit.\n - git submodule add: make the <path> parameter optional\n\nDscho started an interesting discussion regarding the larger workflow in\nwhich the \"submodule add\" is used.  I think the patch itself makes sense\nbut at the same time it probably makes sense to also take the <path> and\ninfer the <repository> as Dscho suggested, probably in \"git submodule\nadd\", not in \"git add\" proper, at least initially.\n\n* sr/gfi-options (2009-09-06) 6 commits.\n - fast-import: test the new option command\n - fast-import: add option command\n - fast-import: test the new feature command\n - fast-import: add feature command\n - fast-import: put marks reading in it's own function\n - fast-import: put option parsing code in separate functions\n\nSeems to be moving again soon.\n\n* je/send-email-no-subject (2009-08-05) 1 commit.\n  (merged to 'next' on 2009-10-11 at 1b99c56)\n + send-email: confirm on empty mail subjects\n\nThe existing tests cover the positive case (i.e. as long as the user says\n\"yes\" to the \"do you really want to send this message that lacks subject\",\nthe message is sent) of this feature, but the feature itself needs its own\ntest to verify the negative case (i.e. does it correctly stop if the user\nsays \"no\"?)\n\n--------------------------------------------------\n[Cooking]\n\n* bg/merge-ff-only (2009-10-29) 1 commit\n  (merged to 'next' on 2009-10-31 at b6b49aa)\n + Teach 'git merge' and 'git pull' the option --ff-only\n\n* jk/maint-1.6.3-ls-files-i (2009-10-30) 1 commit.\n  (merged to 'next' on 2009-10-31 at 3a31fcc)\n + ls-files: unbreak \"ls-files -i\"\n\n* jn/editor-pager (2009-10-30) 8 commits\n - Provide a build time default-pager setting\n - Provide a build time default-editor setting\n - am -i, git-svn: use \"git var GIT_PAGER\"\n - add -i, send-email, svn, p4, etc: use \"git var GIT_EDITOR\"\n - Teach git var about GIT_PAGER\n - Teach git var about GIT_EDITOR\n - Do not use VISUAL editor on dumb terminals\n - Handle more shell metacharacters in editor names\n\n* js/maint-diff-color-words (2009-10-30) 3 commits.\n - diff --color-words: bit of clean-up\n - diff --color-words -U0: fix the location of hunk headers\n - t4034-diff-words: add a test for word diff without context\n\nFixes a corner case of running --color-words with -U0.\n\n* sc/difftool-p4merge (2009-10-28) 1 commit\n  (merged to 'next' on 2009-10-31 at 194b5c5)\n + mergetool--lib: add p4merge as a pre-configured mergetool option\n\n* sc/protocol-doc (2009-10-29) 1 commit\n - Update packfile transfer protocol documentation\n\nThere is the final draft posted, but I haven't picked it up yet.\n\n* sr/vcs-helper (2009-11-06) 12 commits\n - Add Python support library for remote helpers\n - Basic build infrastructure for Python scripts\n - Allow helpers to request the path to the .git directory\n - Allow helpers to report in \"list\" command that the ref is unchanged\n - Allow helper to map private ref names into normal names\n - Add support for \"import\" helper command\n - Allow specifying the remote helper in the url\n - Add a config option for remotes to specify a foreign vcs\n - Allow fetch to modify refs\n - Use a function to determine whether a remote is valid\n - Allow programs to not depend on remotes having urls\n - Fix memory leak in helper method for disconnect\n\nRe-rolled series that contains Daniel's and Johan's.\n\n* tr/describe-advice (2009-10-28) 1 commit\n  (merged to 'next' on 2009-10-31 at 8084850)\n + describe: when failing, tell the user about options that work\n\n* mr/gitweb-snapshot (2009-11-07) 4 commits.\n - gitweb: Smarter snapshot names\n - gitweb: Document current snapshot rules via new tests\n - t/gitweb-lib.sh: Split gitweb output into headers and body\n  (merged to 'next' on 2009-10-11 at 22ba047)\n + gitweb: check given hash before trying to create snapshot\n\nReplaced commits near the tip with recent updates.\n\n* jp/dirty-describe (2009-10-21) 1 commit.\n  (merged to 'next' on 2009-10-30 at 19c7fc7)\n + Teach \"git describe\" --dirty option\n\n* jp/fetch-cull-many-refs (2009-10-25) 2 commits\n  (merged to 'next' on 2009-11-01 at 1f09ce9)\n + fetch: Speed up fetch of large numbers of refs\n + remote: Make ref_remove_duplicates faster for large numbers of refs\n\n* bg/format-patch-p-noop (2009-11-04) 4 commits.\n  (merged to 'next' on 2009-11-08 at 6220d55)\n + Revert \"format-patch -p is now a no-op\" series\n  (merged to 'next' on 2009-10-30 at e34a3db)\n + format-patch documentation: Fix formatting\n + format-patch documentation: Remove diff options that are not useful\n + format-patch: Make implementation and documentation agree\n\nThis is now a no-op; jk/maint-format-patch-p-suppress-stat and\nbg/format-patch-doc-update topics will replace this.\n\n* jk/gitignore-anchored (2009-10-26) 1 commit\n  (merged to 'next' on 2009-10-30 at 9391a93)\n + gitignore: root most patterns at the top-level directory\n\n* jk/maint-add-p-empty (2009-10-27) 1 commit.\n  (merged to 'next' on 2009-10-30 at 2bd302f)\n + add-interactive: handle deletion of empty files\n\n* jk/maint-push-config (2009-10-25) 1 commit.\n  (merged to 'next' on 2009-10-30 at 934e3c5)\n + push: always load default config\n\n* lt/revision-bisect (2009-10-27) 1 commit.\n  (merged to 'next' on 2009-10-30 at 81ee52b)\n + Add '--bisect' revision machinery argument\n\n* jc/pretty-lf (2009-10-04) 1 commit.\n - Pretty-format: %[+-]x to tweak inter-item newlines\n\n* rs/pretty-wrap (2009-11-08) 2 commits\n  (merged to 'next' on 2009-11-08 at 8973fd8)\n + log --format: don't ignore %w() at the start of format string\n  (merged to 'next' on 2009-10-30 at 403bbfe)\n + Implement wrap format %w() as if it is a mode switch\n (this branch uses js/log-rewrap.)\n\n* js/log-rewrap (2009-10-18) 3 commits\n  (merged to 'next' on 2009-10-30 at 403bbfe)\n + Teach --wrap to only indent without wrapping\n + Add strbuf_add_wrapped_text() to utf8.[ch]\n + print_wrapped_text(): allow hard newlines\n (this branch is used by rs/pretty-wrap.)\n\n* sr/blame-incomplete (2009-10-19) 1 commit.\n  (merged to 'next' on 2009-10-22 at 133e0ce)\n + blame: make sure that the last line ends in an LF\n\nI think this is _good enough_ as-is; although it would be better if we\nadded some hint to the output for Porcelain implementations, that can be\ndone as a follow-up fix.\n\n* fc/doc-fast-forward (2009-10-24) 1 commit.\n  (merged to 'next' on 2009-11-01 at faaad90)\n + Use 'fast-forward' all over the place\n\n* ks/precompute-completion (2009-10-26) 3 commits.\n  (merged to 'next' on 2009-10-28 at cd5177f)\n + completion: ignore custom merge strategies when pre-generating\n  (merged to 'next' on 2009-10-22 at f46a28a)\n + bug: precomputed completion includes scripts sources\n  (merged to 'next' on 2009-10-14 at adf722a)\n + Speedup bash completion loading\n\n* sp/smart-http (2009-11-04) 30 commits\n  (merged to 'next' on 2009-11-06 at 666837c)\n + http-backend: Test configuration options\n + http-backend: Use http.getanyfile to disable dumb HTTP serving\n + test smart http fetch and push\n + http tests: use /dumb/ URL prefix\n + set httpd port before sourcing lib-httpd\n + t5540-http-push: remove redundant fetches\n + Smart HTTP fetch: gzip requests\n + Smart fetch over HTTP: client side\n + Smart push over HTTP: client side\n + Discover refs via smart HTTP server when available\n + http-backend: more explict LocationMatch\n + http-backend: add example for gitweb on same URL\n + http-backend: use mod_alias instead of mod_rewrite\n + http-backend: reword some documentation\n + http-backend: add GIT_PROJECT_ROOT environment var\n + Smart fetch and push over HTTP: server side\n + Add stateless RPC options to upload-pack, receive-pack\n + Git-aware CGI to provide dumb HTTP transport\n + remote-helpers: return successfully if everything up-to-date\n + Move WebDAV HTTP push under remote-curl\n + remote-helpers: Support custom transport options\n + remote-helpers: Fetch more than one ref in a batch\n + fetch: Allow transport -v -v -v to set verbosity to 3\n + remote-curl: Refactor walker initialization\n + Add multi_ack_detailed capability to fetch-pack/upload-pack\n + Move \"get_ack()\" back to fetch-pack\n + fetch-pack: Use a strbuf to compose the want list\n + pkt-line: Make packet_read_line easier to debug\n + pkt-line: Add strbuf based functions\n + http-push: fix check condition on http.c::finish_http_pack_request()\n\nv5 plus 3 more fix-up patches, started cooking in 'next'.\n\n* ef/msys-imap (2009-10-22) 9 commits.\n  (merged to 'next' on 2009-10-31 at 8630603)\n + Windows: use BLK_SHA1 again\n + MSVC: Enable OpenSSL, and translate -lcrypto\n + mingw: enable OpenSSL\n + mingw: wrap SSL_set_(w|r)fd to call _get_osfhandle\n + imap-send: build imap-send on Windows\n + imap-send: fix compilation-error on Windows\n + imap-send: use run-command API for tunneling\n + imap-send: use separate read and write fds\n + imap-send: remove useless uid code\n\n* jc/fix-tree-walk (2009-10-22) 11 commits.\n  (merged to 'next' on 2009-10-22 at 10c0c8f)\n + Revert failed attempt since 353c5ee\n + read-tree --debug-unpack\n  (merged to 'next' on 2009-10-11 at 0b058e2)\n + unpack-trees.c: look ahead in the index\n + unpack-trees.c: prepare for looking ahead in the index\n + Aggressive three-way merge: fix D/F case\n + traverse_trees(): handle D/F conflict case sanely\n + more D/F conflict tests\n + tests: move convenience regexp to match object names to test-lib.sh\n + unpack_callback(): use unpack_failed() consistently\n + unpack-trees: typofix\n + diff-lib.c: fix misleading comments on oneway_diff()\n\nThis has some stupid bugs and temporarily reverted from 'next' until I can\nfix it, but the \"temporarily\" turned out to be very loooong.  Sigh...\n\n* jh/notes (2009-10-09) 22 commits.\n - fast-import: Proper notes tree manipulation using the notes API\n - Refactor notes concatenation into a flexible interface for combining notes\n - Notes API: Allow multiple concurrent notes trees with new struct notes_tree\n - Notes API: for_each_note(): Traverse the entire notes tree with a callback\n - Notes API: get_note(): Return the note annotating the given object\n - Notes API: add_note(): Add note objects to the internal notes tree structure\n - Notes API: init_notes(): Initialize the notes tree from the given notes ref\n - Notes API: get_commit_notes() -> format_note() + remove the commit restriction\n  (merged to 'next' on 2009-11-01 at 948327a)\n + Add selftests verifying concatenation of multiple notes for the same commit\n + Refactor notes code to concatenate multiple notes annotating the same object\n + Add selftests verifying that we can parse notes trees with various fanouts\n + Teach the notes lookup code to parse notes trees with various fanout schemes\n + Teach notes code to free its internal data structures on request\n + Add '%N'-format for pretty-printing commit notes\n + Add flags to get_commit_notes() to control the format of the note string\n + t3302-notes-index-expensive: Speed up create_repo()\n + fast-import: Add support for importing commit notes\n + Teach \"-m <msg>\" and \"-F <file>\" to \"git notes edit\"\n + Add an expensive test for git-notes\n + Speed up git notes lookup\n + Add a script to edit/inspect notes\n + Introduce commit notes\n\n* jn/gitweb-blame (2009-09-01) 5 commits.\n - gitweb: Minify gitweb.js if JSMIN is defined\n - gitweb: Create links leading to 'blame_incremental' using JavaScript\n  (merged to 'next' on 2009-10-11 at 73c4a83)\n + gitweb: Colorize 'blame_incremental' view during processing\n + gitweb: Incremental blame (using JavaScript)\n + gitweb: Add optional \"time to generate page\" info in footer\n\nAjax-y blame.\n\n* nd/sparse (2009-08-20) 19 commits.\n - sparse checkout: inhibit empty worktree\n - Add tests for sparse checkout\n - read-tree: add --no-sparse-checkout to disable sparse checkout support\n - unpack-trees(): ignore worktree check outside checkout area\n - unpack_trees(): apply $GIT_DIR/info/sparse-checkout to the final index\n - unpack-trees(): \"enable\" sparse checkout and load $GIT_DIR/info/sparse-checkout\n - unpack-trees.c: generalize verify_* functions\n - unpack-trees(): add CE_WT_REMOVE to remove on worktree alone\n - Introduce \"sparse checkout\"\n - dir.c: export excluded_1() and add_excludes_from_file_1()\n - excluded_1(): support exclude files in index\n - unpack-trees(): carry skip-worktree bit over in merged_entry()\n - Read .gitignore from index if it is skip-worktree\n - Avoid writing to buffer in add_excludes_from_file_1()\n - Teach Git to respect skip-worktree bit (writing part)\n - Teach Git to respect skip-worktree bit (reading part)\n - Introduce \"skip-worktree\" bit in index, teach Git to get/set this bit\n - Add test-index-version\n - update-index: refactor mark_valid() in preparation for new options\n\n--------------------------------------------------\n[For 1.7.0]\n\n* jc/1.7.0-no-commit-no-ff-2 (2009-10-22) 1 commit.\n - git-merge: forbid fast-forward and up-to-date when --no-commit is given\n\nThis makes \"git merge --no-commit\" fail when it results in fast-forward or\nup-to-date.  I haven't described this at the beginning of this message\nyet, as it is not clear if this change is even necessary.  Opinions?\n\n* jk/1.7.0-status (2009-09-05) 5 commits.\n - docs: note that status configuration affects only long format\n  (merged to 'next' on 2009-10-11 at 65c8513)\n + commit: support alternate status formats\n + status: add --porcelain output format\n + status: refactor format option parsing\n + status: refactor short-mode printing to its own function\n (this branch uses jc/1.7.0-status.)\n\nGives the --short output format to post 1.7.0 \"git commit --dry-run\" that\nis similar to that of post 1.7.0 \"git status\".\n\nThe tip one is not in 'next' as I have been hoping that somebody may want\nto change the code to make it unnecessary, but it does not seem to be\nhappening, so probably it should also go to 'next'.\n\n* jc/1.7.0-status (2009-09-05) 4 commits.\n  (merged to 'next' on 2009-10-11 at 9558627)\n + status: typo fix in usage\n + git status: not \"commit --dry-run\" anymore\n + git stat -s: short status output\n + git stat: the beginning of \"status that is not a dry-run of commit\"\n (this branch is used by jk/1.7.0-status.)\n\nWith this, \"git status\" is no longer \"git commit --dry-run\".\n\n* jc/1.7.0-send-email-no-thread-default (2009-08-22) 1 commit.\n  (merged to 'next' on 2009-10-11 at 043acdf)\n + send-email: make --no-chain-reply-to the default\n\n* jc/1.7.0-diff-whitespace-only-status (2009-08-30) 4 commits.\n  (merged to 'next' on 2009-10-11 at 546c74d)\n + diff.c: fix typoes in comments\n + Make test case number unique\n + diff: Rename QUIET internal option to QUICK\n + diff: change semantics of \"ignore whitespace\" options\n\nThis changes exit code from \"git diff --ignore-whitespace\" and friends\nwhen there is no actual output.  It is a backward incompatible change, but\nwe could argue that it is a bugfix.\n\n* jc/1.7.0-push-safety (2009-02-09) 2 commits.\n  (merged to 'next' on 2009-10-11 at 81b8128)\n + Refuse deleting the current branch via push\n + Refuse updating the current branch in a non-bare repository via push\n\n--------------------------------------------------\n[I have been too busy to purge these]\n\n* ne/rev-cache (2009-10-19) 7 commits.\n . support for commit grafts, slight change to general mechanism\n . support for path name caching in rev-cache\n . full integration of rev-cache into git, completed test suite\n . administrative functions for rev-cache, start of integration into git\n . support for non-commit object caching in rev-cache\n . basic revision cache system, no integration or features\n . man page and technical discussion for rev-cache\n\nThe author indicated that there is another round coming.  Does not seem to\npass the tests when merged to 'pu', so it has been ejected for now.\n\n* jc/log-tz (2009-03-03) 1 commit.\n - Allow --date=local --date=other-format to work as expected\n\nMaybe some people care about this.  I dunno.\n\n* jc/mailinfo-remove-brackets (2009-07-15) 1 commit.\n - mailinfo: -b option keeps [bracketed] strings that is not a [PATCH] marker\n\nMaybe some people care about this.  I dunno.\n\n* jg/log-format-body-indent (2009-09-19) 1 commit.\n . git-log --format: Add %B tag with %B(x) option\n\n* db/vcs-helper-rest (2009-10-27) 7 commits.\n . Fix memory leak in helper method for disconnect\n . Allow helpers to report in \"list\" command that the ref is unchanged\n . Add support for \"import\" helper command\n . Add a config option for remotes to specify a foreign vcs\n . Allow programs to not depend on remotes having urls\n . Allow fetch to modify refs\n . Use a function to determine whether a remote is valid\n (this branch is used by jh/cvs-helper.)\n\n* jc/log-stdin (2009-11-03) 1 commit\n . Teach --stdin option to \"log\" family\n\n* jh/cvs-helper (2009-08-18) 8 commits.\n . More fixes to the git-remote-cvs installation procedure\n . Fix the Makefile-generated path to the git_remote_cvs package in git-remote-cvs\n . Add simple selftests of git-remote-cvs functionality\n . git-remote-cvs: Remote helper program for CVS repositories\n . 2/2: Add Python support library for CVS remote helper\n . 1/2: Add Python support library for CVS remote helper\n . Basic build infrastructure for Python scripts\n . Allow helpers to request marks for fast-import\n (this branch uses db/vcs-helper-rest.)\n"},{"id":"127129","messageId":"905315640911090008h34b55a37q439d02de37127039@mail.gmail.com","threadId":"21541","inReplyTo":"7vzl6wz36r.fsf@alter.siamese.dyndns.org","subject":"Re: What's cooking in git.git (Nov 2009, #02; Sun, 08)","fromName":"Tarmigan","fromEmail":"tarmigan+git@gmail.com","sentAt":"2009-11-09T08:08:43Z","receivedAt":"2009-11-09T08:08:43Z","isPatch":false,"sender":{"key":"tarmigan+git@gmail.com","avatar":null},"body":"On Sun, Nov 8, 2009 at 9:18 PM, Junio C Hamano <gitster@pobox.com> wrote:\n> * sp/smart-http (2009-11-04) 30 commits\n>  + test smart http fetch and push\n\nI am trying to test smart http, and have had to set\nDEFAULT_HTTPD_PATH='/usr/sbin/httpd'\nDEFAULT_HTTPD_MODULE_PATH='/usr/lib64/httpd/modules' on Centos.\nPerhaps this failing test is just a difference in the default Apache\nand curl configurations.\n\nTesting with 7f640b7 (\"http-backend: Test configuration options\")\ngives me errors with the third test in t5551-http-fetch.   I don't\nreally know the point of the sed lines, but I am attaching my \"err\"\nfile in case some of the problem is with the CR/LF stuff.\n\nThanks,\nTarmigan\n\n* expecting success:\n\tGIT_CURL_VERBOSE=1 git clone --quiet $HTTPD_URL/smart/repo.git clone 2>err &&\n\ttest_cmp file clone/file &&\n\ttr '\\015' Q <err |\n\tsed -e \"\n\t\ts/Q\\$//\n\t\t/^[*] /d\n\n\t\t/^[^><]/{\n\t\t\ts/^/> /\n\t\t}\n\n\t\t/^> User-Agent: /d\n\t\t/^> Host: /d\n\t\ts/^> Content-Length: .*/> Content-Length: xxx/\n\n\t\t/^< Server: /d\n\t\t/^< Expires: /d\n\t\t/^< Date: /d\n\t\t/^< Content-Length: /d\n\t\t/^< Transfer-Encoding: /d\n\t\" >act &&\n\ttest_cmp exp act\n\n--- exp\t2009-11-09 07:33:19.000000000 +0000\n+++ act\t2009-11-09 07:33:19.000000000 +0000\n@@ -6,15 +6,16 @@\n < Pragma: no-cache\n < Cache-Control: no-cache, max-age=0, must-revalidate\n < Content-Type: application/x-git-upload-pack-advertisement\n-<\n > POST /smart/repo.git/git-upload-pack HTTP/1.1\n+> Accept: */*\n > Accept-Encoding: deflate, gzip\n > Content-Type: application/x-git-upload-pack-request\n > Accept: application/x-git-upload-pack-response\n > Content-Length: xxx\n\n+> 0073want 1937bb05802e1973cc2e437c13e9f1845941b785\nmulti_ack_detailed side-band-64k thin-pack no-progress ofs-delta\n+> 00000009done\n < HTTP/1.1 200 OK\n < Pragma: no-cache\n < Cache-Control: no-cache, max-age=0, must-revalidate\n < Content-Type: application/x-git-upload-pack-result\n-<\n* FAIL 3: clone http repository\n\t\n\t\tGIT_CURL_VERBOSE=1 git clone --quiet $HTTPD_URL/smart/repo.git clone 2>err &&\n\t\ttest_cmp file clone/file &&\n\t\ttr '\\015' Q <err |\n\t\tsed -e \"\n\t\t\ts/Q\\$//\n\t\t\t/^[*] /d\n\t\n\t\t\t/^[^><]/{\n\t\t\t\ts/^/> /\n\t\t\t}\n\t\n\t\t\t/^> User-Agent: /d\n\t\t\t/^> Host: /d\n\t\t\ts/^> Content-Length: .*/> Content-Length: xxx/\n\t\n\t\t\t/^< Server: /d\n\t\t\t/^< Expires: /d\n\t\t\t/^< Date: /d\n\t\t\t/^< Content-Length: /d\n\t\t\t/^< Transfer-Encoding: /d\n\t\t\" >act &&\n\t\ttest_cmp exp act\n"},{"id":"127165","messageId":"20091109152935.GM11919@spearce.org","threadId":"21541","inReplyTo":"905315640911090008h34b55a37q439d02de37127039@mail.gmail.com","subject":"Re: What's cooking in git.git (Nov 2009, #02; Sun, 08)","fromName":"Shawn O. Pearce","fromEmail":"spearce@spearce.org","sentAt":"2009-11-09T15:29:35Z","receivedAt":"2009-11-09T15:29:35Z","isPatch":false,"sender":{"key":"spearce@spearce.org","avatar":"https://avatars.githubusercontent.com/u/34844?v=4"},"body":"Tarmigan <tarmigan+git@gmail.com> wrote:\n> On Sun, Nov 8, 2009 at 9:18 PM, Junio C Hamano <gitster@pobox.com> wrote:\n> > * sp/smart-http (2009-11-04) 30 commits\n> >  + test smart http fetch and push\n> \n> I am trying to test smart http, and have had to set\n> DEFAULT_HTTPD_PATH='/usr/sbin/httpd'\n> DEFAULT_HTTPD_MODULE_PATH='/usr/lib64/httpd/modules' on Centos.\n> Perhaps this failing test is just a difference in the default Apache\n> and curl configurations.\n\n*sigh*\n \n> --- exp\t2009-11-09 07:33:19.000000000 +0000\n> +++ act\t2009-11-09 07:33:19.000000000 +0000\n> @@ -6,15 +6,16 @@\n>  < Pragma: no-cache\n>  < Cache-Control: no-cache, max-age=0, must-revalidate\n>  < Content-Type: application/x-git-upload-pack-advertisement\n> -<\n>  > POST /smart/repo.git/git-upload-pack HTTP/1.1\n> +> Accept: */*\n>  > Accept-Encoding: deflate, gzip\n>  > Content-Type: application/x-git-upload-pack-request\n>  > Accept: application/x-git-upload-pack-response\n\nThe first delta is a missing blank line between requests.  I probably\ncan work around that with some sort of sed hackery and its likely\ncaused by a different libcurl version.\n\nThe second delta is libcurl sending *two* Accept headers to the\nserver.  The first was set by the library as \"*/*\", but the second\nwas set by git-remote-curl.  Here your libcurl is just plain *wrong*.\nThe application has said \"I only support one content type, this one\"\nand the library still went and told the server \"I accept anything\nyou have, just give it to me!\".\n\nI'm not sure what to do about this breakage in curl.  We may have\nto relax how we use HTTP since at least one version of libcurl\ncan't get this minor detail right.\n\n>  > Content-Length: xxx\n> \n> +> 0073want 1937bb05802e1973cc2e437c13e9f1845941b785\n> multi_ack_detailed side-band-64k thin-pack no-progress ofs-delta\n> +> 00000009done\n\nHmmph.  Your libcurl also included the POST body in the verbose\nmessage.\n\n-- \nShawn.\n"},{"id":"127254","messageId":"905315640911100910r5116779eh24796fa5788f4aef@mail.gmail.com","threadId":"21541","inReplyTo":"7vzl6wz36r.fsf@alter.siamese.dyndns.org","subject":"Re: What's cooking in git.git (Nov 2009, #02; Sun, 08)","fromName":"Tarmigan","fromEmail":"tarmigan+git@gmail.com","sentAt":"2009-11-10T17:10:36Z","receivedAt":"2009-11-10T17:10:36Z","isPatch":false,"sender":{"key":"tarmigan+git@gmail.com","avatar":null},"body":"Sorry to bug you so soon again, Shawn.  Thanks for your help.\n\nOn Sun, Nov 8, 2009 at 9:18 PM, Junio C Hamano <gitster@pobox.com> wrote:\n> * sp/smart-http (2009-11-04) 30 commits\n>  + http-backend: Test configuration options\n>  + http-backend: Use http.getanyfile to disable dumb HTTP serving\n>  + test smart http fetch and push\n\nOK now I'm testing on OSX with Apache/2.2.11, and curl 7.19.4.\n\nTesting on 7f640b778f8cf87159890157a815f1d728573477, I am getting\nfailures starting in the third test of t5560-http-backend.sh, \"static\nfile is ok\".  I also get failures on the test after (\"static file if\nhttp.getanyfile true is ok\") and in the log compare (obviously), but I\nthink those will go away when test 3 is fixed, so I have not looked\ninto them.\n\nSpecifically, the GET of info/refs makes something on my machine\nunhappy.  Curl returns 18 (CURLE_PARTIAL_FILE), the test takes a long\ntime to fail, and the \"out\" file looks OK (compared to a linux machine\nwhere the test passes) expect for \"Content-Length: 37847251812411\".\nThe exact line does not work is\ncurl --include http://127.0.0.1:5560/smart/repo.git/info/refs\n\nDigging into it a bit more with gdb, the call to hdr_int() in\nhttp-backend.c looks OK, but then something goes wrong in\nformat_write().  Hmmm it looks like my setup does not like PRIuMAX\nwith size_t, which puts some garbage in the upper bytes of\nContent-Length.  Changing the PRIuMAX to a %zu allows all the tests to\npass, but that may not be the preferred solution.\n\nThanks,\nTarmigan\n"},{"id":"127410","messageId":"20091112044240.GP11919@spearce.org","threadId":"21541","inReplyTo":"905315640911100910r5116779eh24796fa5788f4aef@mail.gmail.com","subject":"[PATCH] http-backend: Fix bad treatment of uintmax_t in Content-Length","fromName":"Shawn O. Pearce","fromEmail":"spearce@spearce.org","sentAt":"2009-11-12T04:42:41Z","receivedAt":"2009-11-12T04:42:41Z","isPatch":true,"sender":{"key":"spearce@spearce.org","avatar":"https://avatars.githubusercontent.com/u/34844?v=4"},"body":"Our Content-Length needs to report an off_t, which could be larger\nprecision than size_t on this system (e.g. 32 bit binary built with\n64 bit large file support).\n\nWe also shouldn't be passing a size_t parameter to printf when\nwe've used PRIuMAX as the format specifier.\n\nFix both issues by using uintmax_t for the hdr_int() routine,\nallowing strbuf's size_t to automatically upcast, and off_t to\nalways fit.\n\nAlso fixed the copy loop we use inside of send_local_file(), we never\nactually updated the size variable so we might as well not use it.\n\nReported-by: Tarmigan <tarmigan+git@gmail.com>\nSigned-off-by: Shawn O. Pearce <spearce@spearce.org>\n---\n\n  Tarmigan <tarmigan+git@gmail.com> wrote:\n  > unhappy.  Curl returns 18 (CURLE_PARTIAL_FILE), the test takes a long\n  > time to fail, and the \"out\" file looks OK (compared to a linux machine\n  > where the test passes) expect for \"Content-Length: 37847251812411\".\n  > \n  > Digging into it a bit more with gdb, the call to hdr_int() in\n  > http-backend.c looks OK, but then something goes wrong in\n  > format_write().  Hmmm it looks like my setup does not like PRIuMAX\n  > with size_t, which puts some garbage in the upper bytes of\n\n  Yup, only the right fix is to keep using PRIuMAX... patch below.\n  \n http-backend.c |    9 +++------\n 1 files changed, 3 insertions(+), 6 deletions(-)\n\ndiff --git a/http-backend.c b/http-backend.c\nindex f8ea9d7..7f48406 100644\n--- a/http-backend.c\n+++ b/http-backend.c\n@@ -134,7 +134,7 @@ static void hdr_str(const char *name, const char *value)\n \tformat_write(1, \"%s: %s\\r\\n\", name, value);\n }\n \n-static void hdr_int(const char *name, size_t value)\n+static void hdr_int(const char *name, uintmax_t value)\n {\n \tformat_write(1, \"%s: %\" PRIuMAX \"\\r\\n\", name, value);\n }\n@@ -216,7 +216,6 @@ static void send_local_file(const char *the_type, const char *name)\n \tchar *buf = xmalloc(buf_alloc);\n \tint fd;\n \tstruct stat sb;\n-\tsize_t size;\n \n \tfd = open(p, O_RDONLY);\n \tif (fd < 0)\n@@ -224,14 +223,12 @@ static void send_local_file(const char *the_type, const char *name)\n \tif (fstat(fd, &sb) < 0)\n \t\tdie_errno(\"Cannot stat '%s'\", p);\n \n-\tsize = xsize_t(sb.st_size);\n-\n-\thdr_int(content_length, size);\n+\thdr_int(content_length, sb.st_size);\n \thdr_str(content_type, the_type);\n \thdr_date(last_modified, sb.st_mtime);\n \tend_headers();\n \n-\twhile (size) {\n+\tfor (;;) {\n \t\tssize_t n = xread(fd, buf, buf_alloc);\n \t\tif (n < 0)\n \t\t\tdie_errno(\"Cannot read '%s'\", p);\n-- \n1.6.5.2.351.g09432\n"},{"id":"127564","messageId":"905315640911141349t7121baa8vc0b2be59fa348512@mail.gmail.com","threadId":"21541","inReplyTo":"20091112044240.GP11919@spearce.org","subject":"Re: [PATCH] http-backend: Fix bad treatment of uintmax_t in Content-Length","fromName":"Tarmigan","fromEmail":"tarmigan+git@gmail.com","sentAt":"2009-11-14T21:49:55Z","receivedAt":"2009-11-14T21:49:55Z","isPatch":true,"sender":{"key":"tarmigan+git@gmail.com","avatar":null},"body":"On Wed, Nov 11, 2009 at 8:42 PM, Shawn O. Pearce <spearce@spearce.org> wrote:\n> Our Content-Length needs to report an off_t, which could be larger\n> precision than size_t on this system (e.g. 32 bit binary built with\n> 64 bit large file support).\n>\n> We also shouldn't be passing a size_t parameter to printf when\n> we've used PRIuMAX as the format specifier.\n>\n> Fix both issues by using uintmax_t for the hdr_int() routine,\n> allowing strbuf's size_t to automatically upcast, and off_t to\n> always fit.\n>\n> Also fixed the copy loop we use inside of send_local_file(), we never\n> actually updated the size variable so we might as well not use it.\n>\n> Reported-by: Tarmigan <tarmigan+git@gmail.com>\n\nTested-by: Tarmigan <tarmigan+git@gmail.com>\n\n> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>\n> ---\n>\n>  Tarmigan <tarmigan+git@gmail.com> wrote:\n>  > unhappy.  Curl returns 18 (CURLE_PARTIAL_FILE), the test takes a long\n>  > time to fail, and the \"out\" file looks OK (compared to a linux machine\n>  > where the test passes) expect for \"Content-Length: 37847251812411\".\n>  >\n>  > Digging into it a bit more with gdb, the call to hdr_int() in\n>  > http-backend.c looks OK, but then something goes wrong in\n>  > format_write().  Hmmm it looks like my setup does not like PRIuMAX\n>  > with size_t, which puts some garbage in the upper bytes of\n>\n>  Yup, only the right fix is to keep using PRIuMAX... patch below.\n\nThis fix is better than the (uintmax_t) cast that I was thinking about posting.\n\nPlease also consider the \"__attribute__((format(printf,1,2))\" patches\nthat I just posted to the list that would warn about this in the\nfuture.\n\nThanks,\nTarmigan\n"},{"id":"127590","messageId":"7v639crw92.fsf@alter.siamese.dyndns.org","threadId":"21541","inReplyTo":"905315640911141349t7121baa8vc0b2be59fa348512@mail.gmail.com","subject":"Re: [PATCH] http-backend: Fix bad treatment of uintmax_t in Content-Length","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2009-11-15T09:08:09Z","receivedAt":"2009-11-15T09:08:09Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Tarmigan <tarmigan+git@gmail.com> writes:\n\n> On Wed, Nov 11, 2009 at 8:42 PM, Shawn O. Pearce <spearce@spearce.org> wrote:\n>> Our Content-Length needs to report an off_t, which could be larger\n>> precision than size_t on this system (e.g. 32 bit binary built with\n>> 64 bit large file support).\n>>\n>> We also shouldn't be passing a size_t parameter to printf when\n>> we've used PRIuMAX as the format specifier.\n>>\n>> Fix both issues by using uintmax_t for the hdr_int() routine,\n>> allowing strbuf's size_t to automatically upcast, and off_t to\n>> always fit.\n>>\n>> Also fixed the copy loop we use inside of send_local_file(), we never\n>> actually updated the size variable so we might as well not use it.\n>>\n>> Reported-by: Tarmigan <tarmigan+git@gmail.com>\n>\n> Tested-by: Tarmigan <tarmigan+git@gmail.com>\n\nThanks; care to spell your name in full (as if you are publishing say a\nscientific paper)?  I am guessing that the other Tarmigan with full name\nwho posted a few patches is the same person as you.\n"}]}