]> git.ipfire.org Git - thirdparty/git.git/log
thirdparty/git.git
3 weeks agoMerge branch 'kn/reftable-consistency-checks'
Junio C Hamano [Tue, 14 Oct 2025 05:00:35 +0000 (22:00 -0700)] 
Merge branch 'kn/reftable-consistency-checks'

The reftable backend learned to sanity check its on-disk data more
carefully.

* kn/reftable-consistency-checks:
  refs/reftable: add fsck check for checking the table name
  reftable: add code to facilitate consistency checks
  fsck: order 'fsck_msg_type' alphabetically
  Documentation/fsck-msgids: remove duplicate msg id
  reftable: check for trailing newline in 'tables.list'
  refs: move consistency check msg to generic layer
  refs: remove unused headers

3 weeks agoMerge branch 'ps/commit-graph-per-object-source'
Junio C Hamano [Tue, 14 Oct 2025 05:00:35 +0000 (22:00 -0700)] 
Merge branch 'ps/commit-graph-per-object-source'

Code clean-up around commit-graph.

* ps/commit-graph-per-object-source:
  commit-graph: pass graphs that are to be merged as parameter
  commit-graph: return commit graph from `repo_find_commit_pos_in_graph()`
  commit-graph: return the prepared commit graph from `prepare_commit_graph()`
  revision: drop explicit check for commit graph
  blame: drop explicit check for commit graph

3 weeks agoMerge branch 'ja/doc-markup-attached-paragraph-fix'
Junio C Hamano [Tue, 14 Oct 2025 05:00:35 +0000 (22:00 -0700)] 
Merge branch 'ja/doc-markup-attached-paragraph-fix'

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

3 weeks agoMerge branch 'ps/ci-avoid-broken-sudo-on-ubuntu'
Junio C Hamano [Tue, 14 Oct 2025 05:00:34 +0000 (22:00 -0700)] 
Merge branch 'ps/ci-avoid-broken-sudo-on-ubuntu'

Our CI script requires "sudo" that can be told to preserve
environment, but Ubuntu replaced with "sudo" with an implementation
that lacks the feature.  Work this around by reinstalling the
original version.

* ps/ci-avoid-broken-sudo-on-ubuntu:
  ci: fix broken jobs on Ubuntu 25.10 caused by switch to sudo-rs(1)

3 weeks agoci: fix broken jobs on Ubuntu 25.10 caused by switch to sudo-rs(1)
Patrick Steinhardt [Fri, 10 Oct 2025 09:41:14 +0000 (11:41 +0200)] 
ci: fix broken jobs on Ubuntu 25.10 caused by switch to sudo-rs(1)

Ubuntu 25.10 has been released. One prominent change in this version of
Ubuntu is the switch to some Rust-based utilities. Part of this switch
is also that Ubuntu now defaults to sudo-rs(1).

Unfortunately, this breaks our CI because sudo-rs(1) does not support
the `--preserve-env` flag. Let's revert back to the C-based sudo(1)
implementation to fix this.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
3 weeks agoThe seventeenth batch
Junio C Hamano [Fri, 10 Oct 2025 19:51:35 +0000 (12:51 -0700)] 
The seventeenth batch

Signed-off-by: Junio C Hamano <gitster@pobox.com>
3 weeks agoMerge branch 'en/doc-merge-tree-describe-merge-base'
Junio C Hamano [Fri, 10 Oct 2025 19:51:46 +0000 (12:51 -0700)] 
Merge branch 'en/doc-merge-tree-describe-merge-base'

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

3 weeks agoMerge branch 'rj/doc-missing-technical-docs'
Junio C Hamano [Fri, 10 Oct 2025 19:51:46 +0000 (12:51 -0700)] 
Merge branch 'rj/doc-missing-technical-docs'

Doc updates.

* rj/doc-missing-technical-docs:
  doc: add some missing technical documents

3 weeks agoMerge branch 'ps/gitlab-ci-windows-improvements'
Junio C Hamano [Fri, 10 Oct 2025 19:51:46 +0000 (12:51 -0700)] 
Merge branch 'ps/gitlab-ci-windows-improvements'

GitLab CI improvements.

* ps/gitlab-ci-windows-improvements:
  t8020: fix test failure due to indeterministic tag sorting
  gitlab-ci: upload Meson test logs as JUnit reports
  gitlab-ci: drop workaround for Python certificate store on Windows
  gitlab-ci: ignore failures to disable realtime monitoring
  gitlab-ci: dedup instructions to disable realtime monitoring

4 weeks agoThe sixteenth batch
Junio C Hamano [Wed, 8 Oct 2025 16:31:33 +0000 (09:31 -0700)] 
The sixteenth batch

Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 weeks agoMerge branch 'ps/rust-balloon'
Junio C Hamano [Wed, 8 Oct 2025 19:17:55 +0000 (12:17 -0700)] 
Merge branch 'ps/rust-balloon'

Dip our toes a bit to (optionally) use Rust implemented helper
called from our C code.

* ps/rust-balloon:
  ci: enable Rust for breaking-changes jobs
  ci: convert "pedantic" job into full build with breaking changes
  BreakingChanges: announce Rust becoming mandatory
  varint: reimplement as test balloon for Rust
  varint: use explicit width for integers
  help: report on whether or not Rust is enabled
  Makefile: introduce infrastructure to build internal Rust library
  Makefile: reorder sources after includes
  meson: add infrastructure to build internal Rust library

4 weeks agoMerge branch 'mh/doc-credential-url-prefix'
Junio C Hamano [Wed, 8 Oct 2025 19:17:55 +0000 (12:17 -0700)] 
Merge branch 'mh/doc-credential-url-prefix'

Doc update to describe a feature that has already been implemented.

* mh/doc-credential-url-prefix:
  docs/gitcredentials: describe URL prefix matching

4 weeks agoMerge branch 'kn/ref-cache-seek-fix'
Junio C Hamano [Wed, 8 Oct 2025 19:17:54 +0000 (12:17 -0700)] 
Merge branch 'kn/ref-cache-seek-fix'

Handling of an empty subdirectory of .git/refs/ in the ref-files
backend has been corrected.

* kn/ref-cache-seek-fix:
  refs/ref-cache: fix SEGFAULT when seeking in empty directories

4 weeks agoMerge branch 'ml/reflog-write-committer-info-fix'
Junio C Hamano [Wed, 8 Oct 2025 19:17:54 +0000 (12:17 -0700)] 
Merge branch 'ml/reflog-write-committer-info-fix'

"git reflog write" did not honor the configured user.name/email
which has been corrected.

* ml/reflog-write-committer-info-fix:
  builtin/reflog: respect user config in "write" subcommand

4 weeks agoThe fifteenth batch
Junio C Hamano [Tue, 7 Oct 2025 19:24:01 +0000 (12:24 -0700)] 
The fifteenth batch

Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 weeks agoMerge branch 'ps/odb-clean-stale-wrappers'
Junio C Hamano [Tue, 7 Oct 2025 19:25:27 +0000 (12:25 -0700)] 
Merge branch 'ps/odb-clean-stale-wrappers'

Code clean-up.

* ps/odb-clean-stale-wrappers:
  odb: drop deprecated wrapper functions

4 weeks agoMerge branch 'js/curl-off-t-fixes'
Junio C Hamano [Tue, 7 Oct 2025 19:25:27 +0000 (12:25 -0700)] 
Merge branch 'js/curl-off-t-fixes'

A few places where an size_t value was cast to curl_off_t without
checking has been updated to use the existing helper function.

* js/curl-off-t-fixes:
  http-push: avoid new compile error
  imap-send: be more careful when casting to `curl_off_t`
  http: offer to cast `size_t` to `curl_off_t` safely

4 weeks agoMerge branch 'jt/clang-format-foreach-wo-space-before-parenthesis'
Junio C Hamano [Tue, 7 Oct 2025 19:25:27 +0000 (12:25 -0700)] 
Merge branch 'jt/clang-format-foreach-wo-space-before-parenthesis'

Clang-format update to let our control macros formatted the way we
had them traditionally, e.g., "for_each_string_list_item()" without
space before the parentheses.

