]> git.ipfire.org Git - thirdparty/git.git/log
thirdparty/git.git
2 weeks agot9160:modernize test path checking
HodaSalim [Mon, 2 Feb 2026 16:18:00 +0000 (18:18 +0200)] 
t9160:modernize test path checking

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>
2 weeks agoGit 2.53 maint v2.53.0
Junio C Hamano [Mon, 2 Feb 2026 02:15:01 +0000 (18:15 -0800)] 
Git 2.53

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2 weeks agoMerge tag 'l10n-2.53.0-v1' of https://github.com/git-l10n/git-po
Junio C Hamano [Mon, 2 Feb 2026 02:13:52 +0000 (18:13 -0800)] 
Merge tag 'l10n-2.53.0-v1' of https://github.com/git-l10n/git-po

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

2 weeks agoRelNotes: fully spell negation
Carlo Marcelo Arenas Belón [Sat, 31 Jan 2026 23:08:48 +0000 (15:08 -0800)] 
RelNotes: fully spell negation

Signed-off-by: Carlo Marcelo Arenas Belón <carenas@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2 weeks agoMerge branch 'jx/zh_CN' of github.com:jiangxin/git
Jiang Xin [Sat, 31 Jan 2026 13:32:54 +0000 (21:32 +0800)] 
Merge branch 'jx/zh_CN' of github.com:jiangxin/git

* '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

2 weeks agoMerge branch 'l10n/zh-TW/git-2-53' of github.com:l10n-tw/git-po
Jiang Xin [Sat, 31 Jan 2026 13:20:06 +0000 (21:20 +0800)] 
Merge branch 'l10n/zh-TW/git-2-53' of github.com:l10n-tw/git-po

* 'l10n/zh-TW/git-2-53' of github.com:l10n-tw/git-po:
  l10n: zh_TW.po: update Git 2.53 translation

2 weeks agoMerge branch 'po-id' of github.com:bagasme/git-po
Jiang Xin [Sat, 31 Jan 2026 13:15:38 +0000 (21:15 +0800)] 
Merge branch 'po-id' of github.com:bagasme/git-po

* 'po-id' of github.com:bagasme/git-po:
  l10n: po-id for 2.53

2 weeks agoMerge branch 'l10n-ga-2.53' of github.com:aindriu80/git-po
Jiang Xin [Sat, 31 Jan 2026 13:13:55 +0000 (21:13 +0800)] 
Merge branch 'l10n-ga-2.53' of github.com:aindriu80/git-po

* '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

2 weeks agoMerge branch 'master' of github.com:alshopov/git-po
Jiang Xin [Sat, 31 Jan 2026 13:11:50 +0000 (21:11 +0800)] 
Merge branch 'master' of github.com:alshopov/git-po

* 'master' of github.com:alshopov/git-po:
  l10n: bg.po: Updated Bulgarian translation (6091t)

2 weeks agoMerge branch 'fr_2.53' of github.com:jnavila/git
Jiang Xin [Sat, 31 Jan 2026 13:08:43 +0000 (21:08 +0800)] 
Merge branch 'fr_2.53' of github.com:jnavila/git

* 'fr_2.53' of github.com:jnavila/git:
  l10n: fr: v2.53

2 weeks agoMerge branch 'tr-l10n' of github.com:bitigchi/git-po
Jiang Xin [Sat, 31 Jan 2026 13:06:38 +0000 (21:06 +0800)] 
Merge branch 'tr-l10n' of github.com:bitigchi/git-po

* 'tr-l10n' of github.com:bitigchi/git-po:
  l10n: tr: Update Turkish translations

2 weeks agoMerge branch 'master' of github.com:nafmo/git-l10n-sv
Jiang Xin [Sat, 31 Jan 2026 13:03:10 +0000 (21:03 +0800)] 
Merge branch 'master' of github.com:nafmo/git-l10n-sv

* 'master' of github.com:nafmo/git-l10n-sv:
  l10n: sv.po: Update Swedish translation

2 weeks agol10n: zh_CN: standardize glossary terms
Jiang Xin [Fri, 30 Jan 2026 02:38:47 +0000 (10:38 +0800)] 
l10n: zh_CN: standardize glossary terms

Add preferred Chinese terminology notes and align existing translations
to the updated glossary. AI-assisted review was used to check and
improve legacy translations.

Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
2 weeks agoRelNotes: correct "fast-import" option name
Junio C Hamano [Fri, 30 Jan 2026 17:50:03 +0000 (09:50 -0800)] 
RelNotes: correct "fast-import" option name

Signed-off-by: Junio C Hamano <gitster@pobox.com>
3 weeks agol10n: zh_CN: updated translation for 2.53
Jiang Xin [Thu, 29 Jan 2026 12:30:39 +0000 (20:30 +0800)] 
l10n: zh_CN: updated translation for 2.53

Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
3 weeks agol10n: zh_CN: fix inconsistent use of standard vs. wide colons
Jiang Xin [Thu, 29 Jan 2026 13:41:39 +0000 (21:41 +0800)] 
l10n: zh_CN: fix inconsistent use of standard vs. wide colons

Replace mixed usage of standard (ASCII) colons ':' with full-width
(wide) colons ':' in Chinese translations to ensure typographic
consistency, as reported by CAESIUS-TIM [1].

Full-width punctuation is preferred in Chinese localization for better
readability and adherence to typesetting conventions.

[1]: https://github.com/git-l10n/git-po/issues/884

Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
3 weeks agol10n: fr: v2.53
Jean-Noël Avila [Fri, 16 Jan 2026 20:14:23 +0000 (21:14 +0100)] 
l10n: fr: v2.53

Signed-off-by: Jean-Noël Avila <jn.avila@free.fr>
3 weeks agol10n: zh_TW.po: update Git 2.53 translation
Yi-Jyun Pan [Wed, 28 Jan 2026 14:45:10 +0000 (22:45 +0800)] 
l10n: zh_TW.po: update Git 2.53 translation

Co-authored-by: Lumynous <lumynou5.tw@gmail.com>
Signed-off-by: Yi-Jyun Pan <pan93412@gmail.com>
3 weeks agoRelNotes: a few spelling fixes
Junio C Hamano [Tue, 27 Jan 2026 20:12:06 +0000 (12:12 -0800)] 
RelNotes: a few spelling fixes

Signed-off-by: Junio C Hamano <gitster@pobox.com>
3 weeks agol10n: tr: Update Turkish translations
Emir SARI [Fri, 16 Jan 2026 16:25:39 +0000 (19:25 +0300)] 
l10n: tr: Update Turkish translations

Signed-off-by: Emir SARI <emir_sari@icloud.com>
3 weeks agol10n: sv.po: Update Swedish translation
Peter Krefting [Tue, 27 Jan 2026 18:33:55 +0000 (19:33 +0100)] 
l10n: sv.po: Update Swedish translation

Also fix typos reported by Tuomas Ahola.

Helped-by: Tuomas Ahola <taahol@utu.fi>.
Signed-off-by: Peter Krefting <peter@softwolves.pp.se>
3 weeks agoGit 2.53-rc2 v2.53.0-rc2
Junio C Hamano [Tue, 27 Jan 2026 06:26:31 +0000 (22:26 -0800)] 
Git 2.53-rc2

