Commit graph

72354 commits

Author SHA1 Message Date
Junio C Hamano 45072eefef Merge branch 'jc/am-whitespace-doc'
"git am --help" now tells readers what actions are available in
"git am --whitespace=<action>", in addition to saying that the
option is passed through to the underlying "git apply".

* jc/am-whitespace-doc:
  doc: add shortcut to "am --whitespace=<action>"
2024-02-27 16:04:31 -08:00
Junio C Hamano a2082dbdd3 Start the 2.45 cycle
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2024-02-26 18:10:25 -08:00
Junio C Hamano 7ece6ad823 Merge branch 'ps/ref-tests-update-even-more'
More tests that are marked as "ref-files only" have been updated to
improve test coverage of reftable backend.

* ps/ref-tests-update-even-more:
  t7003: ensure filter-branch prunes reflogs with the reftable backend
  t2011: exercise D/F conflicts with HEAD with the reftable backend
  t1405: remove unneeded cleanup step
  t1404: make D/F conflict tests compatible with reftable backend
  t1400: exercise reflog with gaps with reftable backend
  t0410: convert tests to use DEFAULT_REPO_FORMAT prereq
  t: move tests exercising the "files" backend
2024-02-26 18:10:25 -08:00
Junio C Hamano 65462776c2 Merge branch 'gt/at-is-synonym-for-head-in-add-patch'
Teach "git checkout -p" and friends that "@" is a synonym for
"HEAD".

* gt/at-is-synonym-for-head-in-add-patch:
  add -p tests: remove PERL prerequisites
  add-patch: classify '@' as a synonym for 'HEAD'
2024-02-26 18:10:25 -08:00
Junio C Hamano cf258a9e4e Merge branch 'kh/column-reject-negative-padding'
"git column" has been taught to reject negative padding value, as
it would lead to nonsense behaviour including division by zero.

* kh/column-reject-negative-padding:
  column: guard against negative padding
  column: disallow negative padding
2024-02-26 18:10:25 -08:00
Junio C Hamano 225f892685 Merge branch 'jc/t9210-lazy-fix'
Adjust use of "rev-list --missing" in an existing tests so that it
does not depend on a buggy failure mode.

* jc/t9210-lazy-fix:
  t9210: do not rely on lazy fetching to fail
2024-02-26 18:10:24 -08:00
Junio C Hamano 9f67cbd0a7 Merge branch 'ps/reftable-iteration-perf'
The code to iterate over refs with the reftable backend has seen
some optimization.

* ps/reftable-iteration-perf:
  reftable/reader: add comments to `table_iter_next()`
  reftable/record: don't try to reallocate ref record name
  reftable/block: swap buffers instead of copying
  reftable/pq: allocation-less comparison of entry keys
  reftable/merged: skip comparison for records of the same subiter
  reftable/merged: allocation-less dropping of shadowed records
  reftable/record: introduce function to compare records by key
2024-02-26 18:10:24 -08:00
Junio C Hamano 274400998b Merge branch 'rs/use-xstrncmpz'
Code clean-up.

* rs/use-xstrncmpz:
  use xstrncmpz()
2024-02-26 18:10:24 -08:00
Junio C Hamano cf47fb7ec7 Merge branch 'cp/apply-core-filemode'
"git apply" on a filesystem without filemode support have learned
to take a hint from what is in the index for the path, even when
not working with the "--index" or "--cached" option, when checking
the executable bit match what is required by the preimage in the
patch.

* cp/apply-core-filemode:
  apply: code simplification
  apply: correctly reverse patch's pre- and post-image mode bits
  apply: ignore working tree filemode when !core.filemode
2024-02-26 18:10:24 -08:00
Junio C Hamano b4385bf016 Merge branch 'ps/reftable-backend'
Integrate the reftable code into the refs framework as a backend.

* ps/reftable-backend:
  refs/reftable: fix leak when copying reflog fails
  ci: add jobs to test with the reftable backend
  refs: introduce reftable backend
