Skip to content

Commit 3a59bb2

Browse files
committed
Merge branch 'maint'
* maint: GIT 1.6.0.5 "git diff <tree>{3,}": do not reverse order of arguments tag: delete TAG_EDITMSG only on successful tag gitweb: Make project specific override for 'grep' feature work http.c: use 'git_config_string' to get 'curl_http_proxy' fetch-pack: Avoid memcpy() with src==dst
2 parents 2dd6202 + 1c2ed59 commit 3a59bb2

File tree

5 files changed

+55
-31
lines changed

5 files changed

+55
-31
lines changed

Documentation/RelNotes-1.6.0.5.txt

Lines changed: 28 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,40 +4,53 @@ GIT v1.6.0.5 Release Notes
44
Fixes since v1.6.0.4
55
--------------------
66

7-
* 'git checkout' used to crash when your HEAD was pointing at a deleted
7+
* "git checkout" used to crash when your HEAD was pointing at a deleted
88
branch.
99

10-
* 'git checkout' from an un-checked-out state did not allow switching out
10+
* "git checkout" from an un-checked-out state did not allow switching out
1111
of the current branch.
1212

13-
* 'git diff' always allowed GIT_EXTERNAL_DIFF and --no-ext-diff was no-op for
13+
* "git diff" always allowed GIT_EXTERNAL_DIFF and --no-ext-diff was no-op for
1414
the command.
1515

16-
* 'git fast-export' did not export all tags.
16+
* Giving 3 or more tree-ish to "git diff" is supposed to show the combined
17+
diff from second and subsequent trees to the first one, but the order was
18+
screwed up.
1719

18-
* 'git ls-files --with-tree=<tree>' did not work with options other
20+
* "git fast-export" did not export all tags.
21+
22+
* "git ls-files --with-tree=<tree>" did not work with options other
1923
than -c, most notably with -m.
2024

21-
* 'git pack-objects' did not make its best effort to honor --max-pack-size
25+
* "git pack-objects" did not make its best effort to honor --max-pack-size
2226
option when a single first object already busted the given limit and
2327
placed many objects in a single pack.
2428

25-
* 'git-p4' fast import frontend was too eager to trigger its keyword expansion
29+
* "git-p4" fast import frontend was too eager to trigger its keyword expansion
2630
logic, even on a keyword-looking string that does not have closing '$' on the
2731
same line.
2832

29-
* 'git push $there' when the remote $there is defined in $GIT_DIR/branches/$there
33+
* "git push $there" when the remote $there is defined in $GIT_DIR/branches/$there
3034
behaves more like what cg-push from Cogito used to work.
3135

32-
* 'git tag' did not complain when given mutually incompatible set of options.
36+
* when giving up resolving a conflicted merge, "git reset --hard" failed
37+
to remove new paths from the working tree.
3338

34-
* 'make check' cannot be run without sparse; people may have meant to say
35-
'make test' instead, so suggest that.
39+
* "git tag" did not complain when given mutually incompatible set of options.
3640

37-
* Many unsafe call to sprintf() style varargs functions are corrected.
41+
* The message constructed in the internal editor was discarded when "git
42+
tag -s" failed to sign the message, which was often caused by the user
43+
not configuring GPG correctly.
3844

39-
* Also contains quite a few documentation updates.
45+
* "make check" cannot be run without sparse; people may have meant to say
46+
"make test" instead, so suggest that.
47+
48+
* Internal diff machinery had a corner case performance bug that choked on
49+
a large file with many repeated contents.
4050

41-
--
42-
O=v1.6.0.4-39-g27f6496
51+
* "git repack" used to grab objects out of packs marked with .keep
52+
into a new pack.
4353

54+
* Many unsafe call to sprintf() style varargs functions are corrected.
55+
56+
* Also contains quite a few documentation updates.

