summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2013-12-17 11:46:32 -0800
committerLibravatar Junio C Hamano <gitster@pobox.com>2013-12-17 11:46:32 -0800
commit4d1826d1d96a4284ef268c6febeaa9fabfa75e9e (patch)
treec19c924f1072120694cf8bb9283f1334e619d94d
parentMerge branch 'jk/t5000-gzip-simplify' (diff)
parentremote: fix status with branch...rebase=preserve (diff)
downloadtgif-4d1826d1d96a4284ef268c6febeaa9fabfa75e9e.tar.xz
Merge branch 'fc/trivial'
* fc/trivial: remote: fix status with branch...rebase=preserve fetch: add missing documentation t: trivial whitespace cleanups abspath: trivial style fix
-rw-r--r--Documentation/git-fetch.txt3
-rw-r--r--abspath.c2
-rw-r--r--builtin/remote.c9
-rwxr-xr-xt/t0002-gitfile.sh3
-rwxr-xr-xt/t0003-attributes.sh1
5 files changed, 12 insertions, 6 deletions
diff --git a/Documentation/git-fetch.txt b/Documentation/git-fetch.txt
index 10657134a8..5809aa4eb9 100644
--- a/Documentation/git-fetch.txt
+++ b/Documentation/git-fetch.txt
@@ -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[]
diff --git a/abspath.c b/abspath.c
index e390994abf..8b3385a777 100644
--- 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;
}
diff --git a/builtin/remote.c b/builtin/remote.c
index f532f35457..119e9151ad 100644
--- a/builtin/remote.c
+++ b/builtin/remote.c
@@ -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;
}
diff --git a/t/t0002-gitfile.sh b/t/t0002-gitfile.sh
index cb144258cc..37e9396e5d 100755
--- a/t/t0002-gitfile.sh
+++ b/t/t0002-gitfile.sh
@@ -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"
diff --git a/t/t0003-attributes.sh b/t/t0003-attributes.sh
index 0b98b6f8d0..b9d79476e2 100755
--- a/t/t0003-attributes.sh
+++ b/t/t0003-attributes.sh
@@ -13,7 +13,6 @@ attr_check () {
test_line_count = 0 err
}
-
test_expect_success 'setup' '
mkdir -p a/b/d a/c b &&
(