Skip to content

Commit

Permalink
try
Browse files Browse the repository at this point in the history
  • Loading branch information
glandium committed Dec 17, 2024
1 parent 120c299 commit a61debb
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 25 deletions.
2 changes: 1 addition & 1 deletion git-core
Submodule git-core updated 1462 files
6 changes: 5 additions & 1 deletion src/build.mk
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ NO_UNIX_SOCKETS ?= 1
SOURCE_DIR = $(subst \,/,$(CARGO_MANIFEST_DIR))

vpath %.c $(SOURCE_DIR)/git-core
vpath version-def.h.in $(SOURCE_DIR)/git-core

$(SOURCE_DIR)/git-core/Makefile:
git -C $(SOURCE_DIR) submodule sync
Expand All @@ -35,7 +36,10 @@ FAKE_INCLUDE := 1
FAKE_INCLUDE :=
include $(SOURCE_DIR)/git-core/Makefile

GIT-VERSION-FILE: GIT-VERSION-GEN
GIT-VERSION-FILE: GIT-VERSION-GEN GIT-VERSION-FILE.in
GIT-VERSION-FILE.in: $(SOURCE_DIR)/git-core/GIT-VERSION-FILE.in
cat $< > $@

GIT-VERSION-GEN detect-compiler:
echo "#!/bin/sh" > $@
echo ". $(SOURCE_DIR)/git-core/$@" >> $@
Expand Down
14 changes: 7 additions & 7 deletions src/cinnabar-fast-import.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ void real_hashwrite(struct hashfile *, const void *, unsigned int);
void hashwrite(struct hashfile *f, const void *buf, unsigned int count)
{
size_t window_size;
size_t packed_git_window_size =
the_repository->settings.packed_git_window_size;

if (f != pack_file) {
real_hashwrite(f, buf, count);
Expand Down Expand Up @@ -111,21 +113,19 @@ void hashwrite(struct hashfile *f, const void *buf, unsigned int count)
}
}

off_t real_find_pack_entry_one(const unsigned char *sha1,
off_t real_find_pack_entry_one(const struct object_id *oid,
struct packed_git *p);

off_t find_pack_entry_one(const unsigned char *sha1, struct packed_git *p)
off_t find_pack_entry_one(const struct object_id *oid, struct packed_git *p)
{
if (p == pack_data) {
struct object_id oid;
struct object_entry *oe;
oidread(&oid, sha1, the_repository->hash_algo);
oe = get_object_entry(&oid);
oe = get_object_entry(oid);
if (oe)
return oe->idx.offset;
return 0;
}
return real_find_pack_entry_one(sha1, p);
return real_find_pack_entry_one(oid, p);
}

struct object_entry *get_object_entry(const struct object_id *oid)
Expand Down Expand Up @@ -194,7 +194,7 @@ static void cleanup(void)
initialized = 0;

if (cinnabar_check(CHECK_HELPER))
pack_report();
pack_report(the_repository);
}

void do_cleanup(int rollback)
Expand Down
18 changes: 9 additions & 9 deletions src/http.c.patch
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
diff --git a/http.c b/http.c
index c89f96ceba..d6284df1e2 100644
index c7a55ae9cd..55dfba24ac 100644
--- a/http.c
+++ b/http.c
@@ -68,7 +68,7 @@ static char *curl_no_proxy;
#ifdef GIT_CURL_HAVE_CURLOPT_PINNEDPUBLICKEY
@@ -63,7 +63,7 @@ static char *ssl_key_type;
static char *ssl_capath;
static char *curl_no_proxy;
static char *ssl_pinnedkey;
#endif
-static char *ssl_cainfo;
+char *ssl_cainfo;
static long curl_low_speed_limit = -1;
static long curl_low_speed_time = -1;
static int curl_ftp_no_epsv;
@@ -423,11 +423,13 @@ static int http_options(const char *var, const char *value,
@@ -410,11 +410,13 @@ static int http_options(const char *var, const char *value,
curl_ssl_try = git_config_bool(var, value);
return 0;
}
Expand All @@ -24,18 +24,18 @@ index c89f96ceba..d6284df1e2 100644
+#endif

if (!strcmp("http.schannelcheckrevoke", var)) {
if (value && !strcmp(value, "best-effort")) {
@@ -1369,9 +1371,6 @@ void http_init(struct remote *remote, const char *url, int proactive_auth)
http_schannel_check_revoke = git_config_bool(var, value);
@@ -1301,9 +1303,6 @@ void http_init(struct remote *remote, const char *url, int proactive_auth)
}
}
#endif

- if (curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK)
- die("curl_global_init failed");
-
if (proactive_auth && http_proactive_auth == PROACTIVE_AUTH_NONE)
http_proactive_auth = PROACTIVE_AUTH_IF_CREDENTIALS;

@@ -1459,7 +1458,6 @@ void http_cleanup(void)
@@ -1391,7 +1390,6 @@ void http_cleanup(void)
curl_easy_cleanup(curl_default);

curl_multi_cleanup(curlm);
Expand Down
14 changes: 7 additions & 7 deletions src/packfile.c.patch
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
diff --git a/packfile.c b/packfile.c
index c0d7dd93f4..d797afff0e 100644
index 9c4bd81a8c..da8a77da48 100644
--- a/packfile.c
+++ b/packfile.c
@@ -1951,7 +1951,9 @@ off_t nth_packed_object_offset(const struct packed_git *p, uint32_t n)
@@ -1993,8 +1993,8 @@ off_t nth_packed_object_offset(const struct packed_git *p, uint32_t n)
}
}

-off_t find_pack_entry_one(const unsigned char *sha1,
+off_t real_find_pack_entry_one(const unsigned char *sha1,
+ struct packed_git *p);
+off_t real_find_pack_entry_one(const unsigned char *sha1,
struct packed_git *p)
-off_t find_pack_entry_one(const struct object_id *oid,
- struct packed_git *p)
+off_t real_find_pack_entry_one(const struct object_id *oid,
+ struct packed_git *p)
{
const unsigned char *index = p->index_data;
uint32_t result;

0 comments on commit a61debb

Please sign in to comment.