* jt/clang-format-foreach-wo-space-before-parenthesis:
  clang-format: exclude control macros from SpaceBeforeParens

4 weeks agoMerge branch 'ps/packfile-store'
Junio C Hamano [Tue, 7 Oct 2025 19:25:27 +0000 (12:25 -0700)] 
Merge branch 'ps/packfile-store'

Code clean-up around the in-core list of all the pack files and
object database(s).

* ps/packfile-store:
  packfile: refactor `get_packed_git_mru()` to work on packfile store
  packfile: refactor `get_all_packs()` to work on packfile store
  packfile: refactor `get_packed_git()` to work on packfile store
  packfile: move `get_multi_pack_index()` into "midx.c"
  packfile: introduce function to load and add packfiles
  packfile: refactor `install_packed_git()` to work on packfile store
  packfile: split up responsibilities of `reprepare_packed_git()`
  packfile: refactor `prepare_packed_git()` to work on packfile store
  packfile: reorder functions to avoid function declaration
  odb: move kept cache into `struct packfile_store`
  odb: move MRU list of packfiles into `struct packfile_store`
  odb: move packfile map into `struct packfile_store`
  odb: move initialization bit into `struct packfile_store`
  odb: move list of packfiles into `struct packfile_store`
  packfile: introduce a new `struct packfile_store`

4 weeks agoMerge branch 'je/doc-push'
Junio C Hamano [Tue, 7 Oct 2025 19:25:26 +0000 (12:25 -0700)] 
Merge branch 'je/doc-push'

Doc updates.

* je/doc-push:
  doc: git-push: rewrite refspec specification
  doc: git-push: create PUSH RULES section

4 weeks agomailmap: change primary address for Jonathan Tan
Jonathan Tan [Tue, 7 Oct 2025 17:11:44 +0000 (10:11 -0700)] 
mailmap: change primary address for Jonathan Tan

Signed-off-by: Jonathan Tan <jonathantanmy@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 weeks agorefs/reftable: add fsck check for checking the table name
Karthik Nayak [Tue, 7 Oct 2025 12:11:31 +0000 (14:11 +0200)] 
refs/reftable: add fsck check for checking the table name

Add glue code in 'refs/reftable-backend.c' which calls the reftable
library to perform the fsck checks. Here we also map the reftable errors
to Git' fsck errors.

Introduce a check to validate table names for a given reftable stack.
Also add 'badReftableTableName' as a corresponding error within Git. The
reftable specification mentions:

  It suggested to use
  ${min_update_index}-${max_update_index}-${random}.ref as a naming
  convention.

So treat non-conformant file names as warnings.

While adding the fsck header to 'refs/reftable-backend.c', modify the
list to maintain lexicographical ordering.

Signed-off-by: Karthik Nayak <karthik.188@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 weeks agoreftable: add code to facilitate consistency checks
Karthik Nayak [Tue, 7 Oct 2025 12:11:30 +0000 (14:11 +0200)] 
reftable: add code to facilitate consistency checks

The `git refs verify` command is used to run consistency checks on the
reference backends. This command is also invoked when users run 'git
fsck'. While the files-backend has some fsck checks added, the reftable
backend lacks such checks. Let's add the required infrastructure and a
check to test for the files present in the reftable directory.

Since the reftable library is treated as an independent library we
should ensure that the library code works independently without
knowledge about Git's internals. To do this, add both 'reftable/fsck.c'
and 'reftable/reftable-fsck.h'. Which provide an entry point
'reftable_fsck_check' for running fsck checks over a provided reftable
stack. The callee provides the function with callbacks to handle issue
and information reporting.

The added check, goes over all tables in the reftable stack validates
that they have a valid name. It not, it raises an error.

While here, move 'reftable/error.o' in the Makefile to retain
lexicographic ordering.

Signed-off-by: Karthik Nayak <karthik.188@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 weeks agofsck: order 'fsck_msg_type' alphabetically
Karthik Nayak [Tue, 7 Oct 2025 12:11:29 +0000 (14:11 +0200)] 
fsck: order 'fsck_msg_type' alphabetically

The list of 'fsck_msg_type' seem to be alphabetically ordered, but there
are a few small misses. Fix this by sorting the sub-sections of the
list to maintain alphabetical ordering.

Signed-off-by: Karthik Nayak <karthik.188@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 weeks agoDocumentation/fsck-msgids: remove duplicate msg id
Karthik Nayak [Tue, 7 Oct 2025 12:11:28 +0000 (14:11 +0200)] 
Documentation/fsck-msgids: remove duplicate msg id

The `gitmodulesLarge` is repeated twice. Remove the second duplicate.

Signed-off-by: Karthik Nayak <karthik.188@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 weeks agoreftable: check for trailing newline in 'tables.list'
Karthik Nayak [Tue, 7 Oct 2025 12:11:27 +0000 (14:11 +0200)] 
reftable: check for trailing newline in 'tables.list'

In the reftable format, the 'tables.list' file contains a
newline separated list of tables. While we parse this file, we do not
check or care about the last newline. Tighten the parser in
`parse_names()` to return an appropriate error if the last newline is
missing.

This requires modification to `parse_names()` to now return the error
while accepting the output as a third argument.

Signed-off-by: Karthik Nayak <karthik.188@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 weeks agorefs: move consistency check msg to generic layer
Karthik Nayak [Tue, 7 Oct 2025 12:11:26 +0000 (14:11 +0200)] 
refs: move consistency check msg to generic layer

The files-backend prints a message before the consistency checks run.
Move this to the generic layer so both the files and reftable backend
can benefit from this message.

Signed-off-by: Karthik Nayak <karthik.188@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 weeks agorefs: remove unused headers
Karthik Nayak [Tue, 7 Oct 2025 12:11:25 +0000 (14:11 +0200)] 
refs: remove unused headers

In the 'refs/' namespace, some of the included header files are not
needed, let's remove them.

Signed-off-by: Karthik Nayak <karthik.188@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 weeks agodoc: fix indentation of refStorage item in git-config(1)
Jeff King [Tue, 7 Oct 2025 08:22:23 +0000 (04:22 -0400)] 
doc: fix indentation of refStorage item in git-config(1)

Commit 5a12fd2a8c (doc: change the markup of paragraphs following a
nested list item, 2025-09-27) converted the list of items in
config/extensions.adoc into a definition list. This caused a small
regression in the indentation of one item, but only when built with
AsciiDoctor. You can see the problem with:

  $ ./doc-diff --asciidoctor 5a12fd2a8c5a12fd2a8c
  --- a/c44beea485f0f2feaf460e2ac87fdd5608d63cf0-asciidoctor/home/peff/share/man/man1/git-config.1
  +++ b/5a12fd2a8c850df311aa149c9bad87b7cb002abb-asciidoctor/home/peff/share/man/man1/git-config.1
  @@ -3128,9 +3128,9 @@ CONFIGURATION FILE
                  •   reftable for the reftable format. This format is
                      experimental and its internals are subject to change.

  -               Note that this setting should only be set by git-init(1) or git-
  -               clone(1). Trying to change it after initialization will not work
  -               and will produce hard-to-diagnose issues.
  +           Note that this setting should only be set by git-init(1) or git-
  +           clone(1). Trying to change it after initialization will not work and
  +           will produce hard-to-diagnose issues.

              relativeWorktrees
                  If enabled, indicates at least one worktree has been linked with

(along with many other changes which are correctly fixing what
5a12fd2a8c intended to fix). The "Note" paragraph should remain aligned
with the bullet points, as they are left-aligned with the rest of the
definition text.

The confusion comes from a paragraph following a list item (ironically,
the same case that 5a12fd2a8c was solving!). We can solve it by adding
"--" block markers around the nested list. We couldn't have done that
before 5a12fd2a8c because before then our list was nested inside another
set of block markers, something that AsciiDoctor has trouble with. But
now that we are a top-level definition list, it is OK to do so (and in
fact, you can see that commit already made a similar adjustment for the
worktreeConfig entry).

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 weeks agoMerge branch 'master' of https://github.com/j6t/gitk
Junio C Hamano [Sun, 5 Oct 2025 20:32:47 +0000 (13:32 -0700)] 
Merge branch 'master' of https://github.com/j6t/gitk

