Skip to content

Commit 590f6e4

Browse files
committed
Sync with 2.6.1
2 parents e13d854 + 22f698c commit 590f6e4

31 files changed

+508
-32
lines changed

Documentation/RelNotes/2.3.10.txt

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
Git v2.3.10 Release Notes
2+
=========================
3+
4+
Fixes since v2.3.9
5+
------------------
6+
7+
* xdiff code we use to generate diffs is not prepared to handle
8+
extremely large files. It uses "int" in many places, which can
9+
overflow if we have a very large number of lines or even bytes in
10+
our input files, for example. Cap the input size to soemwhere
11+
around 1GB for now.
12+
13+
* Some protocols (like git-remote-ext) can execute arbitrary code
14+
found in the URL. The URLs that submodules use may come from
15+
arbitrary sources (e.g., .gitmodules files in a remote
16+
repository), and can hurt those who blindly enable recursive
17+
fetch. Restrict the allowed protocols to well known and safe
18+
ones.

Documentation/RelNotes/2.4.10.txt

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
Git v2.4.10 Release Notes
2+
=========================
3+
4+
Fixes since v2.4.9
5+
------------------
6+
7+
* xdiff code we use to generate diffs is not prepared to handle
8+
extremely large files. It uses "int" in many places, which can
9+
overflow if we have a very large number of lines or even bytes in
10+
our input files, for example. Cap the input size to soemwhere
11+
around 1GB for now.
12+
13+
* Some protocols (like git-remote-ext) can execute arbitrary code
14+
found in the URL. The URLs that submodules use may come from
15+
arbitrary sources (e.g., .gitmodules files in a remote
16+
repository), and can hurt those who blindly enable recursive
17+
fetch. Restrict the allowed protocols to well known and safe
18+
ones.

Documentation/RelNotes/2.5.4.txt

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
Git v2.5.4 Release Notes
2+
========================
3+
4+
Fixes since v2.5.4
5+
------------------
6+
7+
* xdiff code we use to generate diffs is not prepared to handle
8+
extremely large files. It uses "int" in many places, which can
9+
overflow if we have a very large number of lines or even bytes in
10+
our input files, for example. Cap the input size to soemwhere
11+
around 1GB for now.
12+
13+
* Some protocols (like git-remote-ext) can execute arbitrary code
14+
found in the URL. The URLs that submodules use may come from
15+
arbitrary sources (e.g., .gitmodules files in a remote
16+
repository), and can hurt those who blindly enable recursive
17+
fetch. Restrict the allowed protocols to well known and safe
18+
ones.

Documentation/RelNotes/2.6.1.txt

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
Git v2.6.1 Release Notes
2+
========================
3+
4+
Fixes since v2.6
5+
----------------
6+
7+
* xdiff code we use to generate diffs is not prepared to handle
8+
extremely large files. It uses "int" in many places, which can
9+
overflow if we have a very large number of lines or even bytes in
10+
our input files, for example. Cap the input size to soemwhere
11+
around 1GB for now.
12+
13+
* Some protocols (like git-remote-ext) can execute arbitrary code
14+
found in the URL. The URLs that submodules use may come from
15+
arbitrary sources (e.g., .gitmodules files in a remote
16+
repository), and can hurt those who blindly enable recursive
17+
fetch. Restrict the allowed protocols to well known and safe
18+
ones.

Documentation/git.txt

Lines changed: 35 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,22 +43,25 @@ unreleased) version of Git, that is available from the 'master'
4343
branch of the `git.git` repository.
4444
Documentation for older releases are available here:
4545

46-
* link:v2.6.0/git.html[documentation for release 2.6]
46+
* link:v2.6.1/git.html[documentation for release 2.6.1]
4747

4848
* release notes for
49+
link:RelNotes/2.6.1.txt[2.6.1],
4950
link:RelNotes/2.6.0.txt[2.6].
5051

51-
* link:v2.5.3/git.html[documentation for release 2.5.3]
52+
* link:v2.5.4/git.html[documentation for release 2.5.4]
5253

5354
* release notes for
55+
link:RelNotes/2.5.4.txt[2.5.4],
5456
link:RelNotes/2.5.3.txt[2.5.3],
5557
link:RelNotes/2.5.2.txt[2.5.2],
5658
link:RelNotes/2.5.1.txt[2.5.1],
5759
link:RelNotes/2.5.0.txt[2.5].
5860

59-
* link:v2.4.9/git.html[documentation for release 2.4.9]
61+
* link:v2.4.10/git.html[documentation for release 2.4.10]
6062

6163
* release notes for
64+
link:RelNotes/2.4.10.txt[2.4.10],
6265
link:RelNotes/2.4.9.txt[2.4.9],
6366
link:RelNotes/2.4.8.txt[2.4.8],
6467
link:RelNotes/2.4.7.txt[2.4.7],
@@ -70,9 +73,10 @@ Documentation for older releases are available here:
7073
link:RelNotes/2.4.1.txt[2.4.1],
7174
link:RelNotes/2.4.0.txt[2.4].
7275

73-
* link:v2.3.9/git.html[documentation for release 2.3.9]
76+
* link:v2.3.10/git.html[documentation for release 2.3.10]
7477

7578
* release notes for
79+
link:RelNotes/2.3.10.txt[2.3.10],
7680
link:RelNotes/2.3.9.txt[2.3.9],
7781
link:RelNotes/2.3.8.txt[2.3.8],
7882
link:RelNotes/2.3.7.txt[2.3.7],
@@ -1092,6 +1096,33 @@ GIT_ICASE_PATHSPECS::
10921096
an operation has touched every ref (e.g., because you are
10931097
cloning a repository to make a backup).
10941098

