Merge branch 'fc/trivial'
authorJunio C Hamano <gitster@pobox.com>
Tue, 17 Dec 2013 19:46:32 +0000 (11:46 -0800)
committerJunio C Hamano <gitster@pobox.com>
Tue, 17 Dec 2013 19:46:32 +0000 (11:46 -0800)
* fc/trivial:
remote: fix status with branch...rebase=preserve
fetch: add missing documentation
t: trivial whitespace cleanups
abspath: trivial style fix

Documentation/git-fetch.txt
abspath.c
builtin/remote.c
t/t0002-gitfile.sh
t/t0003-attributes.sh
index 10657134a80bd2cc013c34efeba0645ede368c64..5809aa4eb94e969bf700806b1ef3df504ebcfd2b 100644 (file)
@@ -37,6 +37,9 @@ or from several repositories at once if <group> is given and
 there is a remotes.<group> entry in the configuration file.
 (See linkgit:git-config[1]).
 
+When no remote is specified, by default the `origin` remote will be used,
+unless there's an upstream branch configured for the current branch.
+
 OPTIONS
 -------
 include::fetch-options.txt[]
index e390994abff32054452e878484e79c249474389f..8b3385a77749108b29d0a25042a13a174ddbc2e4 100644 (file)
--- a/abspath.c
+++ b/abspath.c
@@ -143,7 +143,7 @@ static const char *real_path_internal(const char *path, int die_on_error)
 error_out:
        free(last_elem);
        if (*cwd && chdir(cwd))
-               die_errno ("Could not change back to '%s'", cwd);
+               die_errno("Could not change back to '%s'", cwd);
 
        return retval;
 }
index f532f354579dc8af7905295a1f3c499e4c18fe11..119e9151ad7fb2a9bcc52d5673a7d51c8d24aacf 100644 (file)
@@ -307,8 +307,13 @@ static int config_read_branches(const char *key, const char *value, void *cb)
                                space = strchr(value, ' ');
                        }
                        string_list_append(&info->merge, xstrdup(value));
-               } else
-                       info->rebase = git_config_bool(orig_key, value);
+               } else {
+                       int v = git_config_maybe_bool(orig_key, value);
+                       if (v >= 0)
+                               info->rebase = v;
+                       else if (!strcmp(value, "preserve"))
+                               info->rebase = 1;
+               }
        }
        return 0;
 }
index cb144258ccc3f32025c4b7beba6ac02c427612d8..37e9396e5dae8957ba73507018d5c334ee65e30d 100755 (executable)
@@ -7,7 +7,7 @@ Verify that plumbing commands work when .git is a file
 . ./test-lib.sh
 
 objpath() {
-    echo "$1" | sed -e 's|\(..\)|\1/|'
+       echo "$1" | sed -e 's|\(..\)|\1/|'
 }
 
 objck() {
@@ -19,7 +19,6 @@ objck() {
        fi
 }
 
-
 test_expect_success 'initial setup' '
        REAL="$(pwd)/.real" &&
        mv .git "$REAL"
index 0b98b6f8d090ecc3dfb48fe6fda5889dfbc5e018..b9d79476e20b4ddf0f9e85c672df2061fb910f9d 100755 (executable)
@@ -13,7 +13,6 @@ attr_check () {
        test_line_count = 0 err
 }
 
-
 test_expect_success 'setup' '
        mkdir -p a/b/d a/c b &&
        (