Commit Graph

15942 Commits

Author SHA1 Message Date
Junio C Hamano
6258f68c3c The 20th batch
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2024-09-23 10:35:09 -07:00
Junio C Hamano
57155e7b4a Git 2.46.2
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEE4fA2sf7nIh/HeOzvsLXohpav5ssFAmbxpngACgkQsLXohpav
 5stOWhAAz52CF7uFYUp9J10DcAQcnpp7lgWZoPqncL9le/Q3lbtNN3rzMOyZwPQt
 fv1KvVAPg2cy4VwFRgOPHbp6mifB0SdoyRQathap+pjq8Z+QZslkfcodNxo9a021
 +T6cs0C9sN8+8Z+LSakShecziYnGuKNzioVXz/UjMNQuA2kPnNoKI4FUfAEk6D0d
 tPoFx2Pprn2znCjJloXAbo9iYbHBWep6FbPdUBJoDJ6NLuUJUZgpFYfeFq+NyfT/
 ykPnbXF9XyVdUB4gYWfFadj1OeuoOPBN+6ISMDLJ5Vk7F9odRzcEaKYp4q+L1l1r
 3PB4SQLNBASGG7+pOUzT3ZvlqbrAeFB44Wcifge+fUYn9rMI6K0TkWVA5X1JmkU3
 wLJDzJC3XUpqjYVNjFnNiW4OGP8judxLEIt883U2WjfeGAs054Hj6rArLwW/YdcJ
 RA312kR23VcxY/vER6y/IseEVtSYqDB5oK3AOSepjeKxJH/0LQ9r2zcojWpRT4nS
 DoBXqT1t9HZ7DSl9w+zVPSeXylYCc9CkM8tVEQLcyLnZ6bUgJgpm0jcOV/CNLKit
 R5YpUei1xFqipNWE/lgDg3D1Gge6TQ/Q7xXUnPPJweY0CwNfgHhnMK+izkINjQX7
 lCApO/OG2/2AQ0hMglNVpIYlFbe6H8DxsKTJgMCI3WrwHW5PTZI=
 =pUUQ
 -----END PGP SIGNATURE-----

Sync with Git 2.46.2
2024-09-23 10:34:39 -07:00
Junio C Hamano
4f71522dfb Git 2.46.2
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2024-09-23 10:33:01 -07:00
Junio C Hamano
52c1a7322f Merge branch 'jc/doc-skip-fetch-all-and-prefetch' into maint-2.46
Doc updates.

* jc/doc-skip-fetch-all-and-prefetch:
  doc: remote.*.skip{DefaultUpdate,FetchAll} stops prefetch
2024-09-23 10:33:00 -07:00
Junio C Hamano
94b60adee3 The 19th batch
Merge the topics that have been cooking since 2024-09-13 or so in
'next'.

Let's try a new workflow to update the maintenance track by removing
the "merge ... later to maint" comments from the draft release notes
on the 'master' track.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2024-09-20 11:16:33 -07:00
Junio C Hamano
6531f31ef3 The eighteenth batch
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2024-09-18 18:02:06 -07:00
Junio C Hamano
5d55832f5c Merge branch 'ps/clar-unit-test'
Import clar unit tests framework libgit2 folks invented for our
use.

* ps/clar-unit-test:
  Makefile: rename clar-related variables to avoid confusion
  clar: add CMake support
  t/unit-tests: convert ctype tests to use clar
  t/unit-tests: convert strvec tests to use clar
  t/unit-tests: implement test driver
  Makefile: wire up the clar unit testing framework
  Makefile: do not use sparse on third-party sources
  Makefile: make hdr-check depend on generated headers
  Makefile: fix sparse dependency on GENERATED_H
  clar: stop including `shellapi.h` unnecessarily
  clar(win32): avoid compile error due to unused `fs_copy()`
  clar: avoid compile error with mingw-w64
  t/clar: fix compatibility with NonStop
  t: import the clar unit testing framework
  t: do not pass GIT_TEST_OPTS to unit tests with prove
2024-09-18 18:02:05 -07:00
Junio C Hamano
3fb745257b ci updates
This batch is solely to unbreak the 32-bit CI jobs that can no
longer work with Ubuntu xenial image that is too ancient.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2024-09-16 15:31:39 -07:00
Junio C Hamano
60a3dbb452 Sync with 'maint' 2024-09-16 15:27:46 -07:00
Junio C Hamano
e29e5cf288 Start preparing for Git 2.46.2
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2024-09-16 15:19:05 -07:00
Junio C Hamano
3969d78396 The seventeenth batch
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2024-09-16 14:22:55 -07:00
Junio C Hamano
6e2a18cb04 Merge branch 'ah/apply-3way-ours'
"git apply --3way" learned to take "--ours" and other options.

