summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
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-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-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 'jc/doc-boolean-synonyms'Junio C Hamano
Doc updates. * jc/doc-boolean-synonyms: doc: centrally document various ways tospell `true` and `false`
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
2025-02-21Merge branch 'ua/update-server-info-sans-the-repository'Junio C Hamano
Code clean-up. * ua/update-server-info-sans-the-repository: builtin/update-server-info: remove the_repository global variable
2025-02-21compat/mingw: rename the symlink, not the targetEliah Kagan
Since 183ea3ea (Merge branch 'ps/mingw-rename', 2024-11-13), a new technique is used on Windows to rename files, where supported. The first step of this technique is to open the file with `CreateFileW`. At that time, `FILE_ATTRIBUTE_NORMAL` was passed as the value of the `dwFlagsAndAttributes` argument. In b30404df [2], this was improved by passing `FILE_FLAG_BACKUP_SEMANTICS`, to support directories as well as regular files. However, neither value of `dwFlagsAndAttributes` is sufficient to open a symbolic link with the correct semantics to rename it. Symlinks on Windows are reparse points. Attempting to open a reparse point with `CreateFileW` dereferences the reparse point and opens the target instead, unless `FILE_FLAG_OPEN_REPARSE_POINT` is included in `dwFlagsAndAttributes`. This is documented for that flag and in the "Symbolic Link Behavior" section of the `CreateFileW` docs [3]. This produces a regression where attempting to rename a symlink on Windows renames its target to the intended new name and location of the symlink. For example, if `symlink` points to `file`, then running git mv symlink symlink-renamed leaves `symlink` in place and unchanged, but renames `file` to `symlink-renamed` [4]. This regression is detectable by existing tests in `t7001-mv.sh`, but the tests must be run by a Windows user with the ability to create symlinks, and the `ln -s` command used to create the initial symlink must also be able to create a real symlink (such as by setting the `MSYS` environment variable to `winsymlinks:nativestrict`). Then these two tests fail if the regression is present, and pass otherwise: 38 - git mv should overwrite file with a symlink 39 - check moved symlink Let's fix this, so that renaming a symlink again renames the symlink itself and leaves the target unchanged, by passing FILE_FLAG_BACKUP_SEMANTICS | FILE_FLAG_OPEN_REPARSE_POINT as the `dwFlagsAndAttributes` argument. This is sufficient (and safe) because including `FILE_FLAG_OPEN_REPARSE_POINT` causes no harm even when used to open a file or directory that is not a reparse point. In that case, as noted in [3], this flag is simply ignored. [1]: https://github.com/git-for-windows/git/commit/183ea3eabf81822506d2cd3aa1dc0727099ebccd [2]: https://github.com/git-for-windows/git/commit/b30404dfc04a4b087b630aea4ab88a51cd3a7459 [3]: https://learn.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-createfilew [4]: https://github.com/git-for-windows/git/issues/5436 Signed-off-by: Eliah Kagan <eliah.kagan@gmail.com> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-02-20Merge branch 'master' of https://github.com/j6t/gitkJunio C Hamano
* 'master' of https://github.com/j6t/gitk: gitk: introduce support for the Meson build system gitk: extract script to build executable gitk: make the "list references" default window width wider gitk: fix arrow keys in input fields with Tcl/Tk >= 8.6 gitk: Use an external icon file on Windows gitk: Unicode file name support gitk(Windows): avoid inadvertently calling executables in the worktree
2025-02-20Merge branch 'pks-meson-support' of https://github.com/pks-t/gitkJohannes Sixt
* 'pks-meson-support' of https://github.com/pks-t/gitk: gitk: introduce support for the Meson build system gitk: extract script to build executable Signed-off-by: Johannes Sixt <j6t@kdbg.org>
2025-02-20Merge branch 'g4w-gitk' of https://github.com/dscho/gitkJohannes Sixt
* 'g4w-gitk' of https://github.com/dscho/gitk: gitk: make the "list references" default window width wider gitk: fix arrow keys in input fields with Tcl/Tk >= 8.6 gitk: Use an external icon file on Windows gitk: Unicode file name support gitk(Windows): avoid inadvertently calling executables in the worktree Signed-off-by: Johannes Sixt <j6t@kdbg.org>
2025-02-20gitk: introduce support for the Meson build systemPatrick Steinhardt
Upstream Git has introduced support for the Meson build system. Introduce support for Meson into gitk, as well, so that Git can easily build its vendored copy of Gitk via a `subproject()` directive. The instructions can be set up as follows: $ meson setup build $ meson compile -C build $ meson install -C build Specific options, like for example where Gitk shall be installed to, can be specified at setup time via `-D`. Available options can be discovered by running `meson configure` either in the source or build directory. Signed-off-by: Patrick Steinhardt <ps@pks.im>
2025-02-20gitk: extract script to build executablePatrick Steinhardt
Extract the scrip that "builds" Gitk from our Makefile so that we can reuse it in Meson. Signed-off-by: Patrick Steinhardt <ps@pks.im>
2025-02-19meson: fix Perl version check for Meson versions before 1.7.0Peter Oliver
Command `perl --version` says, e.g., “This is perl 5, version 26, subversion 0 (v5.26.0)”, which older versions of Meson interpret as version 26. This will be fixed in Meson 1.7.0, but at the time of writing that isn’t yet released. If we run `perl -V:version` we get the unambiguous response “version='5.26.0';”, but we need at least Meson 1.5.0 to be able to do that. Note that Perl are seriously considering dropping the leading 5 entirely in the near future (https://perl.github.io/PPCs/ppc0025-perl-version/), but that shouldn’t affect us. Signed-off-by: Peter Oliver <git@mavit.org.uk> Co-authored-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-02-19meson: bump minimum required Perl version to 5.26.0Peter Oliver
Commit 702d8c1f3b (Require Perl 5.26.0, 2024-10-23) dropped support for Perl versions older than 5.26.0. The Meson build system, which has been developed in parallel to that commit, hasn't been bumped accordingly and thus still requires Perl 5.8.1 or newer. Fix this by requiring Perl 5.26.0 or newer with Meson. Signed-off-by: Peter Oliver <git@mavit.org.uk> Reviewed-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-02-18The twelfth batchJunio C Hamano
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-02-18Merge branch 'bc/contrib-thunderbird-patch-inline-fix'Junio C Hamano
A thunderbird helper script lost its bashism. * bc/contrib-thunderbird-patch-inline-fix: thunderbird-patch-inline: avoid bashism
2025-02-18Merge branch 'lo/t7603-path-is-file-update'Junio C Hamano
Test clean-up. * lo/t7603-path-is-file-update: t7603: replace test -f by test_path_is_file
2025-02-18Merge branch 'da/difftool-sans-the-repository'Junio C Hamano
"git difftool" code clean-up. * da/difftool-sans-the-repository: difftool: eliminate use of USE_THE_REPOSITORY_VARIABLE difftool: eliminate use of the_repository difftool: eliminate use of global variables
2025-02-18Merge branch 'jt/rev-list-missing-print-info'Junio C Hamano
"git rev-list --missing=" learned to accept "print-info" that gives known details expected of the missing objects, like path and type. * jt/rev-list-missing-print-info: rev-list: extend print-info to print missing object type rev-list: add print-info action to print missing object path
2025-02-18Merge branch 'ps/send-pack-unhide-error-in-atomic-push'Junio C Hamano
"git push --atomic --porcelain" used to ignore failures from the other side, losing the error status from the child process, which has been corrected. * ps/send-pack-unhide-error-in-atomic-push: send-pack: gracefully close the connection for atomic push t5543: atomic push reports exit code failure send-pack: new return code "ERROR_SEND_PACK_BAD_REF_STATUS" t5548: add porcelain push test cases for dry-run mode t5548: add new porcelain test cases t5548: refactor test cases by resetting upstream t5548: refactor to reuse setup_upstream() function t5504: modernize test by moving heredocs into test bodies
2025-02-18Merge branch 'ds/backfill'Junio C Hamano
Lazy-loading missing files in a blobless clone on demand is costly as it tends to be one-blob-at-a-time. "git backfill" is introduced to help bulk-download necessary files beforehand. * ds/backfill: backfill: assume --sparse when sparse-checkout is enabled backfill: add --sparse option backfill: add --min-batch-size=<n> option backfill: basic functionality and tests backfill: add builtin boilerplate
2025-02-18diff: don't crash with empty argument to -G or -Sbrian m. carlson
The pickaxe options, -G and -S, need either a regex or a string to look through the history for. An empty value isn't very useful since it would either match everything or nothing, and what's worse, we presently crash with a BUG like so when the user provides one: BUG: diffcore-pickaxe.c:241: should have needle under -G or -S Since it's not very nice of us to crash and this wouldn't do anything useful anyway, let's simply inform the user that they must provide a non-empty argument and exit with an error if they provide an empty one instead. Reported-by: Jared Van Bortel <cebtenzzre@gmail.com> Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net> Acked-by: Elijah Newren <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-02-18doc: use 'title' consistentlyM Hickford
The first line of a commit message is variously called 'title' or 'subject'. Prefer 'title' unless discussing email. Signed-off-by: M Hickford <mirth.hickford@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-02-18merge-tree: fix link formatting in html docsPhillip Wood
In the html documentation the link to the "OUTPUT" section is surrounded by square brackets. Fix this by adding explicit link text to the cross reference. Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk> Acked-by: Elijah Newren <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-02-18merge-tree: improve docs for --stdinPhillip Wood
Add a section for --stdin in the list of options and document that it implies -z so readers know how to parse the output. Also correct the merge status documentation for --stdin as if the status is less than zero "git merge-tree" dies before printing it. Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk> Acked-by: Elijah Newren <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-02-18merge-tree: only use basic merge configPhillip Wood
Commit 9c93ba4d0ae (merge-recursive: honor diff.algorithm, 2024-07-13) replaced init_merge_options() with init_basic_merge_config() for use in plumbing commands and init_ui_merge_config() for use in porcelain commands. As "git merge-tree" is a plumbing command it should call init_basic_merge_config() rather than init_ui_merge_config(). The merge ort machinery ignores "diff.algorithm" so the behavior is unchanged by this commit but it future proofs us against any future changes to init_ui_merge_config(). Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk> Acked-by: Elijah Newren <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-02-18merge-tree: remove redundant codePhillip Wood
real_merge() only ever returns "0" or "1" as it dies if the merge status is less than zero. Therefore the check for "result < 0" is redundant and the result variable is not needed. The return value of real_merge() is ignored because exit status of "git merge-tree --stdin" is "0" for both successful and conflicted merges (the status of each merge is written to stdout). The return type of real_merge() is not changed as it is used for the program's exit status when "--stdin" is not given. Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk> Acked-by: Elijah Newren <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-02-18merge-tree --stdin: flush stdout to avoid deadlockPhillip Wood
If a process tries to read the output from "git merge-tree --stdin" before it closes merge-tree's stdin then it deadlocks. This happens because merge-tree does not flush its output before trying to read another line of input and means that it is not possible to cherry-pick a sequence of commits using "git merge-tree --stdin". Fix this by calling maybe_flush_or_die() before trying to read the next line of input. Flushing the output after each merge does not seem to affect the performance, any difference is lost in the noise even after increasing the number of runs. $ git rev-list --merges --parents -n100 origin/master | sed 's/^[^ ]* //' >/tmp/merges $ hyperfine -L flush 0,1 --warmup 1 --runs 30 \ 'GIT_FLUSH={flush} ./git merge-tree --stdin </tmp/merges' Benchmark 1: GIT_FLUSH=0 ./git merge-tree --stdin </tmp/merges Time (mean ± σ): 546.6 ms ± 11.7 ms [User: 503.2 ms, System: 40.9 ms] Range (min … max): 535.9 ms … 567.7 ms 30 runs Benchmark 2: GIT_FLUSH=1 ./git merge-tree --stdin </tmp/merges Time (mean ± σ): 546.9 ms ± 12.0 ms [User: 505.9 ms, System: 38.9 ms] Range (min … max): 529.8 ms … 570.0 ms 30 runs Summary 'GIT_FLUSH=0 ./git merge-tree --stdin </tmp/merges' ran 1.00 ± 0.03 times faster than 'GIT_FLUSH=1 ./git merge-tree --stdin </tmp/merges' Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk> Acked-by: Elijah Newren <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-02-18refspec: clarify function naming and documentationMeet Soni
Rename `match_name_with_pattern()` to `match_refname_with_pattern()` to better reflect its purpose and improve documentation comment clarity. The previous function name and parameter names were inconsistent, making it harder to understand their roles in refspec matching. - Rename parameters: - `key` -> `pattern` (globbing pattern to match) - `name` -> `refname` (refname to check) - `value` -> `replacement` (replacement mapping pattern) Signed-off-by: Meet Soni <meetsoni3017@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-02-18Makefile: set default goals in makefilesAdam Dinwoodie
Explicitly set the default goal at the very top of various makefiles. This is already present in some makefiles, but not all of them. In particular, this corrects a regression introduced in a38edab7c8 (Makefile: generate doc versions via GIT-VERSION-GEN, 2024-12-06). That commit added some config files as build targets for the Documentation directory, and put the target configuration in a sensible place. Unfortunately, that sensible place was above any other build target definitions, meaning the default goal changed to being those configuration files only, rather than the HTML and man page documentation. Signed-off-by: Adam Dinwoodie <adam@dinwoodie.org> Helped-by: Junio C Hamano <gitster@pobox.com> Acked-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-02-14The eleventh batchJunio C Hamano
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-02-14Merge branch 'ps/doc-http-upload-archive-service'Junio C Hamano
Doc update. * ps/doc-http-upload-archive-service: doc: documentation for http.uploadarchive config option
2025-02-14Merge branch 'kn/reflog-migration-fix-followup'Junio C Hamano
Code clean-up. * kn/reflog-migration-fix-followup: reftable: prevent 'update_index' changes after adding records refs: use 'uint64_t' for 'ref_update.index' refs: mark `ref_transaction_update_reflog()` as static
2025-02-14Merge branch 'bf/fetch-set-head-fix'Junio C Hamano
Fetching into a bare repository incorrectly assumed it always used a mirror layout when deciding to update remote-tracking HEAD, which has been corrected. * bf/fetch-set-head-fix: fetch set_head: fix non-mirror remotes in bare repositories fetch set_head: refactor to use remote directly
2025-02-14Merge branch 'op/worktree-is-main-bare-fix'Junio C Hamano
Going into a secondary worktree and asking "is the main worktree bare?" did not work correctly when per-worktree configuration option was in use, which has been corrected. * op/worktree-is-main-bare-fix: worktree: detect from secondary worktree if main worktree is bare
2025-02-14Merge branch 'tc/clone-single-revision'Junio C Hamano
"git clone" learned to make a shallow clone for a single commit that is not necessarily be at the tip of any branch. * tc/clone-single-revision: builtin/clone: teach git-clone(1) the --revision= option parse-options: introduce die_for_incompatible_opt2() clone: introduce struct clone_opts in builtin/clone.c clone: add tags refspec earlier to fetch refspec clone: refactor wanted_peer_refs() clone: make it possible to specify --tags clone: cut down on global variables in clone.c
2025-02-14Merge branch 'bc/doc-adoc-not-txt'Junio C Hamano
All the documentation .txt files have been renamed to .adoc to help content aware editors. * bc/doc-adoc-not-txt: Remove obsolete ".txt" extensions for AsciiDoc files doc: use .adoc extension for AsciiDoc files gitattributes: mark AsciiDoc files as LF-only editorconfig: add .adoc extension doc: update gitignore for .adoc extension
2025-02-13Makefile: remove accidental recipe prefix in conditionalTaylor Blau
Back in 728b9ac0c3 (Makefile(s): avoid recipe prefix in conditional statements, 2024-04-08), we prepared our Makefiles for a forthcoming change in upstream Make that would ban the recipe prefix within a conditional statement by replacing tabs (the prefix) with eight spaces. In b9d6f64393 (compat/zlib: allow use of zlib-ng as backend, 2025-01-28), a handful of recipe prefix characters were introduced in a conditional statement ('ifdef ZLIB_NG'), causing 'make' to fail on my system, which uses GNU Make 4.4.90. Remove the recipe prefix characters by replacing them with the same script as is mentioned in 728b9ac0c3. Signed-off-by: Taylor Blau <me@ttaylorr.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>