]> git.ipfire.org Git - thirdparty/git.git/log
thirdparty/git.git
10 hours agoThe third batch main master
Junio C Hamano [Tue, 24 Jun 2025 16:47:25 +0000 (09:47 -0700)] 
The third batch

Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 hours agoMerge branch 'ly/run-builtin-use-passed-in-repo'
Junio C Hamano [Tue, 24 Jun 2025 16:48:52 +0000 (09:48 -0700)] 
Merge branch 'ly/run-builtin-use-passed-in-repo'

Code clean-up.

* ly/run-builtin-use-passed-in-repo:
  git.c: remove the_repository dependence in run_builtin()

10 hours agoMerge branch 'rm/t2400-modernize'
Junio C Hamano [Tue, 24 Jun 2025 16:48:52 +0000 (09:48 -0700)] 
Merge branch 'rm/t2400-modernize'

Test clean-up.

* rm/t2400-modernize:
  t2400: replace 'test -[efd]' with 'test_path_is_*'

10 hours agoMerge branch 'sa/multi-mailmap-fix'
Junio C Hamano [Tue, 24 Jun 2025 16:48:51 +0000 (09:48 -0700)] 
Merge branch 'sa/multi-mailmap-fix'

When asking to apply mailmap to both author and committer field
while showing a commit object, the field that appears later was not
correctly parsed and replaced, which has been corrected.

* sa/multi-mailmap-fix:
  cat-file: fix mailmap application for different author and committer

10 hours agoMerge branch 'jc/cg-let-bss-do-its-job'
Junio C Hamano [Tue, 24 Jun 2025 16:48:50 +0000 (09:48 -0700)] 
Merge branch 'jc/cg-let-bss-do-its-job'

Clarify "do not explicitly initialize to zero" rule in the
CodingGuidelines document.

* jc/cg-let-bss-do-its-job:
  CodingGuidelines: let BSS do its job

10 hours agoMerge branch 'ac/preload-index-wo-the-repository'
Junio C Hamano [Tue, 24 Jun 2025 16:48:49 +0000 (09:48 -0700)] 
Merge branch 'ac/preload-index-wo-the-repository'

Code clean-up.

* ac/preload-index-wo-the-repository:
  preload-index: stop depending on 'the_repository'
  environment: remove the global variable 'core_preload_index'

10 hours agoMerge branch 'ly/prepare-show-merge-leakfix'
Junio C Hamano [Tue, 24 Jun 2025 16:48:49 +0000 (09:48 -0700)] 
Merge branch 'ly/prepare-show-merge-leakfix'

Leakfix.

* ly/prepare-show-merge-leakfix:
  revision: fix memory leak in prepare_show_merge()

10 hours agoMerge branch 'kj/stash-onbranch-submodule-fix'
Junio C Hamano [Tue, 24 Jun 2025 16:48:48 +0000 (09:48 -0700)] 
Merge branch 'kj/stash-onbranch-submodule-fix'

"git stash" recorded a wrong branch name when submodules are
present in the current checkout, which has been corrected.

* kj/stash-onbranch-submodule-fix:
  stash: fix incorrect branch name in stash message

10 hours agoMerge branch 'ag/send-email-edit-threading-fix'
Junio C Hamano [Tue, 24 Jun 2025 16:48:47 +0000 (09:48 -0700)] 
Merge branch 'ag/send-email-edit-threading-fix'

"git send-email" incremented its internal message counter when a
message was edited, which made logic that treats the first message
specially misbehave, which has been corrected.

* ag/send-email-edit-threading-fix:
  send-email: show the new message id assigned by outlook in the logs
  send-email: fix bug resulting in broken threads if a message is edited

10 hours agoMerge branch 'pw/stash-p-pathspec-fixes'
Junio C Hamano [Tue, 24 Jun 2025 16:48:47 +0000 (09:48 -0700)] 
Merge branch 'pw/stash-p-pathspec-fixes'

"git stash -p <pathspec>" improvements.

* pw/stash-p-pathspec-fixes:
  stash: allow "git stash [<options>] --patch <pathspec>" to assume push
  stash: allow "git stash -p <pathspec>" to assume push again

10 hours agoMerge branch 'pw/subtree-gpg-sign'
Junio C Hamano [Tue, 24 Jun 2025 16:48:46 +0000 (09:48 -0700)] 
Merge branch 'pw/subtree-gpg-sign'

"git subtree" (in contrib/) learns to grok GPG signing its commits.

* pw/subtree-gpg-sign:
  contrib/subtree: add -S/--gpg-sign
  contrib/subtree: parse using --stuck-long

6 days agoThe second batch
Junio C Hamano [Wed, 18 Jun 2025 20:53:08 +0000 (13:53 -0700)] 
The second batch

Signed-off-by: Junio C Hamano <gitster@pobox.com>
6 days agoMerge branch 'rj/meson-tap-parse-fixup'
Junio C Hamano [Wed, 18 Jun 2025 20:53:36 +0000 (13:53 -0700)] 
Merge branch 'rj/meson-tap-parse-fixup'

An earlier test update incorrectly lost three prerequisites on
macOS, which has been corrected.

* rj/meson-tap-parse-fixup:
  test-lib: add missing prerequisites for Darwin

6 days agoMerge branch 'ly/submodule-update-failure-leakfix'
Junio C Hamano [Wed, 18 Jun 2025 20:53:36 +0000 (13:53 -0700)] 
Merge branch 'ly/submodule-update-failure-leakfix'

A memory leak on an error code path has been plugged.

* ly/submodule-update-failure-leakfix:
  builtin/submodule--helper: fix leak when remote_submodule_branch() failed

6 days agoMerge branch 'jm/bundle-uri-debug-output-to-fp'
Junio C Hamano [Wed, 18 Jun 2025 20:53:35 +0000 (13:53 -0700)] 
Merge branch 'jm/bundle-uri-debug-output-to-fp'

Code clean-up.

* jm/bundle-uri-debug-output-to-fp:
  bundle-uri: send debug output to given FILE * stream

6 days agoMerge branch 'bs/solaris-10-and-11'
Junio C Hamano [Wed, 18 Jun 2025 20:53:35 +0000 (13:53 -0700)] 
Merge branch 'bs/solaris-10-and-11'

Add settings for Solaris 10 & 11.

* bs/solaris-10-and-11:
  config.mak.uname: update settings for Solaris 10 and 11

6 days agoMerge branch 'jw/doc-txt-to-adoc-refs'
Junio C Hamano [Wed, 18 Jun 2025 20:53:34 +0000 (13:53 -0700)] 
Merge branch 'jw/doc-txt-to-adoc-refs'

Some leftover references to documentation source files that no
longer exist, due to recent ".txt" -> ".adoc" renaming, have been
corrected.

* jw/doc-txt-to-adoc-refs:
  doc: update references to renamed AsciiDoc files

6 days agoMerge branch 'ma/doc-diff-cc-headers'
Junio C Hamano [Wed, 18 Jun 2025 20:53:34 +0000 (13:53 -0700)] 
Merge branch 'ma/doc-diff-cc-headers'

Doc mark-up update.

* ma/doc-diff-cc-headers:
  diff-generate-patch.adoc: drop spurious backticks

6 days agoMerge branch 'ly/pack-bitmap-root-leakfix'
Junio C Hamano [Wed, 18 Jun 2025 20:53:34 +0000 (13:53 -0700)] 
Merge branch 'ly/pack-bitmap-root-leakfix'

Memleak fix on an error code path.

* ly/pack-bitmap-root-leakfix:
  pack-bitmap: remove checks before bitmap_free

6 days agoMerge branch 'ly/commit-buffer-reencode-leakfix'
Junio C Hamano [Wed, 18 Jun 2025 20:53:33 +0000 (13:53 -0700)] 
Merge branch 'ly/commit-buffer-reencode-leakfix'

