summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2026-06-25Merge branch 'ps/t4216-tap-fix'Junio C Hamano1-21/+0
TAP output breakage fix. * ps/t4216-tap-fix: t4216: fix no-op test that breaks TAP output
2026-06-25connected: search promisor objects genericallyPatrick Steinhardt2-11/+48
When performing connectivity checks we have to figure out whether any of the new objects are promisor objects, as we cannot assume full connectivity if so. This check is performed by iterating through all packfiles in the repository and searching each of them for the given object. Of course, this mechanism is quite specific to implementation details of the object database, as we assume that it uses packfiles in the first place. Refactor the logic so that we instead use `odb_for_each_object_ext()` with an object prefix filter and the `ODB_FOR_EACH_OBJECT_PROMISOR_ONLY` flag. This will yield all objects that have the exact object name and that are part of a promisor pack in a generic way. Add a test to verify that we indeed use the optimization. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2026-06-25connected: split out promisor-based connectivity checkPatrick Steinhardt1-34/+51
When performing a connectivity check in a partial clone we try to avoid doing the connectivity check by checking whether all new tips are part of a promisor pack. This makes use of the fact that we don't expect full connectivity for promised objects anyway, so it's basically fine if those objects are not fully connected. The logic that handles this promisor-based check is somewhat hard to read though as it uses nested loops and gotos. Pull it out into a standalone function, which makes it a bit easier to reason about. We'll also further simplify the function in the next commit. Suggested-by: Christian Couder <christian.couder@gmail.com> Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2026-06-25odb/source-packed: support flags when iterating an object prefixPatrick Steinhardt1-3/+19
Callers of `odb_for_each_object()` can specify an optional object name prefix so that we only yield objects that match it. This is incompatible though with passing flags at the same time, as we don't yet know to handle them. Loosen this restriction by calling `should_exclude_pack()`. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2026-06-25odb/source-packed: extract logic to skip certain packsPatrick Steinhardt1-10/+18
The caller can pass flags that allow them to filter out specific kinds of objects when iterating objects via `odb_for_each_object()`. This only works for "normal" iteration though, as we `BUG()` when the user passes flags and specifies an object prefix. This limitation will be lifted in the next commit. Prepare for this by extracting the logic that skips certain kinds of packs so that we can easily reuse it. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2026-06-25t4216: fix no-op test that breaks TAP outputPatrick Steinhardt1-21/+0
In t4216 we have have a prerequisite that is active in case the system's `char` type is signed by default. This prerequisite isn't really used by anything though: while it is used to guard one of our tests, that specific test is essentially a no-op. So all this infrastructure does is to provide some debugging hint to a reader that pays a lot of attention. Besides that, the way we set up the prerequisite also results in broken TAP output on systems where `char` is unsigned by default: we use `test_cmp()` to diff two files outside of of any test body, and if the files differ we enable the prerequisite. If so, the call to `test_cmp()` would also print output, and that output is of course not valid TAP output. That wasn't a problem before 389c83025d (t: let prove fail when parsing invalid TAP output, 2026-06-04), because our TAP parser was configured to be lenient. But starting with that commit, t4216 is now failing on systems with unsigned chars. Drop the whole infrastructure. The prerequisite is not used anywhere else, and the only location where it's used doesn't really provide much value. Reported-by: Todd Zullinger <tmz@pobox.com> Signed-off-by: Patrick Steinhardt <ps@pks.im> Tested-by: Todd Zullinger <tmz@pobox.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2026-06-25l10n: sv.po: Update Swedish translationPeter Krefting1-182/+602
Reviewed-by: Tuomas Ahola <taahol@utu.fi> Signed-off-by: Peter Krefting <peter@softwolves.pp.se>
2026-06-25l10n: ca.po: update Catalan translationMikel Forcada1-427/+994
Signed-off-by: Mikel Forcada <mlf@prompsit.com>
2026-06-24Merge branch 'ps/odb-source-packed' into ps/odb-drop-whenceJunio C Hamano26-1079/+1163
* ps/odb-source-packed: odb/source-packed: drop pointer to "files" parent source midx: refactor interfaces to work on "packed" source odb/source-packed: stub out remaining functions odb/source-packed: wire up `freshen_object()` callback odb/source-packed: wire up `find_abbrev_len()` callback odb/source-packed: wire up `count_objects()` callback odb/source-packed: wire up `for_each_object()` callback odb/source-packed: wire up `read_object_stream()` callback odb/source-packed: wire up `read_object_info()` callback packfile: use higher-level interface to implement `has_object_pack()` odb/source-packed: wire up `reprepare()` callback odb/source-packed: wire up `close()` callback odb/source-packed: start converting to a proper `struct odb_source` odb/source-packed: store pointer to "files" instead of generic source packfile: move packed source into "odb/" subsystem packfile: split out packfile list logic packfile: rename `struct packfile_store` to `odb_source_packed`
2026-06-24gpg-interface: fix strip_cr_before_lf to only remove CR before LFAntonio De Stefani1-14/+11
c4adea82c5 (Convert CR/LF to LF in tag signatures, 2008-07-11) introduced CR stripping for GPG output on Windows, but intentionally stripped all CR characters unconditionally to "keep the code simpler", even though only CRLF sequences (Windows line endings) needed to be normalized. Later 2f47eae2a1 (Split GPG interface into its own helper library, 2011-09-07) moved the code into gpg-interface.c, and 29b315778e (ssh signing: add ssh key format and signing code, 2021-09-10) extracted it into the remove_cr_after() helper when adding SSH signing support, while noticing that it unconditionally strips all CRs, leaving a NEEDSWORK comment. Fix the loop to skip CR only when immediately followed by LF, keeping lone trailing CR characters intact. Rename the function to strip_cr_before_lf to reflect its corrected behavior, and update both call sites and their comments accordingly. Signed-off-by: Antonio De Stefani <antonio.destefani08@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2026-06-24l10n: tr: Update Turkish translationsEmir SARI1-169/+583
Signed-off-by: Emir SARI <emir_sari@icloud.com>
2026-06-24l10n: bg.po: Updated Bulgarian translation (6322t)Alexander Shopov1-164/+632
Signed-off-by: Alexander Shopov <ash@kambanaria.org>
2026-06-23repo: add path.gitdir with absolute and relative suffix formattingK Jayatheerth3-0/+36
Scripts need a stable way to locate the git directory without parsing rev-parse output or relying on its flag-driven path format selection. There is no way to retrieve this path from git repo info today. Introduce path.gitdir.absolute and path.gitdir.relative keys, consistent with the path.commondir keys added in the previous patch. Reuse the test_repo_info_path helper introduced there to validate both variants. Mentored-by: Justin Tobler <jltobler@gmail.com> Mentored-by: Lucas Seiki Oshiro <lucasseikioshiro@gmail.com> Signed-off-by: K Jayatheerth <jayatheerthkulkarni2005@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2026-06-23repo: add path.commondir with absolute and relative suffix formattingK Jayatheerth3-0/+87
Scripts working with worktree setups need a reliable way to discover the common directory, which diverges from the git directory when multiple worktrees are in use. There is no way to retrieve this path from git repo info today. Introduce path.commondir.absolute and path.commondir.relative keys. Exposing explicit format variants rather than a single key with a default avoids ambiguity for scripts that require predictable output. Mentored-by: Justin Tobler <jltobler@gmail.com> Mentored-by: Lucas Seiki Oshiro <lucasseikioshiro@gmail.com> Signed-off-by: K Jayatheerth <jayatheerthkulkarni2005@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2026-06-23path: extract format_path() and use in rev-parseK Jayatheerth3-43/+135
Path formatting logic in builtin/rev-parse.c writes directly to stdout. Other builtins cannot reuse it. Extract this logic into format_path() in path.c and expose a path_format enum in path.h. Convert rev-parse to use the new helper in the same step to validate the API against existing tests and avoid introducing dead code. Mentored-by: Justin Tobler <jltobler@gmail.com> Mentored-by: Lucas Seiki Oshiro <lucasseikioshiro@gmail.com> Signed-off-by: K Jayatheerth <jayatheerthkulkarni2005@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2026-06-23status: improve rebase todo list parsingPhillip Wood2-50/+172
When there is rebase in progress "git status" displays the last couple of completed and the next couple of pending commands from the todo list. When it does this it tries to abbreviate the object ids of the commits to be picked. Unfortunately it does not abbreviate the object ids when the line starts with "fixup -C" or "merge -C". It also mistakenly replaces the refname in "reset main" and "update-ref refs/heads/main" with the object id that the ref points to. Fix this by using the function added in the last commit to parse the command name and only try to abbreviate the argument for commands that take an object id. If a command accepts a label then try to resolve the object name as a label first and only if that fails try to resolve it as an object_id. When trying to abbreviate an object id, only replace the object name if it starts with the abbreviated object id so that tag or branch names that contain only hex digits are left unchanged. Comments are now processed after stripping any leading whitespace from the line. This matches what the sequencer does in parse_insn_line(). The existing test cases are updated to test a wider variety of commands. Only the pending commands in the tests are changed to avoid removing existing coverage. Helped-by: Elijah Newren <newren@gmail.com> Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2026-06-23sequencer: factor out parsing of todo commandsPhillip Wood2-12/+35
Move the code that parses todo commands into a separate function so that it can be shared with "git status" in the next commit. As we know the input is NUL terminated we do not pass a pointer to the end of the line and instead test for a blank line by looking for NUL, CR LF, or LF. We use starts_with() instead of starts_with_mem() for the same reason. This results in slightly different behavior when there a CR at the start of the line that is not followed by LF. Previously such a line was treated as a comment rather than an invalid line. Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2026-06-23git-gui: allow larger width for the commit message fieldAlexander Shopov1-1/+1
Users may like to make the main window very wide. In this case, a rather small size of the commit message field leaves a wide unused space at the bottom-right. Allow settting the field width to values much larger than 99 characters. In fact, users can set it to extreme values to fill the entire space regardless of window width: the widget geometry will be negotiated to be limited to the available space despite the large requested width. Signed-off-by: Alexander Shopov <ash@kambanaria.org>
2026-06-23gitk: make "make -s" silentHarald Nordgren1-2/+4
The catalog rule runs msgfmt with --statistics, whose output goes to stderr and so survives "make -s", and the rule also echoes "Generating catalog". The Gitk Makefile guards its quiet helpers on V alone, so a silent build still prints these and the GEN line. The statistics are not needed, as in 2f12b31b746c (Makefile: don't invoke msgfmt with --statistics, 2021-12-17). Drop them, suppress the quiet helpers when "s" is among the make flags, and give the catalog rule a quiet prefix so a quiet build stays quiet. Signed-off-by: Harald Nordgren <haraldnordgren@gmail.com> Signed-off-by: Johannes Sixt <j6t@kdbg.org>
2026-06-22Git 2.55-rc2v2.55.0-rc2Junio C Hamano2-1/+10
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2026-06-22Merge branch 'hn/macos-linker-warning'Junio C Hamano1-2/+9
Xcode 15 and later has a linker set to complain when the same library archive is listed twice on the command line. Squelch the annoyance. * hn/macos-linker-warning: config.mak.uname: avoid macOS dup-library warning
2026-06-22Merge branch 'js/win32-localtime-r'Junio C Hamano1-1/+1
Build-fix for 32-bit Windows. * js/win32-localtime-r: win32: ensure that `localtime_r()` is declared even in i686 builds
2026-06-22Merge branch 'ps/gitlab-ci-windows'Junio C Hamano2-3/+63
Wean the Windows builds in GitLab CI procedure away from (unfortunately unreliable) Chocolatey to install dependencies. * ps/gitlab-ci-windows: gitlab-ci: migrate Windows builds away from Chocolatey
2026-06-22Merge branch 'ps/odb-source-packed' into ps/connected-generic-promisor-checksJunio C Hamano26-1079/+1163
* ps/odb-source-packed: odb/source-packed: drop pointer to "files" parent source midx: refactor interfaces to work on "packed" source odb/source-packed: stub out remaining functions odb/source-packed: wire up `freshen_object()` callback odb/source-packed: wire up `find_abbrev_len()` callback odb/source-packed: wire up `count_objects()` callback odb/source-packed: wire up `for_each_object()` callback odb/source-packed: wire up `read_object_stream()` callback odb/source-packed: wire up `read_object_info()` callback packfile: use higher-level interface to implement `has_object_pack()` odb/source-packed: wire up `reprepare()` callback odb/source-packed: wire up `close()` callback odb/source-packed: start converting to a proper `struct odb_source` odb/source-packed: store pointer to "files" instead of generic source packfile: move packed source into "odb/" subsystem packfile: split out packfile list logic packfile: rename `struct packfile_store` to `odb_source_packed`
2026-06-22odb: introduce `odb_prepare()`Patrick Steinhardt3-15/+20
Introduce `odb_prepare()` as a simple wrapper to prepare alternates and then prepare each individual source. Adapt git-grep(1) to use it. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2026-06-22odb/source: generalize `reprepare()` callbackPatrick Steinhardt11-52/+52
The `reprepare()` callback function can be used to flush caches of a given object source and then prepare it anew. This is for example used when a concurrent process may have written new objects. Ultimately, this can be seen as doing two separate steps: 1. We drop any caches. 2. We prepare the source. We have one callsite in git-grep(1) though that really only want to do (2). This is done by reaching into the "files" backend directly and then calling `odb_source_packed_prepare()`, which of course may not work with alternate backends. We could in theory just call `reprepare()` here, and that would likely not have any significant downside. But this would certainly feel like a code smell. Instead, generalize the `reprepare()` callback to `prepare()` with a flag that optionally instructs the backend to also flush the caches, which allows us to drop the external `odb_source_packed_prepare()` declaration. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2026-06-22Merge branch 'ps/odb-source-packed' into ps/odb-generalize-prepareJunio C Hamano26-1079/+1163
* ps/odb-source-packed: odb/source-packed: drop pointer to "files" parent source midx: refactor interfaces to work on "packed" source odb/source-packed: stub out remaining functions odb/source-packed: wire up `freshen_object()` callback odb/source-packed: wire up `find_abbrev_len()` callback odb/source-packed: wire up `count_objects()` callback odb/source-packed: wire up `for_each_object()` callback odb/source-packed: wire up `read_object_stream()` callback odb/source-packed: wire up `read_object_info()` callback packfile: use higher-level interface to implement `has_object_pack()` odb/source-packed: wire up `reprepare()` callback odb/source-packed: wire up `close()` callback odb/source-packed: start converting to a proper `struct odb_source` odb/source-packed: store pointer to "files" instead of generic source packfile: move packed source into "odb/" subsystem packfile: split out packfile list logic packfile: rename `struct packfile_store` to `odb_source_packed`
2026-06-22win32: ensure that `localtime_r()` is declared even in i686 buildsJohannes Schindelin1-1/+1
The `__MINGW64__` constant is defined, surprise, surprise, only when building for a 64-bit CPU architecture. Therefore using it as a guard to define `_POSIX_C_SOURCE` (so that `localtime_r()` is declared, among other functions) is not enough, we also need to check `__MINGW32__`. Technically, the latter constant is defined even for 64-bit builds. But let's make things a bit easier to understand by testing for both constants. Making it so fixes this compile warning (turned error in GCC v14.1): archive-zip.c: In function 'dos_time': archive-zip.c:612:9: error: implicit declaration of function 'localtime_r'; did you mean 'localtime_s'? [-Wimplicit-function-declaration] 612 | localtime_r(&time, &tm); | ^~~~~~~~~~~ | localtime_s Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2026-06-22log: improve --follow following renames for non-linear historyMiklos Vajna7-2/+254
Have a repo with a subtree merge, do a 'git log --follow prefix/test.c', the output only contains history in the outer repo, not commits that were merged via a subtree merge. What happens is that 'git log --follow' stores the followed path only in opt->diffopt.pathspec, so in case the commit history is non-linear, and multiple parents have renames to the followed path, then the end result isn't really defined: the first commit that happens to be visited in one of the parents update opt->diffopt.pathspec, and from that point, only that updated path is visited. Fix the problem by introducing a commit -> path map (follow_pathspec_slab) that stores what will be a path to follow when visiting that parent. At the top of log_tree_commit(), if the slab has an entry for this commit, we replace opt->diffopt.pathspec with a path from this entry, so the correct path is followed, even if an unrelated sub-tree changed the path to be followed to something else. After log_tree_diff() runs, we record each parent's path in the slab. As a result, the walk order doesn't matter, which was exactly the source of problems previously. This helps with subtree merges (rename happens inside the merge commit), but also fixes the general case when the rename happens in the history of parents, not in the merge commit itself. Signed-off-by: Miklos Vajna <vmiklos@collabora.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2026-06-21A few more topics before -rc2Junio C Hamano1-0/+1
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2026-06-21Merge branch 'js/objects-larger-than-4gb-on-windows-more'Junio C Hamano72-271/+300
* js/objects-larger-than-4gb-on-windows-more: odb: use size_t for object_info.sizep and the size APIs packfile,delta: drop the `cast_size_t_to_ulong()` wrappers pack-objects: use size_t for in-core object sizes packfile: widen unpack_entry()'s size out-parameter to size_t pack-objects(check_pack_inflate()): use size_t instead of unsigned long patch-delta: use size_t for sizes compat/msvc: use _chsize_s for ftruncate
2026-06-21Merge branch 'kw/gitattributes-typofix'Junio C Hamano1-1/+1
* kw/gitattributes-typofix: gitattributes: fix eol attribute for Perl scripts
2026-06-21pack-objects: support `--delta-islands` with `--path-walk`Taylor Blau3-11/+54
Since the inception of `--path-walk`, this option has had a documented incompatibility with `--delta-islands`. When discussing those original patches on the list, a message from Stolee in [1] noted the following: this could be remedied by [...] doing a separate walk to identify islands using the normal method In a related portion of the thread, Peff explains[2]: The delta islands code already does its own tree walk to propagate the bits down (it does rely on the base walk's show_commit() to propagate through the commits). Once each object has its island bitmaps, I think however you choose to come up with delta candidates [...] you should be able to use it. It's fundamentally just answering the question of "am I allowed to delta between these two objects". That is similar to what this patch does, and it turns out the cheaper option is sufficient: perform the same island side effects from the path-walk callback rather than doing a second walk. Recall how delta-islands are computed during a normal repack: - `show_commit()` calls `propagate_island_marks()` for each commit, which merges the commit's island bitset onto its root tree object and onto each of its parent commits. - `show_object()` for a tree records the tree's depth derived from the slash-separated pathname. Subsequent `resolve_tree_islands()` uses that depth to walk trees in increasing-depth order, propagating each tree's marks to its children. - At delta-search time, `in_same_island()` enforces that a delta target's island bitmap is a subset of its base's: every island that reaches the target must also reach the base. Path-walk's enumeration callback is `add_objects_by_path()`. It already adds objects to `to_pack`, but until now did not perform the island-related side effects. Two things are needed: - For each commit batch, call `propagate_island_marks()` on commits, exactly as `show_commit()` does. We have to be careful about the order in which we call this function, and we must see a commit before its parents in order to have island marks to propagate. The path-walk batch preserves that order. Path-walk appends commits to its `OBJ_COMMIT` batch as they come back from the same `get_revision()` loop the regular traversal uses, and `add_objects_by_path()` iterates the batch in array order. So every commit reaches `propagate_island_marks()` in the same sequence that `show_commit()` would have seen it, and the descendant-first chain that the algorithm relies on is intact. Skip island propagation for excluded commits to match the regular traversal, whose `show_commit()` callback is only invoked for interesting commits. Boundary commits may still be present in path-walk's callback so they can serve as thin-pack bases, but they should not contribute island marks. - For each tree batch, record the tree's depth from the path. Use the `record_tree_depth()` helper from the previous commit so both callbacks behave identically, including the max-depth-wins behavior when a tree is reached via more than one path. The helper accepts both the `show_object()` path shape ("foo", "foo/bar") and the path-walk shape with a trailing slash ("foo/", "foo/bar/"), so depths recorded from either traversal mode are directly comparable. This is implicit in the implementation sketch from Peff above. `resolve_tree_islands()` sorts trees by `oe->tree_depth` in increasing-depth order before propagating marks down, so that a parent tree's marks are finalized before its children inherit them. Without recording the depth at path-walk time, every path-walk-discovered tree would land at depth 0 in `to_pack`, the sort would lose its ordering, and children could inherit marks from parents whose own contributions had not yet been merged in. With those two pieces in place, `resolve_tree_islands()` receives the same island inputs from path-walk as it would from the regular traversal, so the existing island checks can be reused unchanged. Drop the documented incompatibility between `--path-walk` and `--delta-islands`, and add t5320 coverage for path-walk island repacks with and without bitmap writing, as well as the same-island case where a delta remains allowed. [1]: https://lore.kernel.org/git/9aa2471b-0850-4707-9733-d3b33609f5f2@gmail.com/ [2]: https://lore.kernel.org/git/20240911063203.GA1538586@coredump.intra.peff.net/ Signed-off-by: Taylor Blau <me@ttaylorr.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2026-06-21pack-objects: extract `record_tree_depth()` helperTaylor Blau1-14/+18
Prepare for a subsequent change that needs to record tree depths from a second call site by factoring the delta-islands tree-depth bookkeeping out of `show_object()` and into a helper, `record_tree_depth()`. The helper looks up the object in `to_pack`, returns early when the object was not added there, computes the depth from the slash count in the supplied name, and preserves the existing max-depth-wins behavior when a tree is reached by more than one path. Signed-off-by: Taylor Blau <me@ttaylorr.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2026-06-21pack-objects: support reachability bitmaps with `--path-walk`Taylor Blau4-8/+70
When 'pack-objects' is invoked with '--path-walk', it prevents us from using reachability bitmaps. This behavior dates back to 70664d2865c (pack-objects: add --path-walk option, 2025-05-16), which included a comment in the relevant portion of the command-line arguments handling that read as follows: /* * We must disable the bitmaps because we are removing * the --objects / --objects-edge[-aggressive] options. */ In fb2c309b7d3 (pack-objects: pass --objects with --path-walk, 2026-05-02), path-walk learned to pass '--objects' again, but still kept bitmap traversal disabled. That leaves two useful cases unsupported: * A path-walk repack that writes bitmaps does not give the bitmap selector any commits, because path-walk reveals commits through `add_objects_by_path()` rather than through `show_commit()`, where `index_commit_for_bitmap()` is normally called. * An invocation like "git pack-objects --use-bitmap-index --path-walk" never tries an existing bitmap, even when one is available and could answer the request. Fortunately for us, neither restriction is required. * On the writing side: teach the path-walk object callback to call `index_commit_for_bitmap()` for commits that it adds to the pack. That gives the bitmap selector the commit candidates it would have seen from the regular traversal. * For bitmap reading, keep passing '--objects' to the internal rev_list machinery, but stop clearing `use_bitmap_index`. If an existing bitmap can answer the request, use it; otherwise fall back to path-walk's own enumeration. As a result, we can see significantly reduced pack generation times from p5311 (with our `GIT_PERF_REPO` set to a recent clone of the fluentui repository) before this commit: Test HEAD^ HEAD ---------------------------------------------------------------------------------------- 5311.40: server (1 days, --path-walk) 1.43(1.39+0.04) 0.01(0.01+0.00) -99.3% 5311.41: size (1 days, --path-walk) 139.6K 139.7K +0.0% 5311.42: client (1 days, --path-walk) 0.02(0.02+0.00) 0.02(0.02+0.00) +0.0% 5311.44: server (2 days, --path-walk) 1.43(1.39+0.04) 0.01(0.00+0.00) -99.3% 5311.45: size (2 days, --path-walk) 139.6K 139.7K +0.0% 5311.46: client (2 days, --path-walk) 0.02(0.02+0.00) 0.02(0.02+0.00) +0.0% 5311.48: server (4 days, --path-walk) 1.44(1.39+0.04) 0.01(0.01+0.00) -99.3% 5311.49: size (4 days, --path-walk) 238.1K 238.1K +0.0% 5311.50: client (4 days, --path-walk) 0.03(0.03+0.00) 0.03(0.03+0.00) +0.0% 5311.52: server (8 days, --path-walk) 1.43(1.39+0.03) 0.01(0.00+0.00) -99.3% 5311.53: size (8 days, --path-walk) 344.9K 344.9K +0.0% 5311.54: client (8 days, --path-walk) 0.07(0.07+0.00) 0.07(0.08+0.00) +0.0% 5311.56: server (16 days, --path-walk) 1.47(1.44+0.03) 0.10(0.08+0.01) -93.2% 5311.57: size (16 days, --path-walk) 844.0K 844.0K +0.0% 5311.58: client (16 days, --path-walk) 0.09(0.09+0.00) 0.09(0.09+0.00) +0.0% 5311.60: server (32 days, --path-walk) 1.52(1.50+0.05) 0.14(0.15+0.02) -90.8% 5311.61: size (32 days, --path-walk) 4.2M 4.2M +0.1% 5311.62: client (32 days, --path-walk) 0.34(0.48+0.02) 0.34(0.45+0.05) +0.0% 5311.64: server (64 days, --path-walk) 1.55(1.52+0.06) 0.15(0.15+0.04) -90.3% 5311.65: size (64 days, --path-walk) 6.4M 6.4M -0.0% 5311.66: client (64 days, --path-walk) 0.51(0.79+0.05) 0.51(0.80+0.06) +0.0% 5311.68: server (128 days, --path-walk) 1.59(1.57+0.06) 0.16(0.21+0.01) -89.9% 5311.69: size (128 days, --path-walk) 8.4M 8.4M -0.0% 5311.70: client (128 days, --path-walk) 0.72(1.44+0.08) 0.71(1.47+0.09) -1.4% We get the same size of output pack, but this commit allows us to do so in a significantly shorter amount of time. Intuitively, we're generating the same pack (hence the unchanged 'test_size' output from run to run), but varying how we get there. Before this commit, pack-objects prefers '--path-walk' to '--use-bitmap-index', so we generate the output pack by performing a normal '--path-walk' traversal. With this commit, we are operating over a *repacked* state (that itself was done with a '--path-walk' traversal), but are able to perform pack-reuse on that repacked state via bitmaps. When comparing the size of the repacked pack with/without '--path-walk' on the previous commit versus this one, we see that (a) the repacked size improves significantly with '--path-walk', and that (b) writing bitmaps during repacking does not regress this improvement: Test HEAD^ HEAD ---------------------------------------------------------------------------------------- 5311.3: size of bitmapped pack 558.4M 558.5M +0.0% 5311.38: size of bitmapped pack (--path-walk) 164.4M 164.4M +0.0% (Note that to observe an improvement here, we must repack with '-F' in order to avoid reusing non-'--path-walk' deltas, which would otherwise skew our results.) There is one wrinkle when it comes to '--boundary', which we must not pass into the bitmap walk in the presence of both '--path-walk' and '--use-bitmap-index'. Path-walk needs boundary commits when it performs its own traversal, in order to discover bases for thin packs, but the bitmap traversal does not expect this. Work around this by setting `revs->boundary` as late as possible within the '--path-walk' traversal, after any bitmap attempt has either succeeded or declined to answer the request. Signed-off-by: Taylor Blau <me@ttaylorr.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2026-06-21t/perf: drop p5311's lookup-table permutationTaylor Blau1-5/+3
p5311 measures the cost of serving a fetch from a bitmapped pack and indexing the resulting pack on the client. Since 761416ef91d (bitmap-lookup-table: add performance tests for lookup table, 2022-08-14), p5311 effectively runs itself twice: once with the bitmap's lookup table extension enabled, and again with it disabled. This comparison has served its useful purpose, as the lookup table is almost four years old, and the de-facto default in server-side Git deployments. A following commit will want to test a different combination (repacking with and without '--path-walk' instead of the lookup table). Instead of multiplying the current test count by two again to produce four variations of `test_fetch_bitmaps()`, drop the lookup table option to reduce the number of perf tests we run. Retain `test_fetch_bitmaps()` itself, since we will use this in the future for the new parameterization. (As an aside, a future commit outside of this series will adjust the default value of 'pack.writeBitmapLookupTable' to "true", matching the de-facto norm for deployments where the existence of bitmap lookup tables is meaningful. Punt on that to a later series and instead make the minimal change for now.) Suggested-by: Derrick Stolee <stolee@gmail.com> Signed-off-by: Taylor Blau <me@ttaylorr.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2026-06-21doc: advise batching patch rerollsWeijie Yuan2-2/+33
Contributors often need guidance on how quickly to send later iterations of a patch series. Add a rough default of no more than one new version of the same series per day so feedback can be batched and reviewers have time to comment regardless of their time zones. Mention factors that can affect the timing, such as series size, review depth, and substantial rework. Also point out that avoiding rapid rerolls encourages authors to polish each version before sending it, so reviewers can focus on substantial issues. Helped-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Weijie Yuan <wy@wyuan.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2026-06-21doc: encourage review replies before rerollingWeijie Yuan2-8/+16
Review feedback should not be answered only by sending a new patch version. Encourage contributors to discuss their planned response in the mailing-list thread before rerolling. This makes the author's reasoning explicit before the next version is prepared, instead of forcing reviewers to infer it from the rerolled patches. It also encourages more direct social interaction between contributors and helps foster a more collaborative review process. Signed-off-by: Weijie Yuan <wy@wyuan.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2026-06-21git-gui: reduce complexity of the quiet msgfmt ruleJohannes Sixt1-3/+2
In non-verbose builds (without V=1) the rule to compile *.po files with msgfmt captures the output in a shell variable and then strips down the text produced by --statistics to fit on a 80 column line. The previous commit removed --statistics output of the msgfmt invocation, so that we don't get to see anything beyond "MSGFMT po/xx.msg" anymore. Make the rule as minimal as the other "quiet" rules. Signed-off-by: Johannes Sixt <j6t@kdbg.org>
2026-06-21git-gui: drop msgfmt --statistics outputHarald Nordgren1-1/+1
The catalog rules ran msgfmt with --statistics, whose output goes to stderr and so survive "make -s". The statistics are not needed, as in 2f12b31b746c (Makefile: don't invoke msgfmt with --statistics, 2021-12-17). Remove it so a quiet build stays quiet. Signed-off-by: Harald Nordgren <haraldnordgren@gmail.com> [j6t: adjust commit message] Signed-off-by: Johannes Sixt <j6t@kdbg.org>
2026-06-20SubmittingPatches: address design critiquesJunio C Hamano1-0/+20
Contributors sometimes fail to answer fundamental design or viability comments from reviewers and submit subsequent rounds without addressing them. When design decisions are resolved on the mailing list, the final justification should be recorded in the commit messages. Instruct authors to be particularly mindful of critiques regarding high-level design or viability, to defend their choices on the list, and to accompany new iterations with clearer explanations in the cover letter, responses, and revised commit messages. Also instruct them to explicitly document the resolution of these concerns in the commit message body to keep the historical record complete. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2026-06-20environment: use 'repo->initialized' for repo_protect_hfs() and ↵Tian Yuchen2-4/+4
repo_protect_ntfs() To match how we refrain from calling repo_config_values() on an uninitialized instance of a repository object in other two topics that deal with ignore_case and trust_executable_bit, check the repo->initialized bit instead of the repo->gitdir member. Mentored-by: Christian Couder <christian.couder@gmail.com> Mentored-by: Ayush Chandekar <ayu.chandekar@gmail.com> Mentored-by: Olamide Caleb Bello <belkid98@gmail.com> Signed-off-by: Tian Yuchen <cat@malon.dev> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2026-06-19config.mak.uname: avoid macOS dup-library warningHarald Nordgren1-2/+9
Building on macOS with Xcode 15 or newer emits: ld: warning: ignoring duplicate libraries: 'libgit.a', 'target/release/libgitcore.a' Some link recipes list the same archive twice, which is harmless. Quiet the warning instead. Pass -Wl,-no_warn_duplicate_libraries on Xcode 15 and newer, whose linkers added both the warning and the suppression flag (ld64-907 and dyld-1009). Earlier linkers reject the flag, so gate on the linker version. Broaden the existing -fno-common version probe to also match the "ld64-NNN" and "dyld-NNN" forms Xcode 15 reports. Signed-off-by: Harald Nordgren <haraldnordgren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2026-06-19config: use repo_ignore_case() to access core.ignorecaseTian Yuchen14-28/+27
Replace the accesses to the global 'ignore_case' variable with calls to 'repo_ignore_case(the_repository)'. This step eliminates the 'ignore_case' global state. Note on compat/win32/path-utils.c: To eliminate the global state, several helper functions (e.g. 'win32_fspathncmp()') now read from 'repo_ignore_case(the_repository)'. While this introduces dependency on 'repository.h' into the 'compat/', it avoids massive refactoring of the signatures across the codebase. Mentored-by: Christian Couder <christian.couder@gmail.com> Mentored-by: Ayush Chandekar <ayu.chandekar@gmail.com> Mentored-by: Olamide Caleb Bello <belkid98@gmail.com> Signed-off-by: Tian Yuchen <cat@malon.dev> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2026-06-19environment: move ignore_case into repo_config_valuesTian Yuchen2-0/+16
The 'core.ignorecase' configuration which is stored as the global variable 'ignore_case' acts as a core filesystem capability flag. Move this global variable into 'struct repo_config_values' to tie it to the specific repository instance it was read from. This reduces global state and aligns with the ongoing libification effort. To ensure code readability, the getter function 'repo_ignore_case()' is introduced. Mentored-by: Christian Couder <christian.couder@gmail.com> Mentored-by: Ayush Chandekar <ayu.chandekar@gmail.com> Mentored-by: Olamide Caleb Bello <belkid98@gmail.com> Signed-off-by: Tian Yuchen <cat@malon.dev> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2026-06-19Merge branch 'js/objects-larger-than-4gb-on-windows'Junio C Hamano1-4/+9
A hotfix to an earlier attempt to update code paths that assumed "unsigned long" was long enough for "size_t". * js/objects-larger-than-4gb-on-windows: zlib: properly clamp to uLong
2026-06-19fetch: fixup a misaligned commentMatt Hunter1-1/+1
Signed-off-by: Matt Hunter <m@lfurio.us> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2026-06-19fetch: add configuration variable fetch.followRemoteHEADMatt Hunter4-17/+169
'fetch.followRemoteHEAD' is added as a generic setting used by all remotes for which 'remote.<name>.followRemoteHEAD' is undefined. If both variables are undefined, a builtin default of "create" is in effect, matching the previous behavior. As mentioned in the previous patch, 'fetch.followRemoteHEAD' supports all of the values that its 'remote' counterpart does _except_ warn-if-not-$branch, due to its tighter coupling to individual remote repositories. This setting interacts with the do_fetch mechanism in the same way as the previous does, but there are opportunities for improved user-experience discussed in [1]. See the included NEEDSWORK comment as well. Documentation and advice messages for both of the followRemoteHEAD variables are reworded to better capture the relationship between the two. The added tests assert feature parity between the two followRemoteHEAD variables, as well as the fact that 'remote.<name>.followRemoteHEAD' always supersedes this new configurable default. [1]: https://lore.kernel.org/git/xmqqh5n213bw.fsf@gitster.g/ Helped-by: Junio C Hamano <gitster@pobox.com> Signed-off-by: Matt Hunter <m@lfurio.us> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2026-06-19fetch: refactor do_fetch handling of followRemoteHEADMatt Hunter2-10/+18
Update enum follow_remote_head_settings to include the value FOLLOW_REMOTE_UNCONFIGURED as the new zero-initialized value for followRemoteHEAD. This will allow us to distinguish between the variable being unset vs. explicitly set to 'create', which is ultimately the system default. The unnecessary indentation is removed. The do_fetch function is likewise updated to perform its own decision making to determine the effective followRemoteHEAD mode, falling back to the system default if necessary. This will enable the next patch to introduce a user-configurable default. Function set_head now accepts the mode as an argument rather than only considering the value defined by the remote. The use of the 'warn-if-not-$branch' value is awkward in the context of a global default, since the branches will differ between individual remotes. For this reason, it's left out of this scheme and handling of the no_warn_branch variable is untouched. Since a remote-specific value for followRemoteHEAD takes priority, we can assume that if remote->no_warn_branch is set, then the remote is also asserting FOLLOW_REMOTE_WARN as the effective operating mode, and it will be honored by do_fetch. Signed-off-by: Matt Hunter <m@lfurio.us> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2026-06-19fetch: return 0 on known git_fetch_configMatt Hunter1-0/+1
The git config callback for git-fetch should only forward calls to git_default_config when an unknown key is given. Prevent this in the case of 'fetch.output' by returning '0', as the other known keys do. Signed-off-by: Matt Hunter <m@lfurio.us> Signed-off-by: Junio C Hamano <gitster@pobox.com>