Skip to content

Commit 90999dd

Browse files
committed
Merge tag 'v2.35.0-rc1'
Git 2.35-rc1 * tag 'v2.35.0-rc1': Git 2.35-rc1 reftable tests: avoid "int" overflow, use "uint64_t" reftable: avoid initializing structs from structs t1450-fsck: exec-bit is not needed to make loose object writable refs API: use "failure_errno", not "errno" Last minute fixes before -rc1 build: NonStop ships with an older zlib packfile: fix off-by-one error in decoding logic t/gpg: simplify test for unknown key branch: missing space fix at line 313 fmt-merge-msg: prevent use-after-free with signed tags cache.h: drop duplicate `ensure_full_index()` declaration lazyload: use correct calling conventions fetch: fix deadlock when cleaning up lockfiles in async signals
2 parents c8464a3 + df3c41a commit 90999dd

22 files changed

+89
-67
lines changed

Documentation/RelNotes/2.35.0.txt

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ Performance, Internal Implementation, Development Support etc.
100100
* Teach and encourage first-time contributors to this project to
101101
state the base commit when they submit their topic.
102102

103-
* The command line complation for "git send-email" options have been
103+
* The command line completion for "git send-email" options have been
104104
tweaked to make it easier to keep it in sync with the command itself.
105105

106106
* Ensure that the sparseness of the in-core index matches the
@@ -367,6 +367,13 @@ Fixes since v2.34
367367
it failed to restore changes to tracked ones.
368368
(merge 71cade5a0b en/stash-df-fix later to maint).
369369

370+
* Calling dynamically loaded functions on Windows has been corrected.
371+
(merge 4a9b204920 ma/windows-dynload-fix later to maint).
372+
373+
* Some lockfile code called free() in signal-death code path, which
374+
has been corrected.
375+
(merge 58d4d7f1c5 ps/lockfile-cleanup-fix later to maint).
376+
370377
* Other code cleanup, docfix, build fix, etc.
371378
(merge 74db416c9c cw/protocol-v2-doc-fix later to maint).
372379
(merge f9b2b6684d ja/doc-cleanup later to maint).
@@ -391,3 +398,5 @@ Fixes since v2.34
391398
(merge 999bba3e0b rs/daemon-plug-leak later to maint).
392399
(merge 786eb1ba39 js/l10n-mention-ngettext-early-in-readme later to maint).
393400
(merge 2f12b31b74 ab/makefile-msgfmt-wo-stats later to maint).
401+
(merge 0517f591ca fs/gpg-unknown-key-test-fix later to maint).
402+
(merge 97d6fb5a1f ma/header-dup-cleanup later to maint).

GIT-VERSION-GEN

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/sh
22

33
GVF=GIT-VERSION-FILE
4-
DEF_VER=v2.35.0-rc0
4+
DEF_VER=v2.35.0-rc1
55

66
LF='
77
'