Signed-off-by: Junio C Hamano <gitster@pobox.com>
3 weeks agol10n: po-id for 2.53
Bagas Sanjaya [Tue, 27 Jan 2026 02:11:03 +0000 (09:11 +0700)] 
l10n: po-id for 2.53

Update following components:

  * branch.c
  * builtin/blame.c
  * builtin/config.c
  * builtin/fast-export.c
  * builtin/fast-import.c
  * builtin/fetch.c
  * builtin/gc.c
  * builtin/index-pack.c
  * builtin/pack-objects.c
  * builtin/patch-id.c
  * builtin/replay.c
  * builtin/repo.c
  * bundle-uri.c
  * command-list.c
  * object-file.c
  * refs/reftable-backend.c
  * repack-promisor.c
  * strbuf.c

Signed-off-by: Bagas Sanjaya <bagasdotme@gmail.com>
3 weeks agol10n: ga.po: Fix git-po-helper warnings
Aindriú Mac Giolla Eoin [Mon, 26 Jan 2026 10:26:51 +0000 (10:26 +0000)] 
l10n: ga.po: Fix git-po-helper warnings

Signed-off-by: Aindriú Mac Giolla Eoin <aindriu80@gmail.com>
3 weeks agoRevert "Merge branch 'cs/rebased-subtree-split'"
Junio C Hamano [Sun, 25 Jan 2026 17:43:29 +0000 (09:43 -0800)] 
Revert "Merge branch 'cs/rebased-subtree-split'"

This reverts commit 79e3055baba32e2952e6e8994cdcd4fc145ba7f0, reversing
changes made to 9813aace1e52765e01e688672cdcdcbe25336ec7.

Regresison report

    https://lore.kernel.org/git/755578cb-07e0-4b40-aa90-aacf4d45ccaa@heusel.eu/

3 weeks agoMerge branch 'master' of https://github.com/j6t/git-gui
Junio C Hamano [Sun, 25 Jan 2026 17:08:06 +0000 (09:08 -0800)] 
Merge branch 'master' of https://github.com/j6t/git-gui

* 'master' of https://github.com/j6t/git-gui:
  git-gui: mark *.po files at any directory level as UTF-8
  git-gui i18n: Update Bulgarian translation (558t)
  git-gui i18n: Update Bulgarian translation (557t)

3 weeks agol10n: bg.po: Updated Bulgarian translation (6091t)
Alexander Shopov [Sat, 17 Jan 2026 09:02:06 +0000 (10:02 +0100)] 
l10n: bg.po: Updated Bulgarian translation (6091t)

Signed-off-by: Alexander Shopov <ash@kambanaria.org>
3 weeks agogit-gui: mark *.po files at any directory level as UTF-8
Johannes Sixt [Sun, 25 Jan 2026 09:46:23 +0000 (10:46 +0100)] 
git-gui: mark *.po files at any directory level as UTF-8

When a commit is viewed in Gitk that changes a file in po/glossary, the
patch text shows mojibake instead of correctly decoded UTF-8 text.
Gitk retrieves the encoding attribute to decide how to treat the bytes
that make up the patch text. There is an attribute definition that all
files are US-ASCII, and a later attribute definition overrides this.
But the override, which specifies UTF-8, applies only to *.po files in
directory po/ and does not apply to subdirectories.

Widen the pattern to apply to all directory levels.

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
3 weeks agoMerge branch 'master' of github.com:alshopov/git-gui
Johannes Sixt [Sun, 25 Jan 2026 09:32:21 +0000 (10:32 +0100)] 
Merge branch 'master' of github.com:alshopov/git-gui

* 'master' of github.com:alshopov/git-gui:
  git-gui i18n: Update Bulgarian translation (558t)

3 weeks agogit-gui i18n: Update Bulgarian translation (558t)
Alexander Shopov [Mon, 19 Jan 2026 09:13:14 +0000 (10:13 +0100)] 
git-gui i18n: Update Bulgarian translation (558t)

- Translate new string (558t)
- Add graves for disambiguation
- Improve glossary translation (96t) and synchonize with git

Signed-off-by: Alexander Shopov <ash@kambanaria.org>
3 weeks agoMerge branch 'master' of github.com:alshopov/git-gui
Johannes Sixt [Sat, 24 Jan 2026 08:25:29 +0000 (09:25 +0100)] 
Merge branch 'master' of github.com:alshopov/git-gui

* 'master' of github.com:alshopov/git-gui:
  git-gui i18n: Update Bulgarian translation (557t)

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
3 weeks agoA bit more before -rc2
Junio C Hamano [Fri, 23 Jan 2026 21:34:17 +0000 (13:34 -0800)] 
A bit more before -rc2

Signed-off-by: Junio C Hamano <gitster@pobox.com>
3 weeks agoMerge branch 'dk/replay-doc-omit-irrelevant-rev-list-options'
Junio C Hamano [Fri, 23 Jan 2026 21:34:37 +0000 (13:34 -0800)] 
Merge branch 'dk/replay-doc-omit-irrelevant-rev-list-options'

Documentation clean-up.

* dk/replay-doc-omit-irrelevant-rev-list-options:
  lint-gitlink: preemptively ignore all /ifn?def|endif/ macros
  replay: drop rev-list formatting options from manual

3 weeks agoMerge branch 'js/symlink-windows'
Junio C Hamano [Fri, 23 Jan 2026 21:34:36 +0000 (13:34 -0800)] 
Merge branch 'js/symlink-windows'

Upstream symbolic link support on Windows from Git-for-Windows.

* js/symlink-windows:
  mingw: special-case index entries for symlinks with buggy size
  mingw: emulate `stat()` a little more faithfully
  mingw: try to create symlinks without elevated permissions
  mingw: add support for symlinks to directories
  mingw: implement basic `symlink()` functionality (file symlinks only)
  mingw: implement `readlink()`
  mingw: allow `mingw_chdir()` to change to symlink-resolved directories
  mingw: support renaming symlinks
  mingw: handle symlinks to directories in `mingw_unlink()`
  mingw: add symlink-specific error codes
  mingw: change default of `core.symlinks` to false
  mingw: factor out the retry logic
  mingw: compute the correct size for symlinks in `mingw_lstat()`
  mingw: teach dirent about symlinks
  mingw: let `mingw_lstat()` error early upon problems with reparse points
  mingw: drop the separate `do_lstat()` function
  mingw: implement `stat()` with symlink support
  mingw: don't call `GetFileAttributes()` twice in `mingw_lstat()`

3 weeks agoMerge branch 'pw/mailmap-self'
Junio C Hamano [Fri, 23 Jan 2026 21:34:36 +0000 (13:34 -0800)] 
Merge branch 'pw/mailmap-self'

Unify entries in .mailmap file for Phillip Wood.

* pw/mailmap-self:
  mailmap: add an entry for Phillip Wood

