{"thread":{"id":"23378","subject":"What's cooking in git.git (Apr 2010, #03; Wed, 07)","startedAt":"2010-04-08T00:48:02Z","lastAt":"2010-04-11T17:57:53Z","messageCount":18,"participants":["Junio C Hamano","Johannes Sixt","Jeff King","Fredrik Kuivinen","Tor Arntsen","Jonathan Nieder","Nguyen Thai Ngoc Duy","Nguyễn Thái Ngọc Duy","Sverre Rabbelier"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"138906","messageId":"7v6342ahx9.fsf@alter.siamese.dyndns.org","threadId":"23378","inReplyTo":null,"subject":"What's cooking in git.git (Apr 2010, #03; Wed, 07)","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2010-04-08T00:48:02Z","receivedAt":"2010-04-08T00:48:02Z","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\nWe are at a bit beyond 1.7.1-rc0 now.\n\n--------------------------------------------------\n[Graduated to \"master\"]\n\n* sg/bash-completion (2010-02-23) 4 commits\n  (merged to 'next' on 2010-03-08 at bc59860)\n + bash: completion for gitk aliases\n + bash: support user-supplied completion scripts for aliases\n + bash: support user-supplied completion scripts for user's git commands\n + bash: improve aliased command recognition\n\nNobody seems to care about \"_git_frotz\" that may potentially crash with\nwhatever random things the end users is doing in their environment, and\nrenaming them to \"_git_complete_frotz\" to avoid that.  So let's not worry\nabout that.\n\n* ic/bash-completion-rpm (2010-03-26) 1 commit\n  (merged to 'next' on 2010-04-02 at 0358304)\n + RPM spec: include bash completion support\n\n* da/maint-python-startup (2010-03-27) 1 commit\n  (merged to 'next' on 2010-04-01 at ca6897a)\n + Makefile: Remove usage of deprecated Python \"has_key\" method\n\n* jc/conflict-marker-size (2010-03-24) 1 commit\n  (merged to 'next' on 2010-04-01 at 164b1f4)\n + diff --check: honor conflict-marker-size attribute\n\n* sb/fmt-merge-msg (2010-03-24) 7 commits\n  (merged to 'next' on 2010-04-01 at 5fcbec5)\n + fmt-merge-msg: hide summary option\n + fmt-merge-msg: remove custom string_list implementation\n + string-list: add unsorted_string_list_lookup()\n + fmt-merge-msg: use pretty.c routines\n + t6200: test fmt-merge-msg more\n + t6200: modernize with test_tick\n + fmt-merge-msg: be quiet if nothing to merge\n (this branch is used by jp/hold-sring-list-sanity.)\n\n* ef/maint-empty-commit-log (2010-03-21) 1 commit\n  (merged to 'next' on 2010-03-28 at aa103e5)\n + rev-list: fix --pretty=oneline with empty message\n\n* jn/mailinfo-scissors (2010-04-03) 1 commit\n  (merged to 'next' on 2010-04-05 at 366435a)\n + Teach mailinfo %< as an alternative scissors mark\n\n* mg/notes-reflog (2010-03-29) 2 commits\n  (merged to 'next' on 2010-04-06 at 1b8066f)\n + refs.c: Write reflogs for notes just like for branch heads\n + t3301-notes: Test the creation of reflog entries\n\n--------------------------------------------------\n[New Topics]\n\n* eb/unpretty-b-format (2010-03-24) 1 commit\n  (merged to 'next' on 2010-04-07 at 7f5c112)\n + Add `%B' in format strings for raw commit body in `git log' and friends\n\n* ne/rev-cache (2010-04-05) 7 commits\n - graft awareness\n - object name support\n - integration into revision walker\n - administrative api and tools\n - support for non-commit objects\n - basic api and porcelain\n - man page and technical docs\n\nFor some reason this was extremely hard to read, partly because it had too\nmany distracting style violations and too many long lines.  I'll start\nreading it later in the week when I find time to comment.\n\n* jp/hold-sring-list-sanity (2010-04-06) 6 commits\n . string_list: Fix argument order for string_list_append\n . string_list: Fix argument order for string_list_lookup\n . string_list: Fix argument order for string_list_insert_at_index\n . string_list: Fix argument order for string_list_insert\n . string_list: Fix argument order for for_each_string_list\n . string_list: Fix argument order for print_string_list\n (this branch uses js/grep-open and sr/remote-helper-export.)\n\nBuilding this on top of slushy codebase is not a very promising endeavor.\nGood thing to do, but bad timing.\n\n* ab/commit-empty-message (2010-04-06) 1 commit\n  (merged to 'next' on 2010-04-07 at 701e863)\n + Add option to git-commit to allow empty log messages\n\n* jc/test-sleepless (2010-04-06) 1 commit\n  (merged to 'next' on 2010-04-07 at 8ccf40a)\n + war on \"sleep\" in tests\n\n* jc/maint-reflog-expire-unreachable (2010-04-07) 2 commits\n - reflog --expire-unreachable: a side note\n - reflog --expire-unreachable: avoid merge-base computation\n\n* jc/doc-submit-gmail (2010-04-07) 1 commit\n - SubmittingPatches: update GMail section\n\n* tc/maint-curl-helper (2010-04-08) 1 commit\n - remote-curl: avoid double-slashes in HTTP requests\n\n--------------------------------------------------\n[Stalled]\n\n* js/rebase-origin-x (2010-02-05) 1 commit\n - [RFC w/o test and incomplete] rebase: add -x option to record original commit name\n\nI retract my objection against the idea of -x; needs polishing before\nmoving forward.\n\n* js/grep-open (2010-03-26) 2 commits\n - grep -O: allow optional argument specifying the pager (or editor)\n - grep: Add the option '--open-files-in-pager'\n (this branch is used by jp/hold-sring-list-sanity.)\n\nProbably needs to support --no-index mode as well.\n\n* tr/word-diff (2010-04-04) 2 commits\n - gitk: add the equivalent of diff --color-words\n - diff: add --word-diff option that generalizes --color-words\n\n--------------------------------------------------\n[Cooking]\n\n* np/malloc-threading (2010-04-07) 2 commits\n - Make xmalloc and xrealloc thread-safe (addendum)\n - Make xmalloc and xrealloc thread-safe\n\nUpdated with Freku's \"init_recursive_mutex()\".  The fix should eventually\ngo to 'maint' and 'master'.\n\n* js/async-thread (2010-03-09) 7 commits\n - Enable threaded async procedures whenever pthreads is available\n  (merged to 'next' on 2010-03-20 at 9939243)\n + Dying in an async procedure should only exit the thread, not the process.\n + Reimplement async procedures using pthreads\n + Windows: more pthreads functions\n + Fix signature of fcntl() compatibility dummy\n + Make report() from usage.c public as vreportf() and use it.\n + Modernize t5530-upload-pack-error.\n\nBeen waiting for resolution of locking issues in malloc-threading.\n\n* sd/log-decorate (2010-04-06) 4 commits\n  (merged to 'next' on 2010-04-06 at 992c9ad)\n + log --pretty/--oneline: ignore log.decorate\n  (merged to 'next' on 2010-03-08 at 58a6fba)\n + log.decorate: usability fixes\n + Add `log.decorate' configuration variable.\n + git_config_maybe_bool()\n\nI did the tip one myself.  An extra set or two of eyeballs would be\nappreciated.\n\n* mh/status-optionally-refresh (2010-04-03) 3 commits\n  (merged to 'next' on 2010-04-05 at 0e64aac)\n + t7508: add a test for \"git status\" in a read-only repository\n + git status: refresh the index if possible\n + t7508: add test for \"git status\" refreshing the index\n\n* cw/ws-indent-with-tab (2010-04-03) 6 commits\n  (merged to 'next' on 2010-04-05 at 5b5e579)\n + whitespace: tests for git-apply --whitespace=fix with tab-in-indent\n + whitespace: add tab-in-indent support for --whitespace=fix\n + whitespace: replumb ws_fix_copy to take a strbuf *dst instead of char *dst\n + whitespace: tests for git-diff --check with tab-in-indent error class\n + whitespace: add tab-in-indent error class\n + whitespace: we cannot \"catch all errors known to git\" anymore\n\n* rr/remote-helper-doc (2010-04-07) 3 commits\n - Documentation/remote-helpers: Add invocation section\n - Documentation/urls: Rewrite to accomodate <transport>::<address>\n - Documentation/remote-helpers: Rewrite description\n\n* sr/remote-helper-export (2010-03-29) 7 commits\n  (merged to 'next' on 2010-04-07 at 5651307)\n + remote-helpers: add tests for testgit helper\n + remote-helpers: add testgit helper\n + remote-helpers: add support for an export command\n + remote-helpers: allow requesing the path to the .git directory\n + fast-import: always create marks_file directories\n + clone: also configure url for bare clones\n + clone: pass the remote name to remote_get\n (this branch is used by jp/hold-sring-list-sanity.)\n\n* cc/revert-strategy (2010-03-31) 5 commits\n  (merged to 'next' on 2010-04-05 at 50909c1)\n + revert: add \"--strategy\" option to choose merge strategy\n + merge: make function try_merge_command non static\n + merge: refactor code that calls \"git merge-STRATEGY\"\n + revert: refactor merge recursive code into its own function\n + revert: use strbuf to refactor the code that writes the merge message\n\nThis is more about debugging and we are not in a great hurry.\n\n* mr/gitweb-jsmin (2010-04-02) 6 commits\n  (merged to 'next' on 2010-04-05 at 5ad036c)\n + gitweb: update INSTALL to use shorter make target\n + gitweb: add documentation to INSTALL regarding gitweb.js\n + instaweb: add minification awareness\n + Gitweb: add autoconfigure support for minifiers\n + Gitweb: add support for minifying gitweb.css\n + Gitweb: add ignore and clean rules for minified files\n\n* sc/http-late-auth (2010-04-01) 1 commit\n  (merged to 'next' on 2010-04-02 at c991acf)\n + Prompt for a username when an HTTP request 401s\n\n* jk/cached-textconv (2010-04-01) 7 commits\n  (merged to 'next' on 2010-04-02 at a023e3c)\n + diff: avoid useless filespec population\n + diff: cache textconv output\n + textconv: refactor calls to run_textconv\n + introduce notes-cache interface\n + make commit_tree a library function\n + fix textconv leak in emit_rewrite_diff\n + fix const-correctness of write_sha1_file\n\n* ld/discovery-limit-to-fs (2010-04-04) 6 commits\n - write-index: check and warn when worktree crosses a filesystem boundary\n  (merged to 'next' on 2010-04-07 at 11ea09a)\n + Rename ONE_FILESYSTEM to DISCOVERY_ACROSS_FILESYSTEM\n + GIT_ONE_FILESYSTEM: flip the default to stop at filesystem boundaries\n + Add support for GIT_ONE_FILESYSTEM\n + truncate cwd string before printing error message\n + config.c: remove static keyword from git_env_bool()\n\nThe tip one is a bit iffy; the whole series changes behaviour in a corner\ncase, and is not a 1.7.1 material.\n\n* pc/remove-warn (2010-03-26) 4 commits\n  (merged to 'next' on 2010-04-02 at 52fc00d)\n + Remove a redundant errno test in a usage of remove_path\n + Introduce remove_or_warn function\n + Implement the rmdir_or_warn function\n + Generalise the unlink_or_warn function\n\nI cherry-picked only obviously sensible bits.\n\n* em/checkout-orphan (2010-03-21) 1 commit\n  (merged to 'next' on 2010-03-28 at 86b6a4f)\n + git checkout: create unparented branch by --orphan\n\nPerhaps needs a bit of documentation updates, describing the \"going open\nsource\" scenario.\n\n* ar/config-from-command-line (2010-03-26) 2 commits\n  (merged to 'next' on 2010-04-07 at e50fd3a)\n + Use strbufs instead of open-coded string manipulation\n + Allow passing of configuration parameters in the command line\n\n* nd/setup (2010-04-05) 43 commits\n - builtins: do not commit pager choice early\n - builtins: setup repository before print unknown command error\n - t0001: Add test cases for \"git init\" with aliases\n - Guard unallowed access to repository when it's not set up\n - alias: keep repository found while collecting aliases as long as possible\n - Allow to undo setup_git_directory_gently() gracefully (and fix alias code)\n - builtins: check for startup_info->help, print and exit early\n - builtins: utilize startup_info->help where possible\n - run_builtin(): save \"-h\" detection result for later use\n - config: do not read .git/config if there is no repository\n - apply: do not check sha1 if there is no repository\n - Do not read .git/info/attributes if there is no repository\n - Do not read .git/info/exclude if there is no repository\n - git_config(): do not read .git/config if there is no repository\n - init/clone: turn on startup->have_repository properly\n - worktree setup: restore original state when things go wrong\n - Use git_config_early() instead of git_config() during repo setup\n - Add git_config_early()\n - worktree setup: call set_git_dir explicitly\n - rev-parse --git-dir: print relative gitdir correctly\n - enter_repo(): initialize other variables as setup_git_directory_gently() does\n - Move enter_repo() to setup.c\n - index-pack: use RUN_SETUP_GENTLY\n - index-pack: trust the prefix returned by setup_git_directory_gently()\n - worktree setup: calculate prefix even if no worktree is found\n - merge-file: use RUN_SETUP_GENTLY\n - var: use RUN_SETUP_GENTLY\n - ls-remote: use RUN_SETUP_GENTLY\n - help: take note why this command is not applicable for RUN_SETUP_GENTLY\n - diff: use RUN_SETUP_GENTLY\n - bundle: use RUN_SETUP_GENTLY\n - apply: use RUN_SETUP_GENTLY\n - verify-pack: use RUN_SETUP_GENTLY\n - check-ref-format: use RUN_SETUP_GENTLY\n - mailinfo: use RUN_SETUP_GENTLY\n - archive: use RUN_SETUP_GENTLY\n - builtin: USE_PAGER should not be used without RUN_SETUP*\n - grep: use RUN_SETUP_GENTLY\n - shortlog: use RUN_SETUP_GENTLY\n - hash-object: use RUN_SETUP_GENTLY\n - config: use RUN_SETUP_GENTLY\n - builtin: Support RUN_SETUP_GENTLY to set up repository early if found\n - builtin: introduce startup_info struct\n\nRerolled.  I need to look at this series during the feature freeze so that\nwe can decide to (or not to) include it in 'next' early in post 1.7.1 cycle.\n"},{"id":"138928","messageId":"4BBD7228.8080403@viscovery.net","threadId":"23378","inReplyTo":"7v6342ahx9.fsf@alter.siamese.dyndns.org","subject":"Re: What's cooking in git.git (Apr 2010, #03; Wed, 07)","fromName":"Johannes Sixt","fromEmail":"j.sixt@viscovery.net","sentAt":"2010-04-08T06:05:28Z","receivedAt":"2010-04-08T06:05:28Z","isPatch":false,"sender":{"key":"j6t@kdbg.org","avatar":"https://avatars.githubusercontent.com/u/14810926?v=4"},"body":"Am 4/8/2010 2:48, schrieb Junio C Hamano:\n> * np/malloc-threading (2010-04-07) 2 commits\n>  - Make xmalloc and xrealloc thread-safe (addendum)\n>  - Make xmalloc and xrealloc thread-safe\n> \n> Updated with Freku's \"init_recursive_mutex()\".  The fix should eventually\n> go to 'maint' and 'master'.\n\nThe addendum does not compile on Windows. I'm working on a replacement.\n\nBTW, are there Unices that do not have a recursive mutex?\n\n-- Hannes\n"},{"id":"138932","messageId":"7vwrwi78t7.fsf@alter.siamese.dyndns.org","threadId":"23378","inReplyTo":"4BBD7228.8080403@viscovery.net","subject":"Re: What's cooking in git.git (Apr 2010, #03; Wed, 07)","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2010-04-08T06:33:08Z","receivedAt":"2010-04-08T06:33:08Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Johannes Sixt <j.sixt@viscovery.net> writes:\n\n> Am 4/8/2010 2:48, schrieb Junio C Hamano:\n>> * np/malloc-threading (2010-04-07) 2 commits\n>>  - Make xmalloc and xrealloc thread-safe (addendum)\n>>  - Make xmalloc and xrealloc thread-safe\n>> \n>> Updated with Freku's \"init_recursive_mutex()\".  The fix should eventually\n>> go to 'maint' and 'master'.\n>\n> The addendum does not compile on Windows. I'm working on a replacement.\n\nThanks.\n\n> BTW, are there Unices that do not have a recursive mutex?\n\nPTHREAD_MUTEX_RECURSIVE is not marked as optional in any way, so I would\nimagine an implementation that lacks it would say NO_PTHREADS in the\nMakefile.\n\nCf.\n\n  http://www.opengroup.org/onlinepubs/9699919799/basedefs/pthread.h.html\n"},{"id":"138949","messageId":"20100408073825.GA15153@coredump.intra.peff.net","threadId":"23378","inReplyTo":"7v6342ahx9.fsf@alter.siamese.dyndns.org","subject":"Re: What's cooking in git.git (Apr 2010, #03; Wed, 07)","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2010-04-08T07:38:26Z","receivedAt":"2010-04-08T07:38:26Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Wed, Apr 07, 2010 at 05:48:02PM -0700, Junio C Hamano wrote:\n\n> * jc/test-sleepless (2010-04-06) 1 commit\n>   (merged to 'next' on 2010-04-07 at 8ccf40a)\n>  + war on \"sleep\" in tests\n\nI read this one, and it looked fine to me.\n\n> * sd/log-decorate (2010-04-06) 4 commits\n>   (merged to 'next' on 2010-04-06 at 992c9ad)\n>  + log --pretty/--oneline: ignore log.decorate\n>   (merged to 'next' on 2010-03-08 at 58a6fba)\n>  + log.decorate: usability fixes\n>  + Add `log.decorate' configuration variable.\n>  + git_config_maybe_bool()\n> \n> I did the tip one myself.  An extra set or two of eyeballs would be\n> appreciated.\n\nI just responded in that thread.\n\n> * jk/cached-textconv (2010-04-01) 7 commits\n>   (merged to 'next' on 2010-04-02 at a023e3c)\n>  + diff: avoid useless filespec population\n>  + diff: cache textconv output\n>  + textconv: refactor calls to run_textconv\n>  + introduce notes-cache interface\n>  + make commit_tree a library function\n>  + fix textconv leak in emit_rewrite_diff\n>  + fix const-correctness of write_sha1_file\n\nYou mentioned pushing this off to 1.7.2. I don't have a problem with\nthat, but you may want to cherry-pick or merge up to the \"fix textconv\nleak\", as it is an unrelated fix.\n\nI think it makes sense to target 1.7.2 with the feature, and then flip\nthe default for diff.*.cachetextconv to 'true' in 1.7.3. That will give\nit some wider exposure before we start running it by default.\n\n> * nd/setup (2010-04-05) 43 commits\n> [...]\n> Rerolled.  I need to look at this series during the feature freeze so that\n> we can decide to (or not to) include it in 'next' early in post 1.7.1 cycle.\n\nI really should review this, but it's just so dauntingly large and\nboring looking that I haven't gotten around to it. Probably one or both\nof us should look at it before applying it to next, but assuming it\npasses a basic sanity check, I think the best thing will be to get it in\n'next' early so we can shake out any bugs during the next cycle.\n\n-Peff\n"},{"id":"138953","messageId":"o2u4c8ef71004080201pdbdc7aa8j99500d7643c278c9@mail.gmail.com","threadId":"23378","inReplyTo":"7vwrwi78t7.fsf@alter.siamese.dyndns.org","subject":"Re: What's cooking in git.git (Apr 2010, #03; Wed, 07)","fromName":"Fredrik Kuivinen","fromEmail":"frekui@gmail.com","sentAt":"2010-04-08T09:01:05Z","receivedAt":"2010-04-08T09:01:05Z","isPatch":false,"sender":{"key":"frekui@gmail.com","avatar":"https://avatars.githubusercontent.com/u/13770967?v=4"},"body":"On Thu, Apr 8, 2010 at 08:33, Junio C Hamano <gitster@pobox.com> wrote:\n> Johannes Sixt <j.sixt@viscovery.net> writes:\n>> BTW, are there Unices that do not have a recursive mutex?\n>\n> PTHREAD_MUTEX_RECURSIVE is not marked as optional in any way, so I would\n> imagine an implementation that lacks it would say NO_PTHREADS in the\n> Makefile.\n>\n> Cf.\n>\n>  http://www.opengroup.org/onlinepubs/9699919799/basedefs/pthread.h.html\n\nFor some reason I looked at Issue 6 of the standard (a previous\nversion, released in 2004). In that version pthread_mutexattr_settype\nand PTHREAD_MUTEX_RECURSIVE are optional. See\nhttp://www.opengroup.org/onlinepubs/009695399/basedefs/pthread.h.html\n\nHowever, it is probably best to just ignore the issue for now until\nsome platform appears where pthreads is available but not recursive\nmutexes.\n\n- Fredrik\n"},{"id":"138956","messageId":"m2sd2d39d861004080214sedf4a65fm7e081d468f4d88f2@mail.gmail.com","threadId":"23378","inReplyTo":"o2u4c8ef71004080201pdbdc7aa8j99500d7643c278c9@mail.gmail.com","subject":"Re: ***SPAM*** Re: What's cooking in git.git (Apr 2010, #03; Wed, 07)","fromName":"Tor Arntsen","fromEmail":"tor@spacetec.no","sentAt":"2010-04-08T09:14:56Z","receivedAt":"2010-04-08T09:14:56Z","isPatch":false,"sender":{"key":"tor@spacetec.no","avatar":null},"body":"On Thu, Apr 8, 2010 at 11:01, Fredrik Kuivinen <frekui@gmail.com> wrote:\n\n> For some reason I looked at Issue 6 of the standard (a previous\n> version, released in 2004). In that version pthread_mutexattr_settype\n> and PTHREAD_MUTEX_RECURSIVE are optional. See\n> http://www.opengroup.org/onlinepubs/009695399/basedefs/pthread.h.html\n>\n> However, it is probably best to just ignore the issue for now until\n> some platform appears where pthreads is available but not recursive\n> mutexes.\n\nIRIX 6.2 has one of those early, primitive implementations. It doesn't\nseem to have PTHREAD_MUTEX_RECURSIVE, even though it has pthread_mutex\nfunctions.  Every other system I have (irix 6.5/solaris/aix) appears\nto have PTHREAD_MUTEX_RECURSIVE.\n\n-Tor\n"},{"id":"138957","messageId":"w2zd2d39d861004080216y5017824aodff2fa3272f5ebfd@mail.gmail.com","threadId":"23378","inReplyTo":"m2sd2d39d861004080214sedf4a65fm7e081d468f4d88f2@mail.gmail.com","subject":"Re: ***SPAM*** Re: What's cooking in git.git (Apr 2010, #03; Wed, 07)","fromName":"Tor Arntsen","fromEmail":"tor@spacetec.no","sentAt":"2010-04-08T09:16:32Z","receivedAt":"2010-04-08T09:16:32Z","isPatch":false,"sender":{"key":"tor@spacetec.no","avatar":null},"body":"On Thu, Apr 8, 2010 at 11:14, Tor Arntsen <tor@spacetec.no> wrote:\n> Every other system I have (irix 6.5/solaris/aix) appears\n> to have PTHREAD_MUTEX_RECURSIVE.\n\nI forgot Tru64 5.1, which is also OK in this respect. So, IRIX 6.2 is\nnegative for now.\n\n-Tor\n"},{"id":"138990","messageId":"20100408214233.GA32441@progeny.tock","threadId":"23378","inReplyTo":"20100408073825.GA15153@coredump.intra.peff.net","subject":"nd/setup","fromName":"Jonathan Nieder","fromEmail":"jrnieder@gmail.com","sentAt":"2010-04-08T21:42:33Z","receivedAt":"2010-04-08T21:42:33Z","isPatch":false,"sender":{"key":"jrnieder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/281595?v=4"},"body":"Jeff King wrote:\n> On Wed, Apr 07, 2010 at 05:48:02PM -0700, Junio C Hamano wrote:\n\n>> * nd/setup (2010-04-05) 43 commits\n[...]\n> Probably one or both\n> of us should look at it before applying it to next, but assuming it\n> passes a basic sanity check, I think the best thing will be to get it in\n> 'next' early so we can shake out any bugs during the next cycle.\n\nI don’t think it’s anywhere near master material yet.\n\nFirst, the basic problem.  The core of the series is in patch 40,\nwhich adds a new runtime self-checker for git.  Kind of like lockdep.\nInstead of proving locking correctness, this proves that whenever git\ntries to access the repository, it has already been clearly and\nunambiguously declared which repository to access (and in particular,\nwhether to try to access a repository at all).  Very neat, and it\nreveals many bugs, which is nice.\n\nWhen lockdep finds a locking problem, it quietly prints a message to\nthe kernel log and the kernel is able to keep going without worrying\nabout it.  Unfortunately, the repository access checker from nd/setup\nis not so graceful: it makes git die even though it should be able to\ncarry on just fine.  Example: with nd/setup, ls-remote currently fails\nwhen run outside any repository.  Probably the checker should be\nconfigured by an environment variable that indicates where to print\nits messages and whether to bail out when a problem is detected (for\ntests).\n\nA few of the earlier patches seem iffy, though they all start with a\ncorrect idea.  For example, one of them changes the semantics of\nrev-parse --show-prefix without documenting it.  So I have been looking\nfor time to document what each patch fixes.  Without some explanation\nof what the patches are supposed to fix and what they are not supposed\nto break, merging even them early would be a bit dangerous.\n\nSorry to be the bearer of bad tidings,\nJonathan\n"},{"id":"138994","messageId":"20100409001322.GB23501@coredump.intra.peff.net","threadId":"23378","inReplyTo":"20100408214233.GA32441@progeny.tock","subject":"Re: nd/setup","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2010-04-09T00:13:22Z","receivedAt":"2010-04-09T00:13:22Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Thu, Apr 08, 2010 at 04:42:33PM -0500, Jonathan Nieder wrote:\n\n> >> * nd/setup (2010-04-05) 43 commits\n> [...]\n> > Probably one or both\n> > of us should look at it before applying it to next, but assuming it\n> > passes a basic sanity check, I think the best thing will be to get it in\n> > 'next' early so we can shake out any bugs during the next cycle.\n> \n> I don’t think it’s anywhere near master material yet.\n\nTo clarify, I don't think that either. But sitting in pu, nobody is even\nrunning it. This seems to me like the sort of topic where there will be\na lot of unintended fallouts. Besides review, the best way to find\nthem is to get people running it, and 'next' is the most bleeding-edge\nwe have.\n\n> when run outside any repository.  Probably the checker should be\n> configured by an environment variable that indicates where to print\n> its messages and whether to bail out when a problem is detected (for\n> tests).\n\nYeah, that sounds reasonable, especially if merging this to 'next' would\nmake git unusable. We want to shake out bugs, not punish people running\nnext. :) But I haven't even really looked at the topic in detail yet.\n\n> Sorry to be the bearer of bad tidings,\n\nNot at all. This is exactly the sort of in-depth review that is very\nhelpful. Thanks.\n\n-Peff\n"},{"id":"139011","messageId":"q2pfcaeb9bf1004082246w3fb6e18bw21943150cbeeb5c7@mail.gmail.com","threadId":"23378","inReplyTo":"20100408214233.GA32441@progeny.tock","subject":"Re: nd/setup","fromName":"Nguyen Thai Ngoc Duy","fromEmail":"pclouds@gmail.com","sentAt":"2010-04-09T05:46:53Z","receivedAt":"2010-04-09T05:46:53Z","isPatch":false,"sender":{"key":"pclouds@gmail.com","avatar":"https://avatars.githubusercontent.com/u/720?v=4"},"body":"2010/4/8 Jonathan Nieder <jrnieder@gmail.com>:\n> When lockdep finds a locking problem, it quietly prints a message to\n> the kernel log and the kernel is able to keep going without worrying\n> about it.  Unfortunately, the repository access checker from nd/setup\n> is not so graceful: it makes git die even though it should be able to\n> carry on just fine.  Example: with nd/setup, ls-remote currently fails\n> when run outside any repository.  Probably the checker should be\n> configured by an environment variable that indicates where to print\n> its messages and whether to bail out when a problem is detected (for\n> tests).\n\nThe intention was to let that patch stay on next/pu for very long time\n(or ever), while the rest of fixes can be merged up to master. That's\nwhy it was the last patch (now close to the last).\n\nI did use an env variable to control whether it die() when unallowed\naccess is found in early versions. Perhaps I should resurrect that env\nvariable.\n\n> A few of the earlier patches seem iffy, though they all start with a\n> correct idea.  For example, one of them changes the semantics of\n> rev-parse --show-prefix without documenting it.  So I have been looking\n\nYou meant \"rev-parse --git-dir\"?\n-- \nDuy\n"},{"id":"139014","messageId":"20100409055701.GA9554@progeny.tock","threadId":"23378","inReplyTo":"q2pfcaeb9bf1004082246w3fb6e18bw21943150cbeeb5c7@mail.gmail.com","subject":"Re: nd/setup","fromName":"Jonathan Nieder","fromEmail":"jrnieder@gmail.com","sentAt":"2010-04-09T05:57:01Z","receivedAt":"2010-04-09T05:57:01Z","isPatch":false,"sender":{"key":"jrnieder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/281595?v=4"},"body":"Nguyen Thai Ngoc Duy wrote:\n> 2010/4/8 Jonathan Nieder <jrnieder@gmail.com>:\n\n>> A few of the earlier patches seem iffy, though they all start with a\n>> correct idea.  For example, one of them changes the semantics of\n>> rev-parse --show-prefix without documenting it.  So I have been looking\n>\n> You meant \"rev-parse --git-dir\"?\n\nI meant --show-prefix.  ad36c84 (worktree setup: calculate prefix even\nif no worktree is found, 2010-04-05) teaches rev-parse to produce a\nnonempty prefix even when there is no workdir but didn’t update the\ndocumentation:\n\n    --show-prefix\n         When the command is invoked from a subdirectory, show the\n         path of the current directory relative to the top-level\n         directory.\n\nI suspect it’s a good change.  Git ought to correctly honor relative\npaths on the command line even when there is no work tree.  But the\nsemantics are not clear any more --- when there is no top-level\ndirectory, what is the prefix relative to?\n\nProbably my other words of warning were also too extreme.  I have been\nusing a copy of git with nd/setup included, and aside from the\nls-remote problem I mentioned, I haven’t run into any trouble.\n\nCheers,\nJonathan\n"},{"id":"139019","messageId":"l2ofcaeb9bf1004082356t2c304902l3f089b701299cec0@mail.gmail.com","threadId":"23378","inReplyTo":"20100409055701.GA9554@progeny.tock","subject":"Re: nd/setup","fromName":"Nguyen Thai Ngoc Duy","fromEmail":"pclouds@gmail.com","sentAt":"2010-04-09T06:56:46Z","receivedAt":"2010-04-09T06:56:46Z","isPatch":false,"sender":{"key":"pclouds@gmail.com","avatar":"https://avatars.githubusercontent.com/u/720?v=4"},"body":"On Fri, Apr 9, 2010 at 7:57 AM, Jonathan Nieder <jrnieder@gmail.com> wrote:\n> Nguyen Thai Ngoc Duy wrote:\n>> 2010/4/8 Jonathan Nieder <jrnieder@gmail.com>:\n>\n>>> A few of the earlier patches seem iffy, though they all start with a\n>>> correct idea.  For example, one of them changes the semantics of\n>>> rev-parse --show-prefix without documenting it.  So I have been looking\n>>\n>> You meant \"rev-parse --git-dir\"?\n>\n> I meant --show-prefix.  ad36c84 (worktree setup: calculate prefix even\n> if no worktree is found, 2010-04-05) teaches rev-parse to produce a\n> nonempty prefix even when there is no workdir but didn’t update the\n> documentation:\n>\n>    --show-prefix\n>         When the command is invoked from a subdirectory, show the\n>         path of the current directory relative to the top-level\n>         directory.\n>\n> I suspect it’s a good change.  Git ought to correctly honor relative\n> paths on the command line even when there is no work tree.  But the\n> semantics are not clear any more --- when there is no top-level\n> directory, what is the prefix relative to?\n>\n> Probably my other words of warning were also too extreme.  I have been\n> using a copy of git with nd/setup included, and aside from the\n> ls-remote problem I mentioned, I haven’t run into any trouble.\n\nOK. I thought it was expectation and did not check documentation. The\nassumption that $GIT_DIR stays at worktree's top directory is still\naround.. I'll rethink about this.\n-- \nDuy\n"},{"id":"139242","messageId":"1270983682-12215-1-git-send-email-pclouds@gmail.com","threadId":"23378","inReplyTo":"20100409001322.GB23501@coredump.intra.peff.net","subject":"[PATCH] Take it easy on unallowed access to non-existent repository","fromName":"Nguyễn Thái Ngọc Duy","fromEmail":"pclouds@gmail.com","sentAt":"2010-04-11T11:01:22Z","receivedAt":"2010-04-11T11:01:22Z","isPatch":true,"sender":{"key":"pclouds@gmail.com","avatar":"https://avatars.githubusercontent.com/u/720?v=4"},"body":"\nSigned-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>\n---\n 2010/4/9 Jeff King <peff@peff.net>:\n > Yeah, that sounds reasonable, especially if merging this to 'next' would\n > make git unusable. We want to shake out bugs, not punish people running\n > next. :) But I haven't even really looked at the topic in detail yet.\n\n This patch could be squashed into 551a5786 (Guard unallowed access to repository..)\n Still don't know what to do with \"git ls-remote\". I'm not familiar with it.\n\n config.c      |    2 +-\n environment.c |    4 ++--\n 2 files changed, 3 insertions(+), 3 deletions(-)\n\ndiff --git a/config.c b/config.c\nindex 9981b09..63702bf 100644\n--- a/config.c\n+++ b/config.c\n@@ -738,7 +738,7 @@ int git_config(config_fn_t fn, void *data)\n \tint ret;\n \n \tif (startup_info && !startup_info->have_run_setup_gitdir)\n-\t\tdie(\"internal error: access to .git/config without repo setup\");\n+\t\twarning(\"Broken repository setup: early access to $GIT_DIR/config\");\n \tif (!startup_info || startup_info->have_repository)\n \t\trepo_config = git_pathdup(\"config\");\n \tret = git_config_early(fn, data, repo_config);\ndiff --git a/environment.c b/environment.c\nindex 28624ad..dbaed04 100644\n--- a/environment.c\n+++ b/environment.c\n@@ -99,7 +99,7 @@ void unset_git_env(void)\n static void setup_git_env(void)\n {\n \tif (startup_info && startup_info->have_run_setup_gitdir)\n-\t\tdie(\"internal error: setup_git_env can't be called twice\");\n+\t\twarning(\"Broken repository setup: setup_git_env() called twice\");\n \tgit_dir = getenv(GIT_DIR_ENVIRONMENT);\n \tif (!git_dir) {\n \t\t/*\n@@ -107,7 +107,7 @@ static void setup_git_env(void)\n \t\t * or enter_repo, not by this function\n \t\t */\n \t\tif (startup_info)\n-\t\t\tdie(\"internal error: $GIT_DIR is empty\");\n+\t\t\twarning(\"Broken respository setup: git_dir is empty\");\n \t\tgit_dir = read_gitfile_gently(DEFAULT_GIT_DIR_ENVIRONMENT);\n \t}\n \tif (!git_dir)\n-- \n1.7.0.rc1.541.g2da82.dirty\n"},{"id":"139254","messageId":"l2ifabb9a1e1004110845l7cc89b70y9878dad9e1537e8d@mail.gmail.com","threadId":"23378","inReplyTo":"1270983682-12215-1-git-send-email-pclouds@gmail.com","subject":"Re: [PATCH] Take it easy on unallowed access to non-existent repository","fromName":"Sverre Rabbelier","fromEmail":"srabbelier@gmail.com","sentAt":"2010-04-11T15:45:46Z","receivedAt":"2010-04-11T15:45:46Z","isPatch":true,"sender":{"key":"srabbelier@gmail.com","avatar":"https://avatars.githubusercontent.com/u/3098?v=4"},"body":"Heya,\n\n2010/4/11 Nguyễn Thái Ngọc Duy <pclouds@gmail.com>:\n>        if (startup_info && !startup_info->have_run_setup_gitdir)\n> -               die(\"internal error: access to .git/config without repo setup\");\n> +               warning(\"Broken repository setup: early access to $GIT_DIR/config\");\n\nThis makes it sound like whatever is the problem is caused by the\nrepository that is being operated on, rather than git's code, is that\ncorrect?\n\n-- \nCheers,\n\nSverre Rabbelier\n"},{"id":"139270","messageId":"y2tfcaeb9bf1004111049m9703af3bs3dc668ec29ae3136@mail.gmail.com","threadId":"23378","inReplyTo":"l2ifabb9a1e1004110845l7cc89b70y9878dad9e1537e8d@mail.gmail.com","subject":"Re: [PATCH] Take it easy on unallowed access to non-existent repository","fromName":"Nguyen Thai Ngoc Duy","fromEmail":"pclouds@gmail.com","sentAt":"2010-04-11T17:49:15Z","receivedAt":"2010-04-11T17:49:15Z","isPatch":true,"sender":{"key":"pclouds@gmail.com","avatar":"https://avatars.githubusercontent.com/u/720?v=4"},"body":"2010/4/11 Sverre Rabbelier <srabbelier@gmail.com>:\n> Heya,\n>\n> 2010/4/11 Nguyễn Thái Ngọc Duy <pclouds@gmail.com>:\n>>        if (startup_info && !startup_info->have_run_setup_gitdir)\n>> -               die(\"internal error: access to .git/config without repo setup\");\n>> +               warning(\"Broken repository setup: early access to $GIT_DIR/config\");\n>\n> This makes it sound like whatever is the problem is caused by the\n> repository that is being operated on, rather than git's code, is that\n> correct?\n\nGaah.. from a user point of view, correct. What do you suggest?\n-- \nDuy\n"},{"id":"139272","messageId":"u2ifabb9a1e1004111052s12949555wa063f214d742e5ec@mail.gmail.com","threadId":"23378","inReplyTo":"y2tfcaeb9bf1004111049m9703af3bs3dc668ec29ae3136@mail.gmail.com","subject":"Re: [PATCH] Take it easy on unallowed access to non-existent repository","fromName":"Sverre Rabbelier","fromEmail":"srabbelier@gmail.com","sentAt":"2010-04-11T17:52:53Z","receivedAt":"2010-04-11T17:52:53Z","isPatch":true,"sender":{"key":"srabbelier@gmail.com","avatar":"https://avatars.githubusercontent.com/u/3098?v=4"},"body":"Heya,\n\nOn Sun, Apr 11, 2010 at 19:49, Nguyen Thai Ngoc Duy <pclouds@gmail.com> wrote:\n> Gaah.. from a user point of view, correct. What do you suggest?\n\nSimple, add a reference to the \"code\":\n\nwarning(\"broken repository setup code: early access to $GIT_DIR/config\");\n\n-- \nCheers,\n\nSverre Rabbelier\n"},{"id":"139274","messageId":"w2mfcaeb9bf1004111057g58cefafdqc1cc30a8c9f82032@mail.gmail.com","threadId":"23378","inReplyTo":"20100408214233.GA32441@progeny.tock","subject":"Re: nd/setup","fromName":"Nguyen Thai Ngoc Duy","fromEmail":"pclouds@gmail.com","sentAt":"2010-04-11T17:57:06Z","receivedAt":"2010-04-11T17:57:06Z","isPatch":false,"sender":{"key":"pclouds@gmail.com","avatar":"https://avatars.githubusercontent.com/u/720?v=4"},"body":"2010/4/8 Jonathan Nieder <jrnieder@gmail.com>:\n> Jeff King wrote:\n>> On Wed, Apr 07, 2010 at 05:48:02PM -0700, Junio C Hamano wrote:\n>\n>>> * nd/setup (2010-04-05) 43 commits\n> [...]\n>> Probably one or both\n>> of us should look at it before applying it to next, but assuming it\n>> passes a basic sanity check, I think the best thing will be to get it in\n>> 'next' early so we can shake out any bugs during the next cycle.\n>\n> I don’t think it’s anywhere near master material yet.\n\nNo it's not. I spent a bit of time on it this morning. A few notes:\n\n- My logic to restore repo state in run_builtin, patch \"Guard\nunallowed access..\", is just broken, and will lead to many die()s (or\nwarning()s with the squash)\n - \"git -p init\" will not work, pager problem again.\n-- \nDuy\n"},{"id":"139275","messageId":"w2zfcaeb9bf1004111057m6062b984t40c62f25a8a9195a@mail.gmail.com","threadId":"23378","inReplyTo":"u2ifabb9a1e1004111052s12949555wa063f214d742e5ec@mail.gmail.com","subject":"Re: [PATCH] Take it easy on unallowed access to non-existent repository","fromName":"Nguyen Thai Ngoc Duy","fromEmail":"pclouds@gmail.com","sentAt":"2010-04-11T17:57:53Z","receivedAt":"2010-04-11T17:57:53Z","isPatch":true,"sender":{"key":"pclouds@gmail.com","avatar":"https://avatars.githubusercontent.com/u/720?v=4"},"body":"On Sun, Apr 11, 2010 at 7:52 PM, Sverre Rabbelier <srabbelier@gmail.com> wrote:\n> Heya,\n>\n> On Sun, Apr 11, 2010 at 19:49, Nguyen Thai Ngoc Duy <pclouds@gmail.com> wrote:\n>> Gaah.. from a user point of view, correct. What do you suggest?\n>\n> Simple, add a reference to the \"code\":\n>\n> warning(\"broken repository setup code: early access to $GIT_DIR/config\");\n\nThanks.\n-- \nDuy\n"}]}