summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2010-07-14git --paginate: paginate external commands againLibravatar Jonathan Nieder2-12/+38
73e25e7c (git --paginate: do not commit pager choice too early, 2010-06-26) failed to take some cases into account. 1b. Builtins that do not use RUN_SETUP (like git config) do not find GIT_DIR set correctly when the pager is launched from run_builtin(). So the core.pager configuration is not honored from subdirectories of the toplevel for them. 4a. External git commands (like git request-pull) relied on the early pager launch to take care of handling the -p option. Ever since 73e25e7c, they do not honor the -p option at all. 4b. Commands invoked through ! aliases (like ls) were also relying on the early pager launch. Fix (4a) by launching the pager (if requested) before running such a “dashed external”. For simplicity, this still does not search for a .git directory before running the external command; when run from a subdirectory of the toplevel, therefore, the “[core] pager” configuration is still not honored. Fix (4b) by launching pager if requested before carrying out such an alias. Actually doing this has no effect, since the pager (if any) would have already been launched in a failed attempt to try a dashed external first. The choice-of-pager-not-honored-from- subdirectory bug still applies here, too. (1b) is not a regression. There is no need to fix it yet. Noticed by Junio. Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-06-28git --paginate: do not commit pager choice too earlyLibravatar Nguyễn Thái Ngọc Duy2-13/+47
When git is passed the --paginate option, starting up a pager requires deciding what pager to start, which requires access to the core.pager configuration. At the relevant moment, the repository has not been searched for yet. Attempting to access the configuration at this point results in git_dir being set to .git [*], which is almost certainly not what was wanted. In particular, when run from a subdirectory of the toplevel, git --paginate does not respect the core.pager setting from the current repository. [*] unless GIT_DIR or GIT_CONFIG is set So delay the pager startup when possible: 1. run_argv() already commits pager choice inside run_builtin() if a command is found. For commands that use RUN_SETUP, waiting until then fixes the problem described above: once git knows where to look, it happily respects the core.pager setting. 2. list_common_cmds_help() prints out 29 lines and exits. This can benefit from pagination, so we need to commit the pager choice before writing this output. Luckily ‘git’ without subcommand has no other reason to access a repository, so it would be intuitive to ignore repository-local configuration in this case. Simpler for now to choose a pager using the funny code that notices a repository that happens to be at .git. That this accesses a repository when it is very convenient to is a bug but not an important one. 3. help_unknown_cmd() prints out a few lines to stderr. It is not important to paginate this, so don’t. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Acked-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-06-28tests: local config file should be honored from subdirs of toplevelLibravatar Jonathan Nieder1-0/+26
When git is passed the --paginate option, starting up a pager requires deciding what pager to start, which requires access to the core.pager configuration. If --paginate is handled before searching for the git dir, this configuration will be missed. In other words, with --paginate and only with --paginate, any repository-local core.pager setting is being ignored [*]. [*] unless the git directory is ./.git or GIT_DIR or GIT_CONFIG was set explicitly. Add a test to demonstrate this counterintuitive behavior. Noticed while reading over a patch by Duy that fixes it. Cc: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Improved-by: Johannes Sixt <j6t@kdbg.org> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Acked-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-06-28t7006: test pager configuration for several git commandsLibravatar Jonathan Nieder1-52/+84
Test choice of pager at several stages of repository setup. This provides some (admittedly uninteresting) examples to keep in mind when considering changes to the setup procedure. Improved-by: Johannes Sixt <j6t@kdbg.org> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Acked-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-06-28t7006 (pager): introduce helper for parameterized testsLibravatar Jonathan Nieder1-18/+54
The current tests test pager configuration for ‘git log’, but other commands use a different setup procedure and should therefore be tested separately. Add a helper to make this easier. This patch introduces the helper and changes some existing tests to use it. The only functional change should be the introduction of ‘git log - ’ to a few test descriptions. Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Acked-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-06-27Git 1.7.2-rc0Libravatar Junio C Hamano1-1/+11
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-06-27Merge branch 'cp/textconv-cat-file'Libravatar Junio C Hamano7-15/+155
* cp/textconv-cat-file: git-cat-file.txt: Document --textconv t/t8007: test textconv support for cat-file textconv: support for cat_file sha1_name: add get_sha1_with_context()
2010-06-27Merge branch 'pb/maint-perl-errmsg-no-dir'Libravatar Junio C Hamano1-2/+2
* pb/maint-perl-errmsg-no-dir: Git.pm: better error message
2010-06-27Merge branch 'tr/send-email-8bit'Libravatar Junio C Hamano3-0/+146
* tr/send-email-8bit: send-email: ask about and declare 8bit mails
2010-06-27Merge branch 'js/maint-am-rebase-invalid-author'Libravatar Junio C Hamano2-6/+17
* js/maint-am-rebase-invalid-author: am: use get_author_ident_from_commit instead of mailinfo when rebasing
2010-06-27Merge branch 'ab/blame-textconv'Libravatar Junio C Hamano4-21/+165
* ab/blame-textconv: t/t8006: test textconv support for blame textconv: support for blame textconv: make the API public Conflicts: diff.h
2010-06-27Merge branch 'jn/show-num-walks'Libravatar Junio C Hamano1-0/+4
* jn/show-num-walks: DWIM 'git show -5' to 'git show --do-walk -5'
2010-06-25Merge branch 'maint'Libravatar Junio C Hamano5-10/+10
* maint: msvc: Fix some compiler warnings Documentation: grep: fix asciidoc problem with -- msvc: Fix some "expr evaluates to function" compiler warnings
2010-06-25msvc: Fix some compiler warningsLibravatar Ramsay Jones1-4/+4
In particular, using the normal (or production) compiler warning level (-W3), msvc complains as follows: .../sha1.c(244) : warning C4018: '<' : signed/unsigned mismatch .../sha1.c(270) : warning C4244: 'function' : conversion from \ 'unsigned __int64' to 'unsigned long', possible loss of data .../sha1.c(271) : warning C4244: 'function' : conversion from \ 'unsigned __int64' to 'unsigned long', possible loss of data Note that gcc issues a similar complaint about line 244 when compiling with -Wextra. Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-06-25Documentation: grep: fix asciidoc problem with --Libravatar Christian Couder1-1/+1
Asciidoc interprets two dashes separated by spaces as a single big dash. So let's escape the first dash, so that "\--" will properly appear as "--". Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-06-24git-cat-file.txt: Document --textconvLibravatar Michael J Gruber1-2/+8
Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-06-24msvc: Fix some "expr evaluates to function" compiler warningsLibravatar Ramsay Jones3-5/+5
In particular, the following warning is issued while compiling notes.c: notes.c(927) : warning C4550: expression evaluates to a \ function which is missing an argument list along with identical warnings on lines 928, 1016 and 1017. In order to suppress the warning, we change the definition of combine_notes_fn, so that the symbol type is an (explicit) "pointer to function ...". As a result, several other declarations need some minor fix-up to take account of the new typedef. Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk> Acked-by: Johan Herland <johan@herland.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-06-23Merge branch 'jk/url-decode'Libravatar Junio C Hamano1-10/+18
* jk/url-decode: url.c: "<scheme>://" part at the beginning should not be URL decoded
2010-06-23url.c: "<scheme>://" part at the beginning should not be URL decodedLibravatar Junio C Hamano1-10/+18
When using the protocol git+ssh:// for example we do not want to decode the '+' as a space. The url decoding must take place only for the server name and parameters. This fixes a regression introduced in 9d2e942. Initial-fix-by: Pascal Obry <pascal.obry@gmail.com> Acked-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-06-22Update draft release notes to 1.7.2Libravatar Junio C Hamano1-12/+41
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-06-22Merge branch 'jc/maint-simpler-common-prefix'Libravatar Junio C Hamano1-13/+13
* jc/maint-simpler-common-prefix: common_prefix: simplify and fix scanning for prefixes
2010-06-22Merge branch 'sb/format-patch-signature'Libravatar Junio C Hamano6-4/+85
* sb/format-patch-signature: completion: Add --signature and format.signature format-patch: Add a signature option (--signature)
2010-06-22Merge branch 'mg/pretty-magic-space'Libravatar Junio C Hamano3-4/+25
* mg/pretty-magic-space: pretty: Introduce ' ' modifier to add space if non-empty Conflicts: pretty.c
2010-06-22Merge branch 'jn/gitweb-return-or-exit-cleanup'Libravatar Junio C Hamano1-0/+9
* jn/gitweb-return-or-exit-cleanup: gitweb: Return or exit after done serving request Conflicts: gitweb/gitweb.perl
2010-06-22Merge branch 'bd/maint-unpack-trees-parawalk-fix'Libravatar Junio C Hamano1-2/+10
* bd/maint-unpack-trees-parawalk-fix: unpack-trees: Make index lookahead less pessimal
2010-06-22Merge branch 'cc/cherry-pick-series'Libravatar Junio C Hamano4-66/+264
* cc/cherry-pick-series: Documentation/revert: describe passing more than one commit Documentation/cherry-pick: describe passing more than one commit revert: add tests to check cherry-picking many commits revert: allow cherry-picking more than one commit revert: change help_msg() to take no argument revert: refactor code into a do_pick_commit() function revert: use run_command_v_opt() instead of execv_git_cmd() revert: cleanup code for -x option
2010-06-22Merge branch 'jc/rev-list-ancestry-path'Libravatar Junio C Hamano4-3/+226
* jc/rev-list-ancestry-path: revision: Turn off history simplification in --ancestry-path mode revision: Fix typo in --ancestry-path error message Documentation/rev-list-options.txt: Explain --ancestry-path Documentation/rev-list-options.txt: Fix missing line in example history graph revision: --ancestry-path
2010-06-22Merge branch 'lt/extended-sha1-match-commit-with-regexp'Libravatar Junio C Hamano1-3/+9
* lt/extended-sha1-match-commit-with-regexp: Make :/ accept a regex rather than a fixed pattern
2010-06-22Merge branch 'maint'Libravatar Junio C Hamano4-4/+24
* maint: Update draft release notes to 1.7.1.1 tests: remove unnecessary '^' from 'expr' regular expression Conflicts: diff.c
2010-06-22Update draft release notes to 1.7.1.1Libravatar Junio C Hamano1-0/+21
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-06-22Merge branch 'ic/maint-rebase-i-abort' into maintLibravatar Junio C Hamano2-1/+12
* ic/maint-rebase-i-abort: rebase -i: Abort cleanly if new base cannot be checked out
2010-06-22Merge branch 'cc/maint-commit-reflog-msg' into maintLibravatar Junio C Hamano2-6/+13
* cc/maint-commit-reflog-msg: commit: use value of GIT_REFLOG_ACTION env variable as reflog message
2010-06-22Merge branch 'jk/maint-advice-empty-amend' into maintLibravatar Junio C Hamano1-0/+7
* jk/maint-advice-empty-amend: commit: give advice on empty amend
2010-06-22Merge branch 'tc/commit-abbrev-fix' into maintLibravatar Junio C Hamano2-6/+72
* tc/commit-abbrev-fix: commit::print_summary(): don't use format_commit_message() t7502-commit: add summary output tests for empty and merge commits t7502-commit: add tests for summary output
2010-06-22Merge branch 'jn/document-rebase-i-p-limitation' into maintLibravatar Junio C Hamano2-0/+33
* jn/document-rebase-i-p-limitation: rebase -i -p: document shortcomings
2010-06-22Merge branch 'jn/checkout-doc' into maintLibravatar Junio C Hamano1-23/+31
* jn/checkout-doc: Documentation/checkout: clarify description Documentation/checkout: clarify description
2010-06-22Merge branch 'cc/maint-diff-CC-binary' into maintLibravatar Junio C Hamano3-5/+98
* cc/maint-diff-CC-binary: diff: fix "git show -C -C" output when renaming a binary file Conflicts: diff.c
2010-06-22Merge branch 'jc/t9129-any-utf8' into maintLibravatar Junio C Hamano1-7/+13
* jc/t9129-any-utf8: t9129: fix UTF-8 locale detection
2010-06-22Merge branch 'cb/ls-files-cdup' into maintLibravatar Junio C Hamano4-71/+110
* cb/ls-files-cdup: ls-files: allow relative pathspec quote.c: separate quoting and relative path generation
2010-06-22Merge branch 'tc/merge-m-log' into maintLibravatar Junio C Hamano5-41/+87
* tc/merge-m-log: merge: --log appends shortlog to message if specified fmt-merge-msg: add function to append shortlog only fmt-merge-msg: refactor merge title formatting fmt-merge-msg: minor refactor of fmt_merge_msg() merge: rename variable merge: update comment t7604-merge-custom-message: show that --log doesn't append to -m t7604-merge-custom-message: shift expected output creation
2010-06-22Merge branch 'ph/clone-message-reword' into maintLibravatar Junio C Hamano1-1/+2
* ph/clone-message-reword: clone: reword messages to match the end-user perception
2010-06-22Merge branch 'jn/maint-amend-missing-name' into maintLibravatar Junio C Hamano2-7/+59
* jn/maint-amend-missing-name: commit --amend: cope with missing display name
2010-06-22Merge branch 'pc/remove-warn' into maintLibravatar Junio C Hamano6-21/+68
* pc/remove-warn: Remove a redundant errno test in a usage of remove_path Introduce remove_or_warn function Implement the rmdir_or_warn function Generalise the unlink_or_warn function
2010-06-21tests: remove unnecessary '^' from 'expr' regular expressionLibravatar Junio C Hamano2-3/+3
As Brandon noticed, a regular expression match given to 'expr' is already anchored at the beginning. Some versions of expr even complain about this. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-06-21Merge branch 'js/maint-receive-pack-symref-alias'Libravatar Junio C Hamano0-0/+0
* js/maint-receive-pack-symref-alias:
2010-06-21Merge branch 'cc/maint-commit-reflog-msg'Libravatar Junio C Hamano2-6/+13
* cc/maint-commit-reflog-msg: commit: use value of GIT_REFLOG_ACTION env variable as reflog message
2010-06-21Merge branch 'ic/maint-rebase-i-abort'Libravatar Junio C Hamano2-1/+12
* ic/maint-rebase-i-abort: rebase -i: Abort cleanly if new base cannot be checked out
2010-06-21Merge branch 'jk/maint-advice-empty-amend'Libravatar Junio C Hamano1-0/+7
* jk/maint-advice-empty-amend: commit: give advice on empty amend
2010-06-21Merge branch 'eb/core-eol'Libravatar Junio C Hamano12-110/+570
* eb/core-eol: Add "core.eol" config variable Rename the "crlf" attribute "text" Add per-repository eol normalization Add tests for per-repository eol normalization Conflicts: Documentation/config.txt Makefile
2010-06-21Merge branch 'fg/autocrlf'Libravatar Junio C Hamano2-0/+101
* fg/autocrlf: autocrlf: Make it work also for un-normalized repositories