3 weeks agoMerge branch 'js/ci-leak-skip-svn'
Junio C Hamano [Fri, 23 Jan 2026 21:34:36 +0000 (13:34 -0800)] 
Merge branch 'js/ci-leak-skip-svn'

Dscho observed that SVN tests are taking too much time in CI leak
checking tasks, but most time is spent not in our code but in libsvn
code (which happen to be written in Perl), whose leaks have little
value to discover for us.  Skip SVN, P4, and CVS tests in the leak
checking tasks.

* js/ci-leak-skip-svn:
  ci: skip CVS and P4 tests in leaks job, too
  ci(*-leaks): skip the git-svn tests to save time

3 weeks agoMerge branch 'jx/build-options-gettext'
Junio C Hamano [Fri, 23 Jan 2026 21:34:36 +0000 (13:34 -0800)] 
Merge branch 'jx/build-options-gettext'

"git bugreport" and "git version --build-options" learned to
include use of 'gettext' feature, to make it easier to diagnose
problems around l10n.

* jx/build-options-gettext:
  help: report on whether or not gettext is enabled

3 weeks agoMerge branch 'ty/t1005-test-path-is-helpers'
Junio C Hamano [Fri, 23 Jan 2026 21:34:36 +0000 (13:34 -0800)] 
Merge branch 'ty/t1005-test-path-is-helpers'

Test clean-up.

* ty/t1005-test-path-is-helpers:
  t1005: modernize "! test -f" to "test_path_is_missing"

3 weeks agoMerge branch 'rj/cygwin-test-fixes-for-2.53'
Junio C Hamano [Fri, 23 Jan 2026 21:34:35 +0000 (13:34 -0800)] 
Merge branch 'rj/cygwin-test-fixes-for-2.53'

Test fixup.

* rj/cygwin-test-fixes-for-2.53:
  t0610-reftable-basics: mitigate a flaky test on cygwin
  t9700/test.pl: fix path type expectation on cygwin

3 weeks agoMerge branch 'sb/doc-update-ref-markup-fix'
Junio C Hamano [Fri, 23 Jan 2026 21:34:35 +0000 (13:34 -0800)] 
Merge branch 'sb/doc-update-ref-markup-fix'

Doc mark-up fix.

* sb/doc-update-ref-markup-fix:
  doc: fix `update-ref` `symref-create` formatting

3 weeks agoMerge branch 'kh/mailmap-avila'
Junio C Hamano [Fri, 23 Jan 2026 21:34:35 +0000 (13:34 -0800)] 
Merge branch 'kh/mailmap-avila'

* kh/mailmap-avila:
  .mailmap: fix and expand mappings for Jean-Noël Avila

3 weeks agol10n: ga.po: Update Irish translation for Git 2.53
Aindriú Mac Giolla Eoin [Fri, 23 Jan 2026 11:54:09 +0000 (11:54 +0000)] 
l10n: ga.po: Update Irish translation for Git 2.53

Signed-off-by: Aindriú Mac Giolla Eoin <aindriu80@gmail.com>
4 weeks agogit-gui i18n: Update Bulgarian translation (557t)
Alexander Shopov [Mon, 19 Jan 2026 09:13:14 +0000 (10:13 +0100)] 
git-gui i18n: Update Bulgarian translation (557t)

Fix the meaning of a string

Signed-off-by: Alexander Shopov <ash@kambanaria.org>
4 weeks agoA few on top of -rc1
Junio C Hamano [Wed, 21 Jan 2026 21:58:08 +0000 (13:58 -0800)] 
A few on top of -rc1

Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 weeks agoMerge branch 'rs/tree-wo-the-repository'
Junio C Hamano [Thu, 22 Jan 2026 00:16:28 +0000 (16:16 -0800)] 
Merge branch 'rs/tree-wo-the-repository'

Remove implicit reliance on the_repository global in the APIs
around tree objects and make it explicit which repository to work
in.

* rs/tree-wo-the-repository:
  cocci: remove obsolete the_repository rules
  cocci: convert parse_tree functions to repo_ variants
  tree: stop using the_repository
  tree: use repo_parse_tree()
  path-walk: use repo_parse_tree_gently()
  pack-bitmap-write: use repo_parse_tree()
  delta-islands: use repo_parse_tree()
  bloom: use repo_parse_tree()
  add-interactive: use repo_parse_tree_indirect()
  tree: add repo_parse_tree*()
  environment: move access to core.maxTreeDepth into repo settings

4 weeks agoMerge branch 'ps/config-doc-get-urlmatch-fix'
Junio C Hamano [Thu, 22 Jan 2026 00:16:27 +0000 (16:16 -0800)] 
Merge branch 'ps/config-doc-get-urlmatch-fix'

Docfix.

* ps/config-doc-get-urlmatch-fix:
  Documentation/config: fix replacement for --get-urlmatch

4 weeks agoMerge branch 'tb/midx-write-corrupt-checksum-fix'
Junio C Hamano [Thu, 22 Jan 2026 00:16:27 +0000 (16:16 -0800)] 
Merge branch 'tb/midx-write-corrupt-checksum-fix'

The logic that avoids reusing MIDX files with a wrong checksum was
broken, which has been corrected.

* tb/midx-write-corrupt-checksum-fix:
  midx-write.c: assume checksum-invalid MIDXs require an update
  t/t5319-multi-pack-index.sh: drop early 'test_done'

4 weeks agoMerge branch 'ps/geometric-repacking-with-promisor-remotes'
Junio C Hamano [Thu, 22 Jan 2026 00:16:27 +0000 (16:16 -0800)] 
Merge branch 'ps/geometric-repacking-with-promisor-remotes'

"git repack --geometric" did not work with promisor packs, which
has been corrected.

* ps/geometric-repacking-with-promisor-remotes:
  builtin/repack: handle promisor packs with geometric repacking
  repack-promisor: extract function to remove redundant packs
  repack-promisor: extract function to finalize repacking
  repack-geometry: extract function to compute repacking split
  builtin/pack-objects: exclude promisor objects with "--stdin-packs"

4 weeks ago.mailmap: fix and expand mappings for Jean-Noël Avila
Kristoffer Haugsbakk [Wed, 21 Jan 2026 21:51:09 +0000 (22:51 +0100)] 
.mailmap: fix and expand mappings for Jean-Noël Avila

The latest release candidate notes say that there is a new contributor:

    Jean-Noël Avila via GitGitGadget, ...

But this is a familiar face, just in a G.G. Gadget trench coat.

Also map the rest of the idents in the history.

Signed-off-by: Kristoffer Haugsbakk <code@khaugsbakk.name>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 weeks agoGit 2.53-rc1 v2.53.0-rc1
Junio C Hamano [Tue, 20 Jan 2026 23:22:31 +0000 (15:22 -0800)] 
Git 2.53-rc1

Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 weeks agoMerge branch 'js/prep-symlink-windows'
Junio C Hamano [Wed, 21 Jan 2026 16:29:00 +0000 (08:29 -0800)] 
Merge branch 'js/prep-symlink-windows'

Further preparation to upstream symbolic link support on Windows.