2024-02-26 18:10:23 -08:00
Junio C Hamano 3c2a3fdc38 Git 2.43.3
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEE4fA2sf7nIh/HeOzvsLXohpav5ssFAmXX4zkACgkQsLXohpav
 5ssYqRAAkVcMK1RgXJaa7CRp0LuCpBVyzzn6oAxhLwDlG0y20WfbaVc9TLQP5SGl
 nxAlGUMFTNdIcNES0gV0H+w1N/4j+WzjujGpssPHNl6/drRMFjUZRosQIczwJpP/
 bxViF4QV3Tdl9xUPpn9gdt9GDez0HAhDBc48Vc/EYMakWq30KFcviHesiEIRmgaw
 IvSbmRNDBHm7wQ6DY70lug/THNDDVWdYYPirzJ+Q9N14JS8ARxEKOom2oQ4ycoG+
 E9I88R4aP2Ohb8+kZoLrejFuMn0xPotO8LyrdQhfleJjQIjIFi50v1PYcAoL+2qf
 GXE7jY7KnN6Ebm2HY1dJSeK2aU1bgSIYdEmoqGcthE9ifwA+pjjPIRbO6ZnhAQ4p
 v2lIclXrSMbxI7YxhXIu9GujR3CpCfjk999s3hNPR41r3uvrl/2oBCryHurLqbDl
 WNCxjZxTt8nLNAjKU04W5OswDREJHZENuTHziBJoN4gSxHCskqjnSYXbLLJNvUzh
 I25fI52ZTGPx+cASC9lSslyocmDU+MubQi6v8+wzKO2yPQZw+nPuodA3f+KWg2Du
 gwSvwVwdyZxJy9Gq2RUExWl09GZHYq5snUNe1nqOAHbepNr6QWB6I6BRPv9pDCMU
 uNR6P7U2IKRqXYfUuFeW6QxhdqibnNA3Qc6Wr4Y7yyM1Au9SpGg=
 =c/2C
 -----END PGP SIGNATURE-----

Git 2.44

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2024-02-22 16:14:53 -08:00
Junio C Hamano 0d464a4e6a Git 2.43.3
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2024-02-22 16:13:38 -08:00
Junio C Hamano 5dc7366297 Merge branch 'la/trailer-cleanups' into maint-2.43
* la/trailer-cleanups:
  trailer: fix comment/cut-line regression with opts->no_divider
2024-02-22 16:09:45 -08:00
Junio C Hamano f41f85c9ec Git 2.44-rc2
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2024-02-19 21:01:01 -08:00
Junio C Hamano 58aa645fc0 Merge branch 'la/trailer-cleanups'
Fix to an already-graduated topic.

* la/trailer-cleanups:
  trailer: fix comment/cut-line regression with opts->no_divider
2024-02-19 20:58:06 -08:00
Jeff King bc47139f4f trailer: fix comment/cut-line regression with opts->no_divider
Commit 97e9d0b78a (trailer: find the end of the log message, 2023-10-20)
combined two code paths for finding the end of the log message. For the
"no_divider" case, we used to use find_trailer_end(), and that has now
been rolled into find_end_of_log_message(). But there's a regression;
that function returns early when no_divider is set, returning the whole
string.

That's not how find_trailer_end() behaved. Although it did skip the
"---" processing (which is what "no_divider" is meant to do), we should
still respect ignored_log_message_bytes(), which covers things like
comments, "commit -v" cut lines, and so on.

