aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2025-10-16builtin/repack.c: avoid using `hash_to_hex()` in pack geometryTaylor Blau1-1/+3
In previous commits, we started passing either repository or git_hash_algo pointers around to various spots within builtin/repack.c to reduce our dependency on the_repository in the hope of undef'ing USE_THE_REPOSITORY_VARIABLE. This commit takes us as far as we can (easily) go in that direction by removing the only use of a convenience function that only exists when USE_THE_REPOSITORY_VARIABLE is defined. Unfortunately, the only other such function is "is_bare_repository()", which is less than straightforward to convert into, say, "repo_is_bare()", the latter of the two accepting a repository pointer. Punt on that for now, and declare this commit as the stopping point for our efforts in the direction of undef'ing USE_THE_REPOSITORY_VARIABLE. Signed-off-by: Taylor Blau <me@ttaylorr.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-10-16builtin/repack.c: avoid "the_hash_algo" in `finish_pack_objects_cmd()`Taylor Blau1-5/+8
In a similar spirit as previous commits, avoid referring directly to "the_hash_algo" in builtin/repack.c::finish_pack_objects_cmd() and instead accept one as a parameter to the function. Since this function has a number of callers throughout the builtin, the diff is a little noisier than previous commits. However, each hunk is limited to passing the hash_algo parameter from a repository pointer that is already in scope. Signed-off-by: Taylor Blau <me@ttaylorr.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-10-16builtin/repack: avoid "the_hash_algo" in `repack_promisor_objects()`Taylor Blau1-1/+1
In a similar spirit as the previous commits, avoid referring directly to "the_hash_algo" within builtin/repack.c::repack_promisor_objects(). Since there is already a repository pointer in scope, use its hash_algo value instead. Signed-off-by: Taylor Blau <me@ttaylorr.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-10-16builtin/repack.c: avoid "the_hash_algo" in `write_oid()`Taylor Blau1-3/+12
In a similar spirit as the previous commit, avoid referring directly to "the_hash_algo" within builtin/repack.c::write_oid(). Unlike the previous commit, we are within a callback function, so must introduce a new struct to pass additional data through its "data" pointer. Signed-off-by: Taylor Blau <me@ttaylorr.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-10-16builtin/repack.c: avoid "the_hash_algo" when deleting packsTaylor Blau1-4/+6
The "mark_packs_for_deletion_1" function uses "the_hash_algo->hexsz" to isolate a pack's checksum before deleting it to avoid deleting a newly written pack having the same checksum (that is, some generated pack wound up identical to an existing pack). Avoid this by passing down a "struct git_hash_algo" pointer, and refer to the hash algorithm through it instead. Signed-off-by: Taylor Blau <me@ttaylorr.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-10-16builtin/repack.c: avoid "the_repository" when repacking promisor objectsTaylor Blau1-3/+4
Pass a "struct repository" pointer to the 'repack_promisor_objects()' function to avoid using "the_repository". Signed-off-by: Taylor Blau <me@ttaylorr.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-10-16builtin/repack.c: avoid "the_repository" when removing packsTaylor Blau1-8/+10
The 'remove_redundant_pack()' function uses "the_repository" to obtain, and optionally remove, the repository's MIDX. Instead of relying on "the_repository", pass around a "struct repository *" parameter through its callers, and use that instead. Signed-off-by: Taylor Blau <me@ttaylorr.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-10-16builtin/repack.c: avoid "the_repository" when taking a ref snapshotTaylor Blau1-7/+9
Avoid using "the_repository" in various MIDX-related ref snapshotting functions. Signed-off-by: Taylor Blau <me@ttaylorr.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-10-16builtin/repack.c: avoid "the_repository" in existing packs APITaylor Blau1-3/+5
There are a number of spots within builtin/repack.c which refer to "the_repository", and either make use of the "existing packs" API or otherwise have a 'struct existing_packs *' in scope. Add a "repo" member to "struct existing_packs" and use that instead of "the_repository" in such locations. Signed-off-by: Taylor Blau <me@ttaylorr.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-10-16builtin/repack.c: avoid "the_repository" in `cmd_repack()`Taylor Blau1-15/+16
Reduce builtin/repack.c's reliance on `the_repository` by using the currently-UNUSED "repo" parameter within cmd_repack(). The following commits will continue to reduce the usage of the_repository in other places within builtin/repack.c. Signed-off-by: Taylor Blau <me@ttaylorr.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-10-16RelNotes: sync with Git 2.51.1 fixupsKristoffer Haugsbakk1-5/+5
Carry over the fixups from 8c3d7c5f (RelNotes: minor fixups before 2.51.1, 2025-10-15). Signed-off-by: Kristoffer Haugsbakk <code@khaugsbakk.name> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-10-16build(deps): bump actions/github-script from 7 to 8Johannes Schindelin1-1/+1
Bumps [actions/github-script](https://github.com/actions/github-script) from 7 to 8. - [Release notes](https://github.com/actions/github-script/releases) - [Commits](https://github.com/actions/github-script/compare/v7...v8) Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-10-16build(deps): bump actions/setup-python from 5 to 6Johannes Schindelin1-2/+2
Bumps [actions/setup-python](https://github.com/actions/setup-python) from 5 to 6. - [Release notes](https://github.com/actions/setup-python/releases) - [Commits](https://github.com/actions/setup-python/compare/v5...v6) Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-10-16build(deps): bump actions/checkout from 4 to 5Johannes Schindelin4-14/+14
Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 5. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v4...v5) Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-10-16build(deps): bump actions/download-artifact from 4 to 5Johannes Schindelin1-3/+3
Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 4 to 5. - [Release notes](https://github.com/actions/download-artifact/releases) - [Commits](https://github.com/actions/download-artifact/compare/v4...v5) Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-10-15t2401: update path checks using test_path helpersSolly1-17/+17
Update old-style shell path checks to use the modern test helpers 'test_path_is_file' and 'test_path_is_dir' for improved runtime diagnosis. Signed-off-by: Solly <solobarine@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-10-15doc: git-pull: clarify how to exit a conflicted mergeJulia Evans1-9/+3
From user feedback: - One user is confused about why `git reset --merge` (why not just `git reset`?). Handle this by mentioning `git merge --abort` and `git reset --abort` instead, which have a more obvious meaning. - 2 users want to know what "In older versions of Git" means exactly (in versions older than 1.7.0). Handle this by removing the warning since it was added 15 years ago (in 3f8fc184c0e2c) Signed-off-by: Julia Evans <julia@jvns.ca> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-10-15doc: git-pull: delete the exampleJulia Evans1-26/+0
From user feedback: this example is confusing because it implies that `git pull` will run `git merge` by default, but the default is `--ff-only`. We could instead show an example of a fast-forward merge, but that may not add a lot since fast-forward merges are relatively simple. This lets us keep the description short. Signed-off-by: Julia Evans <julia@jvns.ca> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-10-15doc: git-pull: clarify options for integrating remote branchJulia Evans1-11/+20
From user feedback: - One user is confused about the current default ("I was convinced that the git default was still to merge on pull") - One user is confused about why "git fetch" isn't mentioned earlier - One user says they always forget what the arguments to `git pull` are and that it's not immediately obvious that `--no-rebase` means "merge" - One user wants `--ff-only` to be mentioned Resolve this by listing the options for integrating the the remote branch. This should help users figure out at a glance which one they want to do, and make it clearer that --ff-only is the default. Signed-off-by: Julia Evans <julia@jvns.ca> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-10-15doc: git-pull: move <repository> and <refspec> paramsJulia Evans2-11/+22
From user feedback: - it's confusing that we use both <branch> and <refspec> to refer to the second argument - one user is not clear about what `refs/heads/*:refs/remotes/origin/*` is meant to be an example of ("is it like a path?") The DESCRIPTION section is also doing a lot right now: it's trying to describe both how the <repository> and <refspec> arguments work (which is pretty complex, as seen in the DEFAULT BEHAVIOUR section) as well as how `git pull` calls `git fetch` and merge/rebase/etc depending on the arguments. Handle this by moving the description of the <repository> and <refspec> arguments to the OPTIONS section, so that we can focus on the merge/rebase/etc behaviour in the DESCRIPTION section, and refer folks to the later sections for details. Use the term "upstream" instead of 'the "remote" and "merge" configuration for the current branch' since users are more likely to know what an "upstream" is. Signed-off-by: Julia Evans <julia@jvns.ca> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-10-15Sync with Git 2.51.1Junio C Hamano1-7/+60
2025-10-15Git 2.51.1v2.51.1Junio C Hamano2-1/+54
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-10-15Merge branch 'kh/doc-patch-id-markup-fix' into maint-2.51Junio C Hamano1-20/+23
Documentation mark-up fix. * kh/doc-patch-id-markup-fix: doc: patch-id: fix accidental literal blocks
2025-10-15Merge branch 'ja/doc-markup-attached-paragraph-fix' into maint-2.51Junio C Hamano2-15/+17
Documentation mark-up fix. * ja/doc-markup-attached-paragraph-fix: doc: fix indentation of refStorage item in git-config(1) doc: change the markup of paragraphs following a nested list item
2025-10-15Merge branch 'en/doc-merge-tree-describe-merge-base' into maint-2.51Junio C Hamano1-4/+10
Clarify the "--merge-base" command line option in "git merge-tree". * en/doc-merge-tree-describe-merge-base: Documentation/git-merge-tree.adoc: clarify the --merge-base option
2025-10-15Merge branch 'mh/doc-credential-url-prefix' into maint-2.51Junio C Hamano2-12/+22
Doc update to describe a feature that has already been implemented. * mh/doc-credential-url-prefix: docs/gitcredentials: describe URL prefix matching
2025-10-15Merge branch 'ps/odb-clean-stale-wrappers' into maint-2.51Junio C Hamano4-42/+8
Code clean-up. * ps/odb-clean-stale-wrappers: odb: drop deprecated wrapper functions
2025-10-15Merge branch 'ag/doc-sendmail-gmail-example-update' into maint-2.51Junio C Hamano1-4/+4
Doc update. * ag/doc-sendmail-gmail-example-update: docs: update sendmail docs to use more secure SMTP server for Gmail
2025-10-15Merge branch 'jc/doc-includeif-hasconfig-remote-url-fix' into maint-2.51Junio C Hamano1-5/+4
Doc mark-up fix. * jc/doc-includeif-hasconfig-remote-url-fix: config: document includeIf conditions consistently
2025-10-15Merge branch 'mm/worktree-doc-typofix' into maint-2.51Junio C Hamano1-1/+1
Docfix. * mm/worktree-doc-typofix: docs: fix typo in worktree.adoc 'extension'
2025-10-15Merge branch 'rs/object-name-extend-abbrev-len-update' into maint-2.51Junio C Hamano1-3/+2
Code clean-up. * rs/object-name-extend-abbrev-len-update: object-name: declare pointer type of extend_abbrev_len()'s 2nd parameter
2025-10-15Merge branch 'kh/doc-markup-fixes' into maint-2.51Junio C Hamano3-3/+3
Doc markup fixes. * kh/doc-markup-fixes: doc: remove extra backtick for inline-verbatim doc: add missing backtick for inline-verbatim
2025-10-15Merge branch 'km/alias-doc-markup-fix' into maint-2.51Junio C Hamano1-1/+1
Docfix. * km/alias-doc-markup-fix: doc: fix formatting of function-wrap shell alias
2025-10-15Merge branch 'js/doc-sending-patch-via-thunderbird' into maint-2.51Junio C Hamano1-3/+9
Doc update. * js/doc-sending-patch-via-thunderbird: doc/format-patch: adjust Thunderbird MUA hint to new add-on
2025-10-15Merge branch 'kr/clone-synopsis-fix' into maint-2.51Junio C Hamano1-1/+1
Doc fix. * kr/clone-synopsis-fix: docs: remove stray bracket from git-clone synopsis
2025-10-15Merge branch 'rj/t6137-cygwin-fix' into maint-2.51Junio C Hamano1-6/+6
Test fix for breakage introduced in Git 2.50. * rj/t6137-cygwin-fix: t6137-*.sh: fix test failure on cygwin
2025-10-15Merge branch 'kh/doc-git-log-markup-fix' into maint-2.51Junio C Hamano1-2/+2
Doc update. * kh/doc-git-log-markup-fix: doc: git-log: fix description list
2025-10-15Merge branch 'kn/refs-files-case-insensitive' into maint-2.51Junio C Hamano6-17/+262
Deal more gracefully with directory / file conflicts when the files backend is used for ref storage, by failing only the ones that are involved in the conflict while allowing others. * kn/refs-files-case-insensitive: refs/files: handle D/F conflicts during locking refs/files: handle F/D conflicts in case-insensitive FS refs/files: use correct error type when lock exists refs/files: catch conflicts on case-insensitive file-systems
2025-10-15Merge branch 'pw/rebase-i-cleanup-fix' into maint-2.51Junio C Hamano2-18/+22
"git rebase -i" failed to clean-up the commit log message when the command commits the final one in a chain of "fixup" commands, which has been corrected. * pw/rebase-i-cleanup-fix: sequencer: remove VERBATIM_MSG flag rebase -i: respect commit.cleanup when picking fixups
2025-10-15Merge branch 'jk/add-i-color' into maint-2.51Junio C Hamano7-42/+150
Some among "git add -p" and friends ignored color.diff and/or color.ui configuration variables, which is an old regression, which has been corrected. * jk/add-i-color: contrib/diff-highlight: mention interactive.diffFilter add-interactive: manually fall back color config to color.ui add-interactive: respect color.diff for diff coloring stash: pass --no-color to diff plumbing child processes
2025-10-15Merge branch 'sg/line-log-boundary-fixes' into maint-2.51Junio C Hamano8-3/+218
A corner case bug in "git log -L..." has been corrected. * sg/line-log-boundary-fixes: line-log: show all line ranges touched by the same diff range line-log: fix assertion error
2025-10-15Merge branch 'ps/upload-pack-oom-protection' into maint-2.51Junio C Hamano2-36/+51
A broken or malicious "git fetch" can say that it has the same object for many many times, and the upload-pack serving it can exhaust memory storing them redundantly, which has been corrected. * ps/upload-pack-oom-protection: upload-pack: don't ACK non-commits repeatedly in protocol v2 t5530: modernize tests
2025-10-15Merge branch 'ds/midx-write-fixes' into maint-2.51Junio C Hamano2-70/+86
Fixes multiple crashes around midx write-out codepaths. * ds/midx-write-fixes: midx-write: simplify error cases midx-write: reenable signed comparison errors midx-write: use uint32_t for preferred_pack_idx midx-write: use cleanup when incremental midx fails midx-write: put failing response value back midx-write: only load initialized packs
2025-10-15Merge branch 'ds/path-walk-repack-fix' into maint-2.51Junio C Hamano2-30/+88
"git repack --path-walk" lost objects in some corner cases, which has been corrected. cf. <CABPp-BHFxxGrqKc0m==TjQNjDGdO=H5Rf6EFsf2nfE1=TuraOQ@mail.gmail.com> * ds/path-walk-repack-fix: path-walk: create initializer for path lists path-walk: fix setup of pending objects
2025-10-15Merge branch 'jk/fetch-check-graph-objects-fix' into maint-2.51Junio C Hamano1-1/+2
Under a race against another process that is repacking the repository, especially a partially cloned one, "git fetch" may mistakenly think some objects we do have are missing, which has been corrected. * jk/fetch-check-graph-objects-fix: fetch-pack: re-scan when double-checking graph objects
2025-10-15Merge branch 'ly/diff-name-only-with-diff-from-content' into maint-2.51Junio C Hamano5-23/+70
Various options to "git diff" that makes comparison ignore certain aspects of the differences (like "space changes are ignored", "differences in lines that match these regular expressions are ignored") did not work well with "--name-only" and friends. * ly/diff-name-only-with-diff-from-content: diff: ensure consistent diff behavior with ignore options
2025-10-15Merge branch 'jc/diff-no-index-in-subdir' into maint-2.51Junio C Hamano2-0/+32
"git diff --no-index" run inside a subdirectory under control of a Git repository operated at the top of the working tree and stripped the prefix from the output, and oddballs like "-" (stdin) did not work correctly because of it. Correct the set-up by undoing what the set-up sequence did to cwd and prefix. * jc/diff-no-index-in-subdir: diff: --no-index should ignore the worktree
2025-10-15Merge branch 'en/ort-rename-fixes' into maint-2.51Junio C Hamano2-30/+544
Various bugs about rename handling in "ort" merge strategy have been fixed. * en/ort-rename-fixes: merge-ort: fix directory rename on top of source of other rename/delete merge-ort: fix incorrect file handling merge-ort: clarify the interning of strings in opt->priv->path t6423: fix missed staging of file in testcases 12i,12j,12k t6423: document two bugs with rename-to-self testcases merge-ort: drop unnecessary temporary in check_for_directory_rename() merge-ort: update comments to modern testfile location
2025-10-15Merge branch 'dl/push-missing-object-error' into maint-2.51Junio C Hamano2-59/+19
"git push" had a code path that led to BUG() but it should have been a die(), as it is a response to a usual but invalid end-user action to attempt pushing an object that does not exist. cf. <xmqqo6spiyqp.fsf@gitster.g> * dl/push-missing-object-error: remote.c: convert if-else ladder to switch remote.c: remove BUG in show_push_unqualified_ref_name_error() t5516: remove surrounding empty lines in test bodies
2025-10-15Merge branch 'ps/reflog-migrate-fixes' into maint-2.51Junio C Hamano12-117/+413
"git refs migrate" to migrate the reflog entries from a refs backend to another had a handful of bugs squashed. * ps/reflog-migrate-fixes: refs: fix invalid old object IDs when migrating reflogs refs: stop unsetting REF_HAVE_OLD for log-only updates refs/files: detect race when generating reflog entry for HEAD refs: fix identity for migrated reflogs ident: fix type of string length parameter builtin/reflog: implement subcommand to write new entries refs: export `ref_transaction_update_reflog()` builtin/reflog: improve grouping of subcommands Documentation/git-reflog: convert to use synopsis type