* ah/apply-3way-ours:
  apply: support --ours, --theirs, and --union for three-way merges
2024-09-16 14:22:54 -07:00
Junio C Hamano
ed155187b4 Sync with Git 2.46.1 2024-09-13 15:31:57 -07:00
Junio C Hamano
9cf95c0ca0 The sixteenth batch
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2024-09-13 15:27:45 -07:00
Junio C Hamano
da1c402a47 Merge branch 'jc/doc-skip-fetch-all-and-prefetch'
Doc updates.

* jc/doc-skip-fetch-all-and-prefetch:
  doc: remote.*.skip{DefaultUpdate,FetchAll} stops prefetch
2024-09-13 15:27:43 -07:00
Junio C Hamano
19de221f36 Merge branch 'ds/doc-wholesale-disabling-advice-messages'
The environment GIT_ADVICE has been intentionally kept undocumented
to discourage its use by interactive users.  Add documentation to
help tool writers.

* ds/doc-wholesale-disabling-advice-messages:
  advice: recommend GIT_ADVICE=0 for tools
2024-09-13 15:27:43 -07:00
Junio C Hamano
0299251319 Merge branch 'ds/scalar-no-tags'
The "scalar clone" command learned the "--no-tags" option.

* ds/scalar-no-tags:
  scalar: add --no-tags option to 'scalar clone'
2024-09-13 15:27:42 -07:00
Junio C Hamano
a731929aa8 Git 2.46.1
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2024-09-13 15:26:52 -07:00
Junio C Hamano
8b4bb65a8f Merge branch 'jc/config-doc-update' into maint-2.46
Docfix.

* jc/config-doc-update:
  git-config.1: fix description of --regexp in synopsis
  git-config.1: --get-all description update
2024-09-13 15:26:52 -07:00
Junio C Hamano
d3d7c8dfb8 Merge branch 'aa/cat-file-batch-output-doc' into maint-2.46
Docfix.

* aa/cat-file-batch-output-doc:
  docs: explain the order of output in the batched mode of git-cat-file(1)
2024-09-13 15:26:52 -07:00
Junio C Hamano
118c74d143 Merge branch 'cl/config-regexp-docfix' into maint-2.46
Docfix.

* cl/config-regexp-docfix:
  doc: replace 3 dash with correct 2 dash in git-config(1)
2024-09-13 15:26:51 -07:00
Junio C Hamano
bb57f055ae Merge branch 'jc/coding-style-c-operator-with-spaces' into maint-2.46
Write down whitespacing rules around C opeators.

* jc/coding-style-c-operator-with-spaces:
  CodingGuidelines: spaces around C operators
2024-09-13 15:26:51 -07:00
Junio C Hamano
57974d46a4 Sync with 'maint' 2024-09-12 11:48:46 -07:00
Junio C Hamano
f8ca6d0064 The fifteenth batch
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2024-09-12 11:47:24 -07:00
Junio C Hamano
6074a7d4ae Another batch of topics for 2.46.1
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2024-09-12 11:09:46 -07:00
Junio C Hamano
d2b936f1dc Merge branch 'jc/grammo-fixes' into maint-2.46
Doc updates.

* jc/grammo-fixes:
  doc: grammofix in git-diff-tree
  tutorial: grammofix
2024-09-12 11:02:19 -07:00
Junio C Hamano
9e2cb073ec Merge branch 'jc/how-to-maintain-updates' into maint-2.46
Doc updates.

* jc/how-to-maintain-updates:
  howto-maintain: mention preformatted docs
2024-09-12 11:02:17 -07:00
Junio C Hamano
c5ee8f2d1c The fourteenth batch
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2024-09-10 13:16:43 -07:00
Junio C Hamano
48642ec7ab Merge branch 'ps/declare-pack-redundamt-dead'
"git pack-redundant" has been marked for removal in Git 3.0.

* ps/declare-pack-redundamt-dead:
  Documentation/BreakingChanges: announce removal of git-pack-redundant(1)
2024-09-10 13:16:43 -07:00
Alex Henrie
57f583c748 apply: support --ours, --theirs, and --union for three-way merges
--ours, --theirs, and --union are already supported in `git merge-file`
for automatically resolving conflicts in favor of one version or the
other, instead of leaving conflict markers in the file. Support them in
`git apply -3` as well because the two commands do the same kind of
file-level merges.

In case in the future --ours, --theirs, and --union gain a meaning
outside of three-way-merges, they do not imply --3way but rather must be
specified alongside it.

Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2024-09-09 10:07:24 -07:00
Junio C Hamano
9a36ea37ae doc: remote.*.skip{DefaultUpdate,FetchAll} stops prefetch
Back when 7cc91a2f (Add the configuration option skipFetchAll,
2009-11-09) added for the sole purpose of adding skipFetchAll as a
synonym to skipDefaultUpdate, there was no explanation about the
reason why it was needed., but these two configuration variables
mean exactly the same thing.

