summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2025-03-04Git 2.49-rc1v2.49.0-rc1Junio C Hamano
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-03-03A few more before -rc1Junio C Hamano
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-03-03Merge branch 'ps/build-meson-fixes'Junio C Hamano
CI fix. * ps/build-meson-fixes: gitlab-ci: fix "msvc-meson" test job succeeding despite test failures
2025-03-03Merge branch 'ps/meson-contrib-bits'Junio C Hamano
Update meson-based build procedure to cover contrib/ and other places as well. * ps/meson-contrib-bits: ci: exercise credential helpers ci: fix propagating UTF-8 test locale in musl-based Meson job meson: wire up static analysis via Coccinelle meson: wire up git-contacts(1) meson: wire up credential helpers contrib/credential: fix compilation of "osxkeychain" helper contrib/credential: fix compiling "libsecret" helper contrib/credential: fix compilation of wincred helper with MSVC contrib/credential: fix "netrc" tests with out-of-tree builds GIT-BUILD-OPTIONS: propagate project's source directory
2025-03-03Merge branch 'ms/merge-recursive-string-list-micro-optimization'Junio C Hamano
Rename processing in the recursive merge backend has seen a micro optimization. * ms/merge-recursive-string-list-micro-optimization: merge-recursive: optimize time complexity for process_renames
2025-03-03Merge branch 'lo/doc-merge-submodule-update'Junio C Hamano
What happens to submodules during merge has been documented in a bit more detail. * lo/doc-merge-submodule-update: merge-strategies.adoc: detail submodule merge
2025-03-03Merge branch 'ps/build-meson-fixes-0130'Junio C Hamano
Assorted fixes and improvements to the build procedure based on meson. * ps/build-meson-fixes-0130: gitlab-ci: restrict maximum number of link jobs on Windows meson: consistently use custom program paths to resolve programs meson: fix overwritten `git` variable meson: prevent finding sed(1) in a loop meson: improve handling of `sane_tool_path` option meson: improve PATH handling meson: drop separate version library meson: stop linking libcurl into all executables meson: introduce `libgit_curl` dependency meson: simplify use of the common-main library meson: inline the static 'git' library meson: fix OpenSSL fallback when not explicitly required meson: fix exec path with enabled runtime prefix
2025-03-03Merge branch 'dk/test-aggregate-results-paste-fix'Junio C Hamano
The use of "paste" command for aggregating the test results have been corrected. * dk/test-aggregate-results-paste-fix: t/aggregate-results: fix paste(1) invocation
2025-02-27A bit more post -rc0Junio C Hamano
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-02-27Merge branch 'jc/3.0-branches-remotes-update'Junio C Hamano
Removal of ".git/branches" and ".git/remotes" support in the BreakingChanges document has been further clarified. * jc/3.0-branches-remotes-update: BreakingChanges: clarify branches/ and remotes/
2025-02-27Merge branch 'bc/http-push-auth-netrc-fix'Junio C Hamano
The netrc support (via the cURL library) for the HTTP transport has been re-enabled. * bc/http-push-auth-netrc-fix: http: allow using netrc for WebDAV-based HTTP protocol
2025-02-27Merge branch 'rs/clear-commit-marks-optim'Junio C Hamano
A micro-optimization. * rs/clear-commit-marks-optim: commit: avoid parent list buildup in clear_commit_marks_many()
2025-02-27Merge branch 'pw/rebase-i-ff-empty-commit'Junio C Hamano
"git rebase -i" failed to allow rewording an empty commit that has been fast-forwarded. * pw/rebase-i-ff-empty-commit: rebase -i: reword empty commit after fast-forward
2025-02-27Merge branch 'kn/ref-migrate-skip-reflog'Junio C Hamano
"git refs migrate" can optionally be told not to migrate the reflog. * kn/ref-migrate-skip-reflog: builtin/refs: add '--no-reflog' flag to drop reflogs
2025-02-27Merge branch 'ua/os-version-capability'Junio C Hamano
The value of "uname -s" is by default sent over the wire as a part of the "version" capability. * ua/os-version-capability: agent: advertise OS name via agent capability t5701: add setup test to remove side-effect dependency version: extend get_uname_info() to hide system details version: refactor get_uname_info() version: refactor redact_non_printables() version: replace manual ASCII checks with isprint() for clarity
2025-02-27gitlab-ci: fix "msvc-meson" test job succeeding despite test failuresPatrick Steinhardt
We have recently noticed that the "msvc-meson" test job in GitLab CI succeeds even if there are failures. This is somewhat puzzling because we use exactly the same command as we do on GitHub Actions, and there the jobs fail as exected. As it turns out, this is another weirdness of the GitLab CI hosted runner for Windows [1]: by default, even successful commands will not make the job fail. Interestingly though, this depends on what exactly the command is that you're running -- the MinGW-based job for example works alright and does fail as expected. The root cause here seems to be specific behaviour of PowerShell. The invocation of `ForEach-Object` does not bubble up any errors in case the invocation of `meson test` fails, and thus we don't notice the error. This is specific to executing the command in a loop: other build steps where we execute commands directly fail as expected. This is because the specific version of PowerShell that we use in the runner does not know about `PSNativeCommandUseErrorActionPreference` yet, which controls whether native commands like "meson.exe" honor the `ErrorActionPreference` variable. The preference has been introduced with PowerShell 7.3 and is default-enabled since PowerShell 7.4, but GitLab's hosted runners still seem to use PowerShell 5.1. Consequently, when tests fail, we won't bubble up the error at all from the loop and thus the job doesn't fail. This isn't an issue in other cases though where we execute native commands directly, as the GitLab runner knows to check the last error code after every command. The same thing doesn't seem to be an issue on GitHub Actions, most likely because it uses PowerShell 7.4. Curiously, the preference for `PSNativeCommandUseErrorActionPreference` is disabled there, but the jobs fail as expected regardless of that. It's puzzling, but I do not have enough PowerShell expertise to give a definitive answer as to why it works there. In any case, Meson 1.8 will likely get support for slicing tests [1], so we can eventually get rid of the whole PowerShell script. For now, work around the issue by explicitly exiting out of the loop with a non-zero error code if we see that Meson has failed. [1]: https://github.com/mesonbuild/meson/pull/14092 Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-02-26gitlab-ci: restrict maximum number of link jobs on WindowsPatrick Steinhardt
The hosted Windows runners on GitLab.com only have 7.5GB of RAM. Given that "link.exe" provided by Microsoft Visual Studio is multi-threaded by itself already and thus quite memory hungry this can quickly lead to memory starvation, out-of-memory situations and thus failed CI jobs. Fix the issue by limiting the number of concurrent linker jobs. The same issue hasn't been observed on GitHub Actions yet, probably because it got more than twice the amount of RAM with 16GB. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-02-26meson: consistently use custom program paths to resolve programsPatrick Steinhardt
The calls to `find_program()` in our documentation don't use our custom program path. This variable gets populated on Windows with the location of Git for Windows so that we can use it to provide our build tools. Consequently, we may not be able to find all necessary binaries on Windows. Adapt the calls to use the program path to fix this. While at it, drop `required: true` arguments, which are the default anyway. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-02-26meson: fix overwritten `git` variablePatrick Steinhardt
We're assigning the `git` variable in three places: - In "meson.build" to store the external Git executable. - In "meson.build" to store the compiled Git executable. - In "Documentation/meson.build" to store the external Git executable, a second time. The last case is only needed because we overwrite the original variable with the built version. Rename the variable used for the built Git executable so that we don't have to resolve the external Git executable multiple times. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-02-26meson: prevent finding sed(1) in a loopPatrick Steinhardt
We're searching for the sed(1) executable in a loop, which will make us try to find it multiple times. Starting with the preceding commit we already declare a variable for that program in the top-level build file. Use it so that we only need to search for the program once. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-02-26meson: improve handling of `sane_tool_path` optionPatrick Steinhardt
The `sane_tool_path` option can be used to override the PATH variable from which the build process, tests and ultimately Git will end up picking programs from. It is currently lacking though because we only use it to populate the PATH environment variable for executed scripts and for the `BROKEN_PATH_FIX` mechanism, but we don't use it to find programs used in the build process itself. Fix this issue by treating it similar to the Windows-specific paths, which will make us use it both to find programs and to populate the PATH environment variable. To help with this fix, change the type of the option to be an array of paths, which makes the handling a bit easier for us. It's also the correct thing to do as the input indeed is a list of paths. Furthermore, the option now overrides the default behaviour on Windows, which si to pick up tools from Git for Windows. This is done so that it becomes easier to override that default behaviour in case it's not desired. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-02-26meson: improve PATH handlingPatrick Steinhardt
When locating programs required for the build we give some special treatment to Windows systems so that we know to also look up tools provided by a Git for Windows installation. This ensures that the build doesn't have any prerequisites other than Microsoft Visual Studio, Meson and Git for Windows. Consequently, some of the programs returned by `find_program()` may not be found via PATH, but via these extra directories. But while Meson can use these tools directly without any special treatment, any scripts that we execute may not be able to find those programs. To help them we thus prepend the directories of a subset of the found programs to PATH. This doesn't make much sense though: we don't need to prepend PATH for any program that was found via PATH, but we really only need to do so for programs located via the extraneous Windows-specific paths. So instead of prepending all programs paths, we really only need to prepend the Windows-specific paths. Adapt the code accordingly by only prepeding Windows-specific paths to PATH, which both simplifies the code and clarifies intent. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-02-26meson: drop separate version libraryPatrick Steinhardt
When building `libgit.a` we link it against a `libgit_version.a` library that contains the version information that we inject at build time. The intent of this is to avoid rebuilding all of `libgit.a` whenever the version changes. But that wouldn't happen in the first place, as we know to just rebuild the files that depend on the generated "version-def.h" file. This is an artifact of an earlier version of the Meson build infra that didn't ultimately land. We didn't yet have "version-def.h", and instead injected the version via preprocessor directives. And here we would have rebuilt all of `libgit.a` indeed in case the version changes, because the preprocessor directive applied to all files. Stop building the separate library and instead add "version-def.h" to the list of source files directly. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-02-26meson: stop linking libcurl into all executablesPatrick Steinhardt
We set up libcurl via the `libgit_dependencies` variable, which gets propagated into every user of the `libgit` dependency. This is not necessary though, as most of our executables aren't even supposed to link against libcurl. Fix this by only propagating include directories as a libgit dependency and propagating the full curl dependency via `libgit_curl`. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-02-26meson: introduce `libgit_curl` dependencyPatrick Steinhardt
We've got a set of common source files that we use for those executables that link against libcurl. The setup is somewhat repetitive though. Simplify it by declaring a `libgit_curl` dependency that bundles all of it together. Note that we don't include curl itself as a dependency. This is because we already pull it in transitively via the libgit dependency, which is unfortunate because libgit itself shouldn't actually link against curl in the first place. This will get fixed in the next commit. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-02-26meson: simplify use of the common-main libraryPatrick Steinhardt
The "common-main.c" file is used by multiple executables. In order to make it easy to set it up we have created a separate library that these executables can link against. All of these executables also want to link against `libgit.a` though, which makes it necessary to specify both of these as dependencies for every executable. Simplify this a bit by declaring the library as a source dependency: instead of creating a static library, we now instead compile the common set of files into each executable separately. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-02-26meson: inline the static 'git' libraryPatrick Steinhardt
When setting up `libgit.a` we first create the static library itself, and then declare it as part of a dependency such that compile arguments, include directories and transitive dependencies get propagated to the users of that library. As such, the static library isn't expected to be used by anything but the declared dependency. Inline the static library so that we don't even use a separate variable for it. This avoids any kind of confusion that may arise and clarifies how the library is supposed to be used. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-02-26meson: fix OpenSSL fallback when not explicitly requiredPatrick Steinhardt
When OpenSSL isn't provided by the system we know to fall back to the subproject wrapper. This is especially helpful on Windows systems, where you typically don't have OpenSSL available, in order to reduce the number of required dependencies. The fallback is broken though when the OpenSSL backend is set to 'auto' as we end up calling `dependency('openssl', required: false)` in that case, which implicitly disables falling back to the wrapper. Fix the issue by re-allowing the fallback in case either OpenSSL is required or in case the backend is set to 'auto'. While at it, fix reporting of the backend in case the user asked us to pick no HTTPS backend at all. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-02-26meson: fix exec path with enabled runtime prefixPatrick Steinhardt
When the runtime prefix option is enabled, Git is built such that it knows to locate its binaries relative to the directory a binary is being executed from. This requires us to figure out relative paths, which is handled in `system_prefix()` by trying to strip a couple of well-known paths. One of these paths, GIT_EXEC_PATH, is expected to be absolute when runtime prefixes are enabled, but relative otherwise. And while our Makefile gets this correctly, in Meson we always wire up the absolute path, which may result in us not being able to find binaries. Fix this by conditionally injecting the paths depending on whether or not the `runtime_prefix` option is enabled. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-02-26Git 2.49-rc0v2.49.0-rc0Junio C Hamano
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-02-26Merge branch 'jk/check-mailmap-wo-name-fix'Junio C Hamano
"git check-mailmap" segfault fix. * jk/check-mailmap-wo-name-fix: mailmap: fix check-mailmap with full mailmap line
2025-02-26Merge branch 'ek/mingw-rename-symlink'Junio C Hamano
Symlink renaming fix. * ek/mingw-rename-symlink: compat/mingw: rename the symlink, not the target
2025-02-25merge-strategies.adoc: detail submodule mergeLucas Seiki Oshiro
Submodule merges are, in general, similar to other merges based on oid three-way-merge. When a conflict happens, however, Git has two special cases (introduced in 68d03e4a6e44) on handling the conflict before yielding it to the user. From the merge-ort and merge-recursive sources: - "Case #1: a is contained in b or vice versa": both strategies try to perform a fast-forward in the submodules if the commit referred by the conflicted submodule is descendant of another; - "Case #2: There are one or more merges that contain a and b in the submodule. If there is only one, then present it as a suggestion to the user, but leave it marked unmerged so the user needs to confirm the resolution." Add a small paragraph on merge-strategies.adoc describing this behavior. Helped-by: Junio C Hamano <gitster@pobox.com> Helped-by: Elijah Newren <newren@gmail.com> Signed-off-by: Lucas Seiki Oshiro <lucasseikioshiro@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-02-25BreakingChanges: clarify branches/ and remotes/Junio C Hamano
As we have created an empty .git/branches/ hierarchy until fairly recently, these directories may be found in modern repositories, but it is highly unlikely that they are being used. Reported-by: Jakub Wilk <jwilk@jwilk.net> Acked-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-02-25The fourteenth batchJunio C Hamano
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-02-25Merge branch 'po/meson-perl-fix'Junio C Hamano
Upgrade the minimum Perl version enforced by meson-based build to match what Makefile-based build uses. * po/meson-perl-fix: meson: fix Perl version check for Meson versions before 1.7.0 meson: bump minimum required Perl version to 5.26.0
2025-02-25Merge branch 'ms/rename-match-name-with-pattern'Junio C Hamano
Code renaming. * ms/rename-match-name-with-pattern: refspec: clarify function naming and documentation
2025-02-25Merge branch 'ad/set-default-target-in-makefiles'Junio C Hamano
Correct the default target in Documentation/Makefile, and future-proof all Makefiles from similar breakages by declaring the default target (which happens to be "all") upfront. * ad/set-default-target-in-makefiles: Makefile: set default goals in makefiles
2025-02-25Merge branch 'pw/merge-tree-stdin-deadlock-fix'Junio C Hamano
"git merge-tree --stdin" has been improved (including a workaround for a deadlock). * pw/merge-tree-stdin-deadlock-fix: merge-tree: fix link formatting in html docs merge-tree: improve docs for --stdin merge-tree: only use basic merge config merge-tree: remove redundant code merge-tree --stdin: flush stdout to avoid deadlock
2025-02-25Merge branch 'mh/doc-commit-title-not-subject'Junio C Hamano
The documentation of "git commit" and "git rebase" now refer to commit titles as such, not "subject". * mh/doc-commit-title-not-subject: doc: use 'title' consistently
2025-02-25Merge branch 'bc/diff-reject-empty-arg-to-pickaxe'Junio C Hamano
The -G/-S options to the "diff" family of commands caused us to hit a BUG() when they get no values; they have been corrected. * bc/diff-reject-empty-arg-to-pickaxe: diff: don't crash with empty argument to -G or -S
2025-02-25Merge branch 'tb/new-make-fix'Junio C Hamano
Workaround the overly picky HT/SP rule in newer GNU Make. * tb/new-make-fix: Makefile: remove accidental recipe prefix in conditional
2025-02-25Merge branch 'da/xdiff-w-sign-compare-workaround'Junio C Hamano
Noises from "-Wsign-compare" in the borrowed xdiff code has been squelched. * da/xdiff-w-sign-compare-workaround: xdiff: avoid signed vs. unsigned comparisons in xutils.c xdiff: avoid signed vs. unsigned comparisons in xpatience.c xdiff: avoid signed vs. unsigned comparisons in xhistogram.c xdiff: avoid signed vs. unsigned comparisons in xemit.c xdiff: avoid signed vs. unsigned comparisons in xdiffi.c xdiff: move sign comparison warning guard into each file
2025-02-24t/aggregate-results: fix paste(1) invocationD. Ben Knoble
When running `make test`, when missing prereqs the following is emitted: make aggregate-results usage: paste [-s] [-d delimiters] file ... fixed 1 success 30066 failed 0 broken 218 total 31274 POSIX says that `paste` requires a file operand; stdin was clearly intended by 49da404070 (test-lib: show missing prereq summary, 2021-11-20). Use it. Signed-off-by: D. Ben Knoble <ben.knoble+github@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-02-24commit: avoid parent list buildup in clear_commit_marks_many()René Scharfe
clear_commit_marks_1() clears the marks of the first parent and its first parent and so on, and saves the higher numbered parents in a list for later. There is no benefit in keeping that list growing with each handled commit. Clear it after each run to reduce peak memory usage. Signed-off-by: René Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-02-24http: allow using netrc for WebDAV-based HTTP protocolbrian m. carlson
For an extended period of time, we've enabled libcurl's netrc functionality, which will read credentials from the netrc file if none are provided. Unfortunately, we have also not documented this fact or written any tests for it, but people have come to rely on it. In 610cbc1dfb ("http: allow authenticating proactively", 2024-07-10), we accidentally broke the ability of users to use the netrc file for the WebDAV-based HTTP protocol. Notably, it works on the initial request but does not work on subsequent requests, which causes failures because that version of the protocol will necessarily make multiple requests. This happens because curl_empty_auth_enabled never returns -1, only 0 or 1, and so if http.proactiveAuth is not enabled, the username and password are always set to empty credentials, which prevents libcurl's fallback to netrc from working. However, in other cases, the server continues to get a 401 response and the credential helper is invoked, which is the normal behavior, so this was not noticed earlier. To fix this, change the condition to check for enabling empty auth and also not having proactive auth enabled, which should result in the username and password not being set to a single colon in the typical case, and thus the netrc file being used. Reported-by: Peter Georg <peter.georg@physik.uni-regensburg.de> Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-02-21mailmap: fix check-mailmap with full mailmap lineJacob Keller
I recently had reported to me a crash from a coworker using the recently added sendemail mailmap support: 3724814 Segmentation fault (core dumped) git check-mailmap "bugs@company.xx" This appears to happen because of the NULL pointer name passed into map_user(). Fix this by passing "" instead of NULL so that we have a valid pointer. Signed-off-by: Jacob Keller <jacob.keller@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-02-21The thirteenth batchJunio C Hamano
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-02-21Merge branch 'ac/doc-http-ssl-type-config'Junio C Hamano
Two configuration variables about SSL authentication material that weren't mentioned in the documentations are now mentioned. * ac/doc-http-ssl-type-config: docs: indicate http.sslCertType and sslKeyType
2025-02-21Merge branch 'en/doc-renormalize'Junio C Hamano
Doc updates. * en/doc-renormalize: doc: clarify the intent of the renormalize option in the merge machinery