summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2026-06-19fetch: rename function report_set_headMatt Hunter1-2/+2
Update to the slightly more obvious name 'warn_set_head', which matches the verbiage of the followRemoteHEAD options. Signed-off-by: Matt Hunter <m@lfurio.us> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2026-06-19t5510: cleanup remote in followRemoteHEAD dangling ref testMatt Hunter1-0/+1
A later patch will introduce a new test which closely mirrors this one. Update this test to remove the 'custom-head' remote it creates. Otherwise, the two tests will conflict with each other, as the second one to execute will fail to create this remote (which already exists, thanks to the first test). Signed-off-by: Matt Hunter <m@lfurio.us> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2026-06-19doc: explain fetchRemoteHEADWarn adviceMatt Hunter1-0/+4
When the user sets 'remote.<name>.followRemoteHEAD' to 'warn[-if-not-$branch]', git-fetch will report when a fetched HEAD disagrees with the locally-configured remote's HEAD. This additional advice instructs the user how to deal with these warnings, but was previously undocumented in git-config. Signed-off-by: Matt Hunter <m@lfurio.us> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2026-06-19fetch: fixup set_head advice for warn-if-not-branchMatt Hunter1-1/+1
Specifying the word 'branch' in the command is not correct - a mismatch with both the implementation in remote.c and the documentation. Signed-off-by: Matt Hunter <m@lfurio.us> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2026-06-19SubmittingPatches: note that trailer order mattersKristoffer Haugsbakk1-0/+10
It matters where you put new trailers: they should be added in chronological order, and each person who passes on a patch should add their s-o-b last. You are signing off on the patch as well as the whole message up to that point. This also makes it clear who added what: Acked-by: The Reviewer <r@example.org> Signed-off-by: The Contributor <c@example.org> Acked-by: The (Late) Reviewer <late@example.org> Signed-off-by: The Maintainer <m@example.org> The first ack was added by the contributor and the second one was added by the maintainer. Helped-by: Junio C Hamano <gitster@pobox.com> Signed-off-by: Kristoffer Haugsbakk <code@khaugsbakk.name> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2026-06-19SubmittingPatches: be consistent with trailer markupKristoffer Haugsbakk1-7/+7
The rest of this section and (most importantly) the list has decided to use `<key>:`. So let’s use backticks (`) and a colon (:) throughout the document. Signed-off-by: Kristoffer Haugsbakk <code@khaugsbakk.name> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2026-06-19SubmittingPatches: document Based-on-patch-by trailerKristoffer Haugsbakk1-0/+4
This trailer comes up often enough and the use case is not fully covered by the other trailers here. For example, it is sometimes better to use this trailer instead of `Co-authored-by:`. Signed-off-by: Kristoffer Haugsbakk <code@khaugsbakk.name> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2026-06-19SubmittingPatches: discourage common Linux trailersKristoffer Haugsbakk1-0/+4
The Linux Kernel regularly uses trailers (or “tags”) `Fixes` and `Link`. Sometimes people submit patches to this project with them. They have their use in that project but it is not clear what purpose they would serve here. For `Fixes`: Linux has many trees, and applying patches with cherry-picks is common. A `Fixes` trailer in commit C2 pointing to commit C1 helps the cherry-picker figure out that she probably needs C2 if she wants to apply C1. See linux/d5d6281a (checkpatch: check for missing Fixes tags, 2024-06-11):[1] Why are stable patches encouraged to have a fixes tag? Some people mark their stable patches as "# 5.10" etc. This is useful but a Fixes tag is still a good idea. For example, the Fixes tag helps in review. It helps people to not cherry-pick buggy patches without also cherry-picking the fix. In contrast the Git project has few trees (to my knowledge), and there is much less need to cherry-pick fixes as opposed to either using backmerges or rebasing all of the downstream tree’s commits on top of git.git `master` from time to time. This project does regularly mention what commits a patch/commit fixes, but that is done inline in the commit message proper (cf. the trailer block of the message). For `Link`: These are used both to link back to the patch submission as well as with footnotes. In contrast this project has `refs/notes/amlog` for linking back to the patch submissions, and footnotes are only used in the commit message proper. † 1: Commit linux/d5d6281a has “linux” in front of it since this commit is from the Linux Kernel, not Git. Example of a Linux tree—as well as an example of `Link`—is [2]. Link: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/ [2] Signed-off-by: Kristoffer Haugsbakk <code@khaugsbakk.name> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2026-06-19SubmittingPatches: encourage trailer use for substantial helpKristoffer Haugsbakk1-3/+11
Trailers beyond the mandatory s-o-b are regularly used based on my last two years of reading the mailing list. Moreover, reviewers might encourage it.[1] This is also in line with the project crediting both commit authors and people mentioned in trailers each release; “Nobody is THE one making contribution”.[2] Adding trailers is already encouraged, but in the section `send-patches`. Let’s replace “If you like” with outright encouragement in this section so that all trailer discussion (except s-o-b; see `sign-off` section) is contained in this section; a link to from `send-patches` makes this information equally visible. Now we need to make a heading for `commit-trailers` in order for the HTML output to make sense. At the same time, it is important to temper this recommendation to a significant enough contribution; in my experience beginners can be eager to add a trailer for everyone who replies with an action point that is followed up on. Let’s also spell out that these trailers should follow the Git author/ committer format. One might naturally just write the name, but in that case it will not be picked up by: git shortlog --group=trailer:<key> and normalization via `.mailmap` will not work. Also introduce the list of common trailers as such. Granted, this is already implied by the later paragraph about “create your own trailer”, so this just frontloads this information. † 1: https://lore.kernel.org/git/CAP8UFD0POvYDgGtEx8GBhvKkd8XzzWQsy8XxAKL9M3+uz3ka+w@mail.gmail.com/#:~:text=for%20at%20least † 2: https://lore.kernel.org/git/xmqqzh248sy0.fsf@gitster.c.googlers.com/ Signed-off-by: Kristoffer Haugsbakk <code@khaugsbakk.name> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2026-06-18zlib: properly clamp to uLongJohannes Schindelin1-4/+9
On platforms where `unsigned long` and `size_t` differ in bit size, we want to clamp the buffers we pass to zlib to the former's size, as per d05d666977 (git-zlib: handle data streams larger than 4GB, 2026-05-08). The logic introduced in that commit performs a clamping to the bits, though, which fails to do what is needed here: If too many bytes are available in the buffers, we need to clamp to the maximum value of an `unsigned long`. Otherwise, we ask zlib to use too small buffers, in the worst case using 0 as the size (think: a value whose 32 lowest bits are all zero). Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2026-06-17gitlab-ci: migrate Windows builds away from ChocolateyPatrick Steinhardt2-3/+63
The Windows builds in GitLab CI use Chocolatey to install dependencies. Unfortunately, Chocolatey seems to be very unreliable, which causes the jobs to fail very regularly. This is a limitation that seems to be somewhat known [1]: As an organization, you want 100% reliability (or at least that potential), and you may want full trust and control as well. This is something you can get with internally hosted packages, and you are unlikely to achieve from use of the Community Package Repository. So using the Community Package Repository is kind of discouraged in case one wants reliability. We _do_ want reliability though, and we cannot easily switch to an enterprise license to fix this issue. Introduce a new script that downloads and installs dependencies directly. This has a couple of benefits: - We can drop our dependency on Chocolatey completely, thus improving reliability. - We can easily cache the installers. - We get direct control over the exact versions we install. - Installing dependencies is sped up from roundabout 3 minutes to 1 minute. [1]: https://docs.chocolatey.org/en-us/community-repository/community-packages-disclaimer/#summary Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2026-06-17Hopefully final batch before -rc2Junio C Hamano1-0/+32
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2026-06-17Merge branch 'en/commit-graph-timestamp-fix'Junio C Hamano2-1/+10
compute_reachable_generation_numbers() in commit-graph used a 32-bit integer to accumulate parent generations, which is OK for generation number v1 (topological levels), but with generation number v2 (adjusted committer timestamps), it truncated timestamps beyond 2106. Fixed by widening the accumulator to timestamp_t. * en/commit-graph-timestamp-fix: commit-graph: use timestamp_t for max parent generation accumulator
2026-06-17Merge branch 'dl/posix-unused-warning-clang'Junio C Hamano1-12/+23
The UNUSED macro in 'compat/posix.h' has been updated to use a newly introduced GIT_CLANG_PREREQ macro for compiler version checks, and the existing GIT_GNUC_PREREQ macro has been modernized to use explicit major/minor comparisons rather than bit-shifting. * dl/posix-unused-warning-clang: compat/posix.h: simplify GIT_GNUC_PREREQ() comparison compat/posix.h: clean up GIT_GNUC_PREREQ() and UNUSED compat/posix.h: enable UNUSED warning messages for Clang
2026-06-17Merge branch 'td/ls-files-pathspec-prefilter'Junio C Hamano4-0/+61
`git ls-files --modified` and `git ls-files --deleted` have been optimized to filter with pathspec before calling lstat() when there is only a single pathspec item, avoiding unnecessary filesystem access for entries that will not be shown. * td/ls-files-pathspec-prefilter: ls-files: filter pathspec before lstat
2026-06-17Merge branch 'ta/doc-config-adoc-fixes'Junio C Hamano5-5/+13
Various AsciiDoc markup fixes in 'git config' documentation and related files to ensure lists and formatting are rendered correctly. * ta/doc-config-adoc-fixes: doc: git-config: escape erroneous highlight markup doc: config/sideband: fix description list delimiter doc: config: terminate runaway lists
2026-06-17Merge branch 'jc/t1400-fifo-cleanup'Junio C Hamano1-0/+1
Test cleanup. * jc/t1400-fifo-cleanup: t1400: have fifo test clean after itself
2026-06-17Merge branch 'td/describe-tag-iteration'Junio C Hamano2-0/+15
'git describe' has been taught to pass the 'refs/tags/' prefix down to the ref iterator when '--all' is not requested, avoiding unnecessary iteration over non-tag refs. * td/describe-tag-iteration: describe: limit default ref iteration to tags
2026-06-17Merge branch 'ps/transport-helper-tsan-fix'Junio C Hamano2-12/+8
The TSAN race in transfer_debug() within transport-helper.c has been resolved by initializing the debug flag early in bidirectional_transfer_loop() before spawning worker threads, allowing the removal of a TSAN suppression. * ps/transport-helper-tsan-fix: transport-helper: fix TSAN race in transfer_debug()
2026-06-17Git 2.55-rc1v2.55.0-rc1Junio C Hamano2-1/+6
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2026-06-17Merge branch 'ab/index-pack-retain-child-bases'Junio C Hamano1-1/+0
"git index-pack" has been optimized by retaining child bases in the delta cache instead of immediately freeing them, letting the existing cache limit policy decide eviction. * ab/index-pack-retain-child-bases: index-pack: retain child bases in delta cache
2026-06-17Merge branch 'js/osxkeychain-build-wo-rust'Junio C Hamano1-1/+1
Build fix. * js/osxkeychain-build-wo-rust: osxkeychain: fix build with Rust
2026-06-17odb/source-packed: drop pointer to "files" parent sourcePatrick Steinhardt4-19/+19
Over the last commits we have turned the packfile store into a proper object database source that can be used as a standalone backend. As such, it is no longer necessary to have it coupled to the "files" parent source. Remove the pointer to the owning "files" source so that the "packed" source can be used as a standalone entity. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2026-06-17midx: refactor interfaces to work on "packed" sourcePatrick Steinhardt13-129/+144
Our interfaces used to interact with MIDXs all work on top of the generic `struct odb_source`. This doesn't make much sense though: a MIDX is strictly tied to the "packed" source, so passing in a generic source gives the false sense that it may also work with a different type of source. Fix this conceptual weirdness and instead require the caller to pass in a "packed" source explicitly. This also makes the next commit easier to implement, where we drop the pointer to the "files" source in the "packed" source. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2026-06-17odb/source-packed: stub out remaining functionsPatrick Steinhardt1-0/+42
Stub out remaining functions that we either don't need or that are basically no-ops. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2026-06-17odb/source-packed: wire up `freshen_object()` callbackPatrick Steinhardt5-29/+24
Move `packfile_store_freshen_object()` and from "packfile.c" into "odb/source-packed.c" and wire it up as the `freshen_object()` callback of the "packed" source. Note that this removes the last external caller of `find_pack_entry()` from "packfile.c", which means that we can now make this function static. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2026-06-17odb/source-packed: wire up `find_abbrev_len()` callbackPatrick Steinhardt4-117/+114
Move `packfile_store_find_abbrev_len()` and its associated helpers from "packfile.c" into "odb/source-packed.c" and wire it up as the `find_abbrev_len()` callback of the "packed" source. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2026-06-17odb/source-packed: wire up `count_objects()` callbackPatrick Steinhardt4-42/+34
Move `packfile_store_count_objects()` from "packfile.c" into "odb/source-packed.c" and wire it up as the `count_objects()` callback of the "packed" source. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2026-06-17odb/source-packed: wire up `for_each_object()` callbackPatrick Steinhardt7-280/+269
Move `packfile_store_for_each_object()` and its associated helpers from "packfile.c" into "odb/source-packed.c" and wire it up as the `for_each_object()` callback of the "packed" source. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2026-06-17odb/source-packed: wire up `read_object_stream()` callbackPatrick Steinhardt4-17/+17
Wire up the `read_object_stream()` callback for the packed source and call it in the "files" source via the `odb_source_read_object_stream()` interface. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2026-06-17odb/source-packed: wire up `read_object_info()` callbackPatrick Steinhardt5-78/+79
Move the logic to read object info from a "packed" source into "odb/source-packed.c" and wire it up as the `read_object_info()` callback. Note that we also move around the supporting `find_pack_entry()`, but we still have to expose it to other callers that exist in "packfile.c". This will be fixed in subsequent commits though, where all callers in "packfile.c" will have been moved into "odb/source-packed.c", and at that point we'll be able to make `find_pack_entry()` file-local again. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2026-06-17packfile: use higher-level interface to implement `has_object_pack()`Patrick Steinhardt1-4/+2
In `has_object_pack()` we're checking whether a specific object exists as part of a packfile. This is done by calling the low-level function `find_pack_entry()`, but this function will eventually be moved into "odb/source-packed.c" and made file-local. Refactor the code to use `packfile_store_read_object_info()` instead. This refactoring is functionally equivalent as that function will call `find_pack_entry()` itself and then return immediately when it ain't got no object info pointer as parameter. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2026-06-17odb/source-packed: wire up `reprepare()` callbackPatrick Steinhardt7-177/+172
Move the logic to prepare and reprepare the "packed" source into "odb/source-packed.c" and wire it up as the `reprepare()` callback. Note that "preparing" a source is not yet generic. Eventually, it would probably make sense to turn the existing `reprepare()` callback into a `prepare()` callback with an optional flag to force re-preparing. But this step will be handled in a separate patch series. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2026-06-17odb/source-packed: wire up `close()` callbackPatrick Steinhardt4-19/+17
Wire up a new `close()` callback for the packed source and call it from the "files" source via the generic `odb_source_close()` interface. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2026-06-17odb/source-packed: start converting to a proper `struct odb_source`Patrick Steinhardt6-22/+60
Start converting `struct odb_source_packed` into a proper pluggable `struct odb_source` by embedding the base struct and assigning it the new `ODB_SOURCE_PACKED` type. Furthermore, wire up lifecycle management of this source by implementing the `free` callback and taking ownership of the chdir notifications. Note that the packed source is not yet functional as a standalone `struct odb_source`, as it's missing all of the callback implementations. These will be wired up in subsequent commits. Further note that we're also registering a `chdir_notify` callback to reparent our path. This wasn't previously necessary (and still isn't at this point in time) because all paths are taken from the owning "files" source, and that source already handles the reparenting for us. But a subsequent commit will change that so that we're using the path of the "packed" source, and once that happens we'll need it to be updated when changing the working directory. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2026-06-17odb/source-packed: store pointer to "files" instead of generic sourcePatrick Steinhardt4-11/+11
The `struct odb_source_packed` holds a pointer to its owning parent source. The way that Git is currently structured, this parent is always the "files" source. In subsequent commits we're going to detangle that so that the "packed" source doesn't have any owning parent source at all, which makes it usable as a completely standalone source. Detangling this mess is somewhat intricate though, and is made even more intricate because it's not always clear which kind of source one is holding at a specific point in time -- either the parent "files" source, or the child "packed" source. Make this relationship more explicit by storing a pointer to the "files" source instead of storing a pointer to a generic `struct odb_source`. This will help make subsequent steps a bit clearer by making it more obvious whether we're using the generic "base" source or the owning "files" source. Note that this is a temporary step, only. At the end of this series we will have dropped the "files" pointer completely. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2026-06-17packfile: move packed source into "odb/" subsystemPatrick Steinhardt7-75/+87
In subsequent patches we'll be turning `struct odb_source_packed` into a proper `struct odb_source`. As a first step towards this goal, move its struct out of "packfile.{c,h}" and into "odb/source-packed.{c,h}". This detaches the implementation of the packfile object source from the generic packfile code, following the same convention already used by the "files" and "in-memory" sources. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2026-06-17packfile: split out packfile list logicPatrick Steinhardt6-105/+117
In the next commit we're about to introduce the "packed" object database source. This source will embed a packfile list, and consequently we'll have to include "packfile.h" to make the struct definition available. This will unfortunately lead to a cyclic dependency that we cannot resolve with a forward declaration. Split out the code that relates to the packfile list into a separate compilation unit so that both "packfile.h" and "odb/source-packed.h" can include it. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2026-06-17packfile: rename `struct packfile_store` to `odb_source_packed`Patrick Steinhardt3-46/+46
Not too long ago, we have introduced the packfile store in b7983adb51 (packfile: introduce a new `struct packfile_store`, 2025-09-23). This struct is responsible for managing all of our access to packfiles and is used as one of the two sources of objects for the "files" source. Back when I introduced this structure I didn't have the clear vision yet that it will eventually also turn into a proper object database source, and how exactly that infrastructure will look like. Now though it's becoming increasingly clear that it does make sense to treat it just the same as any of our other ODB sources. The consequence is that the naming is now a bit out-of-date: it's just another source and will be turned into a proper `struct odb_source` over the next couple of commits, but it's not named accordingly. Rename the structure to `odb_source_packed` to align it with this goal and to bring it in line with the other sources we already have. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2026-06-17osxkeychain: fix build with RustJohannes Schindelin1-1/+1
Without NO_RUST defined, the varint encoder/decoder lives in the RUST_LIB, which needs to be linked. Symptom: cc [... -o contrib/credential/osxkeychain/git-credential-osxkeychain [...] Undefined symbols for architecture x86_64: "_decode_varint", referenced from: _read_untracked_extension in libgit.a[x86_64][63](dir.o) _read_untracked_extension in libgit.a[x86_64][63](dir.o) _read_one_dir in libgit.a[x86_64][63](dir.o) _read_one_dir in libgit.a[x86_64][63](dir.o) _load_cache_entry_block in libgit.a[x86_64][174](read-cache.o) "_encode_varint", referenced from: _write_untracked_extension in libgit.a[x86_64][63](dir.o) _write_untracked_extension in libgit.a[x86_64][63](dir.o) _write_untracked_extension in libgit.a[x86_64][63](dir.o) _write_one_dir in libgit.a[x86_64][63](dir.o) _write_one_dir in libgit.a[x86_64][63](dir.o) _do_write_index in libgit.a[x86_64][174](read-cache.o) ld: symbol(s) not found for architecture x86_64 While it is curious why these functions are needed at all (osxkeychain does not read or write the index), the compile error is a real problem. Instead of trying to play games to add `GITLIBS` while filtering out `common-main.o`, replace the `$(LIB_FILE) $(EXTLIBS)` construct with the much shorter `$(LIBS)` construct that _already_ filters out `common-main.o` and adds the Rust library when needed. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2026-06-16hash-object: add a >4GB/LLP64 test case using filtered inputPhilip Oakley1-0/+12
To verify that the `clean` side of the `clean`/`smudge` filter code is correct with regards to LLP64 (read: to ensure that `size_t` is used instead of `unsigned long`), here is a test case using a trivial filter, specifically _not_ writing anything to the object store to limit the scope of the test case. As in previous commits, the `big` file from previous test cases is reused if available, to save setup time, otherwise re-generated. Signed-off-by: Philip Oakley <philipoakley@iee.email> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2026-06-16hash-object: add another >4GB/LLP64 test casePhilip Oakley1-0/+8
To complement the `--stdin` and `--literally` test cases that verify that we can hash files larger than 4GB on 64-bit platforms using the LLP64 data model, here is a test case that exercises `hash-object` _without_ any options. Just as before, we use the `big` file from the previous test case if it exists to save on setup time, otherwise generate it. Signed-off-by: Philip Oakley <philipoakley@iee.email> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2026-06-16hash-object --stdin: verify that it works with >4GB/LLP64Philip Oakley1-0/+8
Just like the `hash-object --literally` code path, the `--stdin` code path also needs to use `size_t` instead of `unsigned long` to represent memory sizes, otherwise it would cause problems on platforms using the LLP64 data model (such as Windows). To limit the scope of the test case, the object is explicitly not written to the object store, nor are any filters applied. The `big` file from the previous test case is reused to save setup time; To avoid relying on that side effect, it is generated if it does not exist (e.g. when running via `sh t1007-*.sh --long --run=1,41`). Signed-off-by: Philip Oakley <philipoakley@iee.email> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2026-06-16hash algorithms: use size_t for section lengthsPhilip Oakley4-6/+5
Continue walking the code path for the >4GB `hash-object --literally` test to the hash algorithm step for LLP64 systems. This patch lets the SHA1DC code use `size_t`, making it compatible with LLP64 data models (as used e.g. by Windows). The interested reader of this patch will note that we adjust the signature of the `git_SHA1DCUpdate()` function without updating _any_ call site. This certainly puzzled at least one reviewer already, so here is an explanation: This function is never called directly, but always via the macro `platform_SHA1_Update`, which is usually called via the macro `git_SHA1_Update`. However, we never call `git_SHA1_Update()` directly in `struct git_hash_algo`. Instead, we call `git_hash_sha1_update()`, which is defined thusly: static void git_hash_sha1_update(git_hash_ctx *ctx, const void *data, size_t len) { git_SHA1_Update(&ctx->sha1, data, len); } i.e. it contains an implicit downcast from `size_t` to `unsigned long` (before this here patch). With this patch, there is no downcast anymore. With this patch, finally, the t1007-hash-object.sh "files over 4GB hash literally" test case is fixed. Signed-off-by: Philip Oakley <philipoakley@iee.email> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2026-06-16object-file.c: use size_t for header lengthsPhilip Oakley6-13/+13
Continue walking the code path for the >4GB `hash-object --literally` test. The `hash_object_file_literally()` function internally uses both `hash_object_file()` and `write_object_file_prepare()`. Both function signatures use `unsigned long` rather than `size_t` for the mem buffer sizes. Use `size_t` instead, for LLP64 compatibility. While at it, convert those function's object's header buffer length to `size_t` for consistency. The value is already upcast to `uintmax_t` for print format compatibility. Note: The hash-object test still does not pass. A subsequent commit continues to walk the call tree's lower level hash functions to identify further fixes. Signed-off-by: Philip Oakley <philipoakley@iee.email> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2026-06-16hash-object: demonstrate a >4GB/LLP64 problemPhilip Oakley1-0/+11
On LLP64 systems, such as Windows, the size of `long`, `int`, etc. is only 32 bits (for backward compatibility). Git's use of `unsigned long` for file memory sizes in many places, rather than size_t, limits the handling of large files on LLP64 systems (commonly given as `>4GB`). Provide a minimum test for handling a >4GB file. The `hash-object` command, with the `--literally` and without `-w` option avoids writing the object, either loose or packed. This avoids the code paths hitting the `bigFileThreshold` config test code, the zlib code, and the pack code. Subsequent patches will walk the test's call chain, converting types to `size_t` (which is larger in LLP64 data models) where appropriate. Signed-off-by: Philip Oakley <philipoakley@iee.email> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2026-06-16topic flush before -rc1 (batch 2)Junio C Hamano1-0/+37
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2026-06-16Merge branch 'ta/typofixes'Junio C Hamano5-5/+5
Typofixes * ta/typofixes: docs: fix typos
2026-06-16Merge branch 'mm/subprocess-handshake-fix'Junio C Hamano2-6/+37
The subprocess handshake during startup has been made gentler by using packet_read_line_gently() instead of packet_read_line() to prevent the parent Git process from dying abruptly when a configured subprocess (e.g., a clean/smudge filter) fails to start. * mm/subprocess-handshake-fix: sub-process: use gentle handshake to avoid die() on startup failure
2026-06-16Merge branch 'wy/docs-typofixes'Junio C Hamano14-14/+14
Various typos, grammatical errors, and duplicated words in both documentation and code comments have been corrected. * wy/docs-typofixes: docs: fix typos and grammar