summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorLines
2026-02-09t2003: modernize path existence checks using test helpersBurak Kaan Karaçay-25/+25
The old style 'test -f' and 'test -d' checks are silent on failure, which makes debugging difficult. Replace them with the 'test_path_is_*' helpers which provide verbose error messages when a test fails. Signed-off-by: Burak Kaan Karaçay <bkkaracay@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2026-02-08version: stop using the_repositoryRené Scharfe-4/+0
Actually it has never been used in version.c since cf7ee481902 (agent: advertise OS name via agent capability, 2025-02-15) added the dependency macro. Remove it, along with the also unused struct declaration. Signed-off-by: René Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2026-02-08remove duplicate includesRené Scharfe-7/+0
The following command reports that some header files are included twice: $ git grep '#include' '*.c' | sort | uniq -cd Remove the second #include line in each case, as it has no effect. Signed-off-by: René Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2026-02-08commit: use commit_stackRené Scharfe-16/+13
Use commit_stack instead of open-coding it. Also convert the loop counter i to size_t to match the type of the nr member of struct commit_stack. Signed-off-by: René Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2026-02-07merge-file: honor merge.conflictStyle outside of a repositoryYannik Tausch-7/+44
When running outside a repository, git merge-file ignores the merge.conflictStyle configuration variable entirely. Since the function receives `repo` from the caller (which is NULL outside a repository), and repo_config() falls back to reading system and user configuration when passed NULL, pass `repo` to repo_config() unconditionally. Also document that merge.conflictStyle is honored. Signed-off-by: Yannik Tausch <dev@ytausch.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2026-02-06ci: ubuntu: use GNU coreutils for dirnameColin Stagner-0/+11
The uutils version of `dirname` has output that is inconsistent with GNU coreutils. Prefer the GNU implementation of this command. Signed-off-by: Colin Stagner <ask+git@howdoi.land> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2026-02-06merge-ours: integrate with sparse-indexSam Bostock-0/+20
The merge-ours built-in opens the index to compare it against HEAD. The machinery used to do this (i.e. run_diff_index()) is capable of working with a sparse index, but the start-up sequence of this command does not take the necessary steps, so we end up expanding the index fully before doing the comparison. In order to convince sparse-index.c:is_sparse_index_allowed() to return true, we need to: - Read basic configuration with git_default_config so that global variables like core_apply_sparse_checkout are populated. merge-ours currently does not read configuration at all. - Set command_requires_full_index to 0. With that, the command can work without expanding the index fully before doing its work. Signed-off-by: Sam Bostock <sam@sambostock.ca> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2026-02-06merge-ours: drop USE_THE_REPOSITORY_VARIABLESam Bostock-6/+3
The merge-ours built-in uses the `the_repository` global to access the repository. The project is moving away from this global in favor of the `repo` parameter that is passed to each built-in command. Since merge-ours is registered with RUN_SETUP, `repo` is guaranteed to be non-NULL and can be used directly. Drop the USE_THE_REPOSITORY_VARIABLE macro and use `repo` throughout. While at it, remove a stray double blank line between the #include block and the usage string. Signed-off-by: Sam Bostock <sam@sambostock.ca> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2026-02-06doc: fix repo_config documentation referenceSoutrikDas-1/+1
In MyFirstContribution.adoc, the link to the repo_config() documentation is invalid because the related documentation was moved to a different file. Replace the path for the repo_config() documentation from 'Documentation/technical/api-config.h' to 'config.h'. Signed-off-by: SoutrikDas <valusoutrik@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2026-02-05doc: convert git-show to synopsis styleJean-Noël Avila-80/+111
* add synopsis block definition in asciidoc.conf.in * convert commands to synopsis style * use _<placeholder>_ for arguments * minor formatting fixes Reviewed-by: Kristoffer Haugsbakk <kristofferhaugsbakk@fastmail.com> Signed-off-by: Jean-Noël Avila <jn.avila@free.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2026-02-05doc: fix some style issues in git-clone and for-each-ref-optionsJean-Noël Avila-30/+30
* spell out all forms of --[no-]reject-shallow in git-clone * use imperative mood for the first line of options * Use asciidoc NOTE macro * fix markups Reviewed-by: Kristoffer Haugsbakk <kristofferhaugsbakk@fastmail.com> Signed-off-by: Jean-Noël Avila <jn.avila@free.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2026-02-05doc: finalize git-clone documentation conversion to synopsis styleJean-Noël Avila-11/+11
Use backticks where appropriate for command-line options Reviewed-by: Kristoffer Haugsbakk <kristofferhaugsbakk@fastmail.com> Signed-off-by: Jean-Noël Avila <jn.avila@free.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2026-02-05doc: convert git-submodule to synopsis styleJean-Noël Avila-196/+199
* convert commands to synopsis style * use _<placeholder>_ for arguments * convert inline lists into proper definition lists * minor formatting fixes Reviewed-by: Kristoffer Haugsbakk <kristofferhaugsbakk@fastmail.com> Signed-off-by: Jean-Noël Avila <jn.avila@free.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2026-02-05gpg-interface: remove an unnecessary NULL initializationCollin Funk-1/+1
We assign this variable unconditionally, so we do not need to initialize it to NULL where it is defined. Signed-off-by: Collin Funk <collin.funk1@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2026-02-05global: constify some pointers that are not written toCollin Funk-31/+34
The recent glibc 2.43 release had the following change listed in its NEWS file: For ISO C23, the functions bsearch, memchr, strchr, strpbrk, strrchr, strstr, wcschr, wcspbrk, wcsrchr, wcsstr and wmemchr that return pointers into their input arrays now have definitions as macros that return a pointer to a const-qualified type when the input argument is a pointer to a const-qualified type. When compiling with GCC 15, which defaults to -std=gnu23, this causes many warnings like this: merge-ort.c: In function ‘apply_directory_rename_modifications’: merge-ort.c:2734:36: warning: initialization discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers] 2734 | char *last_slash = strrchr(cur_path, '/'); | ^~~~~~~ This patch fixes the more obvious ones by making them const when we do not write to the returned pointer. Signed-off-by: Collin Funk <collin.funk1@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2026-02-05Start 2.54 cycleJunio C Hamano-2/+41
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2026-02-05Merge branch 'sp/t5500-cleanup'Junio C Hamano-7/+12
Test clean-up. * sp/t5500-cleanup: t5500: simplify test implementation and fix git exit code suppression
2026-02-05Merge branch 'tc/last-modified-options-cleanup'Junio C Hamano-18/+87
The "-z" and "--max-depth" documentation (and implementation of "-z") in the "git last-modified" command have been updated. * tc/last-modified-options-cleanup: last-modified: change default max-depth to 0 last-modified: document option '--max-depth' last-modified: document option '-z' last-modified: clarify in the docs the command takes a pathspec
2026-02-05Merge branch 'lp/diff-stat-utf8-display-width-fix'Junio C Hamano-11/+68
The computation of column width made by "git diff --stat" was confused when pathnames contain non-ASCII characters. * lp/diff-stat-utf8-display-width-fix: t4073: add test for diffstat paths length when containing UTF-8 chars diff: improve scaling of filenames in diffstat to handle UTF-8 chars
2026-02-05Merge branch 'ac/sparse-checkout-string-list-cleanup'Junio C Hamano-3/+52
Code clean-up. * ac/sparse-checkout-string-list-cleanup: sparse-checkout: optimize string_list construction and add tests to verify deduplication.
2026-02-05Merge branch 'sp/myfirstcontribution-include-update'Junio C Hamano-6/+9
Doc update. * sp/myfirstcontribution-include-update: doc: MyFirstContribution: fix missing dependencies and clarify build steps
2026-02-05Merge branch 'dd/t5403-modernise'Junio C Hamano-23/+30
Test clean-up. * dd/t5403-modernise: t5403: use test_cmp for post-checkout argument checks t5403: introduce check_post_checkout helper function
2026-02-05Merge branch 'ap/http-probe-rpc-use-auth'Junio C Hamano-0/+46
HTTP transport failed to authenticate in some code paths, which has been corrected. * ap/http-probe-rpc-use-auth: remote-curl: use auth for probe_rpc() requests too
2026-02-05Merge branch 'ar/submodule-gitdir-tweak'Junio C Hamano-51/+1026
Avoid local submodule repository directory paths overlapping with each other by encoding submodule names before using them as path components. * ar/submodule-gitdir-tweak: submodule: detect conflicts with existing gitdir configs submodule: hash the submodule name for the gitdir path submodule: fix case-folding gitdir filesystem collisions submodule--helper: fix filesystem collisions by encoding gitdir paths builtin/credential-store: move is_rfc3986_unreserved to url.[ch] submodule--helper: add gitdir migration command submodule: allow runtime enabling extensions.submodulePathConfig submodule: introduce extensions.submodulePathConfig builtin/submodule--helper: add gitdir command submodule: always validate gitdirs inside submodule_name_to_gitdir submodule--helper: use submodule_name_to_gitdir in add_submodule
2026-02-05Merge branch 'aa/add-p-previous-decisions'Junio C Hamano-46/+53
"git add -p" and friends note what the current status of the hunk being shown is. * aa/add-p-previous-decisions: add -p: show user's hunk decision when selecting hunks
2026-02-05Merge branch 'jk/remote-tracking-ref-leakfix'Junio C Hamano-11/+24
Leakfix. * jk/remote-tracking-ref-leakfix: remote: always allocate branch.push_tracking_ref remote: fix leak in branch_get_push_1() with invalid "simple" config remote: drop const return of tracking_for_push_dest() remote: return non-const pointer from error_buf()
2026-02-05doc: send-email: correct --no-signed-off-by-cc misspellingMatěj Cepl-1/+1
There is no option --signed-off-cc (without -by) for git send-email. Signed-off-by: Matěj Cepl <mcepl@cepl.eu> [kh: rebased and changed subject to house style] Signed-off-by: Kristoffer Haugsbakk <code@khaugsbakk.name> [jc: minor copyedit in the commit message] Signed-off-by: Junio C Hamano <gitster@pobox.com>
2026-02-05test: optionally test contrib in CIJunio C Hamano-0/+19
Recently it was reported that a topic merged to 'next' broke build and test for contrib/subtree part of the system. Instead of having those who run 'next' or 'master' to hit the build and test breakage and report to us, make sure we notice breakages in contrib/ area before they hit my tree at all, during their own presubmit testing. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2026-02-05Merge branch 'pks-meson-fix-missing-msgfmt' of ↵Johannes Sixt-1/+1
https://github.com/pks-gitlab/gitk * 'pks-meson-fix-missing-msgfmt' of https://github.com/pks-gitlab/gitk: gitk: fix msgfmt being required Signed-off-by: Johannes Sixt <j6t@kdbg.org>
2026-02-05gitk: fix msgfmt being requiredPatrick Steinhardt-1/+1
While the Meson build instructions already handle the case where msgfmt wasn't found, we forgot to mark the dependency itself as optional. This causes an error in case the executable could not be found: Project name: gitk Project version: undefined Program sh found: YES (C:\Program Files\Git\bin\sh.EXE) Program wish found: YES (C:\Program Files\Git\mingw64\bin\wish.EXE) Program chmod found: YES (C:\Program Files\Git\usr\bin\chmod.EXE) Program mv found: YES (C:\Program Files\Git\usr\bin\mv.EXE) Program sed found: YES (C:\Program Files\Git\usr\bin\sed.EXE) Program msgfmt found: NO subprojects\gitk\meson.build:28:3: ERROR: Program 'msgfmt' not found or not executable Fix the issue by adding the `required: false` parameter. Signed-off-by: Patrick Steinhardt <ps@pks.im>
2026-02-04contrib/subtree: fix tests with reftable backendColin Stagner-4/+3
One git-subtree test-case relies on git internals to infer the default branch name. This test fails with the new reftable backend. GIT_TEST_DEFAULT_REF_FORMAT=reftable \ meson test t7900-subtree This test script already sets GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main which eliminates the need to infer a branch name at runtime. Hardcode the branch name. Signed-off-by: Colin Stagner <ask+git@howdoi.land> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2026-02-03diff-highlight: allow testing with Git 3.0 breaking changesJunio C Hamano-0/+2
The diff-highlight (in contrib/) comes with its own test script, which relies on the initial branch name being 'master'. This is not just encoded in the test logic, but in the illustration in the file that shows the topology of the history. Force the initial branch name to 'master' to allow it pass. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2026-02-03.mailmap: fix email for Phil HordPhil Hord-1/+2
My canonical and old emails were reversed, somehow. Also add an entry for a new email that may sneak in. Signed-off-by: Phil Hord <phil.hord@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2026-02-03cocci: extend MEMZERO_ARRAY() rulesToon Claes-9/+33
Recently the MEMZERO_ARRAY() macro was introduced. In that commit also coccinelle rules were added to capture cases that can be converted to use that macro. Later a few more cases were manually converted to use the macro, but coccinelle didn't capture those. Extend the rules to capture those as well. In various cases the code could be further beautified by removing parentheses which are no longer needed. Modify the coccinelle rules to optimize those as well and fix them. During conversion indentation also used spaces where tabs should be used, fix that in one go. Signed-off-by: Toon Claes <toon@iotcl.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2026-02-03doc: shortlog: put back trailer paragraphsKristoffer Haugsbakk-3/+4
47beb37b (shortlog: match commit trailers with --group, 2020-09-27) added the `trailer` bullet point with three paragraphs.[1] Later, 3dc95e09 (shortlog: support arbitrary commit format `--group`s, 2022-10-24) put the single-paragraph bullet point about `format` right after the first paragraph about `trailer`. That meant that the second and third paragraphs for `trailer` got moved to `format`. Move the two paragraphs back to `trailer`. We now also need one blank line before the final bullet point so that it does not get joined with the second bullet point. † 1: Technically the bullet list formatting was immediately fixed to include all three paragraphs in 63d24fa0 (shortlog: allow multiple groups to be specified, 2020-09-27) Acked-by: Jeff King <peff@peff.net> Signed-off-by: Kristoffer Haugsbakk <code@khaugsbakk.name> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2026-02-02odb: transparently handle common transaction behaviorJustin Tobler-10/+13
A new ODB transaction is created and returned via `odb_transaction_begin()` and stored in the ODB. Only a single transaction may be pending at a time. If the ODB already has a transaction, the function is expected to return NULL. Similarly, when committing a transaction via `odb_transaction_commit()` the transaction being committed must match the pending transaction and upon commit reset the ODB transaction to NULL. These behaviors apply regardless of the ODB transaction implementation. Move the corresponding logic into `odb_transaction_{begin,commit}()` accordingly. Signed-off-by: Justin Tobler <jltobler@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2026-02-02odb: prepare `struct odb_transaction` to become genericJustin Tobler-43/+65
An ODB transaction handles how objects are stored temporarily and eventually committed. Due to object storage being implemented differently for a given ODB source, the ODB transactions must be implemented in a manner specific to the source the objects are being written to. To provide generic transactions, `struct odb_transaction` is updated to store a commit callback that can be configured to support a specific ODB source. For now `struct odb_transaction_files` is the only transaction type and what is always returned when starting a transaction. Signed-off-by: Justin Tobler <jltobler@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2026-02-02object-file: rename transaction functionsJustin Tobler-8/+8
In a subsequent commit, ODB transactions are made more generic to facilitate each ODB source providing its own transaction handling. Rename `object_file_transaction_{begin,commit}()` to `odb_transaction_files_{begin,commit}()` to better match the future source specific transaction implementation. Signed-off-by: Justin Tobler <jltobler@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2026-02-02odb: store ODB source in `struct odb_transaction`Justin Tobler-11/+11
Each `struct odb_transaction` currently stores a reference to the `struct object_database`. Since transactions are handled per object source, instead store a reference to the source. Signed-off-by: Justin Tobler <jltobler@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2026-02-02blame: fix coloring for repeated suspectsRené Scharfe-4/+23
The option --ignore-rev passes the blame to an older commit. This can cause adjacent scoreboard entries to blame the same commit. Currently we only look at the present entry when determining whether a line needs to be colored for --color-lines. Check the previous entry as well. Reported-by: Seth McDonald <sethmcmail@pm.me> Signed-off-by: René Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2026-02-02t9160:modernize test path checkingHodaSalim-13/+13
Replace old-style path checks with Git's dedicated test helpers: - test -f → test_path_is_file - test -d → test_path_is_dir - test -s → test_file_not_empty Fix typos with the word "subsequent" Found using: git grep "test -[efd]" t/ This improves test readability and provides better error messages when path checks fail. Signed-off-by: HodaSalim <hoda.s.salim@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2026-02-02.github/CONTRIBUTING.md: link to SubmittingPatches on git-scm.comAbdalrhman Mohamed-1/+2
The relative link to SubmittingPatches is broken when viewed through GitHub's specialized "Contributing" tab. Update the link to point to the documentation on git-scm.com to be consistent with other links in the same file. Also, wrap the line to improve readability. Signed-off-by: Abdalrhman Mohamed <Eng.Abdalrhman.Abdalmonem@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2026-02-01Git 2.53v2.53.0maintJunio C Hamano-1/+1
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2026-02-01Merge tag 'l10n-2.53.0-v1' of https://github.com/git-l10n/git-poJunio C Hamano-3312/+3811
l10n-2.53.0-v1 * tag 'l10n-2.53.0-v1' of https://github.com/git-l10n/git-po: l10n: zh_CN: standardize glossary terms l10n: zh_CN: updated translation for 2.53 l10n: zh_CN: fix inconsistent use of standard vs. wide colons l10n: fr: v2.53 l10n: zh_TW.po: update Git 2.53 translation l10n: tr: Update Turkish translations l10n: sv.po: Update Swedish translation l10n: po-id for 2.53 l10n: ga.po: Fix git-po-helper warnings l10n: bg.po: Updated Bulgarian translation (6091t) l10n: ga.po: Update Irish translation for Git 2.53
2026-02-01RelNotes: fully spell negationCarlo Marcelo Arenas Belón-1/+1
Signed-off-by: Carlo Marcelo Arenas Belón <carenas@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2026-01-31Merge branch 'jx/zh_CN' of github.com:jiangxin/gitJiang Xin-1309/+1458
* 'jx/zh_CN' of github.com:jiangxin/git: l10n: zh_CN: standardize glossary terms l10n: zh_CN: updated translation for 2.53 l10n: zh_CN: fix inconsistent use of standard vs. wide colons
2026-01-31Merge branch 'l10n/zh-TW/git-2-53' of github.com:l10n-tw/git-poJiang Xin-720/+348
* 'l10n/zh-TW/git-2-53' of github.com:l10n-tw/git-po: l10n: zh_TW.po: update Git 2.53 translation
2026-01-31Merge branch 'po-id' of github.com:bagasme/git-poJiang Xin-217/+351
* 'po-id' of github.com:bagasme/git-po: l10n: po-id for 2.53
2026-01-31Merge branch 'l10n-ga-2.53' of github.com:aindriu80/git-poJiang Xin-220/+407
* 'l10n-ga-2.53' of github.com:aindriu80/git-po: l10n: ga.po: Fix git-po-helper warnings l10n: ga.po: Update Irish translation for Git 2.53
2026-01-31Merge branch 'master' of github.com:alshopov/git-poJiang Xin-224/+352
* 'master' of github.com:alshopov/git-po: l10n: bg.po: Updated Bulgarian translation (6091t)