aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2009-08-05 12:37:24 -0700
committerJunio C Hamano <gitster@pobox.com>2009-08-05 12:37:24 -0700
commitf0df1293acdba9513cae17e2c63b4169f1347371 (patch)
treee4d9309caa37b13a21ad38147833ed7ee29479bd
parent46068383aa825dfe9026f9255cea07da07e06253 (diff)
parente77095e8b8d541b41c242aa6dbc8319cb99def5e (diff)
downloadgit-f0df1293acdba9513cae17e2c63b4169f1347371.tar.gz
git-f0df1293acdba9513cae17e2c63b4169f1347371.tar.xz
Merge branch 'maint-1.6.3' into maint
* maint-1.6.3: Better usage string for reflog. hg-to-git: don't import the unused popen2 module send-email: remove debug trace config: Keep inner whitespace verbatim
-rw-r--r--builtin-reflog.c2
-rw-r--r--config.c10
-rwxr-xr-xcontrib/hg-to-git/hg-to-git.py2
-rwxr-xr-xgit-send-email.perl1
-rwxr-xr-xt/t1300-repo-config.sh5
5 files changed, 11 insertions, 9 deletions
diff --git a/builtin-reflog.c b/builtin-reflog.c
index ddfdf5a3c..95198c5de 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)
{
diff --git a/config.c b/config.c
index 738b24419..e87edeab0 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/contrib/hg-to-git/hg-to-git.py b/contrib/hg-to-git/hg-to-git.py
index 7b03204ed..2a6839d81 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
diff --git a/git-send-email.perl b/git-send-email.perl
index d508f8334..0700d80af 100755
--- a/git-send-email.perl
+++ b/git-send-email.perl
@@ -450,7 +450,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(<<EOF);
diff --git a/t/t1300-repo-config.sh b/t/t1300-repo-config.sh
index 8c43dcde8..83b729401 100755
--- a/t/t1300-repo-config.sh
+++ b/t/t1300-repo-config.sh
@@ -755,6 +755,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 &&