branch.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@ int validate_new_branchname(const char *name, struct strbuf *ref, int force)
310310
worktrees = get_worktrees();
311311
wt = find_shared_symref(worktrees, "HEAD", ref->buf);
312312
if (wt && !wt->is_bare)
313-
die(_("cannot force update the branch '%s'"
313+
die(_("cannot force update the branch '%s' "
314314
"checked out at '%s'"),
315315
ref->buf + strlen("refs/heads/"), wt->path);
316316
free_worktrees(worktrees);

builtin/clone.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1290,7 +1290,7 @@ int cmd_clone(int argc, const char **argv, const char *prefix)
12901290
*/
12911291
submodule_progress = transport->progress;
12921292

1293-
transport_unlock_pack(transport);
1293+
transport_unlock_pack(transport, 0);
12941294
transport_disconnect(transport);
12951295

12961296
if (option_dissociate) {

builtin/fetch.c

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -223,17 +223,22 @@ static struct option builtin_fetch_options[] = {
223223
OPT_END()
224224
};
225225

226-
static void unlock_pack(void)
226+
static void unlock_pack(unsigned int flags)
227227
{
228228
if (gtransport)
229-
transport_unlock_pack(gtransport);
229+
transport_unlock_pack(gtransport, flags);
230230
if (gsecondary)
231-
transport_unlock_pack(gsecondary);
231+
transport_unlock_pack(gsecondary, flags);
232+
}
233+
234+
static void unlock_pack_atexit(void)
235+
{
236+
unlock_pack(0);
232237
}
233238

234239
static void unlock_pack_on_signal(int signo)
235240
{
236-
unlock_pack();
241+
unlock_pack(TRANSPORT_UNLOCK_PACK_IN_SIGNAL_HANDLER);
237242
sigchain_pop(signo);
238243
raise(signo);
239244
}
@@ -1329,7 +1334,7 @@ static int fetch_and_consume_refs(struct transport *transport,
13291334
trace2_region_leave("fetch", "consume_refs", the_repository);
13301335

13311336
out:
1332-
transport_unlock_pack(transport);
1337+
transport_unlock_pack(transport, 0);
13331338
return ret;
13341339
}
13351340

@@ -1978,7 +1983,7 @@ static int fetch_one(struct remote *remote, int argc, const char **argv,
19781983
gtransport->server_options = &server_options;
19791984

19801985
sigchain_push_common(unlock_pack_on_signal);
1981-
atexit(unlock_pack);
1986+
atexit(unlock_pack_atexit);
19821987
sigchain_push(SIGPIPE, SIG_IGN);
19831988
exit_code = do_fetch(gtransport, &rs);
19841989
sigchain_pop(SIGPIPE);

cache.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -350,8 +350,6 @@ void add_name_hash(struct index_state *istate, struct cache_entry *ce);
350350
void remove_name_hash(struct index_state *istate, struct cache_entry *ce);
351351
void free_name_hash(struct index_state *istate);
352352

353-
void ensure_full_index(struct index_state *istate);
354-
355353
/* Cache entry creation and cleanup */
356354

357355
/*

compat/mingw.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
#include "win32/lazyload.h"
99
#include "../config.h"
1010
#include "dir.h"
11+
#define SECURITY_WIN32
12+
#include <sspi.h>
1113

1214
#define HCAST(type, handle) ((type)(intptr_t)handle)
1315

@@ -1008,7 +1010,7 @@ size_t mingw_strftime(char *s, size_t max,
10081010
/* a pointer to the original strftime in case we can't find the UCRT version */
10091011
static size_t (*fallback)(char *, size_t, const char *, const struct tm *) = strftime;
10101012
size_t ret;
1011-
DECLARE_PROC_ADDR(ucrtbase.dll, size_t, strftime, char *, size_t,
1013+
DECLARE_PROC_ADDR(ucrtbase.dll, size_t, __cdecl, strftime, char *, size_t,
10121014
const char *, const struct tm *);
10131015

10141016
if (INIT_PROC_ADDR(strftime))
@@ -2185,7 +2187,7 @@ enum EXTENDED_NAME_FORMAT {
21852187

21862188
static char *get_extended_user_info(enum EXTENDED_NAME_FORMAT type)
21872189
{
2188-
DECLARE_PROC_ADDR(secur32.dll, BOOL, GetUserNameExW,
2190+
DECLARE_PROC_ADDR(secur32.dll, BOOL, SEC_ENTRY, GetUserNameExW,
21892191
enum EXTENDED_NAME_FORMAT, LPCWSTR, PULONG);
21902192
static wchar_t wbuffer[1024];
21912193
DWORD len;

compat/win32/lazyload.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
/*
55
* A pair of macros to simplify loading of DLL functions. Example:
66
*
7-
* DECLARE_PROC_ADDR(kernel32.dll, BOOL, CreateHardLinkW,
7+
* DECLARE_PROC_ADDR(kernel32.dll, BOOL, WINAPI, CreateHardLinkW,
88
* LPCWSTR, LPCWSTR, LPSECURITY_ATTRIBUTES);
99
*
1010
* if (!INIT_PROC_ADDR(CreateHardLinkW))
@@ -25,10 +25,10 @@ struct proc_addr {
2525
};
2626

2727
/* Declares a function to be loaded dynamically from a DLL. */
28-
#define DECLARE_PROC_ADDR(dll, rettype, function, ...) \
28+
#define DECLARE_PROC_ADDR(dll, rettype, convention, function, ...) \
2929
static struct proc_addr proc_addr_##function = \
3030
{ #dll, #function, NULL, 0 }; \
31-
typedef rettype (WINAPI *proc_type_##function)(__VA_ARGS__); \
31+
typedef rettype (convention *proc_type_##function)(__VA_ARGS__); \
3232
static proc_type_##function function
3333

3434
/*

compat/win32/trace2_win32_process_info.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,8 +143,8 @@ static void get_is_being_debugged(void)
143143
*/
144144
static void get_peak_memory_info(void)
145145
{
146-
DECLARE_PROC_ADDR(psapi.dll, BOOL, GetProcessMemoryInfo, HANDLE,
147-
PPROCESS_MEMORY_COUNTERS, DWORD);
146+
DECLARE_PROC_ADDR(psapi.dll, BOOL, WINAPI, GetProcessMemoryInfo,
147+
HANDLE, PPROCESS_MEMORY_COUNTERS, DWORD);
148148

149149
if (INIT_PROC_ADDR(GetProcessMemoryInfo)) {
150150
PROCESS_MEMORY_COUNTERS pmc;

compat/winansi.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,9 @@ typedef struct _CONSOLE_FONT_INFOEX {
4545
static void warn_if_raster_font(void)
4646
{
4747
DWORD fontFamily = 0;
48-
DECLARE_PROC_ADDR(kernel32.dll, BOOL, GetCurrentConsoleFontEx,
49-
HANDLE, BOOL, PCONSOLE_FONT_INFOEX);
48+
DECLARE_PROC_ADDR(kernel32.dll, BOOL, WINAPI,
49+
GetCurrentConsoleFontEx, HANDLE, BOOL,
50+
PCONSOLE_FONT_INFOEX);
5051

5152
/* don't bother if output was ascii only */
5253
if (!non_ascii_used)

0 commit comments

Comments
 (0)