Skip to content

Commit 4d1826d

Browse files
committed
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
2 parents aa13132 + 0a54f70 commit 4d1826d

5 files changed

Lines changed: 12 additions & 6 deletions

File tree

Documentation/git-fetch.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@ or from several repositories at once if <group> is given and
3737
there is a remotes.<group> entry in the configuration file.
3838
(See linkgit:git-config[1]).
3939

40+
When no remote is specified, by default the `origin` remote will be used,
41+
unless there's an upstream branch configured for the current branch.
42+
4043
OPTIONS
4144
-------
4245
include::fetch-options.txt[]

abspath.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ static const char *real_path_internal(const char *path, int die_on_error)
143143
error_out:
144144
free(last_elem);
145145
if (*cwd && chdir(cwd))
146-
die_errno ("Could not change back to '%s'", cwd);
146+
die_errno("Could not change back to '%s'", cwd);
147147

148148
return retval;
149149
}

builtin/remote.c

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -307,8 +307,13 @@ static int config_read_branches(const char *key, const char *value, void *cb)
307307
space = strchr(value, ' ');
308308
}
309309
string_list_append(&info->merge, xstrdup(value));
310-
} else
311-
info->rebase = git_config_bool(orig_key, value);
310+
} else {
311+
int v = git_config_maybe_bool(orig_key, value);
312+
if (v >= 0)
313+
info->rebase = v;
314+
else if (!strcmp(value, "preserve"))
315+
info->rebase = 1;
316+
}
312317
}
313318
return 0;
314319
}

t/t0002-gitfile.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Verify that plumbing commands work when .git is a file
77
. ./test-lib.sh
88

99
objpath() {
10-
echo "$1" | sed -e 's|\(..\)|\1/|'
10+
echo "$1" | sed -e 's|\(..\)|\1/|'
1111
}
1212

1313
objck() {
@@ -19,7 +19,6 @@ objck() {
1919
fi
2020
}
2121

22-
2322
test_expect_success 'initial setup' '
2423
REAL="$(pwd)/.real" &&
2524
mv .git "$REAL"

t/t0003-attributes.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ attr_check () {
1313
test_line_count = 0 err
1414
}
1515

16-
1716
test_expect_success 'setup' '
1817
mkdir -p a/b/d a/c b &&
1918
(

0 commit comments

Comments
 (0)