Commit Graph

77371 Commits

Author SHA1 Message Date
Junio C Hamano
92daf08c84 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
2025-06-18 13:53:36 -07:00
Junio C Hamano
a6cdbc8f8a 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
2025-06-18 13:53:35 -07:00
Junio C Hamano
aa6ab0323f 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
2025-06-18 13:53:35 -07:00
Junio C Hamano
19612d0e46 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
2025-06-18 13:53:35 -07:00
Junio C Hamano
617318cbce Merge branch 'ma/doc-diff-cc-headers'
Doc mark-up update.

* ma/doc-diff-cc-headers:
  diff-generate-patch.adoc: drop spurious backticks
2025-06-18 13:53:34 -07:00
Junio C Hamano
f1af195690 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
2025-06-18 13:53:34 -07:00
Junio C Hamano
0d0d56bca4 Merge branch 'ly/commit-buffer-reencode-leakfix'
Leakfix.

* ly/commit-buffer-reencode-leakfix:
  repo_logmsg_reencode: fix memory leak when use repo_logmsg_reencode ()
2025-06-18 13:53:34 -07:00
Junio C Hamano
f1a1d79fcf Merge branch 'cf/guideline-documenting-config-vars'
CodingGuidelines update.

* cf/guideline-documenting-config-vars:
  CodingGuidelines: document formatting of similar config variables.
2025-06-18 13:53:33 -07:00
Collin Funk
ff67eea529 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>
2025-06-18 13:48:11 -07:00
Junio C Hamano
f9aa0eedb3 Start 2.51 cycle, the first batch
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-06-17 10:44:42 -07:00
Junio C Hamano
b1dc2e796e 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
2025-06-17 10:44:42 -07:00
Junio C Hamano
2024ab3d97 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
2025-06-17 10:44:42 -07:00
Junio C Hamano
5e22d03832 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
2025-06-17 10:44:41 -07:00
Junio C Hamano
b5a135b1f7 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
2025-06-17 10:44:41 -07:00
Junio C Hamano
1f622bb0ab 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
2025-06-17 10:44:40 -07:00
Junio C Hamano
870a0421c4 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 ()
2025-06-17 10:44:40 -07:00
Junio C Hamano
4fd5b1ddc7 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
2025-06-17 10:44:39 -07:00
Junio C Hamano
5b124e7c16 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
2025-06-17 10:44:39 -07:00
Junio C Hamano
01148cafa4 Merge branch 'rc/userdiff-r'
Userdiff patterns for the R language.

* rc/userdiff-r:
  userdiff: add support for R programming language
2025-06-17 10:44:39 -07:00
Junio C Hamano
88134a8417 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()
2025-06-17 10:44:38 -07:00
Junio C Hamano
60f9bc3e30 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
2025-06-17 10:44:38 -07:00
Junio C Hamano
16bd9f20a4 Git 2.50
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-06-15 21:17:21 -07:00
Junio C Hamano
f1ca98f609 Hopefully final bits before 2.50
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-06-13 13:29:15 -07:00
Junio C Hamano
7bd3e5397d 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
2025-06-13 13:29:15 -07:00
Junio C Hamano
e1f335f3d4 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"
2025-06-13 13:29:14 -07:00
Junio C Hamano
f2a6a1e596 Merge branch 'jc/sed-build-fixes'
Build fix.

* jc/sed-build-fixes:
  build: sed portability fixes
2025-06-13 13:29:14 -07:00
Junio C Hamano
b2bfd317a3 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
2025-06-12 17:31:42 -07:00
Junio C Hamano
9edff09aec 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
2025-06-12 14:19:10 -07:00
Junio C Hamano
5acfacc2a1 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>
2025-06-12 13:44:10 -07:00
Junio C Hamano
9b662a5d21 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)
2025-06-12 13:35:08 -07:00
Sebastian Andrzej Siewior
1c62df0abe 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>
2025-06-12 13:23:39 -07:00
Yi-Jyun Pan
cbf346a996 l10n: zh_TW: update translation for Git 2.50
Signed-off-by: Yi-Jyun Pan <pan93412@gmail.com>
2025-06-12 22:29:32 +08:00
Teng Long
925035958b 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>
2025-06-12 21:47:46 +08:00
Jiang Xin
36cbedb7cf 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
2025-06-12 09:53:04 +08:00
Jiang Xin
ee33b2ef37 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
2025-06-12 09:49:37 +08:00
Kristoffer Haugsbakk
1e2677f66f 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>
2025-06-11 13:32:14 -07:00
Johannes Schindelin
3cc4fc1ebd 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>
2025-06-11 10:01:14 -07:00
Johannes Schindelin
882efe0444 ci(coverity): fix building on Windows
When I added the Coverity workflow in a56b6230d0 (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>
2025-06-11 10:01:14 -07:00
Ralf Thielow
b21f7dd9e3 l10n: Update German translation
Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com>
2025-06-11 16:56:18 +02:00
Arkadii Yakovets
aeac109283 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>
2025-06-10 18:23:00 -07:00
Jiang Xin
a956283999 Merge branch 'po-id' of github.com:bagasme/git-po
* 'po-id' of github.com:bagasme/git-po:
  l10n: po-id for 2.50
2025-06-10 07:43:17 +08:00
Jiang Xin
f6709fbc4a Merge branch 'master' of github.com:alshopov/git-po
* 'master' of github.com:alshopov/git-po:
  l10n: bg.po: Updated Bulgarian translation (5819t)
2025-06-10 07:42:34 +08:00
Jiang Xin
104807f89e 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
2025-06-10 07:41:22 +08:00
Jiang Xin
b0f9a659b2 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
2025-06-10 07:39:49 +08:00
Jiang Xin
1963f3203a Merge branch 'master' of github.com:aindriu80/git-po
* 'master' of github.com:aindriu80/git-po:
  l10n: Add full Irish translation (ga.po)
2025-06-10 07:37:22 +08:00
Kristoffer Haugsbakk
6cd0701e3c doc: maintenance: fix linkgit syntax
Signed-off-by: Kristoffer Haugsbakk <code@khaugsbakk.name>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-06-09 11:33:25 -07:00
Lidong Yan
81cd1eef7d 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>
2025-06-09 09:04:47 -07:00
Junio C Hamano
4c0e625c09 Git 2.50-rc2
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-06-09 07:18:49 -07:00
Junio C Hamano
427b538fc3 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
2025-06-09 07:15:51 -07:00
Lidong Yan
bfc9f9cc64 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>
2025-06-08 08:49:48 -07:00