* js/prep-symlink-windows:
  trim_last_path_component(): avoid hard-coding the directory separator
  strbuf_readlink(): support link targets that exceed 2*PATH_MAX
  strbuf_readlink(): avoid calling `readlink()` twice in corner-cases
  init: do parse _all_ core.* settings early
  mingw: do resolve symlinks in `getcwd()`

4 weeks agoMerge branch 'ps/read-object-info-improvements'
Junio C Hamano [Wed, 21 Jan 2026 16:29:00 +0000 (08:29 -0800)] 
Merge branch 'ps/read-object-info-improvements'

The object-info API has been cleaned up.

* ps/read-object-info-improvements:
  packfile: drop repository parameter from `packed_object_info()`
  packfile: skip unpacking object header for disk size requests
  packfile: disentangle return value of `packed_object_info()`
  packfile: always populate pack-specific info when reading object info
  packfile: extend `is_delta` field to allow for "unknown" state
  packfile: always declare object info to be OI_PACKED
  object-file: always set OI_LOOSE when reading object info

4 weeks agoMerge branch 'ps/packfile-store-in-odb-source'
Junio C Hamano [Wed, 21 Jan 2026 16:28:58 +0000 (08:28 -0800)] 
Merge branch 'ps/packfile-store-in-odb-source'

The packfile_store data structure is moved from object store to odb
source.

* ps/packfile-store-in-odb-source:
  packfile: move MIDX into packfile store
  packfile: refactor `find_pack_entry()` to work on the packfile store
  packfile: inline `find_kept_pack_entry()`
  packfile: only prepare owning store in `packfile_store_prepare()`
  packfile: only prepare owning store in `packfile_store_get_packs()`
  packfile: move packfile store into object source
  packfile: refactor misleading code when unusing pack windows
  packfile: refactor kept-pack cache to work with packfile stores
  packfile: pass source to `prepare_pack()`
  packfile: create store via its owning source

4 weeks agoMerge branch 'kt/http-backend-errors'
Junio C Hamano [Wed, 21 Jan 2026 16:28:58 +0000 (08:28 -0800)] 
Merge branch 'kt/http-backend-errors'

Some error messages from the http transport layer lacked the
terminating newline, which has been corrected.

* kt/http-backend-errors:
  http-backend: write newlines to stderr when responding with errors

4 weeks agoMerge branch 'ps/t1410-cleanup'
Junio C Hamano [Wed, 21 Jan 2026 16:28:58 +0000 (08:28 -0800)] 
Merge branch 'ps/t1410-cleanup'

Test clean-up.

* ps/t1410-cleanup:
  t1410: use test helpers in reflog rewind test

4 weeks agoMerge branch 'ps/ref-consistency-checks'
Junio C Hamano [Wed, 21 Jan 2026 16:28:58 +0000 (08:28 -0800)] 
Merge branch 'ps/ref-consistency-checks'

Update code paths that check data integrity around refs subsystem.
cf. <CAOLa=ZShPP3BPXa=YnC-vuX4zF=pUTFdUidZwOdna8bfVTNM9w@mail.gmail.com>

* ps/ref-consistency-checks:
  builtin/fsck: drop `fsck_head_link()`
  builtin/fsck: move generic HEAD check into `refs_fsck()`
  builtin/fsck: move generic object ID checks into `refs_fsck()`
  refs/reftable: introduce generic checks for refs
  refs/reftable: fix consistency checks with worktrees
  refs/reftable: extract function to retrieve backend for worktree
  refs/reftable: adapt includes to become consistent
  refs/files: introduce function to perform normal ref checks
  refs/files: extract generic symref target checks
  fsck: drop unused fields from `struct fsck_ref_report`
  refs/files: perform consistency checks for root refs
  refs/files: improve error handling when verifying symrefs
  refs/files: extract function to check single ref
  refs/files: remove useless indirection
  refs/files: remove `refs_check_dir` parameter
  refs/files: move fsck functions into global scope
  refs/files: simplify iterating through root refs

4 weeks agoMerge branch 'tb/macos-iconv-workarounds'
Junio C Hamano [Wed, 21 Jan 2026 16:28:57 +0000 (08:28 -0800)] 
Merge branch 'tb/macos-iconv-workarounds'

The iconv library on macOS fails to correctly handle stateful
ISO/IEC 2022 encoded strings.  Work it around instead of replacing
it wholesale from homebrew.

* tb/macos-iconv-workarounds:
  utf8.c: enable workaround for iconv under macOS 14/15
  utf8.c: prepare workaround for iconv under macOS 14/15

4 weeks agoMerge branch 'cs/rebased-subtree-split'
Junio C Hamano [Wed, 21 Jan 2026 16:28:57 +0000 (08:28 -0800)] 
Merge branch 'cs/rebased-subtree-split'

The split command in "git subtree" (in contrib/) has been taught to
deal better with rebased history.

* cs/rebased-subtree-split:
  contrib/subtree: detect rewritten subtree commits

4 weeks agoMerge branch 'je/doc-reset'
Junio C Hamano [Wed, 21 Jan 2026 16:28:57 +0000 (08:28 -0800)] 
Merge branch 'je/doc-reset'

Documentation updates.

* je/doc-reset:
  doc: git-reset: clarify `git reset <pathspec>`
  doc: git-reset: clarify `git reset [mode]`
  doc: git-reset: clarify intro
  doc: git-reset: reorder the forms

4 weeks agoMerge branch 'en/fsck-snapshot-ref-state'
Junio C Hamano [Wed, 21 Jan 2026 16:28:57 +0000 (08:28 -0800)] 
Merge branch 'en/fsck-snapshot-ref-state'

"git fsck" used inconsistent set of refs to show a confused
warning, which has been corrected.

* en/fsck-snapshot-ref-state:
  fsck: snapshot default refs before object walk

4 weeks agolint-gitlink: preemptively ignore all /ifn?def|endif/ macros
Jean-Noël Avila [Wed, 21 Jan 2026 13:27:05 +0000 (14:27 +0100)] 
lint-gitlink: preemptively ignore all /ifn?def|endif/ macros

Instead of testing if the macro name is ifn?def:: as if it were a inline
macro, it is faster and safer to just ignore such block macro lines before
hand.

Signed-off-by: Jean-Noël Avila <jn.avila@free.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 weeks agoreplay: drop rev-list formatting options from manual
D. Ben Knoble [Tue, 20 Jan 2026 14:05:57 +0000 (09:05 -0500)] 
replay: drop rev-list formatting options from manual

The rev-list options in our manuals are quite long; git-replay's manual
is no exception. Since replay doesn't use the formatting options at all
(it has its own output format), drop them.

This is the first time we have needed compound tests [1] for if[n]def in
our documentation:

    git grep '^ifn\?def::' Documentation | grep '[,+]'

[1]: https://docs.asciidoctor.org/asciidoc/latest/directives/ifdef-ifndef/

For both ifdef and ifndef, the "," takes on the intuitive meaning:
- ifdef: if any of the listed attributes are set…
- ifndef: unless any of the listed attributes are set

(Use "+" for "all".)