* 'master' of https://github.com/j6t/gitk:
  gitk: set minimum size on configuration dialog
  gitk: separate code blocks for configuration dialog
  gitk: make configuration dialog resizing useful
  gitk: add theme selection to color configuration page
  gitk: add proc run_themeloader
  gitk: eliminate unused ui color variables
  gitk: eliminate Interface color option from gui
  gitk: use text labels for next/prev search buttons
  gitk: use text labels for commit ID buttons
  gitk: do not invoke tk_setPalette
  gitk: use config variables to define and load a theme
  gitk: make sha1but a ttk::button
  gitk: use themed spinboxes
  gitk: fix MacOS 10.14 "Mojave" crash on launch
  gitk: fix error when remote tracking branch is deleted

4 weeks agoMerge branch 'ml/themes'
Johannes Sixt [Sun, 5 Oct 2025 11:09:49 +0000 (13:09 +0200)] 
Merge branch 'ml/themes'

* ml/themes:
  gitk: set minimum size on configuration dialog
  gitk: separate code blocks for configuration dialog
  gitk: make configuration dialog resizing useful
  gitk: add theme selection to color configuration page
  gitk: add proc run_themeloader
  gitk: eliminate unused ui color variables
  gitk: eliminate Interface color option from gui
  gitk: use text labels for next/prev search buttons
  gitk: use text labels for commit ID buttons
  gitk: do not invoke tk_setPalette
  gitk: use config variables to define and load a theme
  gitk: make sha1but a ttk::button
  gitk: use themed spinboxes

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
4 weeks agogitk: set minimum size on configuration dialog
Mark Levedahl [Sat, 4 Oct 2025 13:57:18 +0000 (09:57 -0400)] 
gitk: set minimum size on configuration dialog

gitk sets no size limit on its configuration dialog, allowing the user
to collapse the window so almost nothing is visible. The geometry
manager sets an initial size so all the widgets are visible, though
ignores the potentially very long text in the entry widgets in doing so.
Let's use this initial size as the minimum. The size information is
computed in Tk's idle processing queue, so a wait is required.

Signed-off-by: Mark Levedahl <mlevedahl@gmail.com>
4 weeks agogitk: separate code blocks for configuration dialog
Mark Levedahl [Wed, 1 Oct 2025 03:28:36 +0000 (23:28 -0400)] 
gitk: separate code blocks for configuration dialog

gitk's configuration dialog uses a large number of widgets, and this
code is hard to read as there is no easily recognizable grouping or
breaks. Help this by adding space between items that occupy a single row
in the dialog.

Signed-off-by: Mark Levedahl <mlevedahl@gmail.com>
4 weeks agogitk: make configuration dialog resizing useful
Mark Levedahl [Tue, 30 Sep 2025 23:35:59 +0000 (19:35 -0400)] 
gitk: make configuration dialog resizing useful

gitk's configuration dialog can be resized, but this does not expand the
space allocated to any widgets. Some items may have long lines of text
that would be visible if the widgets expanded, but this does not happen.

The top-level container uses a two column grid and allocates any space
change equally to both columns.  However, the configuration pages are
contained in one cell so half the additional space is wasted if
expanding. Also, the individual configuration pages do not mark any
column or widgets to expand, so any additional space given is just used
as padding.

Collapse the top-level page to have one column, placing the "OK" and
"Cancel" buttons in a non-resizing frame in column 1 (this keeps the
buttons in constant geometry as the dialog is expanded). This makes all
additional space go to the configuration page.

Mark column 3 of the individual pages to get all additional space, and
mark the text widgets in that column so they will expand to use the
space. While we're at it, eliminate or simplify use of frames to contain
column 2 content, and harmonize the indents of that content.

prefspage_general adds a special "spacer" label in row 2, column 1, that
causes all of the subsequent rows with no column 1 content to indent,
and this carries over to the next notebook tab (prefspage_color) through
some undocumented feature. The fonts page has a different indent, again
for unknown reason. The documented approach would be to use -padx
explicitly on all the rows to set the indents.

Signed-off-by: Mark Levedahl <mlevedahl@gmail.com>
4 weeks agoMerge branch 'es/ignore-osascript-failure'
Johannes Sixt [Sat, 4 Oct 2025 13:36:42 +0000 (15:36 +0200)] 
Merge branch 'es/ignore-osascript-failure'

* es/ignore-osascript-failure:
  gitk: fix MacOS 10.14 "Mojave" crash on launch

4 weeks agoMerge branch 'mr/sort-refs-by-type'
Johannes Sixt [Sat, 4 Oct 2025 13:36:12 +0000 (15:36 +0200)] 
Merge branch 'mr/sort-refs-by-type'

* mr/sort-refs-by-type:
  gitk: fix error when remote tracking branch is deleted

4 weeks agoDocumentation/git-merge-tree.adoc: clarify the --merge-base option
Elijah Newren [Thu, 2 Oct 2025 22:34:47 +0000 (22:34 +0000)] 
Documentation/git-merge-tree.adoc: clarify the --merge-base option

The --merge-base option for merge-tree has a few slightly awkward
constructions or omissions:
  * Split the initial long sentence describing the option into two,
    making the instructions and the limitations clearer for readers.
  * Add context to the final sentence that might be obvious to some
    readers but isn't immediately obvious to all.
  * The discussion about lack of support for multiple merge bases
    simply leave folks wondering why that matters and could help or
    hurt.  Separate it out and add a brief explanation.

Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 weeks agodoc: add some missing technical documents
Ramsay Jones [Thu, 2 Oct 2025 22:12:13 +0000 (23:12 +0100)] 
doc: add some missing technical documents

