From ebdaae372b460ffdf5d153dcd0ac235d52b0d2ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Steinbrink?= Date: Thu, 30 Jul 2009 13:41:57 +0200 Subject: config: Keep inner whitespace verbatim MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Configuration values are expected to be quoted when they have leading or trailing whitespace, but inner whitespace should be kept verbatim even if the value is not quoted. This is already documented in git-config(1), but the code caused inner whitespace to be collapsed to a single space, breaking, for example, clones from a path that has two consecutive spaces in it, as future fetches would only see a single space. Reported-by: John te Bokkel Signed-off-by: Björn Steinbrink Signed-off-by: Junio C Hamano diff --git a/config.c b/config.c index 1682273..7e5594b 100644 --- a/config.c +++ b/config.c @@ -62,7 +62,8 @@ static char *parse_value(void) if (comment) continue; if (isspace(c) && !quote) { - space = 1; + if (len) + space++; continue; } if (!quote) { @@ -71,11 +72,8 @@ static char *parse_value(void) continue; } } - if (space) { - if (len) - value[len++] = ' '; - space = 0; - } + for (; space; space--) + value[len++] = ' '; if (c == '\\') { c = get_next_char(); switch (c) { diff --git a/t/t1300-repo-config.sh b/t/t1300-repo-config.sh index 43ea283..91cbd55 100755 --- a/t/t1300-repo-config.sh +++ b/t/t1300-repo-config.sh @@ -733,6 +733,11 @@ echo >>result test_expect_success '--null --get-regexp' 'cmp result expect' +test_expect_success 'inner whitespace kept verbatim' ' + git config section.val "foo bar" && + test "z$(git config section.val)" = "zfoo bar" +' + test_expect_success SYMLINKS 'symlinked configuration' ' ln -s notyet myconfig && -- cgit v0.10.2-6-g49f6 From 69931b718307ad5adf85292b03e46d822156840a Mon Sep 17 00:00:00 2001 From: Erik Faye-Lund Date: Tue, 4 Aug 2009 21:57:34 +0000 Subject: send-email: remove debug trace Signed-off-by: Erik Faye-Lund diff --git a/git-send-email.perl b/git-send-email.perl index cccbf45..17f930f 100755 --- a/git-send-email.perl +++ b/git-send-email.perl @@ -449,7 +449,6 @@ sub check_file_rev_conflict($) { try { $repo->command('rev-parse', '--verify', '--quiet', $f); if (defined($format_patch)) { - print "foo\n"; return $format_patch; } die(< Date: Mon, 3 Aug 2009 18:41:34 +0200 Subject: hg-to-git: don't import the unused popen2 module Importing the popen2 module in Python-2.6 results in the "DeprecationWarning: The popen2 module is deprecated. Use the subprocess module." message. The module itself isn't used in fact, so just removing it solves the problem. Signed-off-by: Miklos Vajna Signed-off-by: Junio C Hamano diff --git a/contrib/hg-to-git/hg-to-git.py b/contrib/hg-to-git/hg-to-git.py index 7b03204..2a6839d 100755 --- a/contrib/hg-to-git/hg-to-git.py +++ b/contrib/hg-to-git/hg-to-git.py @@ -20,7 +20,7 @@ """ import os, os.path, sys -import tempfile, popen2, pickle, getopt +import tempfile, pickle, getopt import re # Maps hg version -> git version -- cgit v0.10.2-6-g49f6 From e77095e8b8d541b41c242aa6dbc8319cb99def5e Mon Sep 17 00:00:00 2001 From: Matthieu Moy Date: Wed, 5 Aug 2009 17:36:28 +0200 Subject: Better usage string for reflog. Signed-off-by: Matthieu Moy Signed-off-by: Junio C Hamano diff --git a/builtin-reflog.c b/builtin-reflog.c index ddfdf5a..95198c5 100644 --- a/builtin-reflog.c +++ b/builtin-reflog.c @@ -694,7 +694,7 @@ static int cmd_reflog_delete(int argc, const char **argv, const char *prefix) */ static const char reflog_usage[] = -"git reflog (expire | ...)"; +"git reflog [ show | expire | delete ]"; int cmd_reflog(int argc, const char **argv, const char *prefix) { -- cgit v0.10.2-6-g49f6 From 85738ba3df8ae7e01091b479be7f67383ce250b6 Mon Sep 17 00:00:00 2001 From: Jens Lehmann Date: Sat, 1 Aug 2009 20:49:47 +0200 Subject: Documentation: git submodule: add missing options to synopsis The option --merge was missing for submodule update and --cached for submodule summary. Signed-off-by: Jens Lehmann Signed-off-by: Junio C Hamano diff --git a/Documentation/git-submodule.txt b/Documentation/git-submodule.txt index 683ba1a..7dd73ae 100644 --- a/Documentation/git-submodule.txt +++ b/Documentation/git-submodule.txt @@ -14,8 +14,8 @@ SYNOPSIS 'git submodule' [--quiet] status [--cached] [--] [...] 'git submodule' [--quiet] init [--] [...] 'git submodule' [--quiet] update [--init] [-N|--no-fetch] [--rebase] - [--reference ] [--] [...] -'git submodule' [--quiet] summary [--summary-limit ] [commit] [--] [...] + [--reference ] [--merge] [--] [...] +'git submodule' [--quiet] summary [--cached] [--summary-limit ] [commit] [--] [...] 'git submodule' [--quiet] foreach 'git submodule' [--quiet] sync [--] [...] -- cgit v0.10.2-6-g49f6 From 46068383aa825dfe9026f9255cea07da07e06253 Mon Sep 17 00:00:00 2001 From: Jakub Narebski Date: Tue, 4 Aug 2009 17:54:32 +0200 Subject: gitweb/README: Document $base_url Signed-off-by: Jakub Narebski Signed-off-by: Junio C Hamano diff --git a/gitweb/README b/gitweb/README index 9056d1e..66c6a93 100644 --- a/gitweb/README +++ b/gitweb/README @@ -165,6 +165,12 @@ not include variables usually directly set during build): Full URL and absolute URL of gitweb script; in earlier versions of gitweb you might have need to set those variables, now there should be no need to do it. + * $base_url + Base URL for relative URLs in pages generated by gitweb, + (e.g. $logo, $favicon, @stylesheets if they are relative URLs), + needed and used only for URLs with nonempty PATH_INFO via +