Signed-off-by: D. Ben Knoble <ben.knoble+github@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 weeks agomailmap: add an entry for Phillip Wood
Phillip Wood [Tue, 20 Jan 2026 11:01:55 +0000 (11:01 +0000)] 
mailmap: add an entry for Phillip Wood

While all my commits appear under the same address, other addresses
appear in some commit trailers. Map those addresses to the canonical
one.

Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 weeks agoci: skip CVS and P4 tests in leaks job, too
Junio C Hamano [Sat, 17 Jan 2026 18:34:17 +0000 (10:34 -0800)] 
ci: skip CVS and P4 tests in leaks job, too

Looking at the CI logs, the p4 and cvs tests account for another 24
minutes of test time and they offer minimal value for quite a
similar reason as the previous step.

Let's introduce and use a mechanism to skip these tests to save
some resources.

Suggested-by: Phillip Wood <phillip.wood@dunelm.org.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 weeks agoci(*-leaks): skip the git-svn tests to save time
Johannes Schindelin [Fri, 16 Jan 2026 17:31:16 +0000 (17:31 +0000)] 
ci(*-leaks): skip the git-svn tests to save time

I noticed recently that the leak-checking jobs still take a lot of time,
and upon analysis, the git-svn tests contribute significantly to this.

Analyzing a recent CI run, I saw that the Git test suite contains
1,017 tests, running for approximately 5¼ hours total. Of these, 65
git-svn-related tests (~6% of test count) took 42.24 minutes combined,
accounting for ~13.% of the total runtime. This implies that the git-svn
tests are roughly twice as expernsive compared to the other tests.

However, testing git-svn in the leak-checking jobs provides minimal
value: git-svn is implemented as a Perl script, and leak checking only
handles C code. While git-svn does call into Git's built-in commands
that are implemented in C, these are standard Git operations that are
already thoroughly exercised elsewhere in the test suite. Therefore,
running the git-svn tests in the leak-checking jobs only adds to the
overall run time with little value in return.

Given that the leak-checking jobs are particularly time-intensive and
these 42+ minutes of SVN tests per job provide no additional leak
detection value, skip them in the *-leaks jobs to reduce CI runtime.

Assisted-by: Claude Sonnet 4.5
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 weeks agot1005: modernize "! test -f" to "test_path_is_missing"
Tian Yuchen [Sat, 17 Jan 2026 06:25:15 +0000 (14:25 +0800)] 
t1005: modernize "! test -f" to "test_path_is_missing"

Replace instances of "! test -f <file>" with "test_path_is_missing <file>".
This macro provides better diagnostics when the test fails (it prints
"Path exists:" instead of silently failing).

Signed-off-by: Tian Yuchen <a3205153416@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 weeks agohelp: report on whether or not gettext is enabled
Jiang Xin [Sat, 17 Jan 2026 13:59:38 +0000 (21:59 +0800)] 
help: report on whether or not gettext is enabled

When users report that Git has no localized output, we need to check not
only their locale settings, but also whether Git was built with GETTEXT
support in the first place.

Expose this information via the existing build info output by adding a
"gettext: enabled" line to `git version --build-options` (and therefore
also to `git bugreport`) when `NO_GETTEXT` is not defined at build time.

Signed-off-by: Jiang Xin <zhiyou.jx@alibaba-inc.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 weeks agot0610-reftable-basics: mitigate a flaky test on cygwin
Ramsay Jones [Fri, 16 Jan 2026 20:39:56 +0000 (20:39 +0000)] 
t0610-reftable-basics: mitigate a flaky test on cygwin

Test #29 ('ref transaction: corrupted tables cause failure') started to
fail intermittently for me (from v2.52.0-rc0) when running the testsuite
with '-j8'. (Also, having moved to a new laptop and windows 11, rather
than windows 10). If the test is run by hand, or without any parallelism,
then it passes without issue.

When the test fails (e.g. 1 out of 32 parallel runs) the cause is due to
a permission error while corrupting a table file:

  ./test-lib.sh: line 1010: .git/reftable/0x000000000001-0x000000000002-d89bb8ee.ref: Permission denied

This corruption is done in a shell loop, directly after a 'test_commit',
which uses an ': >"$f"' expression to truncate the file. Adding a sleep
of one second after the 'test_commit' and before the shell loop fixes
the test (it is not clear why). Replacing the redirection shell expression
with a 'test-tool truncate "$f" 0' invocation also provides a fix, which
could simply be another way to change the timing sufficiently to win the
race.

During a debug session, I tried looking at the strace output for the
shell redirection:

  $ rm /tmp/hello; echo hello >/tmp/hello; ls -l /tmp/hello
  -rw-r--r-- 1 ramsay None 6 Nov 10 17:25 /tmp/hello
  $

  $ strace -o zzz bash -c ': >/tmp/hello'
  $

Similarly, for the test-tool solution:

  $ strace -o xxx ./t/helper/test-tool truncate /tmp/hello 0
  $

When comparing the output, the differences seemed to be what you would
expect and, if anything, the shell redirect probably would have taken
longer than the test-tool solution (many fcntl() calls to dup the stdout
to the <fd>).  The call to the win32 api NtCreateFile() was identical,
apart from the first (FileHandle) parameter, of course.

In order to fix this flaky test on cygwin, despite not knowing why it
works, replace the shell redirection with the above 'test-tool truncate'
invocation.

Helped-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Ramsay Jones <ramsay@ramsayjones.plus.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 weeks agot9700/test.pl: fix path type expectation on cygwin
Ramsay Jones [Fri, 16 Jan 2026 20:39:44 +0000 (20:39 +0000)] 
t9700/test.pl: fix path type expectation on cygwin

Commit 4ec7ac101b ("t9700: accommodate for Windows paths", 2025-12-17)
changed the type of the absolute path to the git directory from unix to
win32 for both GfW and cygwin. This fixed the test for GfW but causes
new failures on cygwin, since the test expectation is that it uses unix
paths on cygwin. In order to not break cygwin, disable the new code by
removing the "or $^O eq 'cygwin'" sub-expression from the conditional
part of the fix.

Signed-off-by: Ramsay Jones <ramsay@ramsayjones.plus.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 weeks agoMerge a handful more topics after -rc0
Junio C Hamano [Fri, 16 Jan 2026 19:34:19 +0000 (11:34 -0800)] 
Merge a handful more topics after -rc0

Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 weeks agoMerge branch 'ml/doc-blame-markup'
Junio C Hamano [Fri, 16 Jan 2026 20:40:28 +0000 (12:40 -0800)] 
Merge branch 'ml/doc-blame-markup'

Doc mark-up update.

* ml/doc-blame-markup:
  doc: git-blame: convert to new doc format
  doc: blame-options: convert to new doc format

4 weeks agoMerge branch 'kh/doc-patch-id'
Junio C Hamano [Fri, 16 Jan 2026 20:40:28 +0000 (12:40 -0800)] 
Merge branch 'kh/doc-patch-id'

"git patch-id" documentation updates.

* kh/doc-patch-id:
  doc: patch-id: --verbatim locks in --stable
  doc: patch-id: spell out the git-diff-tree(1) form
  doc: patch-id: use definite article for the result
  patch-id: use “patch ID” throughout
  doc: patch-id: capitalize Git version
  doc: patch-id: don’t use semicolon between bullet points

