Skip to content

Commit c93344a

Browse files
committed
Update git-core to v2.50.0
1 parent eca69c2 commit c93344a

15 files changed

+41
-182
lines changed

CI/tools.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
from util import build_commit
1717

1818
MERCURIAL_VERSION = "6.9.1"
19-
GIT_VERSION = "2.49.0"
19+
GIT_VERSION = "2.50.0"
2020

2121
ALL_MERCURIAL_VERSIONS = (
2222
"1.9.3",

git-core

Submodule git-core updated 747 files

src/cinnabar-fast-import.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -264,13 +264,13 @@ void do_set_replace(const struct object_id *replaced,
264264
struct replace_object *replace;
265265

266266
if (is_null_oid(replace_with)) {
267-
oidmap_remove(the_repository->objects->replace_map, replaced);
267+
oidmap_remove(&the_repository->objects->replace_map, replaced);
268268
} else {
269269
struct replace_object *old;
270270
replace = xmalloc(sizeof(*replace));
271271
oidcpy(&replace->original.oid, replaced);
272272
oidcpy(&replace->replacement, replace_with);
273-
old = oidmap_put(the_repository->objects->replace_map, replace);
273+
old = oidmap_put(&the_repository->objects->replace_map, replace);
274274
if (old)
275275
free(old);
276276
}
@@ -547,7 +547,7 @@ void store_replace_map(struct object_id *result) {
547547
struct oidmap_iter iter;
548548
struct replace_object *replace;
549549

550-
oidmap_iter_init(the_repository->objects->replace_map, &iter);
550+
oidmap_iter_init(&the_repository->objects->replace_map, &iter);
551551
while ((replace = oidmap_iter_next(&iter))) {
552552
strbuf_addf(&buf, "160000 %s%c",
553553
oid_to_hex(&replace->original.oid), '\0');

src/cinnabar-helper.c

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ struct rev_info *rev_list_new(int argc, const char **argv) {
6767
void rev_list_finish(struct rev_info *revs) {
6868
// More extensive than reset_revision_walk(). Otherwise --boundary
6969
// and pathspecs don't work properly.
70-
clear_object_flags(ALL_REV_FLAGS | TOPO_WALK_EXPLORED | TOPO_WALK_INDEGREE);
70+
clear_object_flags(the_repository, ALL_REV_FLAGS | TOPO_WALK_EXPLORED | TOPO_WALK_INDEGREE);
7171
release_revisions(revs);
7272
free(revs);
7373
}
@@ -171,27 +171,24 @@ const struct object_id *repo_lookup_replace_object(
171171

172172
void init_replace_map(void)
173173
{
174-
the_repository->objects->replace_map =
175-
xmalloc(sizeof(*the_repository->objects->replace_map));
176-
oidmap_init(the_repository->objects->replace_map, 0);
174+
oidmap_init(&the_repository->objects->replace_map, 0);
177175
the_repository->objects->replace_map_initialized = 1;
178176
}
179177

180178
void reset_replace_map(void)
181179
{
182-
oidmap_free(the_repository->objects->replace_map, 1);
183-
FREE_AND_NULL(the_repository->objects->replace_map);
180+
oidmap_clear(&the_repository->objects->replace_map, 1);
184181
the_repository->objects->replace_map_initialized = 0;
185182
}
186183

187184
unsigned int replace_map_size(void)
188185
{
189-
return hashmap_get_size(&the_repository->objects->replace_map->map);
186+
return hashmap_get_size(&the_repository->objects->replace_map.map);
190187
}
191188

192189
unsigned int replace_map_tablesize(void)
193190
{
194-
return the_repository->objects->replace_map->map.tablesize;
191+
return the_repository->objects->replace_map.map.tablesize;
195192
}
196193

197194
static void init_git_config(void)

src/cinnabar-notes.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ int cinnabar_remove_note(struct cinnabar_notes_tree *t,
133133
if (!result) {
134134
struct object_id oid;
135135
oidread(&oid, object_sha1, the_repository->hash_algo);
136-
add_note(&t->additions, &oid, null_oid(), NULL);
136+
add_note(&t->additions, &oid, null_oid(the_repository->hash_algo), NULL);
137137
}
138138
return result && result2;
139139
}

src/csum-file.c.patch

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
diff --git a/csum-file.c b/csum-file.c
2-
index 2131ee6b12..f31d551613 100644
2+
index 6e21e3cac8..1a4ea61237 100644
33
--- a/csum-file.c
44
+++ b/csum-file.c
5-
@@ -111,7 +111,8 @@ void discard_hashfile(struct hashfile *f)
5+
@@ -110,7 +110,8 @@ void discard_hashfile(struct hashfile *f)
66
free_hashfile(f);
77
}
88

src/fast-import.c.patch

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
diff --git a/builtin/fast-import.c b/builtin/fast-import.c
2-
index 397a6f46ad..0ae561a80b 100644
2+
index b2839c5f43..1feeaf0ec1 100644
33
--- a/builtin/fast-import.c
44
+++ b/builtin/fast-import.c
55
@@ -29,6 +29,7 @@
@@ -19,7 +19,7 @@ index 397a6f46ad..0ae561a80b 100644
1919
{
2020
struct strbuf tmp_file = STRBUF_INIT;
2121
struct packed_git *p;
22-
@@ -859,7 +860,7 @@ static int loosen_small_pack(const struct packed_git *p)
22+
@@ -860,7 +861,7 @@ static int loosen_small_pack(const struct packed_git *p)
2323
return run_command(&unpack);
2424
}
2525

@@ -28,15 +28,15 @@ index 397a6f46ad..0ae561a80b 100644
2828
{
2929
static int running;
3030

31-
@@ -878,6 +879,7 @@ static void end_packfile(void)
31+
@@ -879,6 +880,7 @@ static void end_packfile(void)
3232

3333
close_pack_windows(pack_data);
3434
finalize_hashfile(pack_file, cur_pack_oid.hash, FSYNC_COMPONENT_PACK, 0);
3535
+ pack_file = NULL;
3636
fixup_pack_header_footer(the_hash_algo, pack_data->pack_fd,
3737
pack_data->hash, pack_data->pack_name,
3838
object_count, cur_pack_oid.hash,
39-
@@ -977,6 +979,9 @@ static int store_object(
39+
@@ -978,6 +980,9 @@ static int store_object(
4040
e->pack_id = MAX_PACK_ID;
4141
e->idx.offset = 1; /* just not zero! */
4242
duplicate_count_by_type[type]++;

src/http.c.patch

Lines changed: 4 additions & 143 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
diff --git a/http.c b/http.c
2-
index d5396a3ce2..2cfb042e53 100644
2+
index bf6889a30c..f7e2a585ff 100644
33
--- a/http.c
44
+++ b/http.c
55
@@ -64,7 +64,7 @@ static char *ssl_key_type;
@@ -11,7 +11,7 @@ index d5396a3ce2..2cfb042e53 100644
1111
static long curl_low_speed_limit = -1;
1212
static long curl_low_speed_time = -1;
1313
static int curl_ftp_no_epsv;
14-
@@ -419,11 +419,13 @@ static int http_options(const char *var, const char *value,
14+
@@ -423,11 +423,13 @@ static int http_options(const char *var, const char *value,
1515
curl_ssl_try = git_config_bool(var, value);
1616
return 0;
1717
}
@@ -25,78 +25,7 @@ index d5396a3ce2..2cfb042e53 100644
2525

2626
if (!strcmp("http.schannelcheckrevoke", var)) {
2727
if (value && !strcmp(value, "best-effort")) {
28-
@@ -731,7 +733,7 @@ static int has_proxy_cert_password(void)
29-
30-
static void set_curl_keepalive(CURL *c)
31-
{
32-
- curl_easy_setopt(c, CURLOPT_TCP_KEEPALIVE, 1);
33-
+ curl_easy_setopt(c, CURLOPT_TCP_KEEPALIVE, 1L);
34-
}
35-
36-
/* Return 1 if redactions have been made, 0 otherwise. */
37-
@@ -1032,13 +1034,13 @@ static CURL *get_curl_handle(void)
38-
die("curl_easy_init failed");
39-
40-
if (!curl_ssl_verify) {
41-
- curl_easy_setopt(result, CURLOPT_SSL_VERIFYPEER, 0);
42-
- curl_easy_setopt(result, CURLOPT_SSL_VERIFYHOST, 0);
43-
+ curl_easy_setopt(result, CURLOPT_SSL_VERIFYPEER, 0L);
44-
+ curl_easy_setopt(result, CURLOPT_SSL_VERIFYHOST, 0L);
45-
} else {
46-
/* Verify authenticity of the peer's certificate */
47-
- curl_easy_setopt(result, CURLOPT_SSL_VERIFYPEER, 1);
48-
+ curl_easy_setopt(result, CURLOPT_SSL_VERIFYPEER, 1L);
49-
/* The name in the cert must match whom we tried to connect */
50-
- curl_easy_setopt(result, CURLOPT_SSL_VERIFYHOST, 2);
51-
+ curl_easy_setopt(result, CURLOPT_SSL_VERIFYHOST, 2L);
52-
}
53-
54-
if (curl_http_version) {
55-
@@ -1141,8 +1143,8 @@ static CURL *get_curl_handle(void)
56-
curl_low_speed_time);
57-
}
58-
59-
- curl_easy_setopt(result, CURLOPT_MAXREDIRS, 20);
60-
- curl_easy_setopt(result, CURLOPT_POSTREDIR, CURL_REDIR_POST_ALL);
61-
+ curl_easy_setopt(result, CURLOPT_MAXREDIRS, 20L);
62-
+ curl_easy_setopt(result, CURLOPT_POSTREDIR, (long)CURL_REDIR_POST_ALL);
63-
64-
#ifdef GIT_CURL_HAVE_CURLOPT_PROTOCOLS_STR
65-
{
66-
@@ -1175,7 +1177,7 @@ static CURL *get_curl_handle(void)
67-
user_agent ? user_agent : git_user_agent());
68-
69-
if (curl_ftp_no_epsv)
70-
- curl_easy_setopt(result, CURLOPT_FTP_USE_EPSV, 0);
71-
+ curl_easy_setopt(result, CURLOPT_FTP_USE_EPSV, 0L);
72-
73-
if (curl_ssl_try)
74-
curl_easy_setopt(result, CURLOPT_USE_SSL, CURLUSESSL_TRY);
75-
@@ -1217,18 +1219,18 @@ static CURL *get_curl_handle(void)
76-
77-
if (starts_with(curl_http_proxy, "socks5h"))
78-
curl_easy_setopt(result,
79-
- CURLOPT_PROXYTYPE, CURLPROXY_SOCKS5_HOSTNAME);
80-
+ CURLOPT_PROXYTYPE, (long)CURLPROXY_SOCKS5_HOSTNAME);
81-
else if (starts_with(curl_http_proxy, "socks5"))
82-
curl_easy_setopt(result,
83-
- CURLOPT_PROXYTYPE, CURLPROXY_SOCKS5);
84-
+ CURLOPT_PROXYTYPE, (long)CURLPROXY_SOCKS5);
85-
else if (starts_with(curl_http_proxy, "socks4a"))
86-
curl_easy_setopt(result,
87-
- CURLOPT_PROXYTYPE, CURLPROXY_SOCKS4A);
88-
+ CURLOPT_PROXYTYPE, (long)CURLPROXY_SOCKS4A);
89-
else if (starts_with(curl_http_proxy, "socks"))
90-
curl_easy_setopt(result,
91-
- CURLOPT_PROXYTYPE, CURLPROXY_SOCKS4);
92-
+ CURLOPT_PROXYTYPE, (long)CURLPROXY_SOCKS4);
93-
else if (starts_with(curl_http_proxy, "https")) {
94-
- curl_easy_setopt(result, CURLOPT_PROXYTYPE, CURLPROXY_HTTPS);
95-
+ curl_easy_setopt(result, CURLOPT_PROXYTYPE, (long)CURLPROXY_HTTPS);
96-
97-
if (http_proxy_ssl_cert)
98-
curl_easy_setopt(result, CURLOPT_PROXY_SSLCERT, http_proxy_ssl_cert);
99-
@@ -1337,9 +1339,6 @@ void http_init(struct remote *remote, const char *url, int proactive_auth)
28+
@@ -1380,9 +1382,6 @@ void http_init(struct remote *remote, const char *url, int proactive_auth)
10029
}
10130
}
10231

@@ -106,79 +35,11 @@ index d5396a3ce2..2cfb042e53 100644
10635
if (proactive_auth && http_proactive_auth == PROACTIVE_AUTH_NONE)
10736
http_proactive_auth = PROACTIVE_AUTH_IF_CREDENTIALS;
10837

109-
@@ -1427,7 +1426,6 @@ void http_cleanup(void)
38+
@@ -1470,7 +1469,6 @@ void http_cleanup(void)
11039
curl_easy_cleanup(curl_default);
11140

11241
curl_multi_cleanup(curlm);
11342
- curl_global_cleanup();
11443

11544
string_list_clear(&extra_http_headers, 0);
11645

117-
@@ -1533,9 +1531,9 @@ struct active_request_slot *get_active_slot(void)
118-
curl_easy_setopt(slot->curl, CURLOPT_WRITEFUNCTION, NULL);
119-
curl_easy_setopt(slot->curl, CURLOPT_POSTFIELDS, NULL);
120-
curl_easy_setopt(slot->curl, CURLOPT_POSTFIELDSIZE, -1L);
121-
- curl_easy_setopt(slot->curl, CURLOPT_UPLOAD, 0);
122-
- curl_easy_setopt(slot->curl, CURLOPT_HTTPGET, 1);
123-
- curl_easy_setopt(slot->curl, CURLOPT_FAILONERROR, 1);
124-
+ curl_easy_setopt(slot->curl, CURLOPT_UPLOAD, 0L);
125-
+ curl_easy_setopt(slot->curl, CURLOPT_HTTPGET, 1L);
126-
+ curl_easy_setopt(slot->curl, CURLOPT_FAILONERROR, 1L);
127-
curl_easy_setopt(slot->curl, CURLOPT_RANGE, NULL);
128-
129-
/*
130-
@@ -1544,9 +1542,9 @@ struct active_request_slot *get_active_slot(void)
131-
* HTTP_FOLLOW_* cases themselves.
132-
*/
133-
if (http_follow_config == HTTP_FOLLOW_ALWAYS)
134-
- curl_easy_setopt(slot->curl, CURLOPT_FOLLOWLOCATION, 1);
135-
+ curl_easy_setopt(slot->curl, CURLOPT_FOLLOWLOCATION, 1L);
136-
else
137-
- curl_easy_setopt(slot->curl, CURLOPT_FOLLOWLOCATION, 0);
138-
+ curl_easy_setopt(slot->curl, CURLOPT_FOLLOWLOCATION, 0L);
139-
140-
curl_easy_setopt(slot->curl, CURLOPT_IPRESOLVE, git_curl_ipresolve);
141-
curl_easy_setopt(slot->curl, CURLOPT_HTTPAUTH, http_auth_methods);
142-
@@ -2113,12 +2111,12 @@ static int http_request(const char *url,
143-
int ret;
144-
145-
slot = get_active_slot();
146-
- curl_easy_setopt(slot->curl, CURLOPT_HTTPGET, 1);
147-
+ curl_easy_setopt(slot->curl, CURLOPT_HTTPGET, 1L);
148-
149-
if (!result) {
150-
- curl_easy_setopt(slot->curl, CURLOPT_NOBODY, 1);
151-
+ curl_easy_setopt(slot->curl, CURLOPT_NOBODY, 1L);
152-
} else {
153-
- curl_easy_setopt(slot->curl, CURLOPT_NOBODY, 0);
154-
+ curl_easy_setopt(slot->curl, CURLOPT_NOBODY, 0L);
155-
curl_easy_setopt(slot->curl, CURLOPT_WRITEDATA, result);
156-
157-
if (target == HTTP_REQUEST_FILE) {
158-
@@ -2144,7 +2142,7 @@ static int http_request(const char *url,
159-
strbuf_addstr(&buf, " no-cache");
160-
if (options && options->initial_request &&
161-
http_follow_config == HTTP_FOLLOW_INITIAL)
162-
- curl_easy_setopt(slot->curl, CURLOPT_FOLLOWLOCATION, 1);
163-
+ curl_easy_setopt(slot->curl, CURLOPT_FOLLOWLOCATION, 1L);
164-
165-
headers = curl_slist_append(headers, buf.buf);
166-
167-
@@ -2163,7 +2161,7 @@ static int http_request(const char *url,
168-
curl_easy_setopt(slot->curl, CURLOPT_URL, url);
169-
curl_easy_setopt(slot->curl, CURLOPT_HTTPHEADER, headers);
170-
curl_easy_setopt(slot->curl, CURLOPT_ENCODING, "");
171-
- curl_easy_setopt(slot->curl, CURLOPT_FAILONERROR, 0);
172-
+ curl_easy_setopt(slot->curl, CURLOPT_FAILONERROR, 0L);
173-
174-
ret = run_one_slot(slot, &results);
175-
176-
@@ -2743,7 +2741,7 @@ struct http_object_request *new_http_object_request(const char *base_url,
177-
freq->headers = object_request_headers();
178-
179-
curl_easy_setopt(freq->slot->curl, CURLOPT_WRITEDATA, freq);
180-
- curl_easy_setopt(freq->slot->curl, CURLOPT_FAILONERROR, 0);
181-
+ curl_easy_setopt(freq->slot->curl, CURLOPT_FAILONERROR, 0L);
182-
curl_easy_setopt(freq->slot->curl, CURLOPT_WRITEFUNCTION, fwrite_sha1_file);
183-
curl_easy_setopt(freq->slot->curl, CURLOPT_ERRORBUFFER, freq->errorstr);
184-
curl_easy_setopt(freq->slot->curl, CURLOPT_URL, freq->url);

src/libgit.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,6 @@ pub struct object_info {
222222
sizep: *mut c_ulong,
223223
disk_sizep: *mut u64,
224224
delta_base_oid: *mut object_id,
225-
type_name: *mut strbuf,
226225
contentp: *mut *mut c_void,
227226
whence: c_int, // In reality, it's an inline enum.
228227
// In reality, following is a union with one struct.
@@ -238,7 +237,6 @@ impl Default for object_info {
238237
sizep: std::ptr::null_mut(),
239238
disk_sizep: std::ptr::null_mut(),
240239
delta_base_oid: std::ptr::null_mut(),
241-
type_name: std::ptr::null_mut(),
242240
contentp: std::ptr::null_mut(),
243241
whence: 0,
244242
u_packed_pack: std::ptr::null_mut(),

src/mingw.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@
66
static inline void winansi_init(void) {}
77
#define main cinnabar_main
88
extern int cinnabar_main(int argc, const char *argv[]);
9+
#ifdef __clang__
10+
#pragma clang diagnostic ignored "-Wcomma"
11+
#endif
912
#include "compat/mingw.c"
1013
#else
1114
typedef int make_pedantic_happy;

0 commit comments

Comments
 (0)