Leakfix.

* ly/commit-buffer-reencode-leakfix:
  repo_logmsg_reencode: fix memory leak when use repo_logmsg_reencode ()

6 days agoMerge branch 'cf/guideline-documenting-config-vars'
Junio C Hamano [Wed, 18 Jun 2025 20:53:33 +0000 (13:53 -0700)] 
Merge branch 'cf/guideline-documenting-config-vars'

CodingGuidelines update.

* cf/guideline-documenting-config-vars:
  CodingGuidelines: document formatting of similar config variables.

6 days agoCodingGuidelines: document formatting of similar config variables.
Collin Funk [Tue, 3 Jun 2025 22:45:39 +0000 (15:45 -0700)] 
CodingGuidelines: document formatting of similar config variables.

Document that related `git config` variables should be placed
one-per-line instead of separated by commas.

Suggested-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Collin Funk <collin.funk1@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 days agoStart 2.51 cycle, the first batch
Junio C Hamano [Tue, 17 Jun 2025 17:34:53 +0000 (10:34 -0700)] 
Start 2.51 cycle, the first batch

Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 days agoMerge branch 'ps/meson-tap-parse'
Junio C Hamano [Tue, 17 Jun 2025 17:44:42 +0000 (10:44 -0700)] 
Merge branch 'ps/meson-tap-parse'

Meson-based build/test framework now understands TAP output
generated by our tests.

* ps/meson-tap-parse:
  meson: parse TAP output generated by our tests
  meson: introduce kwargs variable for tests
  test-lib: fail on unexpectedly passing tests
  t7815: fix unexpectedly passing test on macOS
  t/test-lib: fix TAP format for BASH_XTRACEFD warning
  t/test-lib: don't print shell traces to stdout
  t983*: use prereq to check for Python-specific git-p4(1) support
  t9822: use prereq to check for ISO-8859-1 support
  t: silence output from `test_create_repo()`
  t: stop announcing prereqs

7 days agoMerge branch 'jk/diff-no-index-with-pathspec'
Junio C Hamano [Tue, 17 Jun 2025 17:44:41 +0000 (10:44 -0700)] 
Merge branch 'jk/diff-no-index-with-pathspec'

"git diff --no-index dirA dirB" can limit the comparison with
pathspec at the end of the command line, just like normal "git
diff".

* jk/diff-no-index-with-pathspec:
  diff --no-index: support limiting by pathspec
  pathspec: add flag to indicate operation without repository
  pathspec: add match_leading_pathspec variant

7 days agoMerge branch 'ly/fetch-pack-leakfix'
Junio C Hamano [Tue, 17 Jun 2025 17:44:41 +0000 (10:44 -0700)] 
Merge branch 'ly/fetch-pack-leakfix'

A memory-leak in an error code path has been plugged.

* ly/fetch-pack-leakfix:
  builtin/fetch-pack: cleanup before return error

7 days agoMerge branch 'ly/commit-graph-graph-write-leakfix'
Junio C Hamano [Tue, 17 Jun 2025 17:44:41 +0000 (10:44 -0700)] 
Merge branch 'ly/commit-graph-graph-write-leakfix'

A memory-leak in an error code path has been plugged.

* ly/commit-graph-graph-write-leakfix:
  commit-graph: fix start_delayed_progress() leak

7 days agoMerge branch 'ly/do-not-localize-bug-messages'
Junio C Hamano [Tue, 17 Jun 2025 17:44:40 +0000 (10:44 -0700)] 
Merge branch 'ly/do-not-localize-bug-messages'

Code clean-up.

* ly/do-not-localize-bug-messages:
  BUG(): remove leading underscore of the format string

7 days agoMerge branch 'ly/sequencer-update-squash-is-fixup-only'
Junio C Hamano [Tue, 17 Jun 2025 17:44:40 +0000 (10:44 -0700)] 
Merge branch 'ly/sequencer-update-squash-is-fixup-only'

Code clean-up.

* ly/sequencer-update-squash-is-fixup-only:
  sequencer: replace error() with BUG() in update_squash_messages ()

7 days agoMerge branch 'vd/cat-file-objectmode-update'
Junio C Hamano [Tue, 17 Jun 2025 17:44:39 +0000 (10:44 -0700)] 
Merge branch 'vd/cat-file-objectmode-update'

"git cat-file --batch" learns to understand %(objectmode) atom to
allow the caller to tell missing objects (due to repository
corruption) and submodules (whose commit objects are OK to be
missing) apart.

* vd/cat-file-objectmode-update:
  cat-file.c: add batch handling for submodules
  cat-file: add %(objectmode) atom
  t1006: update 'run_tests' to test generic object specifiers

7 days agoMerge branch 'ag/send-email-docs'
Junio C Hamano [Tue, 17 Jun 2025 17:44:39 +0000 (10:44 -0700)] 
Merge branch 'ag/send-email-docs'

Documentation for "git send-email" has been updated with a bit more
credential helper and OAuth information.

* ag/send-email-docs:
  docs: make the purpose of using app password for Gmail more clear in send-email
  docs: remove credential helper links for emails from gitcredentials
  docs: improve formatting in git-send-email documentation
  docs: add credential helper for yahoo and link Google's sendgmail tool

7 days agoMerge branch 'rc/userdiff-r'
Junio C Hamano [Tue, 17 Jun 2025 17:44:38 +0000 (10:44 -0700)] 
Merge branch 'rc/userdiff-r'

Userdiff patterns for the R language.

* rc/userdiff-r:
  userdiff: add support for R programming language

7 days agoMerge branch 'ds/path-walk-2'
Junio C Hamano [Tue, 17 Jun 2025 17:44:38 +0000 (10:44 -0700)] 
Merge branch 'ds/path-walk-2'

"git pack-objects" learns to find delta bases from blobs at the
same path, using the --path-walk API.

* ds/path-walk-2:
  pack-objects: allow --shallow and --path-walk
  path-walk: add new 'edge_aggressive' option
  pack-objects: thread the path-based compression
  pack-objects: refactor path-walk delta phase
  scalar: enable path-walk during push via config
  pack-objects: enable --path-walk via config
  repack: add --path-walk option
  t5538: add tests to confirm deltas in shallow pushes
  pack-objects: introduce GIT_TEST_PACK_PATH_WALK
  p5313: add performance tests for --path-walk
  pack-objects: update usage to match docs
  pack-objects: add --path-walk option
  pack-objects: extract should_attempt_deltas()

7 days agoMerge branch 'lo/my-first-ow-doc-update'
Junio C Hamano [Tue, 17 Jun 2025 17:44:37 +0000 (10:44 -0700)] 
Merge branch 'lo/my-first-ow-doc-update'

Doc update to the more recent world order.

* lo/my-first-ow-doc-update:
  MyFirstContribution: add walken.c to meson.build
  MyFirstContribution: use struct repository in examples

7 days agot2400: replace 'test -[efd]' with 'test_path_is_*'
Rodrigo Michelassi [Tue, 17 Jun 2025 00:29:39 +0000 (21:29 -0300)] 
t2400: replace 'test -[efd]' with 'test_path_is_*'

'test_path_is_file', 'test_path_is_dir' and 'test_file_is_missing'
are test helpers used in Git's development, that emit useful
diagnostic information when they detect a failing condition, while
test -[efd] does not.

Replace the basic shell commands 'test -f', 'test -d' and 'test -e',
with these test helpers.

Co-authored-by: Isabella Caselli <icaselli@usp.br>
Signed-off-by: Isabella Caselli <icaselli@usp.br>
Signed-off-by: Rodrigo Michelassi <rodmichelassi@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
8 days agogit.c: remove the_repository dependence in run_builtin()
Lidong Yan [Mon, 16 Jun 2025 06:22:33 +0000 (14:22 +0800)] 
git.c: remove the_repository dependence in run_builtin()