4 weeks agoMerge branch 'bc/doc-stash-import-export'
Junio C Hamano [Fri, 16 Jan 2026 20:40:27 +0000 (12:40 -0800)] 
Merge branch 'bc/doc-stash-import-export'

Update a FAQ entry on synching two separate repositories using the
"git stash export/import" recently introduced.

* bc/doc-stash-import-export:
  gitfaq: document using stash import/export to sync working tree

4 weeks agoMerge branch 'kj/t7101-modernize'
Junio C Hamano [Fri, 16 Jan 2026 20:40:27 +0000 (12:40 -0800)] 
Merge branch 'kj/t7101-modernize'

Test update.

* kj/t7101-modernize:
  t7101: modernize test path checks

4 weeks agoMerge branch 'ds/builtin-doc-update'
Junio C Hamano [Fri, 16 Jan 2026 20:40:27 +0000 (12:40 -0800)] 
Merge branch 'ds/builtin-doc-update'

Update in-code comment doc to match the current API.

* ds/builtin-doc-update:
  builtin.h: update documentation

4 weeks agoMerge branch 'ac/t1420-use-more-direct-check'
Junio C Hamano [Fri, 16 Jan 2026 20:40:27 +0000 (12:40 -0800)] 
Merge branch 'ac/t1420-use-more-direct-check'

Test update.

* ac/t1420-use-more-direct-check:
  t1420: modernize the lost-found test

4 weeks agoMerge branch 'jk/cat-file-avoid-bitmap-when-unneeded'
Junio C Hamano [Fri, 16 Jan 2026 20:40:26 +0000 (12:40 -0800)] 
Merge branch 'jk/cat-file-avoid-bitmap-when-unneeded'

Fix for a performance regression in "git cat-file".

* jk/cat-file-avoid-bitmap-when-unneeded:
  cat-file: only use bitmaps when filtering

4 weeks agoMerge branch 'jk/t-perf-fixes'
Junio C Hamano [Fri, 16 Jan 2026 20:40:26 +0000 (12:40 -0800)] 
Merge branch 'jk/t-perf-fixes'

Perf-test fixes.

* jk/t-perf-fixes:
  t/perf/run: preserve GIT_PERF_* from environment
  t/perf/perf-lib: fix assignment of TEST_OUTPUT_DIRECTORY

5 weeks agococci: remove obsolete the_repository rules
René Scharfe [Thu, 15 Jan 2026 22:01:25 +0000 (23:01 +0100)] 
cocci: remove obsolete the_repository rules

035c7de9e9e (cocci: apply the "revision.h" part of
"the_repository.pending", 2023-03-28) removed the last of the repo-less
functions and macros mentioned in the_repository.cocci at the time.  No
stragglers appeared since then.  Remove the applied rules now that they
have outlived their usefulness.

Also add a reminder to eventually remove the just added rules for
tree.h.

Suggested-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: René Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 weeks agoRevert "Merge branch 'ar/run-command-hook'"
Junio C Hamano [Thu, 15 Jan 2026 19:12:53 +0000 (11:12 -0800)] 
Revert "Merge branch 'ar/run-command-hook'"

This reverts commit f406b8955295d01089ba2baf35eceadff2d11cae,
reversing changes made to 1627809eeff75e6ec936fc609e7be46d5eb2fa9e.

It seems to have caused a few regressions, two of the three known
ones we have proposed solutions for.  Let's give ourselves a bit
more room to maneuver during the pre-release freeze period and
restart once the 2.53 ships.

5 weeks agoGit 2.53-rc0 v2.53.0-rc0
Junio C Hamano [Thu, 15 Jan 2026 13:59:37 +0000 (05:59 -0800)] 
Git 2.53-rc0

Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 weeks agoMerge branch 'ps/clar-integers'
Junio C Hamano [Thu, 15 Jan 2026 15:12:41 +0000 (07:12 -0800)] 
Merge branch 'ps/clar-integers'

Import newer version of "clar", unit testing framework.

* ps/clar-integers:
  gitattributes: disable blank-at-eof errors for clar test expectations
  t/unit-tests: demonstrate use of integer comparison assertions
  t/unit-tests: update clar to 39f11fe

5 weeks agoMerge branch 'kh/replay-invalid-onto-advance'
Junio C Hamano [Thu, 15 Jan 2026 15:12:41 +0000 (07:12 -0800)] 
Merge branch 'kh/replay-invalid-onto-advance'

Improve the error message when a bad argument is given to the
`--onto` option of "git replay".  Test coverage of "git replay" has
been improved.

* kh/replay-invalid-onto-advance:
  t3650: add more regression tests for failure conditions
  replay: die if we cannot parse object
  replay: improve code comment and die message
  replay: die descriptively when invalid commit-ish is given
  replay: find *onto only after testing for ref name
  replay: remove dead code and rearrange

5 weeks agoMerge branch 'ps/odb-misc-fixes'
Junio C Hamano [Thu, 15 Jan 2026 15:12:40 +0000 (07:12 -0800)] 
Merge branch 'ps/odb-misc-fixes'

Miscellaneous fixes on object database layer.

* ps/odb-misc-fixes:
  odb: properly close sources before freeing them
  builtin/gc: fix condition for whether to write commit graphs

5 weeks agoMerge branch 'pt/t7800-difftool-test-racefix'
Junio C Hamano [Thu, 15 Jan 2026 15:12:40 +0000 (07:12 -0800)] 
Merge branch 'pt/t7800-difftool-test-racefix'

Test fixup.

* pt/t7800-difftool-test-racefix:
  t7800: fix racy "difftool --dir-diff syncs worktree" test

5 weeks agoDocumentation/config: fix replacement for --get-urlmatch
Pushkar Singh [Thu, 15 Jan 2026 11:08:05 +0000 (11:08 +0000)] 
Documentation/config: fix replacement for --get-urlmatch

The documentation claims that --get-urlmatch is replaced by

  git config get --all --show-names --url=<URL> <name>

However, --url cannot be combined with --all, and this command
fails in practice.

Update the replacement to use only --url, which matches the
actual behavior of --get-urlmatch.

Signed-off-by: Pushkar Singh <pushkarkumarsingh1970@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 weeks agobuiltin/repack: handle promisor packs with geometric repacking
Patrick Steinhardt [Mon, 5 Jan 2026 13:16:45 +0000 (14:16 +0100)] 
builtin/repack: handle promisor packs with geometric repacking

When performing a fetch with an object filter, we mark the resulting
packfile as a promisor pack. An object part of such a pack may miss any
of its referenced objects, and Git knows to handle this case by fetching
any such missing objects from the promisor remote.

The "promisor" property needs to be retained going forward. So every
time we pack a promisor object, the resulting pack must be marked as a
promisor pack. git-repack(1) does this already: when a repository has a
promisor remote, it knows to pass "--exclude-promisor-objects" to the
git-pack-objects(1) child process. Promisor packs are written separately
when doing an all-into-one repack via `repack_promisor_objects()`.

