提交 1259404c 编写于 作者: J Junio C Hamano

Merge branch 'maint'

* maint:
  gitweb: Fix setting $/ in parse_commit()
  daemon: do not die on older clients.
  xdiff/xemit.c (xdl_find_func): Elide trailing white space in a context header.
  git-clone: honor --quiet
  Documentation for the [remote] config
  prune-packed: Fix uninitialized variable.
......@@ -230,6 +230,18 @@ pull.octopus::
pull.twohead::
The default merge strategy to use when pulling a single branch.
remote.<name>.url::
The URL of a remote repository. See gitlink:git-fetch[1] or
gitlink:git-push[1].
remote.<name>.fetch::
The default set of "refspec" for gitlink:git-fetch[1]. See
gitlink:git-fetch[1].
remote.<name>.push::
The default set of "refspec" for gitlink:git-push[1]. See
gitlink:git-push[1].
repack.usedeltabaseoffset::
Allow gitlink:git-repack[1] to create packs that uses
delta-base offset. Defaults to false.
......
......@@ -51,6 +51,14 @@ lines are used for `git-push` and `git-fetch`/`git-pull`,
respectively. Multiple `Push:` and `Pull:` lines may
be specified for additional branch mappings.
Or, equivalently, in the `$GIT_DIR/config` (note the use
of `fetch` instead of `Pull:`):
[remote "<remote>"]
url = <url>
push = <refspec>
fetch = <refspec>
The name of a file in `$GIT_DIR/branches` directory can be
specified as an older notation short-hand; the named
file should contain a single line, a URL in one of the
......
......@@ -56,7 +56,7 @@ void prune_packed_objects(int dryrun)
int cmd_prune_packed(int argc, const char **argv, const char *prefix)
{
int i;
int dryrun;
int dryrun = 0;
for (i = 1; i < argc; i++) {
const char *arg = argv[i];
......
......@@ -450,6 +450,8 @@ void fill_in_extra_table_entries(struct interp *itable)
* Replace literal host with lowercase-ized hostname.
*/
hp = interp_table[INTERP_SLOT_HOST].value;
if (!hp)
return;
for ( ; *hp; hp++)
*hp = tolower(*hp);
......@@ -544,8 +546,10 @@ static int execute(struct sockaddr *addr)
loginfo("Extended attributes (%d bytes) exist <%.*s>",
(int) pktlen - len,
(int) pktlen - len, line + len + 1);
if (len && line[len-1] == '\n')
if (len && line[len-1] == '\n') {
line[--len] = 0;
pktlen--;
}
/*
* Initialize the path interpolation table for this connection.
......
......@@ -401,7 +401,8 @@ Pull: refs/heads/$head_points_at:$origin_track" &&
case "$no_checkout" in
'')
git-read-tree -m -u -v HEAD HEAD
test "z$quiet" = z && v=-v || v=
git-read-tree -m -u $v HEAD HEAD
esac
fi
rm -f "$GIT_DIR/CLONE_HEAD" "$GIT_DIR/REMOTE_HEAD"
......
......@@ -1059,12 +1059,11 @@ sub parse_commit {
if (defined $commit_text) {
@commit_lines = @$commit_text;
} else {
$/ = "\0";
local $/ = "\0";
open my $fd, "-|", git_cmd(), "rev-list", "--header", "--parents", "--max-count=1", $commit_id
or return;
@commit_lines = split '\n', <$fd>;
close $fd or return;
$/ = "\n";
pop @commit_lines;
}
my $header = shift @commit_lines;
......
......@@ -90,7 +90,7 @@ static void xdl_find_func(xdfile_t *xf, long i, char *buf, long sz, long *ll) {
*rec == '#')) { /* #define? */
if (len > sz)
len = sz;
if (len && rec[len - 1] == '\n')
while (0 < len && isspace((unsigned char)rec[len - 1]))
len--;
memcpy(buf, rec, len);
*ll = len;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册