{"thread":{"id":"26805","subject":"What's cooking in git.git (Mar 2011, #02; Sun, 20)","startedAt":"2011-03-20T19:49:14Z","lastAt":"2011-03-23T15:54:16Z","messageCount":15,"participants":["Junio C Hamano","Jens Lehmann","Matthieu Moy","Jeff King","Ævar Arnfjörð Bjarmason","Nguyen Thai Ngoc Duy"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"163834","messageId":"7vy649vah1.fsf@alter.siamese.dyndns.org","threadId":"26805","inReplyTo":null,"subject":"What's cooking in git.git (Mar 2011, #02; Sun, 20)","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2011-03-20T19:49:14Z","receivedAt":"2011-03-20T19:49:14Z","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'.\n\nThe very basic of i18n is now in 'master'.  I'll be moving the rest of the\nseries forward shortly.\n\n--------------------------------------------------\n[Graduated to \"master\"]\n\n* ab/i18n-basic (2011-02-25) 9 commits\n  (merged to 'next' on 2011-03-10 at ab70d57)\n + i18n: \"make distclean\" should clean up after \"make pot\"\n + i18n: Makefile: \"pot\" target to extract messages marked for translation\n + i18n: add stub Q_() wrapper for ngettext\n + i18n: do not poison translations unless GIT_GETTEXT_POISON envvar is set\n + i18n: add GETTEXT_POISON to simulate unfriendly translator\n + i18n: add no-op _() and N_() wrappers\n + commit, status: use status_printf{,_ln,_more} helpers\n + commit: refer to commit template as s->fp\n + wt-status: add helpers for printing wt-status lines\n (this branch is used by ab/i18n-st.)\n\n* fk/maint-cvsimport-early-failure (2011-01-31) 1 commit\n  (merged to 'next' on 2011-03-09 at b4dee9e)\n + git-cvsimport.perl: Bail out right away when reading from the server fails\n\n* jc/checkout-orphan-warning (2011-02-18) 1 commit\n  (merged to 'next' on 2011-03-09 at 765cf75)\n + commit: give final warning when reattaching HEAD to leave commits behind\n\n* jc/maint-apply-no-double-patch (2011-03-04) 1 commit\n  (merged to 'next' on 2011-03-09 at 6ec48e7)\n + apply: do not patch lines that were already patched\n\n* jc/maint-apply-report-offset (2011-03-04) 1 commit\n  (merged to 'next' on 2011-03-09 at 1bb74ef)\n + apply -v: show offset count when patch did not apply exactly\n\n* jh/maint-do-not-track-non-branches (2011-02-17) 1 commit\n  (merged to 'next' on 2011-03-09 at 13a9328)\n + branch/checkout --track: Ensure that upstream branch is indeed a branch\n\n* jk/format-patch-multiline-header (2011-02-23) 3 commits\n  (merged to 'next' on 2011-03-09 at f970fe3)\n + format-patch: rfc2047-encode newlines in headers\n + format-patch: wrap long header lines\n + strbuf: add fixed-length version of add_wrapped_text\n\n* jk/merge-rename-ux (2011-02-20) 6 commits\n  (merged to 'next' on 2011-03-09 at df1943a)\n + pull: propagate --progress to merge\n + merge: enable progress reporting for rename detection\n + add inexact rename detection progress infrastructure\n + commit: stop setting rename limit\n + bump rename limit defaults (again)\n + merge: improve inexact rename limit warning\n\n* jk/strbuf-vaddf (2011-03-08) 3 commits\n  (merged to 'next' on 2011-03-09 at 9651bc5)\n + compat: fall back on __va_copy if available\n + strbuf: add strbuf_vaddf\n + compat: provide a fallback va_copy definition\n (this branch is used by ab/i18n-basic, ab/i18n-st, jk/trace-sifter and jn/status-translatable.)\n\n* jk/trace-sifter (2011-02-24) 6 commits\n  (merged to 'next' on 2011-03-09 at 07841db)\n + trace: give repo_setup trace its own key\n + add packet tracing debug code\n + trace: add trace_strbuf\n + trace: factor out \"do we want to trace\" logic\n + trace: refactor to support multiple env variables\n + trace: add trace_vprintf\n\n* jn/maint-instaweb-plack-fix (2011-02-26) 1 commit\n  (merged to 'next' on 2011-03-09 at 3c9e14b)\n + git-instaweb: Change how gitweb.psgi is made runnable as standalone app\n\n* jn/status-translatable (2011-02-25) 3 commits\n  (merged to 'next' on 2011-03-09 at d00d23d)\n + commit, status: use status_printf{,_ln,_more} helpers\n + commit: refer to commit template as s->fp\n + wt-status: add helpers for printing wt-status lines\n\n* js/rerere-forget-always-take-pathspec (2011-03-01) 1 commit\n  (merged to 'next' on 2011-03-10 at 2d1ded3)\n + rerere forget: deprecate invocation without pathspec\n\n* mg/rev-list-n-reverse-doc (2011-03-08) 2 commits\n  (merged to 'next' on 2011-03-10 at 62d3161)\n + git-log.txt,rev-list-options.txt: put option blocks in proper order\n + git-log.txt,rev-list-options.txt: -n/--max-count is commit limiting\n\n* mm/maint-log-n-with-diff-filtering (2011-03-09) 1 commit\n  (merged to 'next' on 2011-03-10 at 33af1cd)\n + log: fix --max-count when used together with -S or -G\n\n* mm/push-default-advice (2011-03-02) 2 commits\n  (merged to 'next' on 2011-03-09 at 160095b)\n + push: better error message when no remote configured\n + push: better error messages when push.default = tracking\n\n* mr/hpux (2011-03-07) 2 commits\n  (merged to 'next' on 2011-03-09 at 8a5fe11)\n + git-compat-util.h: Honor HP C's noreturn attribute\n + Makefile: add NO_FNMATCH_CASEFOLD to HP-UX section\n\n* sp/maint-fd-limit (2011-03-02) 3 commits\n  (merged to 'next' on 2011-03-09 at 389e97d)\n + sha1_file.c: Don't retain open fds on small packs\n + mingw: add minimum getrlimit() compatibility stub\n + Limit file descriptors used by packs\n\n* ss/mergetool--lib (2011-02-27) 2 commits\n  (merged to 'next' on 2011-03-09 at 004fb9c)\n + mergetool--lib: Add Beyond Compare 3 as a tool\n + mergetool--lib: Sort tools alphabetically for easier lookup\n\n* uk/ls-remote-in-get-remote-url (2011-03-01) 2 commits\n  (merged to 'next' on 2011-03-09 at 09b570b)\n + git-request-pull: open-code the only invocation of get_remote_url\n + get_remote_url(): use the same data source as ls-remote to get remote urls\n\n--------------------------------------------------\n[New Topics]\n\n* jc/maint-fetch-alt (2011-03-11) 2 commits\n  (merged to 'next' on 2011-03-17 at c61ec4f)\n + fetch-pack: objects in our alternates are available to us\n + refs_from_alternate: helper to use refs from alternates\n\n* jc/maint-rerere-in-workdir (2011-03-10) 1 commit\n - rerere: make sure it works even in a workdir attached to a young repository\n\nDo not merge; needs more thought around relative symlinks.\n\n* lt/default-abbrev (2010-10-28) 1 commit\n  (merged to 'next' on 2011-03-17 at 1d7e406)\n + Make the default abbrev length configurable\n\nThe configuration roughly corresponds to --abbrev command line option, so\nI should rename it back to core.abbrev as Linus originally named it.\n\n* pk/stash-apply-status-relative (2011-03-12) 1 commit\n - git stash: show status relative to current directory\n\nWill merge to 'next'.\n\n* sg/complete-symmetric-diff (2011-03-10) 2 commits\n  (merged to 'next' on 2011-03-17 at adb0618)\n + bash: complete 'git diff ...branc<TAB>'\n + bash: fix misindented esac statement in __git_complete_file()\n\n* jc/maint-rev-list-culled-boundary (2011-03-14) 1 commit\n  (merged to 'next' on 2011-03-17 at 001b546)\n + list-objects.c: don't add an unparsed NULL as a pending tree\n\n* jn/test-sanitize-git-env (2011-03-15) 5 commits\n  (merged to 'next' on 2011-03-17 at 80a3678)\n + tests: scrub environment of GIT_* variables\n + config: drop support for GIT_CONFIG_NOGLOBAL\n + gitattributes: drop support for GIT_ATTR_NOGLOBAL\n + tests: suppress system gitattributes\n + tests: stop worrying about obsolete environment variables\n\n* js/maint-stash-index-copy (2011-03-16) 2 commits\n  (merged to 'next' on 2011-03-17 at 9f74cc8)\n + stash: copy the index using --index-output instead of cp -p\n + stash: fix incorrect quoting in cleanup of temporary files\n\n* sp/maint-fetch-pack-stop-early (2011-03-14) 2 commits\n  (merged to 'next' on 2011-03-17 at 2580068)\n + fetch-pack: Implement no-done capability\n + fetch-pack: Finish negotation if remote replies \"ACK %s ready\"\n (this branch is used by jc/fetch-progressive-stride.)\n\n* sp/maint-upload-pack-stop-early (2011-03-14) 2 commits\n  (merged to 'next' on 2011-03-17 at e717a84)\n + upload-pack: Implement no-done capability\n + upload-pack: More aggressively send 'ACK %s ready'\n\n* mg/doc-bisect-tweak-worktree (2011-03-15) 2 commits\n  (merged to 'next' on 2011-03-17 at e0acf52)\n + git-bisect.txt: example for bisecting with hot-fix\n + git-bisect.txt: streamline run presentation\n\n* tl/p4 (2011-03-15) 3 commits\n  (merged to 'next' on 2011-03-17 at 3d7f69f)\n + git-p4: Fix error message crash in P4Sync.commit.\n + Teach git-p4 to ignore case in perforce filenames if configured.\n + git-p4: Teach gitConfig method about arguments.\n\n* cn/system-path-tweak (2011-03-17) 1 commit\n - system_path: use a static buffer\n\n* jc/fetch-progressive-stride (2011-03-18) 3 commits\n - fetch-pack: use smaller handshake window for initial request\n - fetch-pack: progressively use larger handshake windows\n - fetch-pack: factor out hardcoded handshake window size\n (this branch uses sp/maint-fetch-pack-stop-early.)\n\nThe top two need to be cleaned up with correct author name.\n\n* jc/maint-diff-q-filter (2011-03-16) 1 commit\n - diff --quiet: disable optimization when --diff-filter=X is used\n\nWill merge to 'next'.\n\n* jn/fortify-source-workaround (2011-03-16) 1 commit\n - run-command: prettify -D_FORTIFY_SOURCE workaround\n\nWill merge to 'next'.\n\n* jn/maint-c99-format (2011-03-16) 2 commits\n - unbreak and eliminate NO_C99_FORMAT\n - mktag: avoid %td in format string\n\nWill merge to 'next'.\n\n* kc/gitweb-pathinfo-w-anchor (2011-03-18) 1 commit\n - gitweb: fix #patchNN anchors when path_info is enabled\n\nWill merge to 'next'.\n\n* pw/p4 (2011-03-16) 2 commits\n - git-p4: test sync new branch\n - git-p4: fix sync new branch regression\n\nWill merge to 'next'.\n\n--------------------------------------------------\n[Stalled]\n\n* jh/merge-sans-branch (2011-02-10) 4 commits\n . merge: add support for merging from upstream by default\n - merge: introduce per-branch-configuration helper function\n - merge: introduce setup_merge_commit helper function\n - merge: update the usage information to be more modern\n\nThere was an objection to the tip one that determines the upstream in a\nwrong way? I've been wanting to move this forward for quite some time but\nalso hoping somebody else would send in a final version.\n\n* mz/rebase (2011-02-28) 34 commits\n - rebase: define options in OPTIONS_SPEC\n  (merged to 'next' on 2011-02-25 at 52caa7a)\n + Makefile: do not install sourced rebase scripts\n  (merged to 'next' on 2011-02-22 at 3219155)\n + rebase: use @{upstream} if no upstream specified\n + rebase -i: remove unnecessary state rebase-root\n + rebase -i: don't read unused variable preserve_merges\n + git-rebase--am: remove unnecessary --3way option\n + rebase -m: don't print exit code 2 when merge fails\n + rebase -m: remember allow_rerere_autoupdate option\n + rebase: remember strategy and strategy options\n + rebase: remember verbose option\n + rebase: extract code for writing basic state\n + rebase: factor out sub command handling\n + rebase: make -v a tiny bit more verbose\n + rebase -i: align variable names\n + rebase: show consistent conflict resolution hint\n + rebase: extract am code to new source file\n + rebase: extract merge code to new source file\n + rebase: remove $branch as synonym for $orig_head\n + rebase -i: support --stat\n + rebase: factor out call to pre-rebase hook\n + rebase: factor out clean work tree check\n + rebase: factor out reference parsing\n + rebase: reorder validation steps\n + rebase -i: remove now unnecessary directory checks\n + rebase: factor out command line option processing\n + rebase: align variable content\n + rebase: align variable names\n + rebase: stricter check of standalone sub command\n + rebase: act on command line outside parsing loop\n + rebase: improve detection of rebase in progress\n + rebase: remove unused rebase state 'prev_head'\n + rebase: read state outside loop\n + rebase: refactor reading of state\n + rebase: clearer names for directory variables\n\nI think the tip one is a response to J6t's regression concerns; it looked\nOk to me.\n\n* jc/diff-irreversible-delete (2011-02-28) 1 commit\n - git diff -D: omit the preimage of deletes\n\n\"diff -B -D\" should omit the deleting half of a broken pair from the\noutput.  Need documentation and tests.\n\n* jc/index-pack (2011-02-25) 5 commits\n - index-pack --verify: read anomalous offsets from v2 idx file\n - write_idx_file: need_large_offset() helper function\n - index-pack: --verify\n - write_idx_file: introduce a struct to hold idx customization options\n - index-pack: group the delta-base array entries also by type\n\nStill a WIP. Need to put histogram output into index-pack --verify to\nreally kill verify-pack.\n\n* gr/cvsimport-alternative-cvspass-location (2011-02-18) 1 commit\n - Look for password in both CVS and CVSNT password files.\n\nIt seems that we need separate parsers for these two formats in order not\nto regress the users of the original cvs.\n\n* jk/tag-contains (2010-07-05) 4 commits\n - Why is \"git tag --contains\" so slow?\n - default core.clockskew variable to one day\n - limit \"contains\" traversals based on commit timestamp\n - tag: speed up --contains calculation\n\nThe idea of the bottom one is probably Ok, except that the use of object\nflags needs to be rethought, or at least the helper needs to be moved to\nbuiltin/tag.c to make it clear that it should not be used outside the\ncurrent usage context.\n\n* jk/edit-notes-in-commit-log (2011-03-07) 2 commits\n - [wip] commit: allow editing notes in commit message editor\n - notes: make expand_notes_ref globally accessible\n\n* jc/rename-degrade-cc-to-c (2011-01-06) 3 commits\n . diffcore-rename: fall back to -C when -C -C busts the rename limit\n . diffcore-rename: record filepair for rename src\n . diffcore-rename: refactor \"too many candidates\" logic\n\nWill take another look.\n\n* mg/grep-full-tree (2011-03-01) 2 commits\n - grep: make --full-tree work with pathspecs\n - grep: --full-tree\n\nDo not merge; it would be preferable to use \":/\" or whatever magic\npathspec that is relative to the root of the working tree.\n\n* nd/rfc-add-u-full-tree (2011-02-07) 1 commit\n - add: make \"add -u\" update full tree without pathspec\n\nA three-phase migration that:\n\n (1) first only warns when we would deviate from traditional behaviour and\n     suggest adding \".\" if the user wants to limit it to cwd, but doesn't\n     actually add full-tree, in the next release;\n\n (2) warn that we have changed the behaviour and suggest adding \".\" if the\n     user wants to limit it to cwd, and actually do full-tree, in 1.8.0;\n\n (3) remove the warning, in 1.8.X (for X at least 2 or more).\n\nwould be a good way forward.\n\n--------------------------------------------------\n[Cooking]\n\n* en/merge-recursive (2011-03-17) 4 commits\n  (merged to 'next' on 2011-03-18 at a32016b)\n + merge-recursive: tweak magic band-aid\n  (merged to 'next' on 2011-03-09 at 3762932)\n + merge-recursive: When we detect we can skip an update, actually skip it\n + t6022: New test checking for unnecessary updates of files in D/F conflicts\n + t6022: New test checking for unnecessary updates of renamed+modified files\n\nI am not happy with these magic band aids.\n\n* nd/init-gitdir (2011-03-19) 2 commits\n - init, clone: support --separate-git-dir for .git file\n - git-init.txt: move description section up\n\n* jl/submodule-fetch-on-demand (2011-03-06) 7 commits\n - fetch/pull: Describe --recurse-submodule restrictions in the BUGS section\n - submodule update: Don't fetch when the submodule commit is already present\n - fetch/pull: Don't recurse into a submodule when commits are already present\n - Submodules: Add 'on-demand' value for the 'fetchRecurseSubmodule' option\n - config: teach the fetch.recurseSubmodules option the 'on-demand' value\n - fetch/pull: Add the 'on-demand' value to the --recurse-submodules option\n - fetch/pull: recurse into submodules when necessary\n\nIs this ready to move forward?\n\n* ss/git-gui-mergetool (2011-02-26) 2 commits\n  (merged to 'next' on 2011-03-17 at a8fac18)\n + mergetool--lib: Add Beyond Compare 3 as a tool\n + mergetool--lib: Sort tools alphabetically for easier lookup\n\nThe CLI side (ss/mergetool--lib topic) will be in the next release, so\nI'll ping Pat to take this into gut-gui tree.\n\n* nd/index-doc (2010-09-06) 1 commit\n - doc: technical details about the index file format\n\n* ab/i18n-st (2011-02-22) 69 commits\n - i18n: git-shortlog basic messages\n - i18n: git-revert split up \"could not revert/apply\" message\n - i18n: git-revert literal \"me\" messages\n - i18n: git-revert \"Your local changes\" message\n - i18n: git-revert basic messages\n - i18n: git-notes GIT_NOTES_REWRITE_MODE error message\n - i18n: git-notes basic commands\n - i18n: git-gc \"Auto packing the repository\" message\n - i18n: git-gc basic messages\n - i18n: git-describe basic messages\n - i18n: git-clean clean.requireForce messages\n - i18n: git-clean basic messages\n - i18n: git-bundle basic messages\n - i18n: git-archive basic messages\n - i18n: git-status \"renamed: \" message\n - i18n: git-status \"Initial commit\" message\n - i18n: git-status \"Changes to be committed\" message\n - i18n: git-status shortstatus messages\n - i18n: git-status \"nothing to commit\" messages\n - i18n: git-status basic messages\n - i18n: git-push \"prevent you from losing\" message\n - i18n: git-push basic messages\n - i18n: git-tag tag_template message\n - i18n: git-tag basic messages\n - i18n: git-reset \"Unstaged changes after reset\" message\n - i18n: git-reset reset_type_names messages\n - i18n: git-reset basic messages\n - i18n: git-rm basic messages\n - i18n: git-mv \"bad\" messages\n - i18n: git-mv basic messages\n - i18n: git-merge \"Wonderful\" message\n - i18n: git-merge \"You have not concluded your merge\" messages\n - i18n: git-merge \"Updating %s..%s\" message\n - i18n: git-merge basic messages\n - i18n: git-log \"--OPT does not make sense\" messages\n - i18n: git-log basic messages\n - i18n: git-grep \"--open-files-in-pager\" message\n - i18n: git-grep basic messages\n - i18n: git-fetch split up \"(non-fast-forward)\" message\n - i18n: git-fetch update_local_ref messages\n - i18n: git-fetch formatting messages\n - i18n: git-fetch basic messages\n - i18n: git-diff basic messages\n - i18n: git-commit advice messages\n - i18n: git-commit \"enter the commit message\" message\n - i18n: git-commit print_summary messages\n - i18n: git-commit formatting messages\n - i18n: git-commit \"middle of a merge\" message\n - i18n: git-commit basic messages\n - i18n: git-checkout \"Switched to a .. branch\" message\n - i18n: git-checkout \"HEAD is now at\" message\n - i18n: git-checkout describe_detached_head messages\n - i18n: git-checkout: our/their version message\n - i18n: git-checkout basic messages\n - i18n: git-branch \"(no branch)\" message\n - i18n: git-branch \"git branch -v\" messages\n - i18n: git-branch \"Deleted branch [...]\" message\n - i18n: git-branch \"remote branch '%s' not found\" message\n - i18n: git-branch basic messages\n - i18n: git-add \"Unstaged changes\" message\n - i18n: git-add \"remove '%s'\" message\n - i18n: git-add \"did not match any files\" message\n - i18n: git-add \"The following paths are ignored\" message\n - i18n: git-add basic messages\n - i18n: git-clone \"Cloning into\" message\n - i18n: git-clone \"Cloning into\" message\n - i18n: git-clone basic messages\n - i18n: git-init \"Initialized [...] repository\" message\n - i18n: git-init basic messages\n\n* mg/rev-list-one-side-only (2011-03-10) 10 commits\n  (merged to 'next' on 2011-03-10 at 2a69869)\n + git-log: put space after commit mark\n + t6007: test rev-list --cherry\n + log --cherry: a synonym\n + rev-list: documentation and test for --cherry-mark\n + revision.c: introduce --cherry-mark\n + rev-list/log: factor out revision mark generation\n + rev-list: --left/right-only are mutually exclusive\n + rev-list: documentation and test for --left/right-only\n + t6007: Make sure we test --cherry-pick\n + revlist.c: introduce --left/right-only for unsymmetric picking\n\nLooked sensible, including the change of the output.\n"},{"id":"163836","messageId":"4D8666DF.3050401@web.de","threadId":"26805","inReplyTo":"7vy649vah1.fsf@alter.siamese.dyndns.org","subject":"Re: What's cooking in git.git (Mar 2011, #02; Sun, 20)","fromName":"Jens Lehmann","fromEmail":"jens.lehmann@web.de","sentAt":"2011-03-20T20:43:11Z","receivedAt":"2011-03-20T20:43:11Z","isPatch":false,"sender":{"key":"jens.lehmann@web.de","avatar":"https://avatars.githubusercontent.com/u/135220?v=4"},"body":"Am 20.03.2011 20:49, schrieb Junio C Hamano:\n> * jl/submodule-fetch-on-demand (2011-03-06) 7 commits\n>  - fetch/pull: Describe --recurse-submodule restrictions in the BUGS section\n>  - submodule update: Don't fetch when the submodule commit is already present\n>  - fetch/pull: Don't recurse into a submodule when commits are already present\n>  - Submodules: Add 'on-demand' value for the 'fetchRecurseSubmodule' option\n>  - config: teach the fetch.recurseSubmodules option the 'on-demand' value\n>  - fetch/pull: Add the 'on-demand' value to the --recurse-submodules option\n>  - fetch/pull: recurse into submodules when necessary\n> \n> Is this ready to move forward?\n\nI'm not aware of any issues with that series, so I'd say yes. (The change in\nbehavior and that we support disconnected operation for submodules way better\nthan before should of course be mentioned in the release notes)\n"},{"id":"163839","messageId":"7vtyexv6wl.fsf@alter.siamese.dyndns.org","threadId":"26805","inReplyTo":"7vy649vah1.fsf@alter.siamese.dyndns.org","subject":"Re: What's cooking in git.git (Mar 2011, #02; Sun, 20)","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2011-03-20T21:06:18Z","receivedAt":"2011-03-20T21:06:18Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Junio C Hamano <gitster@pobox.com> writes:\n\n> * nd/rfc-add-u-full-tree (2011-02-07) 1 commit\n>  - add: make \"add -u\" update full tree without pathspec\n>\n> A three-phase migration that:\n>\n>  (1) first only warns when we would deviate from traditional behaviour and\n>      suggest adding \".\" if the user wants to limit it to cwd, but doesn't\n>      actually add full-tree, in the next release;\n>\n>  (2) warn that we have changed the behaviour and suggest adding \".\" if the\n>      user wants to limit it to cwd, and actually do full-tree, in 1.8.0;\n>\n>  (3) remove the warning, in 1.8.X (for X at least 2 or more).\n>\n> would be a good way forward.\n\n... and here is how the first step would look like.\n\n-- >8 --\nSubject: [PATCH] add -u: warn when ran without pathspec from a subdirectory\n\nWe will be changing the behaviour of \"add -u\" without any pathspec\nto be tree-wide in future releases; warn the users and train them\nto say \"add -u .\" to help smoother migration.\n\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\n---\n builtin/add.c |   18 ++++++++++++++++++\n 1 files changed, 18 insertions(+), 0 deletions(-)\n\ndiff --git a/builtin/add.c b/builtin/add.c\nindex e127d5a..443d3bb 100644\n--- a/builtin/add.c\n+++ b/builtin/add.c\n@@ -359,6 +359,21 @@ static int add_files(struct dir_struct *dir, int flags)\n \treturn exit_status;\n }\n \n+static const char *warn_add_u_without_pathspec_msg[] = {\n+\t\"In release 1.8.0, running 'git add -u' from a subdirectory\",\n+\t\"without giving any pathspec WILL take effect on the whole\",\n+\t\"working tree, not just the part under the current directory.\",\n+\t\"Please make it a habit to say 'git add -u .' when you mean\",\n+\t\"to only add paths under the current directory.\"\n+};\n+\n+static void warn_add_u_without_pathspec(void)\n+{\n+\tint i;\n+\tfor (i = 0; i < ARRAY_SIZE(warn_add_u_without_pathspec_msg); i++)\n+\t\twarning(\"%s\", warn_add_u_without_pathspec_msg[i]);\n+}\n+\n int cmd_add(int argc, const char **argv, const char *prefix)\n {\n \tint exit_status = 0;\n@@ -390,6 +405,9 @@ int cmd_add(int argc, const char **argv, const char *prefix)\n \t\tdie(\"Option --ignore-missing can only be used together with --dry-run\");\n \tif ((addremove || take_worktree_changes) && !argc) {\n \t\tstatic const char *here[2] = { \".\", NULL };\n+\n+\t\tif (take_worktree_changes && prefix)\n+\t\t\twarn_add_u_without_pathspec();\n \t\targc = 1;\n \t\targv = here;\n \t}\n-- \n1.7.4.1.514.ga171c\n"},{"id":"163842","messageId":"7vpqplv65o.fsf@alter.siamese.dyndns.org","threadId":"26805","inReplyTo":"7vtyexv6wl.fsf@alter.siamese.dyndns.org","subject":"Re: What's cooking in git.git (Mar 2011, #02; Sun, 20)","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2011-03-20T21:22:27Z","receivedAt":"2011-03-20T21:22:27Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Junio C Hamano <gitster@pobox.com> writes:\n\n>> * nd/rfc-add-u-full-tree (2011-02-07) 1 commit\n>>  - add: make \"add -u\" update full tree without pathspec\n>>\n>> A three-phase migration that:\n>>\n>>  (1) first only warns when we would deviate from traditional behaviour and\n>>      suggest adding \".\" if the user wants to limit it to cwd, but doesn't\n>>      actually add full-tree, in the next release;\n>>\n>>  (2) warn that we have changed the behaviour and suggest adding \".\" if the\n>>      user wants to limit it to cwd, and actually do full-tree, in 1.8.0;\n>>\n>>  (3) remove the warning, in 1.8.X (for X at least 2 or more).\n>>\n>> would be a good way forward.\n>\n> ... and here is how the first step would look like.\n\n... and here is the second step meant for 1.8.0 release.\n\nThe third step for 1.8.2 or later should be trivially obvious, so I\nwouldn't bother sending it out.\n\n-- >8 --\nSubject: [PATCH] add -u: tree-wide without pathspec\n\nThe warning still remains in this version, but has to stay here\nto help people who skipped late 1.7.X releases.  Unfortunately\nwe do not have a good way to let people who have already heard\nabout the transition to squelch it yet. That has to wait until\nwe have a magic \":/\" pathspec that would mean to match from the\ntop of the working tree no matter where $cwd is.  At that point,\npeople can say \"git add -u :/\" to squelch the warning.\n\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\n---\n builtin/add.c |   18 ++++++++++--------\n 1 files changed, 10 insertions(+), 8 deletions(-)\n\ndiff --git a/builtin/add.c b/builtin/add.c\nindex 443d3bb..0ece4b1 100644\n--- a/builtin/add.c\n+++ b/builtin/add.c\n@@ -360,11 +360,11 @@ static int add_files(struct dir_struct *dir, int flags)\n }\n \n static const char *warn_add_u_without_pathspec_msg[] = {\n-\t\"In release 1.8.0, running 'git add -u' from a subdirectory\",\n-\t\"without giving any pathspec WILL take effect on the whole\",\n-\t\"working tree, not just the part under the current directory.\",\n-\t\"Please make it a habit to say 'git add -u .' when you mean\",\n-\t\"to only add paths under the current directory.\"\n+\t\"Since release 1.8.0, running 'git add -u' from a subdirectory\",\n+\t\"without giving any pathspec takes effect on the whole working\",\n+\t\"tree, not just the part under the current directory.\",\n+\t\"Please say 'git add -u .' if you want to only add paths under\",\n+\t\"the current directory.\"\n };\n \n static void warn_add_u_without_pathspec(void)\n@@ -403,11 +403,13 @@ int cmd_add(int argc, const char **argv, const char *prefix)\n \t\tdie(\"-A and -u are mutually incompatible\");\n \tif (!show_only && ignore_missing)\n \t\tdie(\"Option --ignore-missing can only be used together with --dry-run\");\n-\tif ((addremove || take_worktree_changes) && !argc) {\n+\n+\tif (take_worktree_changes && !argc && prefix)\n+\t\twarn_add_u_without_pathspec();\n+\n+\tif (addremove && !argc) {\n \t\tstatic const char *here[2] = { \".\", NULL };\n \n-\t\tif (take_worktree_changes && prefix)\n-\t\t\twarn_add_u_without_pathspec();\n \t\targc = 1;\n \t\targv = here;\n \t}\n-- \n1.7.4.1.514.ga171c\n"},{"id":"163843","messageId":"vpqlj09a303.fsf@bauges.imag.fr","threadId":"26805","inReplyTo":"7vpqplv65o.fsf@alter.siamese.dyndns.org","subject":"Re: What's cooking in git.git (Mar 2011, #02; Sun, 20)","fromName":"Matthieu Moy","fromEmail":"matthieu.moy@grenoble-inp.fr","sentAt":"2011-03-20T21:36:12Z","receivedAt":"2011-03-20T21:36:12Z","isPatch":false,"sender":{"key":"matthieu.moy@grenoble-inp.fr","avatar":"https://gravatar.com/avatar/72c8a2705971a25dfaff23cece15130d405685845d911aedd5667ace277f3fc5?d=mp&s=160"},"body":"Junio C Hamano <gitster@pobox.com> writes:\n\n> Unfortunately\n> we do not have a good way to let people who have already heard\n> about the transition to squelch it yet.\n\nHow about an advice.addWithoutPath config variable to disable it?\n\n-- \nMatthieu Moy\nhttp://www-verimag.imag.fr/~moy/\n"},{"id":"163850","messageId":"7vhbaxuyk7.fsf@alter.siamese.dyndns.org","threadId":"26805","inReplyTo":"vpqlj09a303.fsf@bauges.imag.fr","subject":"Re: What's cooking in git.git (Mar 2011, #02; Sun, 20)","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2011-03-21T00:06:32Z","receivedAt":"2011-03-21T00:06:32Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Matthieu Moy <Matthieu.Moy@grenoble-inp.fr> writes:\n\n> Junio C Hamano <gitster@pobox.com> writes:\n>\n>> Unfortunately\n>> we do not have a good way to let people who have already heard\n>> about the transition to squelch it yet.\n>\n> How about an advice.addWithoutPath config variable to disable it?\n\nI don't think it is worth it; I'd rather see :/ magic implemented earlier.\n\nAnother possibility is to error out on \"git add -u\" without pathspec in a\nsubdirectory as an error in 1.8.0, and then make it full-tree in 1.8.X in\na distant future, but that wouldn't be as pleasant.\n"},{"id":"163896","messageId":"20110321111643.GE16334@sigill.intra.peff.net","threadId":"26805","inReplyTo":"7vhbaxuyk7.fsf@alter.siamese.dyndns.org","subject":"Re: What's cooking in git.git (Mar 2011, #02; Sun, 20)","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2011-03-21T11:16:43Z","receivedAt":"2011-03-21T11:16:43Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Sun, Mar 20, 2011 at 05:06:32PM -0700, Junio C Hamano wrote:\n\n> Matthieu Moy <Matthieu.Moy@grenoble-inp.fr> writes:\n> \n> > Junio C Hamano <gitster@pobox.com> writes:\n> >\n> >> Unfortunately\n> >> we do not have a good way to let people who have already heard\n> >> about the transition to squelch it yet.\n> >\n> > How about an advice.addWithoutPath config variable to disable it?\n> \n> I don't think it is worth it; I'd rather see :/ magic implemented earlier.\n> \n> Another possibility is to error out on \"git add -u\" without pathspec in a\n> subdirectory as an error in 1.8.0, and then make it full-tree in 1.8.X in\n> a distant future, but that wouldn't be as pleasant.\n\nI thought we cared about giving fans of the current behavior a way to\nkeep it (without having to use additional syntax). Script-writers\nalready need to use \"./\" to be portable to old versions of git, so it's\nnot hurting them (unless you want to count N years into the future, when\nwe can discount such old versions).\n\n-Peff\n"},{"id":"163910","messageId":"7vfwqgtunj.fsf@alter.siamese.dyndns.org","threadId":"26805","inReplyTo":"20110321111643.GE16334@sigill.intra.peff.net","subject":"Re: What's cooking in git.git (Mar 2011, #02; Sun, 20)","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2011-03-21T14:28:32Z","receivedAt":"2011-03-21T14:28:32Z","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>> Matthieu Moy <Matthieu.Moy@grenoble-inp.fr> writes:\n>> \n>> > Junio C Hamano <gitster@pobox.com> writes:\n>> >\n>> >> Unfortunately\n>> >> we do not have a good way to let people who have already heard\n>> >> about the transition to squelch it yet.\n>> >\n>> > How about an advice.addWithoutPath config variable to disable it?\n>> \n>> I don't think it is worth it; I'd rather see :/ magic implemented earlier.\n>> \n>> Another possibility is to error out on \"git add -u\" without pathspec in a\n>> subdirectory as an error in 1.8.0, and then make it full-tree in 1.8.X in\n>> a distant future, but that wouldn't be as pleasant.\n>\n> I thought we cared about giving fans of the current behavior a way to\n> keep it (without having to use additional syntax). Script-writers\n> already need to use \"./\" to be portable to old versions of git, so it's\n> not hurting them (unless you want to count N years into the future, when\n> we can discount such old versions).\n\nSo you would rather have \"addu.relativetocwd\" configuration variable that\nwill warn when unset but the behaviour defaults to true for now, and later\nflip to false?\n\nI'd be in favor of that (the variable name can be painted in any color).\nThe patch series was an illustration of the logical conclusion of Duy's\npatch that punted on the migration path, and if it showed it would not be\npleasant, it served its purpose ;-).\n"},{"id":"164034","messageId":"AANLkTimsiM6k9t8H6q4cwB9i42Q4ysNJb2MYyeYYnF5D@mail.gmail.com","threadId":"26805","inReplyTo":"7vy649vah1.fsf@alter.siamese.dyndns.org","subject":"Re: What's cooking in git.git (Mar 2011, #02; Sun, 20)","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2011-03-22T10:57:58Z","receivedAt":"2011-03-22T10:57:58Z","isPatch":false,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"On Sun, Mar 20, 2011 at 20:49, Junio C Hamano <gitster@pobox.com> wrote:\n\n> [Graduated to \"master\"]\n>\n> * ab/i18n-basic (2011-02-25) 9 commits\n>  (merged to 'next' on 2011-03-10 at ab70d57)\n>  + i18n: \"make distclean\" should clean up after \"make pot\"\n>  + i18n: Makefile: \"pot\" target to extract messages marked for translation\n>  + i18n: add stub Q_() wrapper for ngettext\n>  + i18n: do not poison translations unless GIT_GETTEXT_POISON envvar is set\n>  + i18n: add GETTEXT_POISON to simulate unfriendly translator\n>  + i18n: add no-op _() and N_() wrappers\n>  + commit, status: use status_printf{,_ln,_more} helpers\n>  + commit: refer to commit template as s->fp\n>  + wt-status: add helpers for printing wt-status lines\n>  (this branch is used by ab/i18n-st.)\n\nThanks a lot for merging this down.\n\n> * ab/i18n-st (2011-02-22) 69 commits\n>  - i18n: git-shortlog basic messages\n>  - i18n: git-revert split up \"could not revert/apply\" message\n>  - i18n: git-revert literal \"me\" messages\n>  - i18n: git-revert \"Your local changes\" message\n>  - i18n: git-revert basic messages\n>  - i18n: git-notes GIT_NOTES_REWRITE_MODE error message\n>  - i18n: git-notes basic commands\n>  - i18n: git-gc \"Auto packing the repository\" message\n>  - i18n: git-gc basic messages\n>  - i18n: git-describe basic messages\n>  - i18n: git-clean clean.requireForce messages\n>  - i18n: git-clean basic messages\n>  - i18n: git-bundle basic messages\n>  - i18n: git-archive basic messages\n>  - i18n: git-status \"renamed: \" message\n>  - i18n: git-status \"Initial commit\" message\n>  - i18n: git-status \"Changes to be committed\" message\n>  - i18n: git-status shortstatus messages\n>  - i18n: git-status \"nothing to commit\" messages\n>  - i18n: git-status basic messages\n>  - i18n: git-push \"prevent you from losing\" message\n>  - i18n: git-push basic messages\n>  - i18n: git-tag tag_template message\n>  - i18n: git-tag basic messages\n>  - i18n: git-reset \"Unstaged changes after reset\" message\n>  - i18n: git-reset reset_type_names messages\n>  - i18n: git-reset basic messages\n>  - i18n: git-rm basic messages\n>  - i18n: git-mv \"bad\" messages\n>  - i18n: git-mv basic messages\n>  - i18n: git-merge \"Wonderful\" message\n>  - i18n: git-merge \"You have not concluded your merge\" messages\n>  - i18n: git-merge \"Updating %s..%s\" message\n>  - i18n: git-merge basic messages\n>  - i18n: git-log \"--OPT does not make sense\" messages\n>  - i18n: git-log basic messages\n>  - i18n: git-grep \"--open-files-in-pager\" message\n>  - i18n: git-grep basic messages\n>  - i18n: git-fetch split up \"(non-fast-forward)\" message\n>  - i18n: git-fetch update_local_ref messages\n>  - i18n: git-fetch formatting messages\n>  - i18n: git-fetch basic messages\n>  - i18n: git-diff basic messages\n>  - i18n: git-commit advice messages\n>  - i18n: git-commit \"enter the commit message\" message\n>  - i18n: git-commit print_summary messages\n>  - i18n: git-commit formatting messages\n>  - i18n: git-commit \"middle of a merge\" message\n>  - i18n: git-commit basic messages\n>  - i18n: git-checkout \"Switched to a .. branch\" message\n>  - i18n: git-checkout \"HEAD is now at\" message\n>  - i18n: git-checkout describe_detached_head messages\n>  - i18n: git-checkout: our/their version message\n>  - i18n: git-checkout basic messages\n>  - i18n: git-branch \"(no branch)\" message\n>  - i18n: git-branch \"git branch -v\" messages\n>  - i18n: git-branch \"Deleted branch [...]\" message\n>  - i18n: git-branch \"remote branch '%s' not found\" message\n>  - i18n: git-branch basic messages\n>  - i18n: git-add \"Unstaged changes\" message\n>  - i18n: git-add \"remove '%s'\" message\n>  - i18n: git-add \"did not match any files\" message\n>  - i18n: git-add \"The following paths are ignored\" message\n>  - i18n: git-add basic messages\n>  - i18n: git-clone \"Cloning into\" message\n>  - i18n: git-clone \"Cloning into\" message\n>  - i18n: git-clone basic messages\n>  - i18n: git-init \"Initialized [...] repository\" message\n>  - i18n: git-init basic messages\n\nWhat's your plan for merging this to master?\n\nOnce this is in I'll rebase my ab/i18n on master, sort out that\neval_gettext() issue you raised (maybe we don't need\ngit-sh-i18n--envsubst after all), and submit the shell script i18n\ntranslations.\n"},{"id":"164068","messageId":"7vbp13kpc8.fsf@alter.siamese.dyndns.org","threadId":"26805","inReplyTo":"AANLkTimsiM6k9t8H6q4cwB9i42Q4ysNJb2MYyeYYnF5D@mail.gmail.com","subject":"Re: What's cooking in git.git (Mar 2011, #02; Sun, 20)","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2011-03-22T18:00:23Z","receivedAt":"2011-03-22T18:00:23Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:\n\n> On Sun, Mar 20, 2011 at 20:49, Junio C Hamano <gitster@pobox.com> wrote:\n>\n>> [Graduated to \"master\"]\n>>\n>> * ab/i18n-basic (2011-02-25) 9 commits\n>>  (merged to 'next' on 2011-03-10 at ab70d57)\n>>  + i18n: \"make distclean\" should clean up after \"make pot\"\n>>  + i18n: Makefile: \"pot\" target to extract messages marked for translation\n>>  + i18n: add stub Q_() wrapper for ngettext\n>>  + i18n: do not poison translations unless GIT_GETTEXT_POISON envvar is set\n>>  + i18n: add GETTEXT_POISON to simulate unfriendly translator\n>>  + i18n: add no-op _() and N_() wrappers\n>>  + commit, status: use status_printf{,_ln,_more} helpers\n>>  + commit: refer to commit template as s->fp\n>>  + wt-status: add helpers for printing wt-status lines\n>>  (this branch is used by ab/i18n-st.)\n>\n> Thanks a lot for merging this down.\n\nHeh, thanks a lot for starting it.  Do I have to thank you every time part\nof this huge series advances???\n\n>> * ab/i18n-st (2011-02-22) 69 commits\n>> ...\n>>  - i18n: git-init basic messages\n>\n> What's your plan for merging this to master?\n\nA handful of them down to 'next' first, and then trickle them all\nreasonably quickly, but probably not before 1.7.5 happens.\n"},{"id":"164101","messageId":"7vtyeuiu07.fsf@alter.siamese.dyndns.org","threadId":"26805","inReplyTo":"20110321111643.GE16334@sigill.intra.peff.net","subject":"[PATCH] add: make \"add -u/-A\" update full tree without pathspec","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2011-03-23T00:02:32Z","receivedAt":"2011-03-23T00:02:32Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"When -u was introduced in dfdac5d (git-add -u: match the index with\nworking tree., 2007-04-20), \"add -u\" (without pathspec) added\neverything. Shortly after, 2ed2c22 (git-add -u paths... now works from\nsubdirectory, 2007-08-16) broke it while fixing something related.\n\nThis makes -u and -A inconsistent with some other options, namely -p.\nIt's been four years since the unintentional breakage and people are\nprobably used to \"git add -u\" updating only current directory.\n\nLet's plan in 1.8.0 to change its behaviour in such a way that does\nnot hurt existing users too badly during the transition period.\n\n - A new add.treewideupdate configuration variable can be set to\n   \"true\" to make \"add -u/-A\" that is ran without any pathspec from\n   a subdirectory to affect the whole tree.  When the variable is\n   set to \"false\", the operation is limited to the current working\n   directory.\n\n - Missing configuration variable means the same thing as setting it\n   to \"false\" for now, but the user will be given a warning about\n   the transition plan, and an advise to either set the variable or\n   to say \".\"\n\n - In 1.8.0, the warning message needs to be rephrased, the added\n   test needs to be updated, and the default value for the variable\n   needs to be flipped to \"true\".  In a few releases after that, we\n   would remove the warning message.\n\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\n---\n\n * So how about an alternative with a bit saner migration path?\n   The message would need rewording, though.\n\n builtin/add.c         |   47 ++++++++++++++++++++++++++++++++++++++++++-----\n t/t2200-add-update.sh |   49 +++++++++++++++++++++++++++++++++++++++++++++++++\n 2 files changed, 91 insertions(+), 5 deletions(-)\n\ndiff --git a/builtin/add.c b/builtin/add.c\nindex e127d5a..595f5cc 100644\n--- a/builtin/add.c\n+++ b/builtin/add.c\n@@ -310,6 +310,7 @@ static const char ignore_error[] =\n \n static int verbose = 0, show_only = 0, ignored_too = 0, refresh_only = 0;\n static int ignore_add_errors, addremove, intent_to_add, ignore_missing = 0;\n+static int default_tree_wide_update = -1;\n \n static struct option builtin_add_options[] = {\n \tOPT__DRY_RUN(&show_only, \"dry run\"),\n@@ -335,6 +336,10 @@ static int add_config(const char *var, const char *value, void *cb)\n \t\tignore_add_errors = git_config_bool(var, value);\n \t\treturn 0;\n \t}\n+\tif (!strcasecmp(var, \"add.treewideupdate\")) {\n+\t\tdefault_tree_wide_update = git_config_bool(var, value);\n+\t\treturn 0;\n+\t}\n \treturn git_default_config(var, value, cb);\n }\n \n@@ -359,6 +364,29 @@ static int add_files(struct dir_struct *dir, int flags)\n \treturn exit_status;\n }\n \n+static const char *warn_add_uA_180_migration_msg[] = {\n+\t\"In release 1.8.0, running 'git add -u' (or 'git add -A') from\",\n+\t\"a subdirectory without giving any pathspec WILL take effect\",\n+\t\"on the whole working tree, not just the part under the current\",\n+\t\"directory. You can set add.treewideupdate configuration variable\",\n+\t\"to 'false' to keep the current behaviour.\",\n+\t\"You can set the configuration variable to 'true' to make the\",\n+\t\"'git add -u/-A' command without pathspec take effect on the whole\",\n+\t\"working tree now. If you do so, you can use '.' at the end of\",\n+\t\"the command, e.g. 'git add -u .' when you want to limit the\",\n+\t\"operation to the current directory.\",\n+\t\"This warning will be issued until you set the configuration variable\",\n+\t\"to either 'true' or 'false'.\"\n+};\n+\n+static int warn_180_migration(void)\n+{\n+\tint i;\n+\tfor (i = 0; i < ARRAY_SIZE(warn_add_uA_180_migration_msg); i++)\n+\t\twarning(\"%s\", warn_add_uA_180_migration_msg[i]);\n+\treturn 0; /* default to \"no\" (not tree-wide, i.e. local) */\n+}\n+\n int cmd_add(int argc, const char **argv, const char *prefix)\n {\n \tint exit_status = 0;\n@@ -368,6 +396,7 @@ int cmd_add(int argc, const char **argv, const char *prefix)\n \tint flags;\n \tint add_new_files;\n \tint require_pathspec;\n+\tint whole_tree_add = 0;\n \tchar *seen = NULL;\n \n \tgit_config(add_config, NULL);\n@@ -389,9 +418,13 @@ int cmd_add(int argc, const char **argv, const char *prefix)\n \tif (!show_only && ignore_missing)\n \t\tdie(\"Option --ignore-missing can only be used together with --dry-run\");\n \tif ((addremove || take_worktree_changes) && !argc) {\n-\t\tstatic const char *here[2] = { \".\", NULL };\n-\t\targc = 1;\n-\t\targv = here;\n+\t\twhole_tree_add = 1;\n+\t\tif (prefix) {\n+\t\t\tif (default_tree_wide_update < 0)\n+\t\t\t\tdefault_tree_wide_update = warn_180_migration();\n+\t\t\tif (!default_tree_wide_update)\n+\t\t\t\twhole_tree_add = 0;\n+\t\t}\n \t}\n \n \tadd_new_files = !take_worktree_changes && !refresh_only;\n@@ -406,12 +439,16 @@ int cmd_add(int argc, const char **argv, const char *prefix)\n \t\t (!(addremove || take_worktree_changes)\n \t\t  ? ADD_CACHE_IGNORE_REMOVAL : 0));\n \n-\tif (require_pathspec && argc == 0) {\n+\tif (require_pathspec && !(argc || whole_tree_add)) {\n \t\tfprintf(stderr, \"Nothing specified, nothing added.\\n\");\n \t\tfprintf(stderr, \"Maybe you wanted to say 'git add .'?\\n\");\n \t\treturn 0;\n \t}\n-\tpathspec = validate_pathspec(argc, argv, prefix);\n+\n+\tif (whole_tree_add)\n+\t\tpathspec = NULL;\n+\telse\n+\t\tpathspec = validate_pathspec(argc, argv, prefix);\n \n \tif (read_cache() < 0)\n \t\tdie(\"index file corrupt\");\ndiff --git a/t/t2200-add-update.sh b/t/t2200-add-update.sh\nindex 0692427..7ac8b70 100755\n--- a/t/t2200-add-update.sh\n+++ b/t/t2200-add-update.sh\n@@ -80,6 +80,55 @@ test_expect_success 'change gets noticed' '\n \n '\n \n+test_expect_success 'update from a subdirectory without pathspec (no config)' '\n+\t# This test needs to be updated to expect the whole tree\n+\t# update after 1.8.0 migration.\n+\ttest_might_fail git config --remove add.treewideupdate &&\n+\ttest_might_fail git reset check dir1 &&\n+\techo changed >check &&\n+\t(\n+\t\tcd dir1 &&\n+\t\techo even more >sub2 &&\n+\t\tgit add -u 2>../expect.warning\n+\t) &&\n+\tgit diff-files --name-only dir1 check >actual &&\n+\techo check >expect &&\n+\ttest_cmp expect actual &&\n+\tgrep warning expect.warning\n+'\n+\n+test_expect_success 'update from a subdirectory without pathspec (local)' '\n+\ttest_when_finished \"git config --remove add.treewideupdate; :\" &&\n+\tgit config add.treewideupdate false &&\n+\ttest_might_fail git reset check dir1 &&\n+\techo changed >check &&\n+\t(\n+\t\tcd dir1 &&\n+\t\techo even more >sub2 &&\n+\t\tgit add -u 2>../expect.warning\n+\t) &&\n+\tgit diff-files --name-only dir1 check >actual &&\n+\techo check >expect &&\n+\ttest_cmp expect actual &&\n+\t! grep warning expect.warning\n+'\n+\n+test_expect_success 'update from a subdirectory without pathspec (global)' '\n+\ttest_when_finished \"git config --remove add.treewideupdate; :\" &&\n+\tgit config add.treewideupdate true &&\n+\ttest_might_fail git reset check dir1 &&\n+\techo changed >check &&\n+\t(\n+\t\tcd dir1 &&\n+\t\techo even more >sub2 &&\n+\t\tgit add -u 2>../expect.warning\n+\t) &&\n+\tgit diff-files --name-only dir1 check >actual &&\n+\t: >expect &&\n+\ttest_cmp expect actual &&\n+\t! grep warning expect.warning\n+'\n+\n test_expect_success SYMLINKS 'replace a file with a symlink' '\n \n \trm foo &&\n-- \n1.7.4.1.559.ga7cf60f\n"},{"id":"164109","messageId":"7v7hbqifej.fsf_-_@alter.siamese.dyndns.org","threadId":"26805","inReplyTo":"7vtyeuiu07.fsf@alter.siamese.dyndns.org","subject":"[PATCH] add: make \"add -u/-A\" update full tree without pathspec (step 2)","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2011-03-23T05:17:56Z","receivedAt":"2011-03-23T05:17:56Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Flip the default behaviour when \"git add -u/-A\" is run without a\npathspec from a subdirectory to tree-wide, and reword the advice\nmessage.\n\nWe will need to keep the advice message for a while to help people\nwho skipped the 1.8.0 boundary.\n\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\n---\n\n * This is how 1.8.0 \"flip the default\" would look like.\n\n builtin/add.c         |   20 +++++++++-----------\n t/t2200-add-update.sh |    5 ++---\n 2 files changed, 11 insertions(+), 14 deletions(-)\n\ndiff --git a/builtin/add.c b/builtin/add.c\nindex 595f5cc..1d76d55 100644\n--- a/builtin/add.c\n+++ b/builtin/add.c\n@@ -365,17 +365,15 @@ static int add_files(struct dir_struct *dir, int flags)\n }\n \n static const char *warn_add_uA_180_migration_msg[] = {\n-\t\"In release 1.8.0, running 'git add -u' (or 'git add -A') from\",\n-\t\"a subdirectory without giving any pathspec WILL take effect\",\n+\t\"Since release 1.8.0, running 'git add -u' (or 'git add -A')\",\n+\t\"from a subdirectory without giving any pathspec takes effect\",\n \t\"on the whole working tree, not just the part under the current\",\n-\t\"directory. You can set add.treewideupdate configuration variable\",\n-\t\"to 'false' to keep the current behaviour.\",\n-\t\"You can set the configuration variable to 'true' to make the\",\n-\t\"'git add -u/-A' command without pathspec take effect on the whole\",\n-\t\"working tree now. If you do so, you can use '.' at the end of\",\n-\t\"the command, e.g. 'git add -u .' when you want to limit the\",\n-\t\"operation to the current directory.\",\n-\t\"This warning will be issued until you set the configuration variable\",\n+\t\"directory. If you want to limit the operation to the current\",\n+\t\"directory, please add '.' at the end of the command, like\",\n+\t\"'git add -u .'\",\n+\t\"Alternatively, you can set add.treewideupdate configuration\",\n+\t\"variable to 'false' to keep using the old behaviour.\",\n+\t\"This warning will be issued until you set the variable\",\n \t\"to either 'true' or 'false'.\"\n };\n \n@@ -384,7 +382,7 @@ static int warn_180_migration(void)\n \tint i;\n \tfor (i = 0; i < ARRAY_SIZE(warn_add_uA_180_migration_msg); i++)\n \t\twarning(\"%s\", warn_add_uA_180_migration_msg[i]);\n-\treturn 0; /* default to \"no\" (not tree-wide, i.e. local) */\n+\treturn 1; /* default to \"true\" (tree-wide, i.e. not local) */\n }\n \n int cmd_add(int argc, const char **argv, const char *prefix)\ndiff --git a/t/t2200-add-update.sh b/t/t2200-add-update.sh\nindex 7ac8b70..97478cd 100755\n--- a/t/t2200-add-update.sh\n+++ b/t/t2200-add-update.sh\n@@ -81,8 +81,7 @@ test_expect_success 'change gets noticed' '\n '\n \n test_expect_success 'update from a subdirectory without pathspec (no config)' '\n-\t# This test needs to be updated to expect the whole tree\n-\t# update after 1.8.0 migration.\n+\t# This test needs to be adjusted when warning message is removed\n \ttest_might_fail git config --remove add.treewideupdate &&\n \ttest_might_fail git reset check dir1 &&\n \techo changed >check &&\n@@ -92,7 +91,7 @@ test_expect_success 'update from a subdirectory without pathspec (no config)' '\n \t\tgit add -u 2>../expect.warning\n \t) &&\n \tgit diff-files --name-only dir1 check >actual &&\n-\techo check >expect &&\n+\t: >expect &&\n \ttest_cmp expect actual &&\n \tgrep warning expect.warning\n '\n-- \n1.7.4.1.559.ga7cf60f\n"},{"id":"164110","messageId":"7v1v1yifc9.fsf_-_@alter.siamese.dyndns.org","threadId":"26805","inReplyTo":"7v7hbqifej.fsf_-_@alter.siamese.dyndns.org","subject":"[PATCH] add: make \"add -u/-A\" update full tree without pathspec (step 3)","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2011-03-23T05:19:18Z","receivedAt":"2011-03-23T05:19:18Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Now long after 1.8.0 happened, people should have got used to the\nnew default behaviour and it is no longer necessary to give the\nmigration advice anymore.\n\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\n---\n\n * And this concludes the two-year long series from the future ;-)\n\n builtin/add.c         |   23 +----------------------\n t/t2200-add-update.sh |    3 +--\n 2 files changed, 2 insertions(+), 24 deletions(-)\n\ndiff --git a/builtin/add.c b/builtin/add.c\nindex 1d76d55..71f3aa5 100644\n--- a/builtin/add.c\n+++ b/builtin/add.c\n@@ -364,27 +364,6 @@ static int add_files(struct dir_struct *dir, int flags)\n \treturn exit_status;\n }\n \n-static const char *warn_add_uA_180_migration_msg[] = {\n-\t\"Since release 1.8.0, running 'git add -u' (or 'git add -A')\",\n-\t\"from a subdirectory without giving any pathspec takes effect\",\n-\t\"on the whole working tree, not just the part under the current\",\n-\t\"directory. If you want to limit the operation to the current\",\n-\t\"directory, please add '.' at the end of the command, like\",\n-\t\"'git add -u .'\",\n-\t\"Alternatively, you can set add.treewideupdate configuration\",\n-\t\"variable to 'false' to keep using the old behaviour.\",\n-\t\"This warning will be issued until you set the variable\",\n-\t\"to either 'true' or 'false'.\"\n-};\n-\n-static int warn_180_migration(void)\n-{\n-\tint i;\n-\tfor (i = 0; i < ARRAY_SIZE(warn_add_uA_180_migration_msg); i++)\n-\t\twarning(\"%s\", warn_add_uA_180_migration_msg[i]);\n-\treturn 1; /* default to \"true\" (tree-wide, i.e. not local) */\n-}\n-\n int cmd_add(int argc, const char **argv, const char *prefix)\n {\n \tint exit_status = 0;\n@@ -419,7 +398,7 @@ int cmd_add(int argc, const char **argv, const char *prefix)\n \t\twhole_tree_add = 1;\n \t\tif (prefix) {\n \t\t\tif (default_tree_wide_update < 0)\n-\t\t\t\tdefault_tree_wide_update = warn_180_migration();\n+\t\t\t\tdefault_tree_wide_update = 1;\n \t\t\tif (!default_tree_wide_update)\n \t\t\t\twhole_tree_add = 0;\n \t\t}\ndiff --git a/t/t2200-add-update.sh b/t/t2200-add-update.sh\nindex 97478cd..8479ff2 100755\n--- a/t/t2200-add-update.sh\n+++ b/t/t2200-add-update.sh\n@@ -81,7 +81,6 @@ test_expect_success 'change gets noticed' '\n '\n \n test_expect_success 'update from a subdirectory without pathspec (no config)' '\n-\t# This test needs to be adjusted when warning message is removed\n \ttest_might_fail git config --remove add.treewideupdate &&\n \ttest_might_fail git reset check dir1 &&\n \techo changed >check &&\n@@ -93,7 +92,7 @@ test_expect_success 'update from a subdirectory without pathspec (no config)' '\n \tgit diff-files --name-only dir1 check >actual &&\n \t: >expect &&\n \ttest_cmp expect actual &&\n-\tgrep warning expect.warning\n+\t! grep warning expect.warning\n '\n \n test_expect_success 'update from a subdirectory without pathspec (local)' '\n-- \n1.7.4.1.586.g183369\n"},{"id":"164144","messageId":"AANLkTikBQg_pT2NX9vQc+DcB+4HA35VXBpQyRtAU_ewG@mail.gmail.com","threadId":"26805","inReplyTo":"7v1v1yifc9.fsf_-_@alter.siamese.dyndns.org","subject":"Re: [PATCH] add: make \"add -u/-A\" update full tree without pathspec (step 3)","fromName":"Nguyen Thai Ngoc Duy","fromEmail":"pclouds@gmail.com","sentAt":"2011-03-23T14:02:46Z","receivedAt":"2011-03-23T14:02:46Z","isPatch":true,"sender":{"key":"pclouds@gmail.com","avatar":"https://avatars.githubusercontent.com/u/720?v=4"},"body":"2011/3/23 Junio C Hamano <gitster@pobox.com>:\n> Now long after 1.8.0 happened, people should have got used to the\n> new default behaviour and it is no longer necessary to give the\n> migration advice anymore.\n>\n> Signed-off-by: Junio C Hamano <gitster@pobox.com>\n> ---\n>\n>  * And this concludes the two-year long series from the future ;-)\n\nBeautiful.\n\nI'd expect you kill add.treewideupdate too. Say one year after this\npatch, we can start to annoy users asking them to remove\nadd.treewideupdate and switch to new behavior. Another year goes by,\nwe refuse to work with those who still keep add.treewideupdate config.\n\nA consistent default behavior is a good thing. If I help a git user\nand later realize \"git add -u\" on their machine does not work as I\nexpect it to be, it'd be less pleasant.\n-- \nDuy\n"},{"id":"164157","messageId":"7vk4fpg7dj.fsf@alter.siamese.dyndns.org","threadId":"26805","inReplyTo":"AANLkTikBQg_pT2NX9vQc+DcB+4HA35VXBpQyRtAU_ewG@mail.gmail.com","subject":"Re: [PATCH] add: make \"add -u/-A\" update full tree without pathspec (step 3)","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2011-03-23T15:54:16Z","receivedAt":"2011-03-23T15:54:16Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Nguyen Thai Ngoc Duy <pclouds@gmail.com> writes:\n\n> I'd expect you kill add.treewideupdate too.\n\nOf course not.  That move would be _only_ to break and irritate users who\nare content with the behaviour they have chosen to use.\n\nWhat is your justification?\n\nI wouldn't be defending such a change in the flamewar after a release of\nsuch a version, so you'd better start preparing one for your forked git\nproject if you plan to release one with such a misfeature ;-).\n"}]}