builtin-fetch-pack.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -780,7 +780,8 @@ struct ref *fetch_pack(struct fetch_pack_args *my_args,
780780
struct ref *ref_cpy;
781781

782782
fetch_pack_setup();
783-
memcpy(&args, my_args, sizeof(args));
783+
if (&args != my_args)
784+
memcpy(&args, my_args, sizeof(args));
784785
if (args.depth > 0) {
785786
if (stat(git_path("shallow"), &st))
786787
st.st_mtime = 0;

builtin-tag.c

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -253,13 +253,23 @@ static void write_tag_body(int fd, const unsigned char *sha1)
253253
free(buf);
254254
}
255255

256+
static int build_tag_object(struct strbuf *buf, int sign, unsigned char *result)
257+
{
258+
if (sign && do_sign(buf) < 0)
259+
return error("unable to sign the tag");
260+
if (write_sha1_file(buf->buf, buf->len, tag_type, result) < 0)
261+
return error("unable to write tag file");
262+
return 0;
263+
}
264+
256265
static void create_tag(const unsigned char *object, const char *tag,
257266
struct strbuf *buf, int message, int sign,
258267
unsigned char *prev, unsigned char *result)
259268
{
260269
enum object_type type;
261270
char header_buf[1024];
262271
int header_len;
272+
char *path = NULL;
263273

264274
type = sha1_object_info(object, NULL);
265275
if (type <= OBJ_NONE)
@@ -279,7 +289,6 @@ static void create_tag(const unsigned char *object, const char *tag,
279289
die("tag header too big.");
280290

281291
if (!message) {
282-
char *path;
283292
int fd;
284293

285294
/* write the template message before editing: */
@@ -300,9 +309,6 @@ static void create_tag(const unsigned char *object, const char *tag,
300309
"Please supply the message using either -m or -F option.\n");
301310
exit(1);
302311
}
303-
304-
unlink(path);
305-
free(path);
306312
}
307313

308314
stripspace(buf, 1);
@@ -312,10 +318,16 @@ static void create_tag(const unsigned char *object, const char *tag,
312318

313319
strbuf_insert(buf, 0, header_buf, header_len);
314320

315-
if (sign && do_sign(buf) < 0)
316-
die("unable to sign the tag");
317-
if (write_sha1_file(buf->buf, buf->len, tag_type, result) < 0)
318-
die("unable to write tag file");
321+
if (build_tag_object(buf, sign, result) < 0) {
322+
if (path)
323+
fprintf(stderr, "The tag message has been left in %s\n",
324+
path);
325+
exit(128);
326+
}
327+
if (path) {
328+
unlink(path);
329+
free(path);
330+
}
319331
}
320332

321333
struct msg_arg {

gitweb/gitweb.perl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,7 @@ BEGIN
241241
# $feature{'grep'}{'override'} = 1;
242242
# and in project config gitweb.grep = 0|1;
243243
'grep' => {
244+
'sub' => \&feature_grep,
244245
'override' => 0,
245246
'default' => [1]},
246247

http.c

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ static const char *ssl_cainfo = NULL;
2424
static long curl_low_speed_limit = -1;
2525
static long curl_low_speed_time = -1;
2626
static int curl_ftp_no_epsv = 0;
27-
static char *curl_http_proxy = NULL;
27+
static const char *curl_http_proxy = NULL;
2828

2929
static struct curl_slist *pragma_header;
3030

@@ -149,11 +149,8 @@ static int http_options(const char *var, const char *value, void *cb)
149149
return 0;
150150
}
151151
if (!strcmp("http.proxy", var)) {
152-
if (curl_http_proxy == NULL) {
153-
if (!value)
154-
return config_error_nonbool(var);
155-
curl_http_proxy = xstrdup(value);
156-
}
152+
if (curl_http_proxy == NULL)
153+
return git_config_string(&curl_http_proxy, var, value);
157154
return 0;
158155
}
159156

@@ -309,7 +306,7 @@ void http_cleanup(void)
309306
pragma_header = NULL;
310307

311308
if (curl_http_proxy) {
312-
free(curl_http_proxy);
309+
free((void *)curl_http_proxy);
313310
curl_http_proxy = NULL;
314311
}
315312
}

0 commit comments

Comments
 (0)