run_builtin() takes a repo parameter, so the use of the_repository
is no longer necessary. Removed the usage of the_repository.

Signed-off-by: Lidong Yan <502024330056@smail.nju.edu.cn>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
8 days agoGit 2.50 maint v2.50.0
Junio C Hamano [Mon, 16 Jun 2025 04:17:21 +0000 (21:17 -0700)] 
Git 2.50

Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 days agoHopefully final bits before 2.50
Junio C Hamano [Fri, 13 Jun 2025 20:28:57 +0000 (13:28 -0700)] 
Hopefully final bits before 2.50

Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 days agoMerge branch 'js/github-ci-win-coverity-fix'
Junio C Hamano [Fri, 13 Jun 2025 20:29:14 +0000 (13:29 -0700)] 
Merge branch 'js/github-ci-win-coverity-fix'

Fixes for GitHub Actions Coverity job.

* js/github-ci-win-coverity-fix:
  ci(coverity): output the build log upon error
  ci(coverity): fix building on Windows

11 days agoMerge branch 'ss/revert-builtin-bswap-stuff'
Junio C Hamano [Fri, 13 Jun 2025 20:29:14 +0000 (13:29 -0700)] 
Merge branch 'ss/revert-builtin-bswap-stuff'

Revert a botched bswap.h change that broke ntohll() functions on
big-endian systems with __builtin_bswap32/64().

* ss/revert-builtin-bswap-stuff:
  Revert "bswap.h: add support for built-in bswap functions"

11 days agoMerge branch 'jc/sed-build-fixes'
Junio C Hamano [Fri, 13 Jun 2025 20:29:14 +0000 (13:29 -0700)] 
Merge branch 'jc/sed-build-fixes'

Build fix.

* jc/sed-build-fixes:
  build: sed portability fixes

11 days agocat-file: fix mailmap application for different author and committer
Siddharth Asthana [Fri, 13 Jun 2025 11:57:17 +0000 (17:27 +0530)] 
cat-file: fix mailmap application for different author and committer

The git cat-file command with --mailmap option fails to apply mailmap
transformations to the committer field when the author and committer
identities are different. This occurs due to a missing newline handling
in apply_mailmap_to_header() after processing each identity line.

When rewrite_ident_line() processes an identity, it stops at the end
of the identity data (e.g., "Author Name <email> timestamp"), but
doesn't account for the trailing newline. The current code adds the
identity length to buf_offset but fails to advance past the newline
character. This causes the next iteration to start parsing from the
newline instead of the beginning of the next header line, making it
impossible to match subsequent headers like "committer".

Additionally, rewrite_ident_line() may reallocate the buffer during
its operation. Any code using pointers into the old buffer would be
using invalid memory after such a reallocation.

This bug was introduced in e9c1b0e3 (revision: improve
commit_rewrite_person(), 2022-07-19) when the much simpler version of
commit_rewrite_person() that worked on one "person header" at a time
was rewritten to use the current apply_mailmap_to_header() function.
The original implementation processed author and committer separately,
but the rewrite introduced this loop-based approach that failed to
properly handle the transition between identity lines.

Let's fix this by addressing both issues:
1. After processing an identity line, we now check if we're at a
   newline and advance past it, ensuring the next header line is
   parsed correctly.
2. We recompute the buffer position after rewrite_ident_line() to
   handle potential buffer reallocation.

This ensures that all identity headers in commit and tag objects are
consistently processed regardless of whether the author and committer
are the same person.

Reported-by: Vasilii Iakliushin <viakliushin@gitlab.com>
Reviewed-by: Christian Couder <christian.couder@gmail.com>
Signed-off-by: Siddharth Asthana <siddharthasthana31@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 days agoMerge tag 'l10n-2.50.0-v2' of https://github.com/git-l10n/git-po
Junio C Hamano [Fri, 13 Jun 2025 00:31:42 +0000 (17:31 -0700)] 
Merge tag 'l10n-2.50.0-v2' of https://github.com/git-l10n/git-po

l10n-2.50.0-v2

* tag 'l10n-2.50.0-v2' of https://github.com/git-l10n/git-po:
  l10n: zh_TW: update translation for Git 2.50

12 days agoMerge branch 'kh/maintenance-missing-tasks-docfix'
Junio C Hamano [Thu, 12 Jun 2025 21:19:10 +0000 (14:19 -0700)] 
Merge branch 'kh/maintenance-missing-tasks-docfix'

Doc mark-up fix for a topic that has graduated to 'master'.

* kh/maintenance-missing-tasks-docfix:
  doc: maintenance: fix linkgit syntax

12 days agobuild: sed portability fixes
Junio C Hamano [Thu, 12 Jun 2025 17:04:58 +0000 (10:04 -0700)] 
build: sed portability fixes

Recently generating the version-def.h file and the config-list.h
file have been updated, which broke versions of "sed" that do not
want to be fed a file that ends with an incomplete line, and/or that
do not understand the more recent "-E" option to use extended
regular expression.

Fix them in response to a build-failure reported on Solaris boxes.

cf. https://lore.kernel.org/git/09f954b8-d9c3-418f-ad4b-9cb9b063f4ae@comstyle.com/

Reported-by: Brad Smith <brad@comstyle.com>
Reviewed-by: Collin Funk <collin.funk1@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 days agoMerge tag 'l10n-2.50.0-rnd1' of https://github.com/git-l10n/git-po
Junio C Hamano [Thu, 12 Jun 2025 20:35:08 +0000 (13:35 -0700)] 
Merge tag 'l10n-2.50.0-rnd1' of https://github.com/git-l10n/git-po

l10n-2.50.0-rnd1

* tag 'l10n-2.50.0-rnd1' of https://github.com/git-l10n/git-po:
  l10n: zh_CN: updated translation for 2.50
  l10n: Update German translation
  l10n: uk: add 2.50 translation
  l10n: po-id for 2.50
  l10n: bg.po: Updated Bulgarian translation (5819t)
  l10n: tr: Update Turkish translations for 2.50
  l10n: fr: v2.50 round 1
  l10n: Add full Irish translation (ga.po)

12 days agoRevert "bswap.h: add support for built-in bswap functions"
Sebastian Andrzej Siewior [Wed, 11 Jun 2025 22:14:37 +0000 (00:14 +0200)] 
Revert "bswap.h: add support for built-in bswap functions"

Since 6547d1c9 (bswap.h: add support for built-in bswap
functions, 2025-04-23) tweaked the way the bswap32/64 macros are
defined, on platforms with __builtin_bswap32/64 supported, the
bswap32/64 macros are defined even on big endian platforms.

However the rest of this file assumes that bswap32/64() are defined
ONLY on little endian machines and uses that assumption to redefine
ntohl/ntohll macros. The said commit broke t4014-format-patch.sh test,
among many others on s390x.

Revert the commit.

Signed-off-by: Sebastian Andrzej Siewior <sebastian@breakpoint.cc>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 days agol10n: zh_TW: update translation for Git 2.50
Yi-Jyun Pan [Thu, 12 Jun 2025 14:25:39 +0000 (22:25 +0800)] 
l10n: zh_TW: update translation for Git 2.50

Signed-off-by: Yi-Jyun Pan <pan93412@gmail.com>
12 days agol10n: zh_CN: updated translation for 2.50
Teng Long [Wed, 11 Jun 2025 14:04:19 +0000 (22:04 +0800)] 
l10n: zh_CN: updated translation for 2.50

Helped-by: 依云 <lilydjwg@gmail.com>
Helped-by: Jiang Xin <zhiyou.jx@alibaba-inc.com>
Signed-off-by: Teng Long <dyroneteng@gmail.com>
13 days agoMerge branch '2.50-uk-update' of https://github.com/arkid15r/git-ukrainian-l10n
Jiang Xin [Thu, 12 Jun 2025 01:53:04 +0000 (09:53 +0800)] 
Merge branch '2.50-uk-update' of https://github.com/arkid15r/git-ukrainian-l10n

