From 661bfd13b49db0affebbdda5ac478ebe67634947 Mon Sep 17 00:00:00 2001 From: Stefano Lattarini Date: Fri, 2 Mar 2012 19:48:36 +0100 Subject: [PATCH 1/8] tests: fix spurious error when run directly with Solaris /usr/xpg4/bin/sh If any test script is run directly with Solaris 10 /usr/xpg4/bin/sh or /bin/ksh, it fails spuriously with a message like: t0000-basic.sh[31]: unset: bad argument count This happens because those shells bail out when encountering a call to "unset" with no arguments, and such unset call could take place in 'test-lib.sh'. Fix that issue, and add a proper comment to ensure we don't regress in this respect. Signed-off-by: Stefano Lattarini Signed-off-by: Junio C Hamano --- t/test-lib.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/t/test-lib.sh b/t/test-lib.sh index a089a18864..c0d04c494a 100644 --- a/t/test-lib.sh +++ b/t/test-lib.sh @@ -42,10 +42,11 @@ TZ=UTC TERM=dumb export LANG LC_ALL PAGER TERM TZ EDITOR=: -unset VISUAL -unset EMAIL -unset LANGUAGE -unset $(perl -e ' +# A call to "unset" with no arguments causes at least Solaris 10 +# /usr/xpg4/bin/sh and /bin/ksh to bail out. So keep the unsets +# deriving from the command substitution clustered with the other +# ones. +unset VISUAL EMAIL LANGUAGE $(perl -e ' my @env = keys %ENV; my $ok = join("|", qw( TRACE From b22939a2860604bec718cfd751e930f3a8afd1cc Mon Sep 17 00:00:00 2001 From: Jakub Narebski Date: Fri, 2 Mar 2012 23:50:01 +0100 Subject: [PATCH 2/8] gitweb: Fix passing parameters to git_project_search_form The git_project_search_form() subroutine, introduced in a1e1b2d (gitweb: improve usability of projects search form, 2012-01-31) didn't get its arguments from caller correctly. Gitweb worked correctly thanks to sticky-ness of form fields in CGI.pm... but it make UTF-8 fix for project search not working. Signed-off-by: Jakub Narebski Signed-off-by: Junio C Hamano --- gitweb/gitweb.perl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl index 7729ed26b5..813571b135 100755 --- a/gitweb/gitweb.perl +++ b/gitweb/gitweb.perl @@ -5174,7 +5174,7 @@ sub git_patchset_body { # . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . sub git_project_search_form { - my ($searchtext, $search_use_regexp); + my ($searchtext, $search_use_regexp) = @_; my $limit = ''; if ($project_filter) { From fe6c64ab0b2b568755a6686c0a435fa95ef619bb Mon Sep 17 00:00:00 2001 From: Tom Grennan Date: Fri, 2 Mar 2012 18:15:34 -0800 Subject: [PATCH 3/8] t5512 (ls-remote): modernize style Prepare expected output inside test_expect_success that uses it. Also remove excess blank lines. Signed-off-by: Tom Grennan Signed-off-by: Junio C Hamano --- t/t5512-ls-remote.sh | 27 ++++----------------------- 1 file changed, 4 insertions(+), 23 deletions(-) diff --git a/t/t5512-ls-remote.sh b/t/t5512-ls-remote.sh index 5c546c99a5..6764d511ce 100755 --- a/t/t5512-ls-remote.sh +++ b/t/t5512-ls-remote.sh @@ -5,7 +5,6 @@ test_description='git ls-remote' . ./test-lib.sh test_expect_success setup ' - >file && git add file && test_tick && @@ -18,45 +17,33 @@ test_expect_success setup ' ) >expected.all && git remote add self "$(pwd)/.git" - ' test_expect_success 'ls-remote --tags .git' ' - git ls-remote --tags .git >actual && test_cmp expected.tag actual - ' test_expect_success 'ls-remote .git' ' - git ls-remote .git >actual && test_cmp expected.all actual - ' test_expect_success 'ls-remote --tags self' ' - git ls-remote --tags self >actual && test_cmp expected.tag actual - ' test_expect_success 'ls-remote self' ' - git ls-remote self >actual && test_cmp expected.all actual - ' test_expect_success 'dies when no remote specified and no default remotes found' ' - test_must_fail git ls-remote - ' test_expect_success 'use "origin" when no remote specified' ' - URL="$(pwd)/.git" && echo "From $URL" >exp_err && @@ -65,18 +52,14 @@ test_expect_success 'use "origin" when no remote specified' ' test_cmp exp_err actual_err && test_cmp expected.all actual - ' test_expect_success 'suppress "From " with -q' ' - git ls-remote -q 2>actual_err && test_must_fail test_cmp exp_err actual_err - ' test_expect_success 'use branch..remote if possible' ' - # # Test that we are indeed using branch..remote, not "origin", even # though the "origin" remote has been set. @@ -99,14 +82,13 @@ test_expect_success 'use branch..remote if possible' ' git ls-remote 2>actual_err >actual && test_cmp exp_err actual_err && test_cmp exp actual - ' -cat >exp <exp <<-\EOF && + fatal: '\''refs*master'\'' does not appear to be a git repository + fatal: The remote end hung up unexpectedly + EOF # # Do not expect "git ls-remote " to work; ls-remote, correctly, # confuses for . Although ugly, this behaviour is akin @@ -120,7 +102,6 @@ test_expect_success 'confuses pattern as remote when no remote specified' ' # role as a pattern. test_must_fail git ls-remote refs*master >actual 2>&1 && test_cmp exp actual - ' test_expect_success 'die with non-2 for wrong repository even with --exit-code' ' From 78ed1d2d63390694cb6c451896086fb7338f75b6 Mon Sep 17 00:00:00 2001 From: Michael J Gruber Date: Fri, 2 Mar 2012 19:37:35 -0500 Subject: [PATCH 4/8] t0300: work around bug in dash 0.5.6 The construct 'while IFS== read' makes dash 0.5.6 execute read without changing IFS, which results in test breakages all over the place in t0300. Neither dash 0.5.5.1 and older nor dash 0.5.7 and newer are affected: The problem was introduded resp. fixed by the commits 55c46b7 ([BUILTIN] Honor tab as IFS whitespace when splitting fields in readcmd, 2009-08-11) 1d806ac ([VAR] Do not poplocalvars prematurely on regular utilities, 2010-05-27) in http://git.kernel.org/?p=utils/dash/dash.git Putting 'IFS==' before that line makes all versions of dash work. This looks like a dash bug, not a misinterpretation of the standard. However, it's worth working around for two reasons. One, this version of dash was released in Fedora 14-16, so the bug is found in the wild. And two, at least one other shell, Solaris /bin/sh, choked on this by persisting IFS after the read invocation. That is not a shell we usually care about, and I think this use of IFS is acceptable by POSIX (which allows other behavior near "special builtins", but "read" is not one of those). But it seems that this may be a subtle, not-well-tested case for some shells. Given that the workaround is so simple, it's worth just being defensive. Signed-off-by: Michael J Gruber Signed-off-by: Jeff King Signed-off-by: Junio C Hamano --- t/t0300-credentials.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/t/t0300-credentials.sh b/t/t0300-credentials.sh index 885af8fb62..c1c8108148 100755 --- a/t/t0300-credentials.sh +++ b/t/t0300-credentials.sh @@ -8,10 +8,13 @@ test_expect_success 'setup helper scripts' ' cat >dump <<-\EOF && whoami=`echo $0 | sed s/.*git-credential-//` echo >&2 "$whoami: $*" - while IFS== read key value; do + OIFS=$IFS + IFS== + while read key value; do echo >&2 "$whoami: $key=$value" eval "$key=$value" done + IFS=$OIFS EOF cat >git-credential-useless <<-\EOF && From 38916c5b4740f6db09dc140a84bb470dfb582366 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Scharfe?= Date: Sat, 3 Mar 2012 12:00:29 +0100 Subject: [PATCH 5/8] parse-options: typo check for unknown switches The user specifies a long option but forgets to type the second leading dash, we currently detect and report that fact if its first letter is a valid short option. This is done for safety, to avoid ambiguity between short options (and their arguments) and a long option with a missing dash. This diagnostic message is also helpful for long options whose first letter is not a valid short option, however. Print it in that case, too, as a courtesy. Signed-off-by: Rene Scharfe Signed-off-by: Junio C Hamano --- parse-options.c | 2 ++ t/t0040-parse-options.sh | 10 ++++++++++ 2 files changed, 12 insertions(+) diff --git a/parse-options.c b/parse-options.c index 190899611e..850cfa78c9 100644 --- a/parse-options.c +++ b/parse-options.c @@ -393,6 +393,8 @@ int parse_options_step(struct parse_opt_ctx_t *ctx, case -1: return parse_options_usage(ctx, usagestr, options, 1); case -2: + if (ctx->opt) + check_typos(arg + 1, options); goto unknown; } if (ctx->opt) diff --git a/t/t0040-parse-options.sh b/t/t0040-parse-options.sh index a44bcb9b39..e3f354a45e 100755 --- a/t/t0040-parse-options.sh +++ b/t/t0040-parse-options.sh @@ -236,6 +236,16 @@ test_expect_success 'detect possible typos' ' test_cmp typo.err output.err ' +cat > typo.err << EOF +error: did you mean \`--ambiguous\` (with two dashes ?) +EOF + +test_expect_success 'detect possible typos' ' + test_must_fail test-parse-options -ambiguous > output 2> output.err && + test ! -s output && + test_cmp typo.err output.err +' + cat > expect < Date: Sun, 4 Mar 2012 17:50:43 +0100 Subject: [PATCH 6/8] http.proxy: also mention https_proxy and all_proxy The current wording of the http.proxy documentation suggests that http_proxy is somehow equivalent to http.proxy. However, while http.proxy (by the means of curl's CURLOPT_PROXY option) overrides the proxy for both HTTP and HTTPS protocols, the http_proxy environment variable is used only for HTTP. But since the docs mention only http_proxy, a user might expect it to apply to all HTTP-like protocols. Avoid any such misunderstanding by explicitly mentioning https_proxy and all_proxy as well. Also replace linkgit:curl[1] with a literal 'curl(1)', because the former gets translated to a dead link in the HTML pages. Signed-off-by: Clemens Buchacher Signed-off-by: Junio C Hamano --- Documentation/config.txt | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Documentation/config.txt b/Documentation/config.txt index a7a6dc071d..0e1168c066 100644 --- a/Documentation/config.txt +++ b/Documentation/config.txt @@ -1260,9 +1260,10 @@ help.autocorrect:: This is the default. http.proxy:: - Override the HTTP proxy, normally configured using the 'http_proxy' - environment variable (see linkgit:curl[1]). This can be overridden - on a per-remote basis; see remote..proxy + Override the HTTP proxy, normally configured using the 'http_proxy', + 'https_proxy', and 'all_proxy' environment variables (see + `curl(1)`). This can be overridden on a per-remote basis; see + remote..proxy http.cookiefile:: File containing previously stored cookie lines which should be used From ead8eb8c1092ce2d94d70872946829a7a946ae9d Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Sun, 4 Mar 2012 22:21:30 -0800 Subject: [PATCH 7/8] Update draft release notes to 1.7.9.3 for the last time Signed-off-by: Junio C Hamano --- Documentation/RelNotes/1.7.9.3.txt | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/Documentation/RelNotes/1.7.9.3.txt b/Documentation/RelNotes/1.7.9.3.txt index d7be177681..91c65012f9 100644 --- a/Documentation/RelNotes/1.7.9.3.txt +++ b/Documentation/RelNotes/1.7.9.3.txt @@ -11,14 +11,41 @@ Fixes since v1.7.9.2 to link the binary with -lintl even when libintl.h is missing from the system. + * When the filter driver exits before reading the content before the + main git process writes the contents to be filtered to the pipe to + it, the latter could be killed with SIGPIPE instead of ignoring + such an event as an error. + * "git add --refresh " used to warn about unmerged paths outside the given pathspec. + * The bulk check-in codepath in "git add" streamed contents that + needs smudge/clean filters without running them, instead of punting + and delegating to the codepath to run filters after slurping + everything to core. + + * "git branch --with $that" assumed incorrectly that the user will never + ask the question with nonsense value in $that. + + * "git bundle create" produced a corrupt bundle file upon seeing + commits with excessively long subject line. + + * When a remote helper exits before reading the blank line from the + main git process to signal the end of commands, the latter could be + killed with SIGPIPE. Instead we should ignore such event as a + non-error. + * The commit log template given with "git merge --edit" did not have a short instructive text like what "git commit" gives. + * "git rev-list --verify-objects -q" omitted the extra verification + it needs to do over "git rev-list --objects -q" by mistake. + * "gitweb" used to drop warnings in the log file when "heads" view is accessed in a repository whose HEAD does not point at a valid branch. + * An invalid regular expression pattern given by an end user made + "gitweb" to return garbled response. + Also contains minor fixes and documentation updates. From 4a92a1721483d6a109cf0993843b20159f8d3387 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Sun, 4 Mar 2012 23:38:02 -0800 Subject: [PATCH 8/8] Update draft release notes to 1.7.10 Signed-off-by: Junio C Hamano --- Documentation/RelNotes/1.7.10.txt | 45 ++++++++----------------------- 1 file changed, 11 insertions(+), 34 deletions(-) diff --git a/Documentation/RelNotes/1.7.10.txt b/Documentation/RelNotes/1.7.10.txt index 7813ea12cc..b966a8e853 100644 --- a/Documentation/RelNotes/1.7.10.txt +++ b/Documentation/RelNotes/1.7.10.txt @@ -52,6 +52,9 @@ UI, Workflows & Features * "git push" learned the "--prune" option, similar to "git fetch". + * "git symbolic-ref" learned the "--short" option to abbreviate the + refname it shows unambiguously. + * "git tag --list" can be given "--points-at " to limit its output to those that point at the given object. @@ -64,6 +67,9 @@ UI, Workflows & Features needed (including the ones that are not necessary for a specific task). + * Project search in "gitweb" shows the substring that matched in the + project name and description highlighted. + Foreign Interface * Improved handling of views, labels and branches in git-p4 (in contrib). @@ -112,39 +118,10 @@ Unless otherwise noted, all the fixes since v1.7.9 in the maintenance releases are contained in this release (see release notes to them for details). - * "git branch --with $that" assumed incorrectly that the user will never - ask the question with nonsense value in $that. - (merge 6c41e97 cn/maint-branch-with-bad later to maint). - - * An invalid regular expression pattern given by an end user made - "gitweb" to return garbled response. - (merge 36612e4 jn/maint-gitweb-invalid-regexp later to maint). - - * "git rev-list --verify-objects -q" omitted the extra verification - it needs to do over "git rev-list --objects -q" by mistake. - (merge 9899372 nd/maint-verify-objects later to maint). - - * The bulk check-in codepath streamed contents that needs - smudge/clean filters without running them, instead of punting and - delegating to the codepath to run filters after slurping everything - to core. - (merge 4f22b10 jk/maint-avoid-streaming-filtered-contents later to maint). - - * When the filter driver exits before reading the content before the - main git process writes the contents to be filtered to the pipe to - it, the latter could be killed with SIGPIPE instead of ignoring - such an event as an error. - (merge 6424c2a jb/filter-ignore-sigpipe later to maint). - - * When a remote helper exits before reading the blank line from the - main git process to signal the end of commands, the latter could be - killed with SIGPIPE. Instead we should ignore such event as a - non-error. - (merge c34fe63 sp/smart-http-failure-to-push later to maint). - - * "git bundle create" produced a corrupt bundle file upon seeing - commits with excessively long subject line. - (merge 8a557bb tr/maint-bundle-long-subject later to maint). + * The code to synthesize the fake ancestor tree used by 3-way merge + fallback in "git am" was not prepared to read a patch created with + a non-standard -p value. + (merge a61ba26 jc/am-3-nonstandard-popt later to maint). * "gitweb" used to drop warnings in the log file when "heads" view is accessed in a repository whose HEAD does not point at a valid @@ -152,7 +129,7 @@ details). --- exec >/var/tmp/1 -O=v1.7.9.2-358-g64d1544 +O=v1.7.9.2-383-gb8b5290 echo O=$(git describe) git log --first-parent --oneline ^maint $O.. echo