But we don't support promisor objects when doing a geometric repack yet.
Promisor packs do not get any special treatment there, as we simply
merge promisor and non-promisor packs. The resulting pack is not even
marked as a promisor pack, which essentially corrupts the repository.

This corruption couldn't happen in the real world though: we pass both
"--exclude-promisor-objects" and "--stdin-packs" to git-pack-objects(1)
if a repository has a promisor remote, but as those options are mutually
exclusive we always end up dying. And while we made those flags
compatible with one another in a preceding commit, we still end up dying
in case git-pack-objects(1) is asked to repack a promisor pack.

There's multiple ways to fix this:

  - We can exclude promisor packs from the geometric progression
    altogether. This would have the consequence that we never repack
    promisor packs at all. But in a partial clone it is quite likely
    that the user generates a bunch of promisor packs over time, as
    every backfill fetch would create another one. So this doesn't
    really feel like a sensible option.

  - We can adapt git-pack-objects(1) to support repacking promisor packs
    and include them in the normal geometric progression. But this would
    mean that the set of promisor objects expands over time as the packs
    are merged with normal packs.

  - We can use a separate geometric progression to repack promisor
    packs.

The first two options both have significant downsides, so they aren't
really feasible. But the third option fixes both of these downsides: we
make sure that promisor packs get merged, and at the same time we never
expand the set of promisor objects beyond the set of objects that are
already marked as promisor objects.

Implement this strategy so that geometric repacking works in partial
clones.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 weeks agorepack-promisor: extract function to remove redundant packs
Patrick Steinhardt [Mon, 5 Jan 2026 13:16:44 +0000 (14:16 +0100)] 
repack-promisor: extract function to remove redundant packs

We're about to add a second caller that wants to remove redundant packs
after a geometric repack. Split out the function which does this to
prepare for that.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 weeks agorepack-promisor: extract function to finalize repacking
Patrick Steinhardt [Mon, 5 Jan 2026 13:16:43 +0000 (14:16 +0100)] 
repack-promisor: extract function to finalize repacking

We're about to add a second caller that wants to finalize repacking of
promisor objects. Split out the function which does this to prepare for
that.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 weeks agorepack-geometry: extract function to compute repacking split
Patrick Steinhardt [Mon, 5 Jan 2026 13:16:42 +0000 (14:16 +0100)] 
repack-geometry: extract function to compute repacking split

We're about to add a second caller that wants to compute the repacking
split for a set of packfiles. Split out the function that computes this
split to prepare for that.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 weeks agobuiltin/pack-objects: exclude promisor objects with "--stdin-packs"
Patrick Steinhardt [Mon, 5 Jan 2026 13:16:41 +0000 (14:16 +0100)] 
builtin/pack-objects: exclude promisor objects with "--stdin-packs"

It is currently not possible to combine "--exclude-promisor-objects"
with "--stdin-packs" because both flags want to set up a revision walk
to enumerate the objects to pack. In a subsequent commit though we want
to extend geometric repacks to support promisor objects, and for that we
need to handle the combination of both flags.

There are two cases we have to think about here:

  - "--stdin-packs" asks us to pack exactly the objects part of the
    specified packfiles. It is somewhat questionable what to do in the
    case where the user asks us to exclude promisor objects, but at the
    same time explicitly passes a promisor pack to us. For now, we
    simply abort the request as it is self-contradicting. As we have
    also been dying before this commit there is no regression here.

  - "--stdin-packs=follow" does the same as the first flag, but it also
    asks us to include all objects transitively reachable from any
    object in the packs we are about to repack. This is done by doing
    the revision walk mentioned further up. Luckily, fixing this case is
    trivial: we only need to modify the revision walk to also set the
    `exclude_promisor_objects` field.

Note that we do not support the "--exclude-promisor-objects-best-effort"
flag for now as we don't need it to support geometric repacking with
promisor objects.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 weeks agomidx-write.c: assume checksum-invalid MIDXs require an update
Taylor Blau [Mon, 12 Jan 2026 23:45:06 +0000 (18:45 -0500)] 
midx-write.c: assume checksum-invalid MIDXs require an update

In 6ce9d558ced (midx-write: skip rewriting MIDX with `--stdin-packs`
unless needed, 2025-12-10), the MIDX machinery learned how to optimize
out unnecessary writes with "--stdin-packs".

In order to do this, it compares the contents of the in-progress write
against a MIDX loaded directly from the object store. We load a separate
MIDX (as opposed to checking our update relative to "ctx.m") because the
MIDX code does not reuse an existing MIDX with --stdin-packs, and always
leaves "ctx.m" as NULL. See commit 0c5a62f14bc (midx-write.c: do not
read existing MIDX with `packs_to_include`, 2024-06-11) for details on
why.

If "ctx.m" is non-NULL, however, it is guaranteed to be checksum-valid,
since we only assign "ctx.m" when "midx_checksum_valid()" returns true.
Since the same guard does not exist for the MIDX we pass to
"midx_needs_update()", we may ignore on-disk corruption when determining
whether or not we can optimize out the write.

Add a similar guard within "midx_needs_update()" to prevent such an
issue.

A more robust fix would involve revising 0c5a62f14bc and teaching the
MIDX generation code how to reuse an existing MIDX even when invoked
with "--stdin-packs", such that we could avoid side-loading the MIDX
directly from the object store in order to call "midx_needs_update()".
For now, pursue the minimal fix.

Signed-off-by: Taylor Blau <me@ttaylorr.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 weeks agot/t5319-multi-pack-index.sh: drop early 'test_done'
Taylor Blau [Mon, 12 Jan 2026 23:45:03 +0000 (18:45 -0500)] 
t/t5319-multi-pack-index.sh: drop early 'test_done'

In 6ce9d558ced (midx-write: skip rewriting MIDX with `--stdin-packs`
unless needed, 2025-12-10), an extra 'test_done' was added, causing the
test script to finish before having run all of its tests.

Dropping this extraneous 'test_done' exposes a bug from commit
6ce9d558ced that causes a subsequent test to fail. Mark that test with a
'test_expect_failure' for now, and the subsequent commit will explain
and fix the bug.

Signed-off-by: Taylor Blau <me@ttaylorr.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 weeks agoMerge branch 'ps/repack-avoid-noop-midx-rewrite' into tb/midx-write-corrupt-checksum-fix
Junio C Hamano [Tue, 13 Jan 2026 13:21:09 +0000 (05:21 -0800)] 
Merge branch 'ps/repack-avoid-noop-midx-rewrite' into tb/midx-write-corrupt-checksum-fix

* ps/repack-avoid-noop-midx-rewrite:
  midx-write: skip rewriting MIDX with `--stdin-packs` unless needed
  midx-write: extract function to test whether MIDX needs updating
  midx: fix `BUG()` when getting preferred pack without a reverse index

5 weeks agoutf8.c: enable workaround for iconv under macOS 14/15
Torsten Bögershausen [Mon, 12 Jan 2026 16:25:53 +0000 (17:25 +0100)] 
utf8.c: enable workaround for iconv under macOS 14/15