* '2.50-uk-update' of https://github.com/arkid15r/git-ukrainian-l10n:
  l10n: uk: add 2.50 translation

13 days agoMerge branch 'l10n-de-2.50' of https://github.com/ralfth/git
Jiang Xin [Thu, 12 Jun 2025 01:49:37 +0000 (09:49 +0800)] 
Merge branch 'l10n-de-2.50' of https://github.com/ralfth/git

* 'l10n-de-2.50' of https://github.com/ralfth/git:
  l10n: Update German translation

13 days agoCodingGuidelines: let BSS do its job
Junio C Hamano [Wed, 11 Jun 2025 21:16:58 +0000 (14:16 -0700)] 
CodingGuidelines: let BSS do its job

We have mentioned this in various reviews, but I didn't see it
mentioned in the CodingGuildelines document.  Let's add it.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 days agoRelNotes/2.50.0: fix typos & other improvements
Kristoffer Haugsbakk [Wed, 11 Jun 2025 17:35:24 +0000 (19:35 +0200)] 
RelNotes/2.50.0: fix typos & other improvements

• Replace with phrases that are more standard (“all-or-nothing”
  instead of “-none”)
• Add coordinating words that make it less likely for you to trip
  over the sentence (“*that* "gc" can do”)
• Use “SMTP” instead of both SMTP and smtp
• Don’t mention `git fsck --reference` since the previous release
  was not affected by this minor bug.  Also say “errored out” since
  the git-refs(1) bug was there in v2.48.0 as well
• Use the more widespread “linked” instead of “secondary worktree”

Signed-off-by: Kristoffer Haugsbakk <code@khaugsbakk.name>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 days agoci(coverity): output the build log upon error
Johannes Schindelin [Wed, 11 Jun 2025 15:54:38 +0000 (15:54 +0000)] 
ci(coverity): output the build log upon error

It is quite helpful to know what Coverity said, exactly, in case it
fails to analyze the code.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 days agoci(coverity): fix building on Windows
Johannes Schindelin [Wed, 11 Jun 2025 15:54:37 +0000 (15:54 +0000)] 
ci(coverity): fix building on Windows

When I added the Coverity workflow in a56b6230d0b1 (ci: add a GitHub
workflow to submit Coverity scans, 2023-09-25), I merely converted an
Azure Pipeline definition that had been running successfully for ages.

In the meantime, the current Coverity documentation describes a very
different way to install the analysis tool, recommending to add the
`bin/` directory to the _end_ of `PATH` (when originally, IIRC, it was
recommended to add it to the _beginning_ of the `PATH`).

This is crucial! The reason is that the current incarnation of the
Windows variant of Coverity's analysis tools come with a _lot_ of DLL
files in their `bin/` directory, some of them interferring rather badly
with the `gcc.exe` in Git for Windows' SDK that we use to run the
Coverity build. The symptom is a cryptic error message:

  make: *** [Makefile:2960: headless-git.o] Error 1
  make: *** Waiting for unfinished jobs....
  D:\git-sdk-64-minimal\mingw64\bin\windres.exe: preprocessing failed.
  make: *** [Makefile:2679: git.res] Error 1
  make: *** [Makefile:2893: git.o] Error 1
  make: *** [Makefile:2893: builtin/add.o] Error 1
  Attempting to detect unconfigured compilers in build
  |0----------25-----------50----------75---------100|
  ****************************************************
  Warning:  Build command make.exe exited with code 2. Please verify that the build completed successfully.
  Warning:  Emitted 0 C/C++ compilation units (0%) successfully

  0 C/C++ compilation units (0%) are ready for analysis
   For more details, please look at:
      D:/a/git/git/cov-int/build-log.txt

The log (which the workflow is currently not configured to reveal) then
points out that the `windows.h` header cannot be found, which is _still_
not very helpful. The underlying root cause is that the `gcc.exe` in Git
for Windows' SDK determines the location of the header files via the
location of certain DLL files, and finding the "wrong" ones first on the
`PATH` misleads that logic.

Let's fix this problem by following Coverity's current recommendation
and append the `bin/` directory in which `cov-int` can be found to the
_end_ of `PATH`.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 days agostash: fix incorrect branch name in stash message
K Jayatheerth [Wed, 11 Jun 2025 01:42:03 +0000 (07:12 +0530)] 
stash: fix incorrect branch name in stash message

When creating a stash, Git uses the current branch name
of the superproject to construct the stash commit message.
However, in repositories with submodules,
the message may mistakenly display the submodule branch name instead.

This is because `refs_resolve_ref_unsafe()` returns a pointer to a static buffer.
Subsequent calls to the same function overwrite the buffer,
corrupting the originally fetched `branch_name` used for the stash message.

Use `xstrdup()` to duplicate the branch name immediately after resolving it,
so that later buffer overwrites do not affect the stash message.

Signed-off-by: K Jayatheerth <jayatheerthkulkarni2005@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 days agol10n: Update German translation
Ralf Thielow [Sat, 31 May 2025 12:40:17 +0000 (14:40 +0200)] 
l10n: Update German translation

Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com>
2 weeks agol10n: uk: add 2.50 translation
Arkadii Yakovets [Wed, 11 Jun 2025 01:23:00 +0000 (18:23 -0700)] 
l10n: uk: add 2.50 translation

Co-authored-by: Kate Golovanova <kate@kgthreads.com>
Co-authored-by: Tamara Lazerka <98753789+aramattamara@users.noreply.github.com>
Signed-off-by: Arkadii Yakovets <ark@cho.red>
Signed-off-by: Kate Golovanova <kate@kgthreads.com>
Signed-off-by: Tamara Lazerka <98753789+aramattamara@users.noreply.github.com>
2 weeks agopreload-index: stop depending on 'the_repository'
Ayush Chandekar [Tue, 10 Jun 2025 13:02:21 +0000 (18:32 +0530)] 
preload-index: stop depending on 'the_repository'

Refactor "preload-index.c" to remove the dependency on the global
'the_repository'. Replace the occurrences of 'the_repository' with
'index->repo' and thus remove the definition '#define
USE_THE_REPOSITORY_VARIABLE'.

Mentored-by: Christian Couder <christian.couder@gmail.com>
Mentored-by: Ghanshyam Thakkar <shyamthakkar001@gmail.com>
Signed-off-by: Ayush Chandekar <ayu.chandekar@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2 weeks agoenvironment: remove the global variable 'core_preload_index'
Ayush Chandekar [Tue, 10 Jun 2025 13:02:20 +0000 (18:32 +0530)] 
environment: remove the global variable 'core_preload_index'

The global variable 'core_preload_index' is used in a single function
named 'preload_index()' in "preload-index.c". Move its declaration inside
that function, removing unnecessary global state.

This change is part of an ongoing effort to eliminate global variables,
improve modularity and help libify the codebase.

Mentored-by: Christian Couder <christian.couder@gmail.com>
Mentored-by: Ghanshyam Thakkar <shyamthakkar001@gmail.com>
Signed-off-by: Ayush Chandekar <ayu.chandekar@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2 weeks agorevision: fix memory leak in prepare_show_merge()
Lidong Yan [Tue, 10 Jun 2025 00:37:59 +0000 (00:37 +0000)] 
revision: fix memory leak in prepare_show_merge()

In revision.c:prepare_show_merge(), we allocated an array in prune
but forget to free it. Since parse_pathspec is not responsible to
free prune, we should add `free(prune)` in the end of prepare_show_merge().

Signed-off-by: Lidong Yan <502024330056@smail.nju.edu.cn>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2 weeks agoMerge branch 'po-id' of github.com:bagasme/git-po
Jiang Xin [Mon, 9 Jun 2025 23:43:17 +0000 (07:43 +0800)] 
Merge branch 'po-id' of github.com:bagasme/git-po

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