Also, when we taught the "prefetch" task to "git maintenance" later,
we did make it pay attention to the setting, but we forgot to
document it.

Document these variables as synonyms that collectively implements
the last-one-wins semantics, and also clarify that the prefetch task
is also controlled by this variable.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2024-09-09 10:06:13 -07:00
Derrick Stolee
fb2b9815a4 advice: recommend GIT_ADVICE=0 for tools
The GIT_ADVICE environment variable was added implicitly in b79deeb554
(advice: add --no-advice global option, 2024-05-03) but was not
documented. Add documentation to show that it is an option for tools
that want to disable these messages. Make note that while the
--no-advice option exists, older Git versions will fail to parse that
option. The environment variable presents a way to change the behavior
of Git versions that understand it without disrupting older versions.

Co-authored-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Derrick Stolee <stolee@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2024-09-06 14:15:16 -07:00
Derrick Stolee
ce31b82ca9 scalar: add --no-tags option to 'scalar clone'
Some large repositories use tags to track a huge list of release
versions. While this choice is costly on the ref advertisement, it is
further wasteful for clients who do not need those tags. Allow clients
to optionally skip the tag advertisement.

This behavior is similar to that of 'git clone --no-tags' implemented in
0dab2468ee (clone: add a --no-tags option to clone without tags,
2017-04-26), including the modification of the remote.origin.tagOpt
config value to include "--no-tags".

One thing that is opposite of the 'git clone' implementation is that
this allows '--tags' as an assumed option, which can be naturally negated
with '--no-tags'. The clone command does not accept '--tags' but allows
"--no-no-tags" as the negation of its '--no-tags' option.

While testing this option, combine the test with the previously untested
'--no-src' option introduced in 4527db8ff8 (scalar: add --[no-]src
option, 2023-08-28).

Signed-off-by: Derrick Stolee <stolee@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2024-09-06 14:13:48 -07:00
Junio C Hamano
4c42d5ff28 The thirteenth batch
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2024-09-06 10:38:52 -07:00
Junio C Hamano
4476304a06 Merge branch 'jc/maybe-unused'
Developer doc updates.

* jc/maybe-unused:
  CodingGuidelines: also mention MAYBE_UNUSED
2024-09-06 10:38:50 -07:00
Junio C Hamano
5ecd5fa58b Merge branch 'jk/unused-parameters'
Make our codebase compilable with the -Werror=unused-parameter
option.

* jk/unused-parameters:
  CodingGuidelines: mention -Wunused-parameter and UNUSED
  config.mak.dev: enable -Wunused-parameter by default
  compat: mark unused parameters in win32/mingw functions
  compat: disable -Wunused-parameter in win32/headless.c
  compat: disable -Wunused-parameter in 3rd-party code
  t-reftable-readwrite: mark unused parameter in callback function
  gc: mark unused config parameter in virtual functions
2024-09-06 10:38:50 -07:00
Junio C Hamano
6dcb2db0fa Merge branch 'jk/send-email-mailmap'
"git send-email" learned "--mailmap" option to allow rewriting the
recipient addresses.

* jk/send-email-mailmap:
  send-email: add mailmap support via sendemail.mailmap and --mailmap
  check-mailmap: add options for additional mailmap sources
  check-mailmap: accept "user@host" contacts
2024-09-06 10:38:49 -07:00
Patrick Steinhardt
9b7caa2809 t: import the clar unit testing framework
Our unit testing framework is a homegrown solution. While it supports
most of our needs, it is likely that the volume of unit tests will grow
quite a bit in the future such that we can exercise low-level subsystems
directly. This surfaces several shortcomings that the current solution
has:

  - There is no way to run only one specific tests. While some of our
    unit tests wire this up manually, others don't. In general, it
    requires quite a bit of boilerplate to get this set up correctly.

  - Failures do not cause a test to stop execution directly. Instead,
    the test author needs to return manually whenever an assertion
    fails. This is rather verbose and is not done correctly in most of
    our unit tests.

  - Wiring up a new testcase requires both implementing the test
    function and calling it in the respective test suite's main
    function, which is creating code duplication.

We can of course fix all of these issues ourselves, but that feels
rather pointless when there are already so many unit testing frameworks
out there that have those features.

We line out some requirements for any unit testing framework in
"Documentation/technical/unit-tests.txt". The "clar" unit testing
framework, which isn't listed in that table yet, ticks many of the
boxes:

  - It is licensed under ISC, which is compatible.

  - It is easily vendorable because it is rather tiny at around 1200
    lines of code.

  - It is easily hackable due to the same reason.

  - It has TAP support.

  - It has skippable tests.

  - It preprocesses test files in order to extract test functions, which
    then get wired up automatically.