The previous commit introduced a workaround in utf8.c to deal
with broken iconv implementations.

It is enabled when a MacOS version is used that has a buggy
iconv library and there is no external library provided
(and linked against) from neither MacPorts nor Homebrew nor Fink.
For Homebrew, MacPorts and Fink we check if libiconv exist.
Introduce 2 new macros: HAS_GOOD_LIBICONV and NEEDS_GOOD_LIBICONV.

For Homebrew HAS_GOOD_LIBICONV is set when the libiconv directory
exist.
MacPorts can be installed with or without libiconv, so check if
libiconv.dylib exists (which is a softlink)

Fink compiles and installs libiconv by default.
Note that a fresh installation of Fink now defaults to /opt/sw.
Older versions used /sw as default, so leave the check and setting
of BASIC_CFLAGS and BASIC_LDFLAGS as is.
For the new default check for the existance of /opt/sw as well.
Add a check for /opt/sw/lib/libiconv.dylib which sets HAS_GOOD_LIBICONV

Signed-off-by: Torsten Bögershausen <tboegi@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 weeks agoutf8.c: prepare workaround for iconv under macOS 14/15
Torsten Bögershausen [Mon, 12 Jan 2026 16:25:51 +0000 (17:25 +0100)] 
utf8.c: prepare workaround for iconv under macOS 14/15

MacOS14 (Sonoma) has started to ship an iconv library with bugs.
The same bugs exists even in MacOS 15 (Sequoia)

A bug report running the Git test suite says:

three tests of t3900 fail on macOS 26.1 for me:

  not ok 17 - ISO-2022-JP should be shown in UTF-8 now
  not ok 25 - ISO-2022-JP should be shown in UTF-8 now
  not ok 38 - commit --fixup into ISO-2022-JP from UTF-8

Here's the verbose output of the first one:

=================
expecting success of 3900.17 'ISO-2022-JP should be shown in UTF-8 now':
                compare_with ISO-2022-JP "$TEST_DIRECTORY"/t3900/2-UTF-8.txt

 --- /Users/x/src/git/t/t3900/2-UTF-8.txt 2024-10-01 19:43:24.605230684 +0000
 +++ current     2025-12-08 21:52:45.786161909 +0000
@@ -1,5 +1,5 @@
 はれひほふ

 しているのが、いるので。
 -濱浜ほれぷりぽれまびぐりろへ。
 +濱浜ほれぷりぽれまび$0$j$m$X!#
not ok 17 - ISO-2022-JP should be shown in UTF-8 now
1..17
=================

compare_with runs git show to display a commit message, which in this
case here was encoded using ISO-2022-JP and is supposed to be reencoded
to UTF-8, but git show only does that half-way -- the "$0$j$m$X!#" part
is from the original ISO-2022-JP representation.

That botched conversion is done by utf8.c::reencode_string_iconv().  It
calls iconv(3) to do the actual work, initially with an output buffer of
the same size as the input.  If the output needs more space the function
enlarges the buffer and calls iconv(3) again.

iconv(3) won't tell us how much space it needs, but it will report what
part it already managed to convert, so we can increase the buffer and
continue from there.  ISO-2022-JP has escape codes for switching between
character sets, so it's a stateful encoding.  I guess the iconv(3) on my
machine forgets the state at the end of part one and then messes up part
two.

[end of citation]

Working around the buggy iconv shipped with the OS can be done in
two  ways:
a) Link Git against a different version of iconv
b) Improve the handling when iconv needs a larger output buffer

a) is already done by default when either Fink [1] or MacPorts [2]
   or Homebrew [3] is installed.
b) is implemented here, in case that no fixed iconv is available:
   When the output buffer is too short, increase it (as before)
   and start from scratch (this is new).

This workound needs to be enabled with
'#define ICONV_RESTART_RESET'
and a makefile knob will be added in the next commit

Suggested-by: René Scharfe <l.s.r@web.de>
Signed-off-by: Torsten Bögershausen <tboegi@web.de>
[1] https://www.finkproject.org/
[2] https://www.macports.org/
[3] https://brew.sh/

Signed-off-by: Torsten Bögershausen <tboegi@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 weeks agobuiltin/fsck: drop `fsck_head_link()`
Patrick Steinhardt [Mon, 12 Jan 2026 09:03:06 +0000 (10:03 +0100)] 
builtin/fsck: drop `fsck_head_link()`

The function `fsck_head_link()` was historically used to perform a
couple of consistency checks for refs. (Almost) all of these checks have
now been moved into the refs subsystem. There's only a single check
remaining that verifies whether `refs_resolve_ref_unsafe()` returns a
`NULL` pointer. This may happen in a couple of cases:

  - When `refs_is_safe()` declares the ref to be unsafe. We already have
    checks for this as we verify refnames with `check_refname_format()`.

  - When the ref doesn't exist. A repository without "HEAD" is
    completely broken though, and we would notice this error ahead of
    time already.

  - In case the caller passes `RESOLVE_REF_READING` and the ref is a
    symref that doesn't resolve. We don't pass this flag though.

As such, this check doesn't cover anything anymore that isn't already
covered by `refs_fsck()`. Drop it, which also allows us to inline the
call to `refs_resolve_ref_unsafe()`.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 weeks agobuiltin/fsck: move generic HEAD check into `refs_fsck()`
Patrick Steinhardt [Mon, 12 Jan 2026 09:03:05 +0000 (10:03 +0100)] 
builtin/fsck: move generic HEAD check into `refs_fsck()`

Move the check that detects "HEAD" refs that do not point at a branch
into `refs_fsck()`. This follows the same motivation as the preceding
commit.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 weeks agobuiltin/fsck: move generic object ID checks into `refs_fsck()`
Patrick Steinhardt [Mon, 12 Jan 2026 09:03:04 +0000 (10:03 +0100)] 
builtin/fsck: move generic object ID checks into `refs_fsck()`

While most of the logic that verifies the consistency of refs is
driven by `refs_fsck()`, we still have a small handful of checks in
`fsck_head_link()`. These checks don't use the git-fsck(1) reporting
infrastructure, and as such it's impossible to for example disable
some of those checks.

One such check detects refs that point to the all-zeroes object ID.
Extract this check into the generic `refs_fsck_ref()` function that is
used by both the "files" and "reftable" backends.

Note that this will cause us to not return an error code from
`fsck_head_link()` anymore in case this error was detected. This is fine
though: the only caller of this function does not check the error code
anyway. To demonstrate this, adapt the function to drop its return value
altogether. The function will be removed in a subsequent commit anyway.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 weeks agorefs/reftable: introduce generic checks for refs
Patrick Steinhardt [Mon, 12 Jan 2026 09:03:03 +0000 (10:03 +0100)] 
refs/reftable: introduce generic checks for refs

In a preceding commit we have extracted generic checks for both direct
and symbolic refs that apply for all backends. Wire up those checks for
the "reftable" backend.

Note that this is done by iterating through all refs manually with the
low-level reftable ref iterator. We explicitly don't want to use the
higher-level iterator that is exposed to users of the reftable backend
as that iterator may swallow for example broken refs.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>