2 weeks agoMerge branch 'master' of github.com:alshopov/git-po
Jiang Xin [Mon, 9 Jun 2025 23:42:34 +0000 (07:42 +0800)] 
Merge branch 'master' of github.com:alshopov/git-po

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

2 weeks agoMerge branch 'l10n_fr_v2.50' of github.com:jnavila/git
Jiang Xin [Mon, 9 Jun 2025 23:41:22 +0000 (07:41 +0800)] 
Merge branch 'l10n_fr_v2.50' of github.com:jnavila/git

* 'l10n_fr_v2.50' of github.com:jnavila/git:
  l10n: fr: v2.50 round 1

2 weeks agoMerge branch 'tr-l10n' of github.com:bitigchi/git-po
Jiang Xin [Mon, 9 Jun 2025 23:39:49 +0000 (07:39 +0800)] 
Merge branch 'tr-l10n' of github.com:bitigchi/git-po

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

2 weeks agoMerge branch 'master' of github.com:aindriu80/git-po
Jiang Xin [Mon, 9 Jun 2025 23:37:22 +0000 (07:37 +0800)] 
Merge branch 'master' of github.com:aindriu80/git-po

* 'master' of github.com:aindriu80/git-po:
  l10n: Add full Irish translation (ga.po)

2 weeks agodoc: maintenance: fix linkgit syntax
Kristoffer Haugsbakk [Mon, 9 Jun 2025 15:59:42 +0000 (17:59 +0200)] 
doc: maintenance: fix linkgit syntax

Signed-off-by: Kristoffer Haugsbakk <code@khaugsbakk.name>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2 weeks agotest-lib: add missing prerequisites for Darwin
Ramsay Jones [Mon, 9 Jun 2025 17:13:38 +0000 (18:13 +0100)] 
test-lib: add missing prerequisites for Darwin

commit d3d8c601fd ("t7815: fix unexpectedly passing test on macOS",
2025-06-02) added a MACOS prerequisite by adding a 'Darwin' case
label to the 'OS-specific' case statement. However, this commit
forgot to set several prerequisites which appear in the 'default'
case label, in addition to the new MACOS prerequisite. This causes
several tests, which macOS should pass, being skipped.

In order to run all applicable tests on macOS, add the missing
prerequisites to the 'Darwin' case.

Signed-off-by: Ramsay Jones <ramsay@ramsayjones.plus.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2 weeks agopack-bitmap: remove checks before bitmap_free
Lidong Yan [Mon, 9 Jun 2025 08:18:44 +0000 (08:18 +0000)] 
pack-bitmap: remove checks before bitmap_free

In pack-bitmap.c:find_boundary_objects(), the roots_bitmap is only freed
if cascade_pseudo_merges_1() fails. However, cascade_pseudo_merges_1()
uses roots_bitmap as a mutable reference without taking ownership of it.
As a result, if cascade_pseudo_merges_1() succeeds, roots_bitmap is leaked.
And this leak currently lacks a dedicated test to detect it.

To fix this leak, remove if cascade_pseudo_merges_1() succeed check and
always calling bitmap_free(roots_bitmap);

To trigger this leak, we need roots_bitmap that contains at least one
pseudo merge. So that we can use pseudo merge bitmap when we compute roots
reachable bitmap. Here we create two commits: first A then B. Add A
to the pseudo-merge and perform a traversal over the range A..B.
In this scenario, the "haves" set will be {A}, and cascade_pseudo_merges_1
will succeed, thereby exposing the leak due to the missing roots_bitmap
cleanup.

Signed-off-by: Lidong Yan <502024330056@smail.nju.edu.cn>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2 weeks agoGit 2.50-rc2 v2.50.0-rc2
Junio C Hamano [Mon, 9 Jun 2025 14:17:31 +0000 (07:17 -0700)] 
Git 2.50-rc2

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2 weeks agoMerge branch 'mm/test-in-absolute-home'
Junio C Hamano [Mon, 9 Jun 2025 14:15:50 +0000 (07:15 -0700)] 
Merge branch 'mm/test-in-absolute-home'

Tests that compare $HOME and $(pwd), which should be the same
directory unless the tests chdir's around, would fail when the user
enters the test directory via symbolic links, which has been
corrected.

* mm/test-in-absolute-home:
  t: run tests from a normalized working directory

2 weeks agobuiltin/submodule--helper: fix leak when remote_submodule_branch() failed
Lidong Yan [Sun, 8 Jun 2025 03:56:59 +0000 (03:56 +0000)] 
builtin/submodule--helper: fix leak when remote_submodule_branch() failed

In builtin/submodule--helper.c:update_submodule(), the variable
remote_name is allocated in get_default_remote_submodule() but
may be leaked if remote_submodule_branch() fails. Although it is
unlikely that remote_submodule_branch() would fail after successfully
obtaining a remote ref name from get_default_remote_submodule(),
it is still possible. To prevent a potential memory leak, add a
call to free(remote_name) at the early exit point.

Signed-off-by: Lidong Yan <502024330056@smail.nju.edu.cn>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2 weeks agoconfig.mak.uname: update settings for Solaris 10 and 11
Brad Smith [Sun, 8 Jun 2025 01:26:52 +0000 (21:26 -0400)] 
config.mak.uname: update settings for Solaris 10 and 11

Solaris 10 and newer has strtoumax().

Solaris 11 and newer has mkdtemp(), memmem(), and strcasestr().

Signed-off-by: Brad Smith <brad@comstyle.com>
Reviewed-by: Collin Funk <collin.funk1@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2 weeks agoA bit more before -rc2
Junio C Hamano [Sat, 7 Jun 2025 17:46:34 +0000 (10:46 -0700)] 
A bit more before -rc2

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2 weeks agoMerge branch 'js/curl-easy-setopt-typefix'
Junio C Hamano [Sat, 7 Jun 2025 17:46:50 +0000 (10:46 -0700)] 
Merge branch 'js/curl-easy-setopt-typefix'

Adjust to newer version of libcURL.

* js/curl-easy-setopt-typefix:
  curl: pass `long` values where expected

2 weeks agoMerge branch 'jk/curl-easy-setopt-typefix'
Junio C Hamano [Sat, 7 Jun 2025 17:46:50 +0000 (10:46 -0700)] 
Merge branch 'jk/curl-easy-setopt-typefix'

Adjust to newer version of libcURL.

* jk/curl-easy-setopt-typefix:
  curl: fix symbolic constant typechecks with curl_easy_setopt()
  curl: fix integer variable typechecks with curl_easy_setopt()
  curl: fix integer constant typechecks with curl_easy_setopt()

2 weeks agoMerge branch 'bs/bsd-wo-specific-xopen-source'
Junio C Hamano [Sat, 7 Jun 2025 17:46:50 +0000 (10:46 -0700)] 
Merge branch 'bs/bsd-wo-specific-xopen-source'

Build fix for BSDs.

* bs/bsd-wo-specific-xopen-source:
  compat: fixes for header handling with OpenBSD / NetBSD

2 weeks agoMerge branch 'cf/var-completion-obsd-fixes'
Junio C Hamano [Sat, 7 Jun 2025 17:46:49 +0000 (10:46 -0700)] 
Merge branch 'cf/var-completion-obsd-fixes'

Build fix for OpenBSD.

* cf/var-completion-obsd-fixes:
  completion: make sed command that generates config-list.h portable.

2 weeks agostash: allow "git stash [<options>] --patch <pathspec>" to assume push
Phillip Wood [Sat, 7 Jun 2025 09:45:26 +0000 (10:45 +0100)] 
stash: allow "git stash [<options>] --patch <pathspec>" to assume push