Commit bcf7edee09 ("meson: generate articles", 2024-12-27) added the
generation of the 'howto' and 'technical' documents to the meson build.
At this time those documents had a '*.txt' file extension, but they were
renamed with an '*.adoc' extension by commit 1f010d6bdf ("doc: use .adoc
extension for AsciiDoc files", 2025-01-20), for the most part. For the
meson build, commit 87eccc3a81 ("meson: fix building technical and howto
docs", 2025-03-02) fixed the meson.build files, which had not been
updated when the files were renamed.

However, the 'Documentation/Makefile' has not been updated to include
all of the recently added technical documents. In particular, the
following are built by meson, but not by the Makefile:

    commit-graph.adoc
    directory-rename-detection.adoc
    packfile-uri.adoc
    remembering-renames.adoc
    repository-version.adoc
    rerere.adoc
    sparse-checkout.adoc
    sparse-index.adoc

In order to ensure that both build systems format the same technical
documents, add the above documents to the TECH_DOCS variable in the
Documentation/Makefile.

Signed-off-by: Ramsay Jones <ramsay@ramsayjones.plus.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 weeks agoThe fourteenth batch
Junio C Hamano [Thu, 2 Oct 2025 19:23:32 +0000 (12:23 -0700)] 
The fourteenth batch

Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 weeks agoMerge branch 'kh/you-still-use-whatchanged-fix'
Junio C Hamano [Thu, 2 Oct 2025 19:26:12 +0000 (12:26 -0700)] 
Merge branch 'kh/you-still-use-whatchanged-fix'

The "do you still use it?" message given by a command that is
deeply deprecated and allow us to suggest alternatives has been
updated.

* kh/you-still-use-whatchanged-fix:
  BreakingChanges: remove claim about whatchanged reports
  whatchanged: remove not-even-shorter clause
  whatchanged: hint about git-log(1) and aliasing
  you-still-use-that??: help the user help themselves
  t0014: test shadowing of aliases for a sample of builtins
  git: allow alias-shadowing deprecated builtins
  git: move seen-alias bookkeeping into handle_alias(...)
  git: add `deprecated` category to --list-cmds
  Makefile: don’t add whatchanged after it has been removed

5 weeks agoMerge branch 'ps/meson-build-docs'
Junio C Hamano [Thu, 2 Oct 2025 19:26:12 +0000 (12:26 -0700)] 
Merge branch 'ps/meson-build-docs'

The build procedure based on meson learned a target to only build
documentation, similar to "make doc".

* ps/meson-build-docs:
  ci: don't compile whole project when testing docs with Meson
  meson: print docs backend as part of the summary
  meson: introduce a "docs" alias to compile documentation only

5 weeks agoMerge branch 'ps/config-get-color-fixes'
Junio C Hamano [Thu, 2 Oct 2025 19:26:12 +0000 (12:26 -0700)] 
Merge branch 'ps/config-get-color-fixes'

The use of "git config get" command to learn how ANSI color
sequence is for a particular type, e.g., "git config get
--type=color --default=reset no.such.thing", isn't very ergonomic.

* ps/config-get-color-fixes:
  builtin/config: do not spawn pager when printing color codes
  builtin/config: special-case retrieving colors without a key
  builtin/config: do not die in `get_color()`
  t1300: small style fixups
  t1300: write test expectations in the test's body

5 weeks agoMerge branch 'cc/fast-import-strip-signed-commits'
Junio C Hamano [Thu, 2 Oct 2025 19:26:12 +0000 (12:26 -0700)] 
Merge branch 'cc/fast-import-strip-signed-commits'

"git fast-import" learned that "--signed-commits=<how>" option that
corresponds to that of "git fast-export".

* cc/fast-import-strip-signed-commits:
  fast-import: add '--signed-commits=<mode>' option
  gpg-interface: refactor 'enum sign_mode' parsing

5 weeks agoMerge branch 'ms/refs-optimize'
Junio C Hamano [Thu, 2 Oct 2025 19:26:12 +0000 (12:26 -0700)] 
Merge branch 'ms/refs-optimize'

"git refs optimize" is added for not very well explained reason
despite it does the same thing as "git pack-refs"...

* ms/refs-optimize:
  t: add test for git refs optimize subcommand
  t0601: refactor tests to be shareable
  builtin/refs: add optimize subcommand
  doc: pack-refs: factor out common options
  builtin/pack-refs: factor out core logic into a shared library
  builtin/pack-refs: convert to use the generic refs_optimize() API
  reftable-backend: implement 'optimize' action
  files-backend: implement 'optimize' action
  refs: add a generic 'optimize' API

5 weeks agoMerge branch 'jt/odb-transaction'
Junio C Hamano [Thu, 2 Oct 2025 19:26:11 +0000 (12:26 -0700)] 
Merge branch 'jt/odb-transaction'

The work to build on the bulk-checkin infrastructure to create many
objects at once in a transaction and to abstract it into the
generic object layer continues.

* jt/odb-transaction:
  odb: add transaction interface
  object-file: update naming from bulk-checkin
  object-file: relocate ODB transaction code
  bulk-checkin: drop flush_odb_transaction()
  builtin/update-index: end ODB transaction when --verbose is specified
  bulk-checkin: remove ODB transaction nesting

5 weeks agot8020: fix test failure due to indeterministic tag sorting
Patrick Steinhardt [Thu, 2 Oct 2025 11:04:40 +0000 (13:04 +0200)] 
t8020: fix test failure due to indeterministic tag sorting

In e6c06e87a2 (last-modified: fix bug when some paths remain unhandled,
2025-09-18), we have fixed a bug where under certain circumstances,
git-last-modified(1) would BUG because there's still some unhandled
paths. The fix claims that the root cause here is criss-cross merges,
and it adds a test case that seemingly exercises this.

Curiously, this test case fails on some systems because the actual
output does not match our expectations:

    diff --git a/expect b/actual
    index 5271607..bdc620e 100644
    --- a/expect
    --- b/actual
    @@ -1,3 +1,3 @@
     km3 a
    -k2 k
    +km2 k
     1 file
    error: last command exited with $?=1
    not ok 15 - last-modified with subdir and criss-cross merge

The output we see is git-name-rev(1) with `--annotate-stdin`. What it
does is to take the output of git-last-modified(1), which contains
object IDs of the blamed commits, and convert those object IDs into the
names of the corresponding tags. Interestingly, we indeed have both "k2"
and "km2" as tags, and even more interestingly both of these tags point
to the same commit. So the output we get isn't _wrong_, as the tags are
ambiguous.

But why do both of these tags point to the same commit? "km2" really is
supposed to be a merge, but due to the way the test is constructed the
merge turns into a fast-forward merge. Which means that the resulting
commit-graph does not even contain a criss-cross merge in the first place!
A quick test though shows that the test indeed triggers the bug, so
the initial analysis that the behaviour is triggered by such merges
must be wrong.

And it is: seemingly, the issue isn't with criss-cross merges, but
rather with a graph where different files in the same directory were
modified on both sides of a merge.

Refactor the test so that we explicitly test for this specific situation
instead of mentioning the "criss-cross merge" red herring. As the test
is very specific to the actual layout of the repository we also adapt it
to use its own standalone repository.

Note that this requires us to drop the `test_when_finished` call in
`check_last_modified` because it's not supported to execute that
function in a subshell.

This refactoring also fixes the original tag ambiguity that caused us to
fail on some platforms.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 weeks agogitlab-ci: upload Meson test logs as JUnit reports
Patrick Steinhardt [Thu, 2 Oct 2025 11:04:39 +0000 (13:04 +0200)] 
gitlab-ci: upload Meson test logs as JUnit reports

When running tests, Meson knows to output both a test log as well as a
JUnit test report that collates results. We don't currently upload these
results in our GitLab CI at all, which makes it hard to see which tests
ran, but also which of our tests may have failed.

Upload these JUnit reports as artifacts to make this information more
accessible. Note that we also do this for some jobs that don't use Meson
and thus don't generate these reports in the first place. GitLab CI
handles missing reports gracefully though, so there is no reason to
special-case those jobs that don't use Meson.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 weeks agogitlab-ci: drop workaround for Python certificate store on Windows
Patrick Steinhardt [Thu, 2 Oct 2025 11:04:38 +0000 (13:04 +0200)] 
gitlab-ci: drop workaround for Python certificate store on Windows

On Windows, we have been running into some issues in the past where the
certificate store for Python is broken on the GitLab CI runners using
Windows. The consequence was that we weren't able to establish any SSL
connections via Python, but we need that feature so that we can download
the Meson wraps. The workaround we employed was to import certificates
from the cURL project into the certificate store via OpenSSL.

This is obviously an ugly workaround. But even more importantly, this
workaround fails every time Chocolatey updates its OpenSSL packages. The
problem here is that the old OpenSSL package installer will be removed
immediately once the newer version was published, But the Chocolatey
community repository may not yet have propagated the new version of this
package to all of its caches. The result is that for a couple hours (or
sometimes even one or two days) we always fail to install OpenSSL until
the new version was propagated.

Luckily though, it turns out that the workaround doesn't seem to be
required anymore. Drop it to work around the intermittent failures and
to clean up some now-unneeded legacy cruft.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 weeks agogitlab-ci: ignore failures to disable realtime monitoring
Patrick Steinhardt [Thu, 2 Oct 2025 11:04:37 +0000 (13:04 +0200)] 
gitlab-ci: ignore failures to disable realtime monitoring

We have recently introduced a change to disable realtime monitoring for
Windows job in GitLab CI. This change led (and still leads) to a quite
significant speedup.

But there's a catch: seemingly, some of the runners we use already have
realtime monitoring disabled. On such a machine, trying to disable the
feature again leads to an error that causes the whole job to fail.

Safeguard against such failures by explicitly ignoring them.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 weeks agogitlab-ci: dedup instructions to disable realtime monitoring
Patrick Steinhardt [Thu, 2 Oct 2025 11:04:36 +0000 (13:04 +0200)] 
gitlab-ci: dedup instructions to disable realtime monitoring

The instruction to disable realtime monitoring are shared across all of
our Windows-based jobs. Deduplicate it so that we can more readily
iterate on it.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 weeks agoci: enable Rust for breaking-changes jobs
Patrick Steinhardt [Thu, 2 Oct 2025 07:29:34 +0000 (09:29 +0200)] 
ci: enable Rust for breaking-changes jobs

Enable Rust for our breaking-changes jobs so that we can verify that the
build infrastructure and the converted Rust subsystems work as expected.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 weeks agoci: convert "pedantic" job into full build with breaking changes
Patrick Steinhardt [Thu, 2 Oct 2025 07:29:33 +0000 (09:29 +0200)] 
ci: convert "pedantic" job into full build with breaking changes

The "pedantic" CI job is building on Fedora with `DEVOPTS=pedantic`.
This build flag doesn't do anything anymore starting with 6a8cbc41ba
(developer: enable pedantic by default, 2021-09-03), where we have
flipped the default so that developers have to opt-out of pedantic
builds via the "no-pedantic" option. As such, all this job really does
is to do a normal build on Fedora, which isn't all that interesting.

Convert that job into a full build-and-test job that uses Meson with
breaking changes enabled. This plugs two gaps:

  - We now test on another distro that we didn't run tests on
    beforehand.

  - We verify that breaking changes work as expected with Meson.

Furthermore, in a subsequent commit we'll modify both jobs that use
breaking changes to also enable Rust. By converting the Fedora job to
use Meson, we ensure that we test our Rust build infrastructure for both
build systems.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 weeks agoBreakingChanges: announce Rust becoming mandatory
Patrick Steinhardt [Thu, 2 Oct 2025 07:29:32 +0000 (09:29 +0200)] 
BreakingChanges: announce Rust becoming mandatory

Over the last couple of years the appetite for bringing Rust into the
codebase has grown significantly across the developer base. Introducing
Rust is a major change though and has ramifications for the whole
ecosystem:

  - Some platforms have a Rust toolchain available, but have not yet
    integrated it into their build infrastructure.

  - Some platforms don't have any support for Rust at all.

  - Some platforms may have to figure out how to fit Rust into their
    bootstrapping sequence.

Due to this, and given that Git is a critical piece of infrastructure
for the whole industry, we cannot just introduce such a heavyweight
dependency without doing our due diligence.

Instead, preceding commits have introduced a test balloon into our build
infrastructure that convert one tiny subsystem to use Rust. For now,
using Rust to build that subsystem is entirely optional -- if no Rust
support is available, we continue to use the C implementation. This test
balloon has the intention to give distributions time and let them ease
into our adoption of Rust.

Having multiple implementations of the same subsystem is not sustainable
though, and the plan is to eventually be able to use Rust freely all
across our codebase. As such, there is the intent to make Rust become a
mandatory part of our build process.

Add an announcement to our breaking changes that Rust will become
mandatory in Git 3.0. A (very careful and non-binding) estimate might be
that this major release might be released in the second half of next
year, which should give distributors enough time to prepare for the
change.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 weeks agovarint: reimplement as test balloon for Rust
Patrick Steinhardt [Thu, 2 Oct 2025 07:29:31 +0000 (09:29 +0200)] 
varint: reimplement as test balloon for Rust

Implement a trivial test balloon for our Rust build infrastructure by
reimplementing the "varint.c" subsystem in Rust. This subsystem is
chosen because it is trivial to convert and because it doesn't have any
dependencies to other components of Git.

If support for Rust is enabled, we stop compiling "varint.c" and instead
compile and use "src/varint.rs".

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 weeks agovarint: use explicit width for integers
Patrick Steinhardt [Thu, 2 Oct 2025 07:29:30 +0000 (09:29 +0200)] 
varint: use explicit width for integers

The varint subsystem currently uses implicit widths for integers. On the
one hand we use `uintmax_t` for the actual value. On the other hand, we
use `int` for the length of the encoded varint.

Both of these have known maximum values, as we only support at most 16
bytes when encoding varints. Thus, we know that we won't ever exceed
`uint64_t` for the actual value and `uint8_t` for the prefix length.

Refactor the code to use explicit widths. Besides making the logic
platform-independent, it also makes our life a bit easier in the next
commit, where we reimplement "varint.c" in Rust.

Suggested-by: Ezekiel Newren <ezekielnewren@gmail.com>
Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 weeks agohelp: report on whether or not Rust is enabled
Patrick Steinhardt [Thu, 2 Oct 2025 07:29:29 +0000 (09:29 +0200)] 
help: report on whether or not Rust is enabled

We're about to introduce support for Rust into the core of Git, where
some (trivial) subsystems are converted to Rust. These subsystems will
also retain a C implementation though as Rust is not yet mandatory.
Consequently, it now becomes possible for a Git version to have bugs
that are specific to whether or not it is built with Rust support
overall.

Expose information about whether or not Git was built with Rust via our
build info. This means that both `git version --build-options`, but also
`git bugreport` will now expose that bit of information. Hopefully, this
should make it easier for us to discover any Rust-specific issues.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 weeks agoMakefile: introduce infrastructure to build internal Rust library
Patrick Steinhardt [Thu, 2 Oct 2025 07:29:28 +0000 (09:29 +0200)] 
Makefile: introduce infrastructure to build internal Rust library

Introduce infrastructure to build the internal Rust library. This
mirrors the infrastructure we have added to Meson in the preceding
commit. Developers can enable the infrastructure by passing the new
`WITH_RUST` build toggle.

Inspired-by: Ezekiel Newren <ezekielnewren@gmail.com>
Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 weeks agoMakefile: reorder sources after includes
Patrick Steinhardt [Thu, 2 Oct 2025 07:29:27 +0000 (09:29 +0200)] 
Makefile: reorder sources after includes

In an upcoming change we'll make some of the sources compile
conditionally based on whether or not `WITH_RUST` is defined. To let
developers specify that flag in their "config.mak" we'll thus have to
reorder our sources so that they come after the include of that file.

Do so.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 weeks agomeson: add infrastructure to build internal Rust library
Patrick Steinhardt [Thu, 2 Oct 2025 07:29:26 +0000 (09:29 +0200)] 
meson: add infrastructure to build internal Rust library

Add the infrastructure into Meson to build an internal Rust library.
Building the Rust parts of Git are for now entirely optional, as they
are mostly intended as a test balloon for both Git developers, but also
for distributors of Git. So for now, they may contain:

  - New features that are not mission critical to Git and that users can
    easily live without.

  - Alternative implementations of small subsystems.

If these test balloons are successful, we will eventually make Rust a
mandatory dependency for our build process in Git 3.0.

The availability of a Rust toolchain will be auto-detected by Meson at
setup time. This behaviour can be tweaked via the `-Drust=` feature
toggle.

Next to the linkable Rust library, also wire up tests that can be
executed via `meson test`. This allows us to use the native unit testing
capabilities of Rust.

Note that the Rust edition is currently set to 2018. This edition is
supported by Rust 1.49, which is the target for the upcoming gcc-rs
backend. For now we don't use any features of Rust that would require a
newer version, so settling on this old version makes sense so that
gcc-rs may become an alternative backend for compiling Git. If we _do_
want to introduce features that were added in more recent editions of
Rust though we should reevaluate that choice.

Inspired-by: Ezekiel Newren <ezekielnewren@gmail.com>
Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 weeks agodocs/gitcredentials: describe URL prefix matching
M Hickford [Wed, 1 Oct 2025 20:56:49 +0000 (20:56 +0000)] 
docs/gitcredentials: describe URL prefix matching

Documentation was inaccurate since 9a121b0d226 (credential: handle
`credential.<partial-URL>.<key>` again, 2020-04-24)

Add tests for documented behaviour.

Signed-off-by: M Hickford <mirth.hickford@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 weeks agorefs/ref-cache: fix SEGFAULT when seeking in empty directories
Karthik Nayak [Wed, 1 Oct 2025 12:17:29 +0000 (14:17 +0200)] 
refs/ref-cache: fix SEGFAULT when seeking in empty directories

The 'cache_ref_iterator_seek()' function is used to seek the
`ref_iterator` to the desired reference in the ref-cache mechanism. We
use the seeking functionality to implement the '--start-after' flag in
'git-for-each-ref(1)'.

When using the files-backend with packed-refs, it is possible that some
of the refs directories are empty. For e.g. just after repacking, the
'refs/heads' directory would be empty. The ref-cache seek mechanism,
doesn't take this into consideration when descending into a
subdirectory, and makes an out of bounds access, causing SEGFAULT as we
try to access entries within the directory. Fix this by breaking out of
the loop when we enter an empty directory.

Since we start with the base directory of 'refs/' which is never empty,
it is okay to perform this check after the first iteration in the
`do..while` clause.

Add tests which simulate this behavior and also provide coverage over
using the feature over packed-refs.

Helped-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Karthik Nayak <karthik.188@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 weeks agogitk: add theme selection to color configuration page
Mark Levedahl [Mon, 22 Sep 2025 17:15:49 +0000 (13:15 -0400)] 
gitk: add theme selection to color configuration page

gitk allows configuring a particular theme in its configuration file
(default on linux: ~/.config/git/gitk), but offers no ability to modify
this from gitk's configuration editor. Let's add this to the color
configuration page.

Present the offered themes in a list, and allow choosing / modifying a
theme definition file ($themeloader). Update the list of themes if the
theme file is modified, and update the theme if specifically requested
(by default, just change the value for use after gitk is restarted).

Any theme definition file can change the global options database,
affecting potentially any theme. So, the ultimate configuration should
have either
- no theme definition file (themeloader = {}), and a native Tk, theme,
or
- themeloader naming a valid file, and $theme naming a theme defined by
  that file.

But, there is no trivial way to enforce the above. Shrug.

Helped-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Mark Levedahl <mlevedahl@gmail.com>
5 weeks agobuiltin/reflog: respect user config in "write" subcommand
Michael Lohmann [Tue, 30 Sep 2025 19:53:20 +0000 (21:53 +0200)] 
builtin/reflog: respect user config in "write" subcommand

The reflog write recognizes only GIT_COMMITTER_NAME and
GIT_COMMITTER_EMAIL environment variables, but forgot to honor the
user.name and user.email configuration variables, due to lack of
repo_config() call to grab these values from the configuration files.

The test suite sets these variables, so this behavior was unnoticed.

Ensure that the reflog write also uses the values of user.name and
user.email if set in the Git configuration.

Co-authored-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Michael Lohmann <git@lohmann.sh>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 weeks agogitk: add proc run_themeloader
Mark Levedahl [Mon, 29 Sep 2025 03:04:54 +0000 (23:04 -0400)] 
gitk: add proc run_themeloader

gitk currently accepts a single themeloader file via the config file,
and will source this with errors reported to the console. This is fine
for simple configuration, but will not support interactive theme
exploration from the gui. In particular, a themeloader file must be
sourced only once as the themes defined cannot be re-defined. Also,
errors must be handled rather than just aborting while printing to the
console.  So, add a proc to handle the above, supporting expansion of
the gui config pages.

Signed-off-by: Mark Levedahl <mlevedahl@gmail.com>
5 weeks agogitk: eliminate unused ui color variables
Mark Levedahl [Tue, 23 Sep 2025 11:55:21 +0000 (07:55 -0400)] 
gitk: eliminate unused ui color variables

gitk has a number of variables used in setting up colors for the classic
(non-themed) widget set. These variables are unused with ttk, so let's
eliminate them. But, leave the variables in the config file for now -
those can be eliminated after this change is merged.

Signed-off-by: Mark Levedahl <mlevedahl@gmail.com>
5 weeks agogitk: eliminate Interface color option from gui
Mark Levedahl [Tue, 23 Sep 2025 11:48:40 +0000 (07:48 -0400)] 
gitk: eliminate Interface color option from gui

gitk offers to change the ui color on the colors prefs page, but the
variable set has no effect because gitk is using themes. Let's eliminate
the "Interface" color selection option from that page.

Signed-off-by: Mark Levedahl <mlevedahl@gmail.com>
5 weeks agogitk: use text labels for next/prev search buttons
Mark Levedahl [Sun, 21 Sep 2025 19:17:07 +0000 (15:17 -0400)] 
gitk: use text labels for next/prev search buttons

gitk allows searching for commits with various criteria, and provides
up/down search buttons to facilitate this search. These buttons are
labelled with bitmaps, and those bitmaps are not always recolored
correctly for the ui scheme as the theme colors are not known. Let's
just use text labels on these, allowing the styles to handle any
coloring needed. Use utf codepoints for the arrows, presuming that these
code points are available in the selected font.

Signed-off-by: Mark Levedahl <mlevedahl@gmail.com>
5 weeks agogitk: use text labels for commit ID buttons
Mark Levedahl [Sun, 21 Sep 2025 19:13:54 +0000 (15:13 -0400)] 
gitk: use text labels for commit ID buttons

gitk maintains a stack of commit ids visited, and allows navigating
these using a pair of buttons shown with arrows using bitmaps. An attempt
is made to recolor these bitmaps to handle different color schemes, but
this is unreliable across multiple themes as the required colors are not
universally known. Let's just use text labels for these buttons,
allowing the themes to recolor the text along with everything else. Use
utf code points for the text, presuming that these arrow glyphs are
available in the selected font.

Signed-off-by: Mark Levedahl <mlevedahl@gmail.com>
5 weeks agogitk: do not invoke tk_setPalette
Mark Levedahl [Sat, 27 Sep 2025 12:19:08 +0000 (08:19 -0400)] 
gitk: do not invoke tk_setPalette

gitk uses themed widgets with a user selected theme, but also invokes
tk_setPalette to configure colors for the non-themed widgets including
the menubar. However, themes in general are expected to configure
those colors already. The builtin themes (default, alt, clam, classic on
unix/X11) all have compatible colors, and need no such reconfiguration,
and (most, if not all) available themes set the options database for this
purpose as well. Furthermore, gitk in the past avoided invoking
tk_setPalette on Windows to avoid some issues.

So, let's stop calling tk_setPalette everywhere, and just rely upon the
selected theme (possibly user installed) to have set all needed colors.

Note: if a user installs more than one theme using $themeloader, the last
one installed will have defined the colors to be used. Those colors will
probably be incorrect for any other set, including Tk's builtin set.

Signed-off-by: Mark Levedahl <mlevedahl@gmail.com>
5 weeks agogitk: use config variables to define and load a theme
Mark Levedahl [Mon, 22 Sep 2025 14:36:41 +0000 (10:36 -0400)] 
gitk: use config variables to define and load a theme

gitk uses themed tk, but has no capability to alter the theme defined
by Tk. While there are documented ways to install other themes, and
to make one the default, these methods are obscure at best. Instead,
let's offer two config variables:

- theme  this is the name of the theme to use, and must be available.
- themeloader - this is the full pathname of a tcl script that
  will load one or more themes into the Tk namespace.

By default, theme is set to the theme active when Tk is started, and
themeloader = {}.  These variables must be defined to something else to
have any user visible effect.

Signed-off-by: Mark Levedahl <mlevedahl@gmail.com>
5 weeks agoThe thirteenth batcn
Junio C Hamano [Mon, 29 Sep 2025 18:31:29 +0000 (11:31 -0700)] 
The thirteenth batcn

Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 weeks agoMerge branch 'tc/last-modified-recursive-fix'
Junio C Hamano [Mon, 29 Sep 2025 18:40:35 +0000 (11:40 -0700)] 
Merge branch 'tc/last-modified-recursive-fix'

"git last-modified" operating in non-recursive mode used to trigger
a BUG(), which has been corrected.

* tc/last-modified-recursive-fix:
  last-modified: fix bug when some paths remain unhandled

5 weeks agoMerge branch 'kn/refs-files-case-insensitive'
Junio C Hamano [Mon, 29 Sep 2025 18:40:35 +0000 (11:40 -0700)] 
Merge branch 'kn/refs-files-case-insensitive'

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

5 weeks agoMerge branch 'jk/color-variable-fixes'
Junio C Hamano [Mon, 29 Sep 2025 18:40:35 +0000 (11:40 -0700)] 
Merge branch 'jk/color-variable-fixes'

Some places in the code confused a variable that is *not* a boolean
to enable color but is an enum that records what the user requested
to do about color.  A couple of bugs of this sort have been fixed,
while the code has been cleaned up to prevent similar bugs in the
future.

* jk/color-variable-fixes:
  config: store want_color() result in a separate bool
  add-interactive: retain colorbool values longer
  color: return bool from want_color()
  color: use git_colorbool enum type to store colorbools
  pretty: use format_commit_context.auto_color as colorbool
  diff: stop passing ecbdata->use_color as boolean
  diff: pass o->use_color directly to fill_metainfo()
  diff: don't use diff_options.use_color as a strict bool
  diff: simplify color_moved check when flushing
  grep: don't treat grep_opt.color as a strict bool
  color: return enum from git_config_colorbool()
  color: use GIT_COLOR_* instead of numeric constants

5 weeks agoMerge branch 'dk/stash-apply-index'
Junio C Hamano [Mon, 29 Sep 2025 18:40:35 +0000 (11:40 -0700)] 
Merge branch 'dk/stash-apply-index'

The stash.index configuration variable can be set to make "git stash
pop/apply" pretend that it was invoked with "--index".

* dk/stash-apply-index:
  stash: honor stash.index in apply, pop modes
  stash: refactor private config globals
  t3905: remove unneeded blank line
  t3903: reduce dependencies on previous tests

5 weeks agoMerge branch 'je/doc-checkout'
Junio C Hamano [Mon, 29 Sep 2025 18:40:34 +0000 (11:40 -0700)] 
Merge branch 'je/doc-checkout'

Doc updates.

* je/doc-checkout:
  doc: git-checkout: clarify restoring files section
  doc: git-checkout: split up restoring files section
  doc: git-checkout: deduplicate --detach explanation
  doc: git-checkout: clarify `-b` and `-B`
  doc: git-checkout: clarify `git checkout <branch>`
  doc: git-checkout: clarify ARGUMENT DISAMBIGUATION
  doc: git-checkout: clarify intro sentence

5 weeks agoMerge branch 'jk/setup-revisions-freefix'
Junio C Hamano [Mon, 29 Sep 2025 18:40:34 +0000 (11:40 -0700)] 
Merge branch 'jk/setup-revisions-freefix'

There are double frees and leaks around setup_revisions() API used
in "git stash show", which has been fixed, and setup_revisions()
API gained a wrapper to make it more ergonomic when using it with
strvec-manged argc/argv pairs.

* jk/setup-revisions-freefix:
  revision: retain argv NULL invariant in setup_revisions()
  treewide: pass strvecs around for setup_revisions_from_strvec()
  treewide: use setup_revisions_from_strvec() when we have a strvec
  revision: add wrapper to setup_revisions() from a strvec
  revision: manage memory ownership of argv in setup_revisions()
  stash: tell setup_revisions() to free our allocated strings

5 weeks agoMerge branch 'pw/rebase-i-cleanup-fix'
Junio C Hamano [Mon, 29 Sep 2025 18:40:34 +0000 (11:40 -0700)] 
Merge branch 'pw/rebase-i-cleanup-fix'

"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

5 weeks agoMerge branch 'jc/3.0-default-initial-branch-to-main-addendum'
Junio C Hamano [Mon, 29 Sep 2025 18:40:34 +0000 (11:40 -0700)] 
Merge branch 'jc/3.0-default-initial-branch-to-main-addendum'

Keep giving hint about the default initial branch name for users
who may be surprised after Git 3.0 switch-over.

* jc/3.0-default-initial-branch-to-main-addendum:
  initial branch: give hints after switching the default name

5 weeks agoMerge branch 'pw/3.0-default-initial-branch-to-main'
Junio C Hamano [Mon, 29 Sep 2025 18:40:33 +0000 (11:40 -0700)] 
Merge branch 'pw/3.0-default-initial-branch-to-main'

Declare that "git init" that is not otherwise configured uses
'main' as the initial branch, not 'master', starting Git 3.0.

* pw/3.0-default-initial-branch-to-main:
  t0613: stop setting default initial branch
  t9902: switch default branch name to main
  t4013: switch default branch name to main
  breaking-changes: switch default branch to main

5 weeks agoMerge branch 'nb/send-email-no-dup-reply-to'
Junio C Hamano [Mon, 29 Sep 2025 18:40:33 +0000 (11:40 -0700)] 
Merge branch 'nb/send-email-no-dup-reply-to'

"git send-email --compose --reply-to=<address>" used to add
duplicated Reply-To: header, which made mailservers unhappy.  This
has been corrected.

* nb/send-email-no-dup-reply-to:
  send-email: don't duplicate Reply-to: in intro message

5 weeks agoMerge branch 'ps/clar-updates'
Junio C Hamano [Mon, 29 Sep 2025 18:40:33 +0000 (11:40 -0700)] 
Merge branch 'ps/clar-updates'

Import a newer version of the clar unit testing framework.

* ps/clar-updates:
  t/unit-tests: update to 10e96bc
  t/unit-tests: update clar to fcbed04

5 weeks agoclang-format: exclude control macros from SpaceBeforeParens
Justin Tobler [Sat, 27 Sep 2025 14:50:45 +0000 (09:50 -0500)] 
clang-format: exclude control macros from SpaceBeforeParens

The formatter currently suggests adding a space between a control macro
and parentheses. In the Git project, this is not typically expected. Set
`SpaceBeforeParens` to `ControlStatementsExceptControlMacros`
accordingly.

Helped-by: Karthik Nayak <karthik.188@gmail.com>
Signed-off-by: Justin Tobler <jltobler@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 weeks agodoc: change the markup of paragraphs following a nested list item
Jean-Noël Avila [Sat, 27 Sep 2025 19:39:45 +0000 (21:39 +0200)] 
doc: change the markup of paragraphs following a nested list item

Asciidoctor and asciidoc.py have different behaviors when a paragraph
follows a nested list item. Asciidoctor has a bug[1] that makes it keep a
plus sign (+) used to attached paragraphs at the beginning of the paragraph.

This commit uses workarounds to avoid this problem by using second level
definition lists and open blocks.

[1]:https://github.com/asciidoctor/asciidoctor/issues/4704

Signed-off-by: Jean-Noël Avila <jn.avila@free.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 weeks agohttp-push: avoid new compile error
Johannes Schindelin [Fri, 26 Sep 2025 10:32:52 +0000 (10:32 +0000)] 
http-push: avoid new compile error

With the recent update in Git for Windows/ARM64 as of
https://github.com/git-for-windows/git-sdk-arm64/commit/21b288e16358
cURL was updated from v8.15.0 to v8.16.0, and the LLVM-based builds (but
strangely not the GCC-based builds) continuously greet me thusly:

  http-push.c:211:2: error: call to '_curl_easy_setopt_err_long' declared
  with 'warning' attribute: curl_easy_setopt expects a long argument
  [-Werror,-Wattribute-warning]
      CC builtin/apply.o
    211 |         curl_easy_setopt(curl, CURLOPT_INFILESIZE, buffer->buf.len);
        |         ^
  C:/a/git-sdk-arm64/git-sdk-arm64/minimal-sdk/clangarm64/include/curl/typecheck-gcc.h:50:15:
  note: expanded from macro 'curl_easy_setopt'
     50 |               _curl_easy_setopt_err_long();                             \
        |               ^
  1 error generated.
  make: *** [Makefile:2877: http-push.o] Error 1

The easiest way to shut up that compile error (which is legitimate,
seeing as the `CURLOPT_INFILESIZE` options expects a `long` parameter,
but `buffer->buf.len` refers to the `size_t` attribute of a `strbuf`)
would be to simply cast the parameter to a `long`.

However, there is a much better solution: To use the
`CURLOPT_INFILESIZE_LARGE` option instead, which was added in cURL
v7.11.0 (see https://curl.se/ch/7.11.0.html) and which Git _already_
uses in `curl_append_msgs_to_imap()`.

This fix was the motivation for renaming `xcurl_off_t()` to
`cast_size_t_to_curl_off_t()` and making it available more broadly,
which is the reason why it is used here, too.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 weeks agoimap-send: be more careful when casting to `curl_off_t`
Johannes Schindelin [Fri, 26 Sep 2025 10:32:51 +0000 (10:32 +0000)] 
imap-send: be more careful when casting to `curl_off_t`

When casting a `size_t` to `curl_off_t`, there is a currently uncommon
chance that the value can be cut off (`curl_off_t` is expected to be a
signed 64-bit data type).

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 weeks agohttp: offer to cast `size_t` to `curl_off_t` safely
Johannes Schindelin [Fri, 26 Sep 2025 10:32:50 +0000 (10:32 +0000)] 
http: offer to cast `size_t` to `curl_off_t` safely

This commit moves the `xcurl_off_t()` function, which validates that a
given value fits within the `curl_off_t` data type and then casts it, to
a more central place so that it can be used outside of `remote-curl.c`,
too.

At the same time, this function is renamed to conform better with the
naming convention of the helper functions that safely cast from one data
type to another which has been well established in `git-compat-util.h`.

With this move, `gettext.h` must be `#include`d in `http.h` to allow the
error message to remain translatable.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
6 weeks agogitk: make sha1but a ttk::button
Mark Levedahl [Sun, 21 Sep 2025 13:48:34 +0000 (09:48 -0400)] 
gitk: make sha1but a ttk::button

gitk's 'Commit ID' button uses a classic widget, not a themed one,
leading to inconsistent style. Commit 51a7e8b654 (d93f1713b0 ("gitk: Use
themed tk widgets", 2009-04-17) that added themed widgets did not touch
this particular widget, but does not say why. Regardless, let's use a
themed button to be consistent with the rest of the interface.

Signed-off-by: Mark Levedahl <mlevedahl@gmail.com>
6 weeks agogitk: use themed spinboxes
Mark Levedahl [Sun, 21 Sep 2025 13:46:58 +0000 (09:46 -0400)] 
gitk: use themed spinboxes

gitk uses classic (non-themed) spinboxes rather than the ttk variants.
Commit d93f1713b0 ("gitk: Use themed tk widgets", 2009-04-17) that added
ttk makes no mention of why ttk:spinboxes were omitted, but this leads
to an inconsistent interface. Let's use the ttk version.

Signed-off-by: Mark Levedahl <mlevedahl@gmail.com>
6 weeks agodoc: git-push: rewrite refspec specification
Julia Evans [Tue, 23 Sep 2025 18:10:49 +0000 (18:10 +0000)] 
doc: git-push: rewrite refspec specification

From user feedback, there was a request for examples, as well as a
comment that one person found "If git push [<repository>] without
any <refspec> argument is set to update some ref at the destination
with <src> with remote.<repository>.push configuration variable..."
impossible to understand.

To make the section easier to navigate, create a list of every possible
refspec form, with examples for each form as well as 2 forms which were
previously missing (patterns and negative refspecs).

Made a few changes to use more familiar language, but ultimately
refspecs are a pretty advanced feature so I've mostly left the
terminology alone.

Signed-off-by: Julia Evans <julia@jvns.ca>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
6 weeks agodoc: git-push: create PUSH RULES section
Julia Evans [Tue, 23 Sep 2025 18:10:48 +0000 (18:10 +0000)] 
doc: git-push: create PUSH RULES section

Right now the rules for when a `git push` is allowed are buried at the
bottom of the description of `<refspec>`. Put them in their own section
so that we can reference them from `--force` and give some context for
why they exist.

Having the "PUSH RULES" section also lets us be a little bit more
specific with the rule in `--force`: we can just focus on the rule
for pushing for a branch (which is likely the one that's most relevant)
and leave the details about what happens when you push to a tag or a ref
that isn't a branch to the later section.

Signed-off-by: Julia Evans <julia@jvns.ca>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
6 weeks agopackfile: refactor `get_packed_git_mru()` to work on packfile store
Patrick Steinhardt [Tue, 23 Sep 2025 10:17:14 +0000 (12:17 +0200)] 
packfile: refactor `get_packed_git_mru()` to work on packfile store

The `get_packed_git_mru()` function prepares the packfile store and then
returns its packfiles in most-recently-used order. Refactor it to accept
a packfile store instead of a repository to clarify its scope.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
6 weeks agopackfile: refactor `get_all_packs()` to work on packfile store
Patrick Steinhardt [Tue, 23 Sep 2025 10:17:13 +0000 (12:17 +0200)] 
packfile: refactor `get_all_packs()` to work on packfile store

The `get_all_packs()` function prepares the packfile store and then
returns its packfiles. Refactor it to accept a packfile store instead of
a repository to clarify its scope.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
6 weeks agopackfile: refactor `get_packed_git()` to work on packfile store
Patrick Steinhardt [Tue, 23 Sep 2025 10:17:12 +0000 (12:17 +0200)] 
packfile: refactor `get_packed_git()` to work on packfile store

The `get_packed_git()` function prepares the packfile store and then
returns its packfiles. Refactor it to accept a packfile store instead of
a repository to clarify its scope.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
6 weeks agopackfile: move `get_multi_pack_index()` into "midx.c"
Patrick Steinhardt [Tue, 23 Sep 2025 10:17:11 +0000 (12:17 +0200)] 
packfile: move `get_multi_pack_index()` into "midx.c"

The `get_multi_pack_index()` function is declared and implemented in the
packfile subsystem, even though it really belongs into the multi-pack
index subsystem. The reason for this is likely that it needs to call
`packfile_store_prepare()`, which is not exposed by the packfile system.
In a subsequent commit we're about to add another caller outside of the
packfile system though, so we'll have to expose the function anyway.

Do so now already and move `get_multi_pack_index()` into the MIDX
subsystem.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
6 weeks agopackfile: introduce function to load and add packfiles
Patrick Steinhardt [Tue, 23 Sep 2025 10:17:10 +0000 (12:17 +0200)] 
packfile: introduce function to load and add packfiles

We have a recurring pattern where we essentially perform an upsert of a
packfile in case it isn't yet known by the packfile store. The logic to
do so is non-trivial as we have to reconstruct the packfile's key, check
the map of packfiles, then create the new packfile and finally add it to
the store.

Introduce a new function that does this dance for us. Refactor callsites
to use it.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
6 weeks agopackfile: refactor `install_packed_git()` to work on packfile store
Patrick Steinhardt [Tue, 23 Sep 2025 10:17:09 +0000 (12:17 +0200)] 
packfile: refactor `install_packed_git()` to work on packfile store

The `install_packed_git()` functions adds a packfile to a specific
object store. Refactor it to accept a packfile store instead of a
repository to clarify its scope.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
6 weeks agopackfile: split up responsibilities of `reprepare_packed_git()`
Patrick Steinhardt [Tue, 23 Sep 2025 10:17:08 +0000 (12:17 +0200)] 
packfile: split up responsibilities of `reprepare_packed_git()`

In `reprepare_packed_git()` we perform a couple of operations:

  - We reload alternate object directories.

  - We clear the loose object cache.

  - We reprepare packfiles.

While the logic is hosted in "packfile.c", it clearly reaches into other
subsystems that aren't related to packfiles.

Split up the responsibility and introduce `odb_reprepare()` which now
becomes responsible for repreparing the whole object database. The
existing `reprepare_packed_git()` function is refactored accordingly and
only cares about reloading the packfile store now.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
6 weeks agopackfile: refactor `prepare_packed_git()` to work on packfile store
Patrick Steinhardt [Tue, 23 Sep 2025 10:17:07 +0000 (12:17 +0200)] 
packfile: refactor `prepare_packed_git()` to work on packfile store

The `prepare_packed_git()` function and its friends are responsible for
loading packfiles as well as the multi-pack index for a given object
database. Refactor these functions to accept a packfile store instead of
a repository to clarify their scope.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
6 weeks agopackfile: reorder functions to avoid function declaration
Patrick Steinhardt [Tue, 23 Sep 2025 10:17:06 +0000 (12:17 +0200)] 
packfile: reorder functions to avoid function declaration

Reorder functions so that we can avoid a forward declaration of
`prepare_packed_git()`.

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