diff --git a/Documentation/RelNotes/2.50.0.adoc b/Documentation/RelNotes/2.50.0.adoc index c3d5dad704eea7..95349ea50c001e 100644 --- a/Documentation/RelNotes/2.50.0.adoc +++ b/Documentation/RelNotes/2.50.0.adoc @@ -300,7 +300,7 @@ Fixes since v2.49 (merge e7ef4be7c2 mh/left-right-limited later to maint). * Document the convention to disable hooks altogether by setting the - hooksPath configuration variable to /dev/nulll + hooksPath configuration variable to /dev/null. (merge 1b2eee94f1 ds/doc-disable-hooks later to maint). * Make sure outage of third-party sites that supply P4, Git-LFS, and @@ -318,6 +318,7 @@ Fixes since v2.49 * Update to arm64 Windows port. (merge 436a42215e js/windows-arm64 later to maint). + * hashmap API clean-up to ensure hashmap_clear() leaves a cleared map in a reusable state. (merge 9481877de3 en/hashmap-clear-fix later to maint). @@ -351,7 +352,7 @@ Fixes since v2.49 (merge 5dbaec628d pw/sequencer-reflog-use-after-free later to maint). * win+Meson CI pipeline, unlike other pipelines for Windows, - used to build artifacts in develper mode, which has been changed to + used to build artifacts in developer mode, which has been changed to build them in release mode for consistency. (merge 184abdcf05 js/ci-build-win-in-release-mode later to maint). @@ -379,6 +380,15 @@ Fixes since v2.49 reverse failed to give the mode bits of the path "removed" by the patch to the file it creates, which has been corrected. + * "git verify-refs" (and hence "git fsck --reference") started + erroring out in a repository in which secondary worktrees were + prepared with Git 2.43 or lower. + (merge d5b3c38b8a sj/ref-contents-check-fix later to maint). + + * Update total_ram() functrion on BSD variants. + + * Update online_cpus() functrion on BSD variants. + * Other code cleanup, docfix, build fix, etc. (merge 227c4f33a0 ja/doc-block-delimiter-markup-fix later to maint). (merge 2bfd3b3685 ab/decorate-code-cleanup later to maint). diff --git a/Documentation/git-column.adoc b/Documentation/git-column.adoc index 5a4f2b6fde9f27..8e0047214dc992 100644 --- a/Documentation/git-column.adoc +++ b/Documentation/git-column.adoc @@ -50,7 +50,7 @@ EXAMPLES -------- Format data by columns: -+ + ------------ $ seq 1 24 | git column --mode=column --padding=5 1 4 7 10 13 16 19 22 @@ -59,7 +59,7 @@ $ seq 1 24 | git column --mode=column --padding=5 ------------ Format data by rows: -+ + ------------ $ seq 1 21 | git column --mode=row --padding=5 1 2 3 4 5 6 7 @@ -68,7 +68,7 @@ $ seq 1 21 | git column --mode=row --padding=5 ------------ List some tags in a table with unequal column widths: -+ + ------------ $ git tag --list 'v2.4.*' --column=row,dense v2.4.0 v2.4.0-rc0 v2.4.0-rc1 v2.4.0-rc2 v2.4.0-rc3 diff --git a/GIT-VERSION-GEN b/GIT-VERSION-GEN index cea2a13401353f..1047b8d11de767 100755 --- a/GIT-VERSION-GEN +++ b/GIT-VERSION-GEN @@ -1,6 +1,6 @@ #!/bin/sh -DEF_VER=v2.50.0-rc0 +DEF_VER=v2.50.0-rc1 LF=' ' diff --git a/builtin/gc.c b/builtin/gc.c index e33ba946e43602..7dc94f243d7dc6 100644 --- a/builtin/gc.c +++ b/builtin/gc.c @@ -516,7 +516,7 @@ static uint64_t total_ram(void) total *= (uint64_t)si.mem_unit; return total; } -#elif defined(HAVE_BSD_SYSCTL) && (defined(HW_MEMSIZE) || defined(HW_PHYSMEM)) +#elif defined(HAVE_BSD_SYSCTL) && (defined(HW_MEMSIZE) || defined(HW_PHYSMEM) || defined(HW_PHYSMEM64)) int64_t physical_memory; int mib[2]; size_t length; @@ -524,6 +524,8 @@ static uint64_t total_ram(void) mib[0] = CTL_HW; # if defined(HW_MEMSIZE) mib[1] = HW_MEMSIZE; +# elif defined(HW_PHYSMEM64) + mib[1] = HW_PHYSMEM64; # else mib[1] = HW_PHYSMEM; # endif diff --git a/refs/files-backend.c b/refs/files-backend.c index 4d1f65a57a5b55..bf6f89b1d1938b 100644 --- a/refs/files-backend.c +++ b/refs/files-backend.c @@ -3762,6 +3762,9 @@ static int files_fsck_refs_dir(struct ref_store *ref_store, iter = dir_iterator_begin(sb.buf, 0); if (!iter) { + if (errno == ENOENT && !is_main_worktree(wt)) + goto out; + ret = error_errno(_("cannot open directory %s"), sb.buf); goto out; } diff --git a/t/t0602-reffiles-fsck.sh b/t/t0602-reffiles-fsck.sh index f671ac4d3aba1a..0ef483659d561f 100755 --- a/t/t0602-reffiles-fsck.sh +++ b/t/t0602-reffiles-fsck.sh @@ -110,6 +110,25 @@ test_expect_success 'ref name check should be adapted into fsck messages' ' ) ' +test_expect_success 'no refs directory of worktree should not cause problems' ' + test_when_finished "rm -rf repo" && + git init repo && + ( + cd repo && + test_commit initial && + git worktree add --detach ./worktree && + + ( + cd worktree && + worktree_refdir="$(git rev-parse --git-dir)/refs" && + # Simulate old directory layout + rmdir "$worktree_refdir" && + git refs verify 2>err && + test_must_be_empty err + ) + ) +' + test_expect_success 'ref name check should work for multiple worktrees' ' test_when_finished "rm -rf repo" && git init repo && diff --git a/thread-utils.c b/thread-utils.c index 1f89ffab4c32bc..374890e6b05b69 100644 --- a/thread-utils.c +++ b/thread-utils.c @@ -46,11 +46,11 @@ int online_cpus(void) mib[0] = CTL_HW; # ifdef HW_AVAILCPU mib[1] = HW_AVAILCPU; - len = sizeof(cpucount); - if (!sysctl(mib, 2, &cpucount, &len, NULL, 0)) - return cpucount; -# endif /* HW_AVAILCPU */ +# elif defined(HW_NCPUONLINE) + mib[1] = HW_NCPUONLINE; +# else mib[1] = HW_NCPU; +# endif /* HW_AVAILCPU */ len = sizeof(cpucount); if (!sysctl(mib, 2, &cpucount, &len, NULL, 0)) return cpucount;