The support for assuming "push" when "-p" is given introduced in
9e140909f61 (stash: allow pathspecs in the no verb form, 2017-02-28) is
very narrow, neither "git stash -m <message> -p <pathspec>" nor "git
stash --patch <pathspec>" imply "push" and die instead. Relax this by
passing PARSE_OPT_STOP_AT_NON_OPTION when push is being assumed and then
setting "force_assume" if "--patch" was present. This means "git stash
<pathspec> -p" still dies so that it does not assume the user meant
"push" if they mistype a subcommand name but "git stash -m <message> -p
<pathspec>" will now succeed. The test added in the last commit is
adjusted to check that push is still assumed when "--patch" comes after
other options on the command-line.

Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2 weeks agostash: allow "git stash -p <pathspec>" to assume push again
Phillip Wood [Sat, 7 Jun 2025 09:45:25 +0000 (10:45 +0100)] 
stash: allow "git stash -p <pathspec>" to assume push again

Historically "git stash [<options>]" was assumed to mean "git stash save
[<options>]". Since 1ada5020b38 (stash: use stash_push for no verb form,
2017-02-28) it is assumed to mean "git stash push [<options>]". As the
push subcommand supports pathspecs, 9e140909f61 (stash: allow pathspecs
in the no verb form, 2017-02-28) allowed "git stash -p <pathspec>" to
mean "git stash push -p <pathspec>". This was broken in 8c3713cede7
(stash: eliminate crude option parsing, 2020-02-17) which failed to
account for "push" being added to the start of argv in cmd_stash()
before it calls push_stash() and kept looking in argv[0] for "-p" after
moving the code to push_stash().

Fix this by regression by checking argv[1] instead of argv[0] and add a
couple of tests to prevent future regressions.

Helped-by: Martin Ågren <martin.agren@gmail.com>
Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2 weeks agol10n: po-id for 2.50
Bagas Sanjaya [Thu, 29 May 2025 08:39:46 +0000 (15:39 +0700)] 
l10n: po-id for 2.50

Update following components:

  * builtin/cat-file.c
  * builtin/fast-export.c
  * builtin/fsck.c
  * builtin/merge-tree.c
  * builtin/mv.c
  * builtin/reflog.c
  * builtin/repack.c
  * builtin/rev-list.c
  * builtin/update-ref.c
  * command-list.h
  * midx-write.c
  * object-file.c
  * parse-options.c
  * promisor-remote.c
  * refs/packed-backend.c
  * scalar.c
  * t/helper/test-pack-deltas.c
  * git-send-email.perl

Translate following new components:

  * builtin/diff-pairs.c

Signed-off-by: Bagas Sanjaya <bagasdotme@gmail.com>
2 weeks agodoc: update references to renamed AsciiDoc files
Jouke Witteveen [Wed, 21 May 2025 19:05:10 +0000 (19:05 +0000)] 
doc: update references to renamed AsciiDoc files

The .txt extensions were changed to .adoc in 1f010d6 (doc: use .adoc
extension for AsciiDoc files, 2025-01-20). References to the renamed
files were not updated yet.

Signed-off-by: Jouke Witteveen <j.witteveen@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2 weeks agoMerge branch 'master' of https://github.com/j6t/git-gui
Junio C Hamano [Fri, 6 Jun 2025 16:41:59 +0000 (09:41 -0700)] 
Merge branch 'master' of https://github.com/j6t/git-gui

* 'master' of https://github.com/j6t/git-gui:
  git-gui: don't delete source files when auto_mkindex fails

2 weeks agodiff-generate-patch.adoc: drop spurious backticks
Martin Ågren [Fri, 6 Jun 2025 12:31:36 +0000 (14:31 +0200)] 
diff-generate-patch.adoc: drop spurious backticks

Commit 0b080a70ab (doc: git-diff: apply format changes to
diff-generate-patch, 2024-11-18) wrapped the ".." in

  mode <mode>,<mode>..<mode>

in backticks. Note how the line before is quite similar,

  index <hash>,<hash>..<hash>

but did not get any backticks. Remove the backticks, since they confuse
Asciidoctor.

The exact failure mode changed with c87b2b3a6f (doc: fix asciidoctor
synopsis processing of triple-dots, 2025-04-12), and arguably to the
better. But Asciidoctor (2.0.18) still ends up confused by these
backticks and leaves the manpage rendering as

  index <hash>,<hash>..<hash>
  mode <mode>,<mode>`..__<mode>__
  {empty}`new file mode <mode>

Drop the backticks. This is a no-op with asciidoc (10.2.0).

Signed-off-by: Martin Ågren <martin.agren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2 weeks agocurl: pass `long` values where expected
Johannes Schindelin [Fri, 6 Jun 2025 09:29:24 +0000 (09:29 +0000)] 
curl: pass `long` values where expected

As of Homebrew's update to cURL v8.14.0, there are new compile errors to
be observed in the `osx-gcc` job of Git's CI builds:

  In file included from http.h:8,
                   from imap-send.c:36:
  In function 'setup_curl',
      inlined from 'curl_append_msgs_to_imap' at imap-send.c:1460:9,
      inlined from 'cmd_main' at imap-send.c:1581:9:
  /usr/local/Cellar/curl/8.14.0/include/curl/typecheck-gcc.h:50:15: error: call to '_curl_easy_setopt_err_long' declared with attribute warning: curl_easy_setopt expects a long argument [-Werror=attribute-warning]
     50 |               _curl_easy_setopt_err_long();                             \
        |               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
  /usr/local/Cellar/curl/8.14.0/include/curl/curl.h:54:7: note: in definition of macro 'CURL_IGNORE_DEPRECATION'
     54 |       statements \
        |       ^~~~~~~~~~
  imap-send.c:1423:9: note: in expansion of macro 'curl_easy_setopt'
   1423 |         curl_easy_setopt(curl, CURLOPT_PORT, srvc->port);
        |         ^~~~~~~~~~~~~~~~
  [... many more instances of nearly identical warnings...]

See for example this CI workflow run:
https://github.com/git/git/actions/runs/15454602308/job/43504278284#step:4:307

The most likely explanation is the entry "typecheck-gcc.h: fix the
typechecks" in cURL's release notes (https://curl.se/ch/8.14.0.html).

Nearly identical compile errors afflicted recently-updated Debian
setups, which have been addressed by `jk/curl-easy-setopt-typefix`.

However, on macOS Git is built with different build options, which
uncovered more instances of `int` values that need to be cast to
constants, which were not covered by 6f11c42e8edc (curl: fix integer
constant typechecks with curl_easy_setopt(), 2025-06-04). Let's
explicitly convert even those remaining `int` constants in
`curl_easy_setopt()` calls to `long` parameters.

In addition to looking at the compile errors of the `osx-gcc` job, I
verified that there are no other instances of the same issue that need
to be handled in this manner (and that might not be caught by our CI
builds because of yet other build options that might skip those code
parts), I ran the following command and inspected all 23 results
manually to ensure that the fix is now actually complete:

  git grep -n curl_easy_setopt |
  grep -ve ',.*, *[A-Za-z_"&]' \
    -e ',.*, *[-0-9]*L)' \
    -e ',.*,.* (long)'

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2 weeks agogit-gui: don't delete source files when auto_mkindex fails
Johannes Sixt [Fri, 6 Jun 2025 05:41:42 +0000 (07:41 +0200)] 
git-gui: don't delete source files when auto_mkindex fails

