Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Documentation/config.txt12
-rw-r--r--Documentation/urls.txt8
-rw-r--r--builtin-prune-packed.c2
-rw-r--r--daemon.c6
-rwxr-xr-xgit-clone.sh3
-rwxr-xr-xgitweb/gitweb.perl3
-rw-r--r--xdiff/xemit.c2
7 files changed, 30 insertions, 6 deletions
diff --git a/Documentation/config.txt b/Documentation/config.txt
index 05d657444f..026d4cf9ad 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 26ecba53fb..670827c323 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 e12b6cf599..24e3b0a8c2 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];
diff --git a/daemon.c b/daemon.c
index ad8492873e..e66bb802da 100644
--- a/daemon.c
+++ b/daemon.c
@@ -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 786d65a859..3f006d1a77 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 c9e57f0516..bc8d8eb238 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 714c563547..154c26fdcd 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;