While it's not perfect, the fact that clar originates from the libgit2
project means that it should be rather easy for us to collaborate with
upstream to plug any gaps.

Import the clar unit testing framework at commit 1516124 (Merge pull
request #97 from pks-t/pks-whitespace-fixes, 2024-08-15). The framework
will be wired up in subsequent commits.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2024-09-04 08:41:36 -07:00
Patrick Steinhardt
53a92c9552 Documentation/BreakingChanges: announce removal of git-pack-redundant(1)
The git-pack-redundant(1) command is already in the process of being
phased out and dies unless the user passes the `--i-still-use-this` flag
since 4406522b76 (pack-redundant: escalate deprecation warning to an
error, 2023-03-23). We haven't heard any complaints, so let's announce
the removal of this command in Git 3.0 in our breaking changes document.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2024-09-03 11:05:22 -07:00
Junio C Hamano
2e7b89e038 The twelfth batch
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2024-09-03 09:15:04 -07:00
Junio C Hamano
bd3abe0417 Merge branch 'jc/config-doc-update'
Docfix.

* jc/config-doc-update:
  git-config.1: fix description of --regexp in synopsis
  git-config.1: --get-all description update
2024-09-03 09:15:04 -07:00
Junio C Hamano
dd903659cd Merge branch 'js/fetch-push-trace2-annotation'
More trace2 events at key points on push and fetch code paths have
been added.

* js/fetch-push-trace2-annotation:
  send-pack: add new tracing regions for push
  fetch: add top-level trace2 regions
  trace2: implement trace2_printf() for event target
2024-09-03 09:15:02 -07:00
Junio C Hamano
533e30819a Merge branch 'aa/cat-file-batch-output-doc'
Docfix.

* aa/cat-file-batch-output-doc:
  docs: explain the order of output in the batched mode of git-cat-file(1)
2024-09-03 09:15:01 -07:00
Junio C Hamano
f123c19e72 Merge branch 'cl/config-regexp-docfix'
Docfix.

* cl/config-regexp-docfix:
  doc: replace 3 dash with correct 2 dash in git-config(1)
2024-09-03 09:14:59 -07:00
Junio C Hamano
a051ca5e65 CodingGuidelines: also mention MAYBE_UNUSED
A function that uses a parameter in one build may lose all uses of
the parameter in another build, depending on the configuration.  A
workaround for such a case, MAYBE_UNUSED, should also be mentioned
when we recommend the use of UNUSED to our developers.

Keep the addition to the guideline short and document the criteria
to choose between UNUSED and MAYBE_UNUSED near their definition.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2024-08-29 11:28:07 -07:00
Junio C Hamano
c3b92d4037 Merge branch 'jk/unused-parameters' into jc/maybe-unused
* jk/unused-parameters:
  CodingGuidelines: mention -Wunused-parameter and UNUSED
  config.mak.dev: enable -Wunused-parameter by default
  compat: mark unused parameters in win32/mingw functions
  compat: disable -Wunused-parameter in win32/headless.c
  compat: disable -Wunused-parameter in 3rd-party code
  t-reftable-readwrite: mark unused parameter in callback function
  gc: mark unused config parameter in virtual functions
2024-08-29 11:09:20 -07:00
Junio C Hamano
4590f2e941 The eleventh batch
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2024-08-29 11:08:17 -07:00
Junio C Hamano
17d4b10aea The tenth batch
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2024-08-28 10:31:28 -07:00
Jeff King
a61bc8879e CodingGuidelines: mention -Wunused-parameter and UNUSED
Now that -Wunused-parameter is on by default for DEVELOPER=1 builds,
people may trigger it, blocking their build. When it's a mistake for the
parameter to exist, the path forward is obvious: remove it. But
sometimes you need to suppress the warning, and the "UNUSED" mechanism
for that is specific to our project, so people may not know about it.

Let's put some advice in CodingGuidelines, including an example warning
message. That should help people who grep for the warning text after
seeing it from the compiler.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2024-08-28 09:51:25 -07:00
Jacob Keller
f54ca6ae72 check-mailmap: add options for additional mailmap sources
The git check-mailmap command reads the mailmap from either the default
.mailmap location and then from the mailmap.blob and mailmap.file
configurations.

A following change to git send-email will want to support new
configuration options based on the configured identity. The
identity-based configuration and options only make sense in the context
of git send-email.

Expose the read_mailmap_file and read_mailmap_blob functions from
mailmap.c.  Teach git check-mailmap the --mailmap-file and
--mailmap-blob options which load the additional mailmap sources.

Signed-off-by: Jacob Keller <jacob.keller@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2024-08-27 14:51:29 -07:00