Commit 2cc5b0facfa4 (git-gui: extract script to generate "tclIndex",
2025-03-11) converted commands in a Makefile rule to a shell script.
In this process, the Makefile variable $@ had to be replaced by the
file name that it represents, 'lib/tclIndex'. However, the occurrence
in `rm -f $@` was missed. In a shell script, $@ expands to all
command line arguments, which happen to be the source files lib/*.tcl
in this case. Needless to say that we do not want to remove source
files during a build. Replace $@ by the intended 'lib/tclIndex'.

Reported-by: Randall S. Becker <rsbecker@nexbridge.com>
Signed-off-by: Johannes Sixt <j6t@kdbg.org>
2 weeks agoMerge branch 'js/t5410-tee-hang-workaround'
Junio C Hamano [Thu, 5 Jun 2025 18:56:29 +0000 (11:56 -0700)] 
Merge branch 'js/t5410-tee-hang-workaround'

* js/t5410-tee-hang-workaround:
  t5410: avoid hangs in CI runs in the win+Meson test jobs

2 weeks agot5410: avoid hangs in CI runs in the win+Meson test jobs
Johannes Schindelin [Thu, 5 Jun 2025 10:16:45 +0000 (10:16 +0000)] 
t5410: avoid hangs in CI runs in the win+Meson test jobs

In the GitHub workflow used in Git's CI builds, the `vs test` jobs use a
subset of a specific revision of Git for Windows' SDK to run Git's test
suite. This revision is validated by another CI workflow to ensure that
said revision _can_ run Git's test suite successfully, skipping buggy
updates in Git for Windows' SDK.

The `win+Meson test` jobs do things differently, quite differently. They
use the Bash of the Git for Windows version that is installed on the
runners to run Git's test suite.

This difference has consequences.

When 68cb0b5253a0 (builtin/receive-pack: add option to skip connectivity
check, 2025-05-20) introduced a test case that uses `tee <file> | git
receive-pack` as `--receive-pack` parameter (imitating an existing
pattern in the same test script), it hit just the sweet spot to trigger
a bug in the MSYS2 runtime shipped in Git for Windows v2.49.0. This
version is the one currently installed on GitHub's runners.

The problem is that the `git receive-pack` process finishes while the
`tee` process does not need to write anything anymore and therefore does
not receive an EOF. Instead, it should receive a SIGPIPE, but the bug in
the MSYS2 runtime prevents that from working as intended. As a
consequence, the `tee` process waits for more input from the `git.exe
send-pack` process but none is coming, and the test script patiently
waits until the 6h timeout hits.

Only every once in a while, the `git receive-pack` process manages to
send an EOF to the `tee` process and no hang occurs. Therefore, the
problem can be worked around by cancelling the clearly-hanging job after
twenty or so minutes and re-running it, repeating the process about half
a dozen times, until the hang was successfully avoided.

This bug in the MSYS2 runtime has been fixed in the meantime, which is
the reason why the same test case causes no problems in the `win test`
and the `vs test` jobs.

This will continue to be the case until the Git for Windows version on
the GitHub runners is upgraded to a version that distributes a newer
MSYS2 runtime version. However, as of time of writing, this _is_ the
latest Git for Windows version, and will be for another 1.5 weeks, until
Git v2.50.0 is scheduled to appear (and shortly thereafter Git for
Windows v2.50.0). Traditionally it takes a while before the runners pick
up the new version.

We could just wait it out, six hours at a time.

Here, I opt for an alternative: Detect the buggy MSYS2 runtime and
simply skip the test case. It's not like the `receive-pack` test cases
are specific to Windows, and even then, to my chagrin the CI runs in
git-for-windows/git spend around ten hours of compute time each and
every time to run the entire test suite on all the platforms, even the
tests that cover cross-platform code, and for Windows alone we do that
three times: with GCC, with MSVC, and with MSVC via Meson. Therefore, I
deem it more than acceptable to skip this test case in one of those
matrices.

For good luck, also the preceding test case is skipped in that scenario,
as it uses the same `--receive-pack=tee <file> | git receive-pack`
pattern, even though I never observed that test case to hang in
practice.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2 weeks agoMerge branch 'jk/curl-easy-setopt-typefix' into js/curl-easy-setopt-typefix
Junio C Hamano [Thu, 5 Jun 2025 15:56:57 +0000 (08:56 -0700)] 
Merge branch 'jk/curl-easy-setopt-typefix' into js/curl-easy-setopt-typefix

* jk/curl-easy-setopt-typefix:
  curl: fix symbolic constant typechecks with curl_easy_setopt()
  curl: fix integer variable typechecks with curl_easy_setopt()
  curl: fix integer constant typechecks with curl_easy_setopt()

2 weeks agorepo_logmsg_reencode: fix memory leak when use repo_logmsg_reencode ()
Lidong Yan [Thu, 5 Jun 2025 06:27:26 +0000 (06:27 +0000)] 
repo_logmsg_reencode: fix memory leak when use repo_logmsg_reencode ()

pretty.c:repo_logmsg_reencode() allocated memory should be freed with
repo_unuse_commit_buffer(). Callers sometimes forgot free it at exit
point. Add `repo_unuse_commit_buffer()` in insert_records_from_trailers
at builtin/shortlog.c and create_commit at builtin/replay.c

Signed-off-by: Lidong Yan <502024330056@smail.nju.edu.cn>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2 weeks agoMerge branch 'bs/config-mak-openbsd'
Junio C Hamano [Wed, 4 Jun 2025 21:30:28 +0000 (14:30 -0700)] 
Merge branch 'bs/config-mak-openbsd'

Build fix for OpenBSD

* bs/config-mak-openbsd:
  config.mak.uname: update settings for OpenBSD

2 weeks agocurl: fix symbolic constant typechecks with curl_easy_setopt()
Jeff King [Wed, 4 Jun 2025 20:56:22 +0000 (16:56 -0400)] 
curl: fix symbolic constant typechecks with curl_easy_setopt()

As with the previous two commits, we should be passing long integers,
not regular ones, to curl_easy_setopt(), and compiling against curl 8.14
loudly complains if we don't.

This patch catches the remaining cases, which are ones where we pass
curl's own symbolic constants. We'll cast them to long manually in each
call.

It seems kind of weird to me that curl doesn't define these constants as
longs, since the point of them is to pass to curl_easy_setopt(). But in
the curl documentation and examples, they clearly show casting them as
part of the setopt calls. It may be that there is some reason not to
push the type into the macro, like backwards compatibility. I didn't
dig, as it doesn't really matter: we have to follow what existing curl
versions ask for anyway.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2 weeks agocurl: fix integer variable typechecks with curl_easy_setopt()
Jeff King [Wed, 4 Jun 2025 20:55:52 +0000 (16:55 -0400)] 
curl: fix integer variable typechecks with curl_easy_setopt()

As discussed in the previous commit, we should be passing long integers,
not regular ones, to curl_easy_setopt(), and compiling against curl 8.14
loudly complains if we don't.

That patch fixed integer constants by adding an "L". This one deals with
actual variables.

Arguably these variables could just be declared as "long" in the first
place. But it's actually kind of awkward due to other code which uses
them:

  - port is conceptually a short, and we even call htons() on it (though
    weirdly it is defined as a regular int).

  - ssl_verify is conceptually a bool, and we assign to it from
    git_config_bool().

So I think we could probably switch these out for longs without hurting
anything, but it just feels a bit weird. Doubly so because if you don't
set USE_CURL_FOR_IMAP_SEND set, then the current types are fine!

So let's just cast these to longs in the curl calls, which makes what's
going on obvious. There aren't that many spots to modify (and as you can
see from the context, we already have some similar casts).

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2 weeks agocurl: fix integer constant typechecks with curl_easy_setopt()
Jeff King [Wed, 4 Jun 2025 20:55:13 +0000 (16:55 -0400)] 
curl: fix integer constant typechecks with curl_easy_setopt()

The curl documentation specifies that curl_easy_setopt() takes either:

  ...a long, a function pointer, an object pointer or a curl_off_t,
  depending on what the specific option expects.

But when we pass an integer constant like "0", it will by default be a
regular non-long int. This has always been wrong, but seemed to work in
practice (I didn't dig into curl's implementation to see whether this
might actually be triggering undefined behavior, but it seems likely and
regardless we should do what the docs say).

This is especially important since curl has a type-checking macro that
causes building against curl 8.14 to produce many warnings. The specific
commit is due to their 79b4e56b3 (typecheck-gcc.h: fix the typechecks,
2025-04-22). Curiously, it does only seem to trigger when compiled with
-O2 for me.

We can fix it by just marking the constants with a long "L".

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2 weeks agobundle-uri: send debug output to given FILE * stream
Jan Mazur [Wed, 4 Jun 2025 17:11:21 +0000 (17:11 +0000)] 
bundle-uri: send debug output to given FILE * stream

d796cedb (bundle-uri: unit test "key=value" parsing, 2022-10-12)
introduced the print_bundle_list() function, which takes a "FILE
*fp" to write the output to.  Later with c93c3d2f (bundle-uri:
parse bundle.heuristic=creationToken, 2023-01-31) the function
started showing additional information, which is always written
to the standard output stream.

It does not look like a deliberate decision to do so, and it
does not hurt, as all callers of the function passes stdout to
it.

We could change the function not to take fp and always write to
the standard output to simplify, but let's use the FILE *fp
provided by the caller consistently to write out output.

Signed-off-by: Jan Mazur <mzr@meta.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2 weeks agocontrib/subtree: add -S/--gpg-sign
Patrik Weiskircher [Wed, 4 Jun 2025 14:16:37 +0000 (14:16 +0000)] 
contrib/subtree: add -S/--gpg-sign

Allows optionally signing the commits that git subtree creates. This can
be necessary when working in a repository that requires gpg signed
commits.

Signed-off-by: Patrik Weiskircher <patrik@pspdfkit.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2 weeks agocontrib/subtree: parse using --stuck-long
Patrik Weiskircher [Wed, 4 Jun 2025 14:16:36 +0000 (14:16 +0000)] 
contrib/subtree: parse using --stuck-long

Optional parameter handling only works unambiguous with git rev-parse
--parseopt when using the --stuck-long option. To prepare for future commits
which add flags with optional parameters, parse with --stuck-long.

Signed-off-by: Patrik Weiskircher <patrik@pspdfkit.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2 weeks agosend-email: show the new message id assigned by outlook in the logs
Aditya Garg [Wed, 4 Jun 2025 12:55:14 +0000 (18:25 +0530)] 
send-email: show the new message id assigned by outlook in the logs

Whenever an email is sent, send-email shows a log at last, which
contains all the headers of the email that were received by the
receipients.

In case outlook changes the Message-ID, a log for the same is shown to
the user, but that change is not reflected when the log containing all
the headers is displayed. Here is an example of the log that is shown
when outlook changes the Message-ID:

Outlook reassigned Message-ID to: <PN3PR01MB95973E5ACD7CCFADCB4E298CB865A@PN3PR01MB9597.INDPRD01.PROD.OUTLOOK.COM>
OK. Log says:
Server: smtp.office365.com
MAIL FROM:<gargaditya08@live.com>
RCPT TO:<negahe7142@nomrista.com>
From: Aditya Garg <gargaditya08@live.com>
To: negahe7142@nomrista.com
Subject: [PATCH] send-email: show the new message id assigned by outlook in the logs
Date: Mon, 26 May 2025 20:28:36 +0530
Message-ID: <20250526145836.4825-1-gargaditya08@live.com>
X-Mailer: git-send-email @GIT_VERSION@
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit

Result: 250

Fix this by updating the $header variable, which has the message ID we
internally assigned on the "Message-ID:" header, with the message ID the
Outlook server assigned. It should look like this after this patch:

OK. Log says:
Server: smtp.office365.com
MAIL FROM:<gargaditya08@live.com>
RCPT TO:<negahe7142@nomrista.com>
From: Aditya Garg <gargaditya08@live.com>
To: negahe7142@nomrista.com
Subject: [PATCH] send-email: show the new message id assigned by outlook in the logs
Date: Mon, 26 May 2025 20:29:22 +0530
Message-ID: <PN3PR01MB95977486061BD2542BD09B67B865A@PN3PR01MB9597.INDPRD01.PROD.OUTLOOK.COM>
X-Mailer: git-send-email @GIT_VERSION@
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit

Result: 250

Signed-off-by: Aditya Garg <gargaditya08@live.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2 weeks agosend-email: fix bug resulting in broken threads if a message is edited
Aditya Garg [Wed, 4 Jun 2025 12:55:13 +0000 (18:25 +0530)] 
send-email: fix bug resulting in broken threads if a message is edited

Whenever we send a thread of emails using send-email, a message number
is internally assigned to each email. This number is used to track the
order of the emails in the thread. Whenever a new message is processed
in a thread, the current script logic increments the message number by
one, which is intended.

But, if a message is edited and then resent, its message number again
gets incremented. This is because the script uses the same logic to
process the edited message, which it uses to send the next message.

This minor bug is usually harmless, unless a special situations arises.
That situation is when the first message in a thread is edited and
resent, and an `--in-reply-to` argument is also passed to send-email.
In this case, if the user has chosen shallow threading, the threading
does not work as expected, and all messages become replies to the
Message-ID specified in the `--in-reply-to` argument.

The reason for this bug is hidden in the code for threading itself.

if ($thread) {
if ($message_was_sent &&
  ($chain_reply_to || !defined $in_reply_to || length($in_reply_to) == 0 ||
  $message_num == 1)) {
$in_reply_to = $message_id;
if (length $references > 0) {
$references .= "\n $message_id";
} else {
$references = "$message_id";
}
}
}

Here `$message_num` is the current message number, and `$in_reply_to` is
the Message-ID of the message to which the current message is a reply.
In case `--in-reply-to` is specified, the `$in_reply_to` variable
is set to the value of the `--in-reply-to` argument.

Whenever this whole set of conditions is true, the script sets the
`$in_reply_to` variable to the current message's ID. This is done to
ensure that the next message in the thread is a reply to this message.

In case we specify an `--in-reply-to` argument, and have shallow
threading, the only condition that can make this true is
`$message_num == 1`, which is true for the first message in a thread.
Thus, the `$in_reply_to` variable gets set to the first message's ID.
For subsequent messages, the `$message_num` variable is always
greater than 1, and the whole set of conditions is false. Therefore, the
`$in_reply_to` variable remains as the first message's ID. This is what
we expect in shallow threading. But if the user edits the first message
and resends it, the `$message_num` variable gets incremented by 1, and
thus the condition `$message_num == 1` becomes false. This means that
the `$in_reply_to` variable is not set to the first message's ID. As a
result the next message in the thread is not a reply to the first
message, but to the `--in-reply-to` argument, effectively breaking the
threading.

In case the user does not specify an `--in-reply-to` argument, the
`!defined $in_reply_to` condition is true, and thus the `$in_reply_to`
variable is set to the first message's ID, and the threading works
as expected, regardless of the message number.

To fix this bug, we need to ensure that the `$message_num` variable is
not incremented by 1 when a message is edited and resent. We do this by
decreasing the `$message_num` variable by 1 whenever the request to edit
a message is received. This way, the next message in the thread will
have the same message number as the edited message. Therefore the
threading will work as expected.

The same logic has also been applied in case the user drops a single
message from the thread by choosing the "[n]o" option during
confirmation. By doing this, the next message in the thread is assigned
the message number of the dropped message, and thus the threading
works as expected.

Signed-off-by: Aditya Garg <gargaditya08@live.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2 weeks agocommit-graph: fix start_delayed_progress() leak
Lidong Yan [Wed, 4 Jun 2025 03:11:15 +0000 (03:11 +0000)] 
commit-graph: fix start_delayed_progress() leak

In commit-graph.c:graph_write(), if read_one_commit() failed,
progress allocated in start_delayed_progress() will leak. Add
stop_progress() before goto cleanup.

Signed-off-by: Lidong Yan <502024330056@smail.nju.edu.cn>
Acked-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>