The bug is actually in the interpret-trailers command, but the obvious
way to experience it is by running "commit -v" with a "--trailer"
option. The new trailer will be added at the end of the verbose diff,
rather than before it (and consequently will be ignored entirely, since
everything after the diff's intro scissors line is thrown away).

I've added two tests here: one for interpret-trailers directly, which
shows the bug via the parsing routines, and one for "commit -v".

The fix itself is pretty simple: instead of returning early, no_divider
just skips the "---" handling but still calls ignored_log_message_bytes().

Reported-by: Philippe Blain <levraiphilippeblain@gmail.com>
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2024-02-19 19:06:18 -08:00
Junio C Hamano 96c8a0712e l10n-2.44.0-rnd3
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEE37vMEzKDqYvVxs51k24VDd1FMtUFAmXSpeoACgkQk24VDd1F
 MtX7RA/9HXk19TQPI/8YHL2Z29Yax2yPcgy+kq/UzXJ3YbNAsEBZyLwqfkv1bi6h
 S67Ggc0tmQdE0BDDAwG54+kzCUnRh6WFzHXyU0Mazena+7kxRuyCdmKNj9a9W7Jn
 2NLiS37a8KB83nlUn7coIrbFfs7P80J50Ax6oJFSPTEqZM8unNw/QEitufodaju2
 XdAbO8wofZZDn+i+HiCQnUT3loV8XxJdCk/ZM7RMtLRLzxKx78GsazLjkbYG1ci1
 4yAw3A6M+w1AvppplToZiH4JYvpMg7Box4tow0EKcYL5yOMk9tx2kVAbc26Mpm4Q
 IrADtuilhyHr8UI/VrD1frkNW+BByaE3WAJ2IgSzFmOv2eqe2aVtvkmga0DG1zyl
 P0ZGAKjfH0cSpEvuG16XGHYQjqp/ulWDedx9bdFJg2iFnjHj7F2DEubm08tUW7OG
 cNs6uYGTyfq9VLtvc4qIHFQNtMrUtnYETNK1Sn++11CYWoYpFzdUk75oEB8SkxYq
 JPn9xFbhzz5K9vKE1jAp1XIYLaKwD1up71VPCL6bhHyOwvgJ1RcWtbK+h58xqGAw
 n+w5epstdOGeKkmtrpYC1R6Y/ejckdk++/K8ml5owFeQ7u1l1zNsonpf9qtjnBLI
 utf3YmfkfBd767kAqfeqdcjV9+hLgpaegl8ElWChRLOushfhj18=
 =ZD+B
 -----END PGP SIGNATURE-----

Merge tag 'l10n-2.44.0-rnd3' of https://github.com/git-l10n/git-po

l10n-2.44.0-rnd3

* tag 'l10n-2.44.0-rnd3' of https://github.com/git-l10n/git-po:
  l10n: zh_TW: Git 2.44
  l10n: zh_CN: for git 2.44 rounds
  l10n: Update German translation
  l10n: tr: Update Turkish translations for 2.44
  l10n: fr.po: v2.44.0 round 3
  l10n: bg.po: Updated Bulgarian translation (5610t)
  l10n: sv.po: Update Swedish translation
  l10n: Update Catalan translation
  l10n: po-id for 2.44 (round 1)
  l10n: ci: disable cache for setup-go to suppress warnings
  l10n: ci: remove unused param for add-pr-comment@v2
  l10n: uk: v2.44 update (round 3)
  l10n: uk: v2.44 update (round 2)
  l10n: uk: v2.44 localization update
  l10n: bump Actions versions in l10n.yml
2024-02-19 08:35:40 -08:00
Yi-Jyun Pan 5fdd5b989c
l10n: zh_TW: Git 2.44
Co-Authored-By: lumynou5 <lumynou5.tw@gmail.com>
Signed-off-by: Yi-Jyun Pan <pan93412@gmail.com>
2024-02-18 21:03:43 +08:00
Jiang Xin 63e81f22a6 Merge branch 'master' of github.com:ralfth/git
* 'master' of github.com:ralfth/git:
  l10n: Update German translation
2024-02-18 20:33:01 +08:00
Jiang Xin 9c4289b3db Merge branch 'po-id' of github.com:bagasme/git-po
* 'po-id' of github.com:bagasme/git-po:
  l10n: po-id for 2.44 (round 1)
2024-02-18 20:31:55 +08:00
Jiang Xin 3a00233815 Merge branch '2.44-uk-update' of github.com:arkid15r/git-ukrainian-l10n
* '2.44-uk-update' of github.com:arkid15r/git-ukrainian-l10n:
  l10n: uk: v2.44 update (round 3)
  l10n: uk: v2.44 update (round 2)
  l10n: uk: v2.44 localization update
2024-02-18 20:30:05 +08:00
Jiang Xin ce2f6a001f Merge branch 'master' of github.com:alshopov/git-po
* 'master' of github.com:alshopov/git-po:
  l10n: bg.po: Updated Bulgarian translation (5610t)
2024-02-18 20:28:57 +08:00
Jiang Xin 499f952da0 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.44
2024-02-18 20:27:47 +08:00
Jiang Xin 45ebe3fcf6 Merge branch 'fr_2.44.0' of github.com:jnavila/git
* 'fr_2.44.0' of github.com:jnavila/git:
  l10n: fr.po: v2.44.0 round 3
2024-02-18 20:26:45 +08:00
Jiang Xin 61ad0f6484 Merge branch 'catalan-l10n' of github.com:Softcatala/git-po
* 'catalan-l10n' of github.com:Softcatala/git-po:
  l10n: Update Catalan translation
2024-02-18 20:25:32 +08:00
Jiang Xin 362f27f8a8 Merge branch 'master' of github.com:nafmo/git-l10n-sv
* 'master' of github.com:nafmo/git-l10n-sv:
  l10n: sv.po: Update Swedish translation
2024-02-18 20:24:48 +08:00
Teng Long 3c58354a53 l10n: zh_CN: for git 2.44 rounds
In addition to the localized translation in 2.44, for zh_CN, we have
uniformly modified the translation of the word "commit-graph" to make it
more consistent with language usage habits.

Signed-off-by: Teng Long <dyroneteng@gmail.com>
2024-02-18 11:48:52 +08:00
Todd Zullinger d44a018852 RelNotes: minor typo fixes in 2.44.0 draft
Signed-off-by: Todd Zullinger <tmz@pobox.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2024-02-17 10:11:55 -08:00
Ralf Thielow 37c2ad6535 l10n: Update German translation
Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com>
2024-02-17 18:14:54 +01:00
Emir SARI b927408183 l10n: tr: Update Turkish translations for 2.44
Signed-off-by: Emir SARI <emir_sari@icloud.com>
2024-02-16 22:06:18 +03:00
Jean-Noël Avila 2675562081 l10n: fr.po: v2.44.0 round 3
Signed-off-by: Jean-Noël Avila <jn.avila@free.fr>
2024-02-16 19:20:07 +01:00
Alexander Shopov 330e4198b8 l10n: bg.po: Updated Bulgarian translation (5610t)
Signed-off-by: Alexander Shopov <ash@kambanaria.org>
2024-02-16 09:39:04 +01:00
Peter Krefting 20657a8b43 l10n: sv.po: Update Swedish translation
Signed-off-by: Peter Krefting <peter@softwolves.pp.se>
2024-02-16 07:59:21 +01:00
Jordi Mas 6f5e31bec7 l10n: Update Catalan translation
Signed-off-by: Jordi Mas <jmas@softcatala.org>
2024-02-16 07:18:20 +01:00
Bagas Sanjaya c293cf8c47 l10n: po-id for 2.44 (round 1)
Update following components:

  * builtin/replay.c
  * command-list.h
  * commit-graph.c
  * pack-bitmap.c
  * sequencer.c

Signed-off-by: Bagas Sanjaya <bagasdotme@gmail.com>
2024-02-16 11:01:11 +07:00
Jiang Xin 1bb7fcbffc l10n: ci: disable cache for setup-go to suppress warnings
After we upgraded actions/setup-go to v5, the following warning message
was reported every time we ran the CI.

    Restore cache failed: Dependencies file is not found ...

Disable cache to suppress warning messages as described in the solution
below.

    https://github.com/actions/setup-go/issues/427

Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
2024-02-16 11:51:19 +08:00
Jiang Xin 4d733f09f0 l10n: ci: remove unused param for add-pr-comment@v2
When we upgraded GitHub Actions "mshick/add-pr-comment" to v2, the
following warning message was reported every time we ran the CI.

    Unexpected input(s) 'repo-token-user-login', valid inputs ...

Removed the obsolete parameter "repo-token-user-login" to suppress
warning messages.

Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
2024-02-16 11:40:58 +08:00
Arkadii Yakovets a2e183e065
l10n: uk: v2.44 update (round 3)
Signed-off-by: Arkadii Yakovets <ark@cho.red>
2024-02-15 18:05:05 -08:00
Arkadii Yakovets 6ad5961c91
l10n: uk: v2.44 update (round 2)
Signed-off-by: Arkadii Yakovets <ark@cho.red>
2024-02-15 18:02:14 -08:00
Arkadii Yakovets ed8e89ec8c
l10n: uk: v2.44 localization update
Co-authored-by: Kate Golovanova <kate@kgthreads.com>
Signed-off-by: Arkadii Yakovets <ark@cho.red>
Signed-off-by: Kate Golovanova <kate@kgthreads.com>
2024-02-15 18:02:13 -08:00
Jiang Xin c68ee9b9cc Merge branch 'master' of github.com:git/git
* 'master' of github.com:git/git:
  diff: mark param1 and param2 as placeholders
2024-02-16 09:39:06 +08:00
Junio C Hamano 3e0d3cd5c7 Merge branch 'jx/dirstat-parseopt-help'
The mark-up of diff options has been updated to help translators.

* jx/dirstat-parseopt-help:
  diff: mark param1 and param2 as placeholders
2024-02-15 15:14:48 -08:00
Patrick Steinhardt 5918f30b65 t7003: ensure filter-branch prunes reflogs with the reftable backend
In t7003 we conditionally check whether the reflog for branches pruned
by git-filter-branch(1) get deleted based on whether or not we use the
"files" backend. Same as with the preceding commit, this condition was
added because in its initial iteration the "reftable" backend did not
delete reflogs when their corresponding ref was deleted. Since then, the
backend has been aligned to behave the same as the "files" backend
though, which makes this check unnecessary.

Remove it.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2024-02-15 10:12:31 -08:00
Patrick Steinhardt f85a032c67 t2011: exercise D/F conflicts with HEAD with the reftable backend
Some of the tests in t2011 exercise whether it is possible to move away
from a symbolic HEAD ref whose target ref has a directory-file conflict
with another, preexisting ref. These tests don't use git-symbolic-ref(1)
but manually write HEAD. This is supposedly done to avoid using logic
that we're about to exercise, but it makes it impossible to verify
whether the logic also works for ref backends other than "files".

Refactor the code to use git-symbolic-ref(1) instead so that the tests
work with the "reftable" backend, as well. We already have lots of tests
in t1404 that ensure that both git-update-ref(1) and git-symbolic-ref(1)
work in such a scenario, so it should be safe to rely on it here.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2024-02-15 10:12:30 -08:00
Patrick Steinhardt c4e3af6d97 t1405: remove unneeded cleanup step
In 5e00514745 (t1405: explictly delete reflogs for reftable, 2022-01-31)
we have added a test that explicitly deletes the reflog when not using
the "files" backend. This was required because back then, the "reftable"
backend didn't yet delete reflogs when deleting their corresponding
branches, and thus subsequent tests would fail because some unexpected
reflogs still exist.

The "reftable" backend was eventually changed though so that it behaves
the same as the "files" backend and deletes reflogs when deleting refs.
This was done to make the "reftable" backend behave like the "files"
backend as closely as possible so that it can act as a drop-in
replacement.

The cleanup-style test is thus not required anymore. Remove it.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2024-02-15 10:12:30 -08:00
Patrick Steinhardt 3f87bb2c2b t1404: make D/F conflict tests compatible with reftable backend
Some of the tests in t1404 exercise whether Git correctly aborts
transactions when there is a directory/file conflict with ref names.
While these tests are all marked to require the "files" backend, they do
in fact apply to the "reftable" backend as well.

This may not make much sense on the surface: D/F conflicts only exist
because the "files" backend uses the filesystem to store loose refs, and
thus the restriction theoretically shouldn't apply to the "reftable"
backend. But for now, the "reftable" backend artificially restricts the
creation of such conflicting refs so that it is a drop-in replacement
for the "files" backend. This also ensures that the "reftable" backend
can easily be used on the server side without causing issues for clients
which only know to use the "files" backend.

The only difference between the "files" and "reftable" backends is a
slightly different error message. Adapt the tests to accomodate for this
difference and remove the REFFILES prerequisite so that we start testing
with both backends.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2024-02-15 10:12:30 -08:00
Patrick Steinhardt 129a169874 t1400: exercise reflog with gaps with reftable backend
In t1400, we have a test that exercises whether we print a warning
message as expected when the reflog contains entries which have a gap
between the old entry's new object ID and the new entry's old object ID.
While the logic should apply to all ref backends, the test setup writes
into `.git/logs` directly and is thus "files"-backend specific.

Refactor the test to instead use `git reflog delete` to create the gap
and drop the REFFILES prerequisite.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2024-02-15 10:12:30 -08:00
Patrick Steinhardt e98839843b t0410: convert tests to use DEFAULT_REPO_FORMAT prereq
In t0410 we have two tests which exercise how partial clones behave in
the context of a repository with extensions. These tests are marked to
require a repository using SHA1 and the "files" backend because we
explicitly set the repository format version to 0, and setting up either
the "objectFormat" or "refStorage" extensions requires a repository
format version of 1.

We have recently introduced a new DEFAULT_REPO_FORMAT prerequisite.
Despite capturing the intent more directly, it also has the added
benefit that it can easily be extended in the future in case we add new
repository extensions. Adapt the tests to use it.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2024-02-15 10:12:30 -08:00
Patrick Steinhardt 161d981641 t: move tests exercising the "files" backend
We still have a bunch of tests scattered across our test suites that
exercise on-disk files of the "files" backend directly:

  - t1301 exercises permissions of reflog files when the config
    "core.sharedRepository" is set.

  - t1400 exercises whether empty directories in the ref store are
    handled correctly.

  - t3200 exercises what happens when there are symlinks in the ref
    store.

  - t3400 also exercises what happens when ".git/logs" is a symlink.

All of these are inherently low-level tests specific to the "files"
backend. Move them into "t0600-reffiles-backend.sh" to reflect this.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2024-02-15 10:12:30 -08:00
Jiang Xin f98643fcb2 Merge branch 'master' of github.com:git/git
* 'master' of github.com:git/git: (51 commits)
  Hopefully the last batch of fixes before 2.44 final
  Git 2.43.2
  A few more fixes before -rc1
  write-or-die: fix the polarity of GIT_FLUSH environment variable
  A few more topics before -rc1
  completion: add and use __git_compute_second_level_config_vars_for_section
  completion: add and use __git_compute_first_level_config_vars_for_section
  completion: complete 'submodule.*' config variables
  completion: add space after config variable names also in Bash 3
  receive-pack: use find_commit_header() in check_nonce()
  ci(linux32): add a note about Actions that must not be updated
  ci: bump remaining outdated Actions versions
  unit-tests: do show relative file paths on non-Windows, too
  receive-pack: use find_commit_header() in check_cert_push_options()
  prune: mark rebase autostash and orig-head as reachable
  sequencer: unset GIT_CHERRY_PICK_HELP for 'exec' commands
  ref-filter.c: sort formatted dates by byte value
  ssh signing: signal an error with a negative return value
  bisect: document command line arguments for "bisect start"
  bisect: document "terms" subcommand more fully
  ...
2024-02-15 09:48:25 +08:00