diff options
author | Junio C Hamano <junkio@cox.net> | 2006-10-23 19:29:05 -0700 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2006-10-23 19:29:05 -0700 |
commit | 1259404c7e5cd88b7f6692986469cd20cbfacdad (patch) | |
tree | cadffdf850a06e1d41ce1ebf4d1290e8d5768cfc | |
parent | b4aee09e610567529dc619d7324dc2fe85a11db5 (diff) | |
parent | a153adf683d2b6e22c7e892ed8a161b140156186 (diff) | |
download | git-1259404c7e5cd88b7f6692986469cd20cbfacdad.tar.gz git-1259404c7e5cd88b7f6692986469cd20cbfacdad.tar.xz |
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.
-rw-r--r-- | Documentation/config.txt | 12 | ||||
-rw-r--r-- | Documentation/urls.txt | 8 | ||||
-rw-r--r-- | builtin-prune-packed.c | 2 | ||||
-rw-r--r-- | daemon.c | 6 | ||||
-rwxr-xr-x | git-clone.sh | 3 | ||||
-rwxr-xr-x | gitweb/gitweb.perl | 3 | ||||
-rw-r--r-- | xdiff/xemit.c | 2 |
7 files changed, 30 insertions, 6 deletions
diff --git a/Documentation/config.txt b/Documentation/config.txt index 05d657444..026d4cf9a 100644 --- a/Documentation/config.txt +++ b/Documentation/config.txt @@ -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. diff --git a/Documentation/urls.txt b/Documentation/urls.txt index 26ecba53f..670827c32 100644 --- a/Documentation/urls.txt +++ b/Documentation/urls.txt @@ -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 diff --git a/builtin-prune-packed.c b/builtin-prune-packed.c index e12b6cf59..24e3b0a8c 100644 --- a/builtin-prune-packed.c +++ b/builtin-prune-packed.c @@ -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. diff --git a/git-clone.sh b/git-clone.sh index 786d65a85..3f006d1a7 100755 --- a/git-clone.sh +++ b/git-clone.sh @@ -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" diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl index c9e57f051..bc8d8eb23 100755 --- a/gitweb/gitweb.perl +++ b/gitweb/gitweb.perl @@ -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; diff --git a/xdiff/xemit.c b/xdiff/xemit.c index 714c56354..154c26fdc 100644 --- a/xdiff/xemit.c +++ b/xdiff/xemit.c @@ -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; |