1099+
`GIT_ALLOW_PROTOCOL`::
1100+
If set, provide a colon-separated list of protocols which are
1101+
allowed to be used with fetch/push/clone. This is useful to
1102+
restrict recursive submodule initialization from an untrusted
1103+
repository. Any protocol not mentioned will be disallowed (i.e.,
1104+
this is a whitelist, not a blacklist). If the variable is not
1105+
set at all, all protocols are enabled. The protocol names
1106+
currently used by git are:
1107+
1108+
- `file`: any local file-based path (including `file://` URLs,
1109+
or local paths)
1110+
1111+
- `git`: the anonymous git protocol over a direct TCP
1112+
connection (or proxy, if configured)
1113+
1114+
- `ssh`: git over ssh (including `host:path` syntax,
1115+
`git+ssh://`, etc).
1116+
1117+
- `rsync`: git over rsync
1118+
1119+
- `http`: git over http, both "smart http" and "dumb http".
1120+
Note that this does _not_ include `https`; if you want both,
1121+
you should specify both as `http:https`.
1122+
1123+
- any external helpers are named by their protocol (e.g., use
1124+
`hg` to allow the `git-remote-hg` helper)
1125+
10951126

10961127
Discussion[[Discussion]]
10971128
------------------------

RelNotes

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Documentation/RelNotes/2.6.0.txt
1+
Documentation/RelNotes/2.6.1.txt

builtin/blame.c

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -974,7 +974,10 @@ static void pass_blame_to_parent(struct scoreboard *sb,
974974
fill_origin_blob(&sb->revs->diffopt, target, &file_o);
975975
num_get_patch++;
976976

977-
diff_hunks(&file_p, &file_o, 0, blame_chunk_cb, &d);
977+
if (diff_hunks(&file_p, &file_o, 0, blame_chunk_cb, &d))
978+
die("unable to generate diff (%s -> %s)",
979+
sha1_to_hex(parent->commit->object.sha1),
980+
sha1_to_hex(target->commit->object.sha1));
978981
/* The rest are the same as the parent */
979982
blame_chunk(&d.dstq, &d.srcq, INT_MAX, d.offset, INT_MAX, parent);
980983
*d.dstq = NULL;
@@ -1120,7 +1123,9 @@ static void find_copy_in_blob(struct scoreboard *sb,
11201123
* file_p partially may match that image.
11211124
*/
11221125
memset(split, 0, sizeof(struct blame_entry [3]));
1123-
diff_hunks(file_p, &file_o, 1, handle_split_cb, &d);
1126+
if (diff_hunks(file_p, &file_o, 1, handle_split_cb, &d))
1127+
die("unable to generate diff (%s)",
1128+
sha1_to_hex(parent->commit->object.sha1));
11241129
/* remainder, if any, all match the preimage */
11251130
handle_split(sb, ent, d.tlno, d.plno, ent->num_lines, parent, split);
11261131
}

builtin/merge-file.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,8 @@ int cmd_merge_file(int argc, const char **argv, const char *prefix)
7575
names[i] = argv[i];
7676
if (read_mmfile(mmfs + i, fname))
7777
return -1;
78-
if (buffer_is_binary(mmfs[i].ptr, mmfs[i].size))
78+
if (mmfs[i].size > MAX_XDIFF_SIZE ||
79+
buffer_is_binary(mmfs[i].ptr, mmfs[i].size))
7980
return error("Cannot merge binary files: %s",
8081
argv[i]);
8182
}

builtin/merge-tree.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,8 @@ static void show_diff(struct merge_list *entry)
118118
if (!dst.ptr)
119119
size = 0;
120120
dst.size = size;
121-
xdi_diff(&src, &dst, &xpp, &xecfg, &ecb);
121+
if (xdi_diff(&src, &dst, &xpp, &xecfg, &ecb))
122+
die("unable to generate diff");
122123
free(src.ptr);
123124
free(dst.ptr);
124125
}

builtin/rerere.c

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,10 @@ static int diff_two(const char *file1, const char *label1,
2929
xdemitconf_t xecfg;
3030
xdemitcb_t ecb;
3131
mmfile_t minus, plus;
32+
int ret;
3233

3334
if (read_mmfile(&minus, file1) || read_mmfile(&plus, file2))
34-
return 1;
35+
return -1;
3536

3637
printf("--- a/%s\n+++ b/%s\n", label1, label2);
3738
fflush(stdout);
@@ -40,11 +41,11 @@ static int diff_two(const char *file1, const char *label1,
4041
memset(&xecfg, 0, sizeof(xecfg));
4142
xecfg.ctxlen = 3;
4243
ecb.outf = outf;
43-
xdi_diff(&minus, &plus, &xpp, &xecfg, &ecb);
44+
ret = xdi_diff(&minus, &plus, &xpp, &xecfg, &ecb);
4445

4546
free(minus.ptr);
4647
free(plus.ptr);
47-
return 0;
48+
return ret;
4849
}
4950

5051
int cmd_rerere(int argc, const char **argv, const char *prefix)
@@ -104,7 +105,8 @@ int cmd_rerere(int argc, const char **argv, const char *prefix)
104105
for (i = 0; i < merge_rr.nr; i++) {
105106
const char *path = merge_rr.items[i].string;
106107
const struct rerere_id *id = merge_rr.items[i].util;
107-
diff_two(rerere_path(id, "preimage"), path, path, path);
108+
if (diff_two(rerere_path(id, "preimage"), path, path, path))
109+
die("unable to generate diff for %s", rerere_path(id, NULL));
108110
}
109111
} else
110112
usage_with_options(rerere_usage, options);

0 commit comments

Comments
 (0)