]> git.ipfire.org Git - thirdparty/git.git/log
thirdparty/git.git
13 months agogrep: work around UTF-8 related JIT bug in PCRE2 <= 10.34
Mathias Krause [Thu, 23 Mar 2023 17:25:39 +0000 (18:25 +0100)] 
grep: work around UTF-8 related JIT bug in PCRE2 <= 10.34

Stephane is reporting[1] a regression introduced in git v2.40.0 that leads
to 'git grep' segfaulting in his CI pipeline. It turns out, he's using an
older version of libpcre2 that triggers a wild pointer dereference in
the generated JIT code that was fixed in PCRE2 10.35.

Instead of completely disabling the JIT compiler for the buggy version,
just mask out the Unicode property handling as we used to do prior to
commit acabd2048ee0 ("grep: correctly identify utf-8 characters with
\{b,w} in -P").

[1] https://lore.kernel.org/git/7E83DAA1-F9A9-4151-8D07-D80EA6D59EEA@clumio.com/

Reported-by: Stephane Odul <stephane@clumio.com>
Signed-off-by: Mathias Krause <minipli@grsecurity.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 months agogrep: correctly identify utf-8 characters with \{b,w} in -P
Carlo Marcelo Arenas Belón [Sun, 8 Jan 2023 15:52:17 +0000 (07:52 -0800)] 
grep: correctly identify utf-8 characters with \{b,w} in -P

When UTF is enabled for a PCRE match, the corresponding flags are
added to the pcre2_compile() call, but PCRE2_UCP wasn't included.

This prevents extending the meaning of the character classes to
include those new valid characters and therefore result in failed
matches for expressions that rely on that extention, for ex:

  $ git grep -P '\bÆvar'

Add PCRE2_UCP so that \w will include Æ and therefore \b could
correctly match the beginning of that word.

This has an impact on performance that has been estimated to be
between 20% to 40% and that is shown through the added performance
test.

Signed-off-by: Carlo Marcelo Arenas Belón <carenas@gmail.com>
Acked-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
17 months agoGit 2.39 v2.39.0
Junio C Hamano [Mon, 12 Dec 2022 00:59:08 +0000 (09:59 +0900)] 
Git 2.39

Signed-off-by: Junio C Hamano <gitster@pobox.com>
17 months agoMerge tag 'l10n-2.39.0-rnd1' of https://github.com/git-l10n/git-po
Junio C Hamano [Mon, 12 Dec 2022 00:20:49 +0000 (09:20 +0900)] 
Merge tag 'l10n-2.39.0-rnd1' of https://github.com/git-l10n/git-po

l10n-2.39.0-rnd1

* tag 'l10n-2.39.0-rnd1' of https://github.com/git-l10n/git-po:
  l10n: zh_TW.po: Git 2.39-rc2
  l10n: tr: v2.39.0 updates
  l10n: Update Catalan translation
  l10n: bg.po: Updated Bulgarian translation (5501t)
  l10n: de.po: update German translation
  l10n: zh_CN v2.39.0 round 1
  l10n: fr: v2.39 rnd 1
  l10n: po-id for 2.39 (round 1)
  l10n: sv.po: Update Swedish translation (5501t0f0)

17 months agoSync with Git 2.38.2
Junio C Hamano [Sun, 11 Dec 2022 00:34:51 +0000 (09:34 +0900)] 
Sync with Git 2.38.2

17 months agoGit 2.38.2 v2.38.2
Junio C Hamano [Sun, 11 Dec 2022 00:32:48 +0000 (09:32 +0900)] 
Git 2.38.2

Signed-off-by: Junio C Hamano <gitster@pobox.com>
17 months agol10n: zh_TW.po: Git 2.39-rc2
pan93412 [Sat, 10 Dec 2022 17:16:20 +0000 (01:16 +0800)] 
l10n: zh_TW.po: Git 2.39-rc2

Signed-off-by: pan93412 <pan93412@gmail.com>
17 months agoci: use a newer `github-script` version
Johannes Schindelin [Tue, 8 Nov 2022 10:13:28 +0000 (10:13 +0000)] 
ci: use a newer `github-script` version

The old version we currently use runs in node.js v12.x, which is being
deprecated in GitHub Actions. The new version uses node.js v16.x.

Incidentally, this also avoids the warning about the deprecated
`::set-output::` workflow command because the newer version of the
`github-script` Action uses the recommended new way to specify outputs.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Taylor Blau <me@ttaylorr.com>
17 months agoMerge branch 'jx/ci-ubuntu-fix' into maint-2.38
Junio C Hamano [Sat, 10 Dec 2022 07:17:47 +0000 (16:17 +0900)] 
Merge branch 'jx/ci-ubuntu-fix' into maint-2.38

Adjust the GitHub CI to newer ubuntu release.

* jx/ci-ubuntu-fix:
  ci: install python on ubuntu
  ci: use the same version of p4 on both Linux and macOS
  ci: remove the pipe after "p4 -V" to catch errors
  github-actions: run gcc-8 on ubuntu-20.04 image

17 months agoSync with 'maint'
Junio C Hamano [Sat, 10 Dec 2022 05:02:22 +0000 (14:02 +0900)] 
Sync with 'maint'

17 months agoMerge branch 'js/ci-use-newer-up-down-artifact' into maint-2.38
Junio C Hamano [Sat, 10 Dec 2022 05:02:09 +0000 (14:02 +0900)] 
Merge branch 'js/ci-use-newer-up-down-artifact' into maint-2.38

CI fix.

* js/ci-use-newer-up-down-artifact:
  ci: avoid using deprecated {up,down}load-artifacts Action

17 months agoMerge branch 'ab/ci-use-macos-12' into maint-2.38
Junio C Hamano [Sat, 10 Dec 2022 05:02:09 +0000 (14:02 +0900)] 
Merge branch 'ab/ci-use-macos-12' into maint-2.38

CI fix.

* ab/ci-use-macos-12:
  CI: upgrade to macos-12, and pin OSX version

17 months agoMerge branch 'ab/ci-retire-set-output' into maint-2.38
Junio C Hamano [Sat, 10 Dec 2022 05:02:09 +0000 (14:02 +0900)] 
Merge branch 'ab/ci-retire-set-output' into maint-2.38

CI fix.

* ab/ci-retire-set-output:
  CI: migrate away from deprecated "set-output" syntax

17 months agoMerge branch 'ab/ci-musl-bash-fix' into maint-2.38
Junio C Hamano [Sat, 10 Dec 2022 05:02:09 +0000 (14:02 +0900)] 
Merge branch 'ab/ci-musl-bash-fix' into maint-2.38

CI fix.

* ab/ci-musl-bash-fix:
  CI: don't explicitly pick "bash" shell outside of Windows, fix regression

17 months agoMerge branch 'od/ci-use-checkout-v3-when-applicable' into maint-2.38
Junio C Hamano [Sat, 10 Dec 2022 05:02:09 +0000 (14:02 +0900)] 
Merge branch 'od/ci-use-checkout-v3-when-applicable' into maint-2.38

Update GitHub CI to use actions/checkout@v3; use of the older
checkout@v2 gets annoying deprecation notices.

* od/ci-use-checkout-v3-when-applicable:
  ci(main): upgrade actions/checkout to v3

17 months agoMerge branch 'js/ci-use-newer-up-down-artifact'
Junio C Hamano [Sat, 10 Dec 2022 05:01:06 +0000 (14:01 +0900)] 
Merge branch 'js/ci-use-newer-up-down-artifact'

CI fix.

* js/ci-use-newer-up-down-artifact:
  ci: avoid using deprecated {up,down}load-artifacts Action

17 months agoMerge branch 'ab/ci-use-macos-12'
Junio C Hamano [Sat, 10 Dec 2022 05:01:06 +0000 (14:01 +0900)] 
Merge branch 'ab/ci-use-macos-12'

CI fix.

* ab/ci-use-macos-12:
  CI: upgrade to macos-12, and pin OSX version

17 months agoMerge branch 'ab/ci-retire-set-output'
Junio C Hamano [Sat, 10 Dec 2022 05:01:05 +0000 (14:01 +0900)] 
Merge branch 'ab/ci-retire-set-output'

CI fix.

* ab/ci-retire-set-output:
  CI: migrate away from deprecated "set-output" syntax

17 months agoMerge branch 'ab/ci-musl-bash-fix'
Junio C Hamano [Sat, 10 Dec 2022 05:01:05 +0000 (14:01 +0900)] 
Merge branch 'ab/ci-musl-bash-fix'

CI fix.

* ab/ci-musl-bash-fix:
  CI: don't explicitly pick "bash" shell outside of Windows, fix regression

17 months agoMerge branch 'od/ci-use-checkout-v3-when-applicable'
Junio C Hamano [Sat, 10 Dec 2022 05:01:05 +0000 (14:01 +0900)] 
Merge branch 'od/ci-use-checkout-v3-when-applicable'

Update GitHub CI to use actions/checkout@v3; use of the older
checkout@v2 gets annoying deprecation notices.

* od/ci-use-checkout-v3-when-applicable:
  ci(main): upgrade actions/checkout to v3

17 months agomailmap: update email address of Matheus Tavares
Matheus Tavares [Fri, 9 Dec 2022 23:35:16 +0000 (20:35 -0300)] 
mailmap: update email address of Matheus Tavares

I haven't been very active in the community lately, but I'm soon going
to lose access to my previous commit email (@usp.br); so add my current
personal address to mailmap for any future message exchanges or patch
contributions.

Signed-off-by: Matheus Tavares <matheus.bernardino@usp.br>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
17 months agorebase --update-refs: avoid unintended ref deletion
Victoria Dye [Mon, 7 Nov 2022 17:47:52 +0000 (09:47 -0800)] 
rebase --update-refs: avoid unintended ref deletion

In b3b1a21d1a5 (sequencer: rewrite update-refs as user edits todo list,
2022-07-19), the 'todo_list_filter_update_refs()' step was added to handle
the removal of 'update-ref' lines from a 'rebase-todo'. Specifically, it
removes potential ref updates from the "update refs state" if a ref does not
have a corresponding 'update-ref' line.

However, because 'write_update_refs_state()' will not update the state if
the 'refs_to_oids' list was empty, removing *all* 'update-ref' lines will
result in the state remaining unchanged from how it was initialized (with
all refs' "after" OID being null). Then, when the ref update is applied, all
refs will be updated to null and consequently deleted.

To fix this, delete the 'update-refs' state file when 'refs_to_oids' is
empty. Additionally, add a tests covering "all update-ref lines removed"
cases.

Reported-by: herr.kaste <herr.kaste@gmail.com>
Helped-by: Phillip Wood <phillip.wood@dunelm.org.uk>
Helped-by: Derrick Stolee <derrickstolee@github.com>
Signed-off-by: Victoria Dye <vdye@github.com>
Signed-off-by: Taylor Blau <me@ttaylorr.com>
17 months agoRelNotes: a couple of typofixes
Johannes Schindelin [Thu, 8 Dec 2022 14:48:07 +0000 (14:48 +0000)] 
RelNotes: a couple of typofixes

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
17 months agoMerge branch 'turkish' of github.com:bitigchi/git-po
Jiang Xin [Thu, 8 Dec 2022 00:25:27 +0000 (08:25 +0800)] 
Merge branch 'turkish' of github.com:bitigchi/git-po

* 'turkish' of github.com:bitigchi/git-po:
  l10n: tr: v2.39.0 updates

17 months agoMerge branch 'catalan' of github.com:Softcatala/git-po
Jiang Xin [Thu, 8 Dec 2022 00:24:56 +0000 (08:24 +0800)] 
Merge branch 'catalan' of github.com:Softcatala/git-po

* 'catalan' of github.com:Softcatala/git-po:
  l10n: Update Catalan translation

17 months agoMerge branch 'fz/po-zh_CN' of github.com:fangyi-zhou/git-po
Jiang Xin [Thu, 8 Dec 2022 00:22:57 +0000 (08:22 +0800)] 
Merge branch 'fz/po-zh_CN' of github.com:fangyi-zhou/git-po

* 'fz/po-zh_CN' of github.com:fangyi-zhou/git-po:
  l10n: zh_CN v2.39.0 round 1

17 months agoCI: migrate away from deprecated "set-output" syntax
Ævar Arnfjörð Bjarmason [Wed, 7 Dec 2022 01:49:18 +0000 (02:49 +0100)] 
CI: migrate away from deprecated "set-output" syntax

As noted in [1] and the warnings the CI itself is spewing echoing
outputs to stdout is deprecated, and they should be written to
"$GITHUB_OUTPUT" instead.

1. https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
17 months agoci: avoid using deprecated {up,down}load-artifacts Action
Johannes Schindelin [Wed, 7 Dec 2022 14:34:39 +0000 (14:34 +0000)] 
ci: avoid using deprecated {up,down}load-artifacts Action

The deprecated versions of these Actions still use node.js 12 whereas
workflows will need to use node.js 16 to avoid problems going forward.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
17 months agoCI: don't explicitly pick "bash" shell outside of Windows, fix regression
Ævar Arnfjörð Bjarmason [Wed, 7 Dec 2022 12:03:15 +0000 (13:03 +0100)] 
CI: don't explicitly pick "bash" shell outside of Windows, fix regression

When the "js/ci-github-workflow-markup" topic was originally merged in
[1] it included a change to get rid of the "ci/print-test-failures.sh"
step[2]. This was then brought back in [3] as part of a fix-up patches
on top[4].

The problem was that [3] was not a revert of the relevant parts of
[2], but rather copy/pasted the "ci/print-test-failures.sh" step that
was present for the Windows job to all "ci/print-test-failures.sh"
steps. The Windows steps specified "shell: bash", but the non-Windows
ones did not.

This broke the "ci/print/test-failures.sh" step for the "linux-musl"
job, where we don't have a "bash" shell, just a "/bin/sh" (a
"dash"). This breakage was reported at the time[5], but hadn't been
fixed.

It would be sufficient to change this only for "linux-musl", but let's
change this for both "regular" and "dockerized" to omit the "shell"
line entirely, as we did before [2].

Let's also change undo the "name" change that [3] made while
copy/pasting the "print test failures" step for the Windows job. These
steps are now the same as they were before [2], except that the "if"
includes the "env.FAILED_TEST_ARTIFACTS" test.

1. fc5a070f591 (Merge branch 'js/ci-github-workflow-markup', 2022-06-07)
2. 08dccc8fc1f (ci: make it easier to find failed tests' logs in the
   GitHub workflow, 2022-05-21)
3. 5aeb145780f (ci(github): bring back the 'print test failures' step,
   2022-06-08)
4. d0d96b8280f (Merge branch 'js/ci-github-workflow-markup', 2022-06-17)
5. https://lore.kernel.org/git/220725.86sfmpneqp.gmgdl@evledraar.gmail.com/

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
17 months agol10n: tr: v2.39.0 updates
Emir SARI [Wed, 7 Dec 2022 15:00:57 +0000 (18:00 +0300)] 
l10n: tr: v2.39.0 updates

Signed-off-by: Emir SARI <emir_sari@icloud.com>
17 months agol10n: Update Catalan translation
Jordi Mas [Wed, 7 Dec 2022 06:35:32 +0000 (07:35 +0100)] 
l10n: Update Catalan translation

Signed-off-by: Jordi Mas <jmas@softcatala.org>
17 months agoCI: upgrade to macos-12, and pin OSX version
Ævar Arnfjörð Bjarmason [Tue, 6 Dec 2022 19:57:56 +0000 (20:57 +0100)] 
CI: upgrade to macos-12, and pin OSX version

Per [1] and the warnings our CI is emitting GitHub is phasing in
"macos-12" as their "macos-latest".

As with [2], let's pin our image to a specific version so that we're
not having it swept from under us, and our upgrade cycle can be more
predictable than whenever GitHub changes their images.

1. https://github.com/actions/runner-images/issues/6384
2. 0178420b9ca (github-actions: run gcc-8 on ubuntu-20.04 image,
   2022-11-25)

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
17 months agoMerge branch 'master' of github.com:alshopov/git-po
Jiang Xin [Wed, 7 Dec 2022 01:23:49 +0000 (09:23 +0800)] 
Merge branch 'master' of github.com:alshopov/git-po

* 'master' of github.com:alshopov/git-po:
  l10n: bg.po: Updated Bulgarian translation (5501t)

17 months agoMerge branch 'l10n-de-2.39' of github.com:ralfth/git
Jiang Xin [Wed, 7 Dec 2022 01:23:24 +0000 (09:23 +0800)] 
Merge branch 'l10n-de-2.39' of github.com:ralfth/git

* 'l10n-de-2.39' of github.com:ralfth/git:
  l10n: de.po: update German translation

17 months agoMerge branch 'po-id' of github.com:bagasme/git-po
Jiang Xin [Wed, 7 Dec 2022 01:22:17 +0000 (09:22 +0800)] 
Merge branch 'po-id' of github.com:bagasme/git-po

* 'po-id' of github.com:bagasme/git-po:
  l10n: po-id for 2.39 (round 1)

17 months agoMerge branch 'master' of github.com:nafmo/git-l10n-sv
Jiang Xin [Wed, 7 Dec 2022 01:21:49 +0000 (09:21 +0800)] 
Merge branch 'master' of github.com:nafmo/git-l10n-sv

* 'master' of github.com:nafmo/git-l10n-sv:
  l10n: sv.po: Update Swedish translation (5501t0f0)

17 months agoMerge branch 'fr_v2.39_rnd1' of github.com:jnavila/git
Jiang Xin [Wed, 7 Dec 2022 01:21:25 +0000 (09:21 +0800)] 
Merge branch 'fr_v2.39_rnd1' of github.com:jnavila/git

* 'fr_v2.39_rnd1' of github.com:jnavila/git:
  l10n: fr: v2.39 rnd 1

17 months agol10n: bg.po: Updated Bulgarian translation (5501t)
Alexander Shopov [Tue, 6 Dec 2022 15:00:37 +0000 (16:00 +0100)] 
l10n: bg.po: Updated Bulgarian translation (5501t)

Signed-off-by: Alexander Shopov <ash@kambanaria.org>
17 months agoGit 2.39-rc2 v2.39.0-rc2
Junio C Hamano [Tue, 6 Dec 2022 00:49:31 +0000 (09:49 +0900)] 
Git 2.39-rc2

Signed-off-by: Junio C Hamano <gitster@pobox.com>
17 months agoci(main): upgrade actions/checkout to v3
Oscar Dominguez [Mon, 5 Dec 2022 10:01:14 +0000 (10:01 +0000)] 
ci(main): upgrade actions/checkout to v3

To be up to date with actions/checkout opens the door to use the latest
features if necessary and get the latest security patches.

This also avoids a couple of deprecation warnings in the CI runs.

Note: The `actions/checkout` Action has been known to be broken in i686
containers as of v2, therefore we keep forcing it to v1 there. See
actions/runner#2115 for more details.

Signed-off-by: Oscar Dominguez <dominguez.celada@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
17 months agol10n: de.po: update German translation
Ralf Thielow [Fri, 2 Dec 2022 16:28:32 +0000 (17:28 +0100)] 
l10n: de.po: update German translation

Reviewed-by: Matthias Rüster <matthias.ruester@gmail.com>
Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com>
17 months agol10n: zh_CN v2.39.0 round 1
Fangyi Zhou [Fri, 2 Dec 2022 14:04:41 +0000 (14:04 +0000)] 
l10n: zh_CN v2.39.0 round 1

- Revise translation of 'stale'

Reviewed-by: 依云 <lilydjwg@gmail.com>
Signed-off-by: Fangyi Zhou <me@fangyi.io>
17 months agoMerge branch 'ab/fewer-the-index-macros'
Junio C Hamano [Thu, 1 Dec 2022 09:38:07 +0000 (18:38 +0900)] 
Merge branch 'ab/fewer-the-index-macros'

Squelch warnings from Coccinelle

* ab/fewer-the-index-macros:
  cocci: avoid "should ... be a metavariable" warnings

17 months agoMerge branch 'ab/gnumake-4.4-fix'
Junio C Hamano [Thu, 1 Dec 2022 09:38:07 +0000 (18:38 +0900)] 
Merge branch 'ab/gnumake-4.4-fix'

Adjust our Makefiles for GNUmake 4.4

* ab/gnumake-4.4-fix:
  Makefiles: change search through $(MAKEFLAGS) for GNU make 4.4

17 months agococci: avoid "should ... be a metavariable" warnings
Ævar Arnfjörð Bjarmason [Wed, 30 Nov 2022 08:28:23 +0000 (09:28 +0100)] 
cocci: avoid "should ... be a metavariable" warnings

Since [1] running "make coccicheck" has resulted in [2] being emitted
to the *.log files for the "spatch" run, and in the case of "make
coccicheck-test" we'd emit these to the user's terminal.

Nothing was broken as a result, but let's refactor the relevant rules
to eliminate the ambiguity between a possible variable and an
identifier.

1. 0e6550a2c63 (cocci: add a index-compatibility.pending.cocci,
   2022-11-19)
2. warning: line 257: should active_cache be a metavariable?
   warning: line 260: should active_cache_changed be a metavariable?
   warning: line 263: should active_cache_tree be a metavariable?
   warning: line 271: should active_nr be a metavariable?

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
17 months agoMakefiles: change search through $(MAKEFLAGS) for GNU make 4.4
Ævar Arnfjörð Bjarmason [Wed, 30 Nov 2022 08:23:49 +0000 (09:23 +0100)] 
Makefiles: change search through $(MAKEFLAGS) for GNU make 4.4

Since GNU make 4.4 the semantics of the $(MAKEFLAGS) variable has
changed in a backward-incompatible way, as its "NEWS" file notes:

  Previously only simple (one-letter) options were added to the MAKEFLAGS
  variable that was visible while parsing makefiles.  Now, all options are
  available in MAKEFLAGS.  If you want to check MAKEFLAGS for a one-letter
  option, expanding "$(firstword -$(MAKEFLAGS))" is a reliable way to return
  the set of one-letter options which can be examined via findstring, etc.

This upstream change meant that e.g.:

make man

Would become very noisy, because in shared.mak we rely on extracting
"s" from the $(MAKEFLAGS), which now contains long options like
"--jobserver-auth=fifo:<path>", which we'll conflate with the "-s"
option.

So, let's change this idiom we've been carrying since [1], [2] and [3]
as the "NEWS" suggests.

Note that the "-" in "-$(MAKEFLAGS)" is critical here, as the variable
will always contain leading whitespace if there are no short options,
but long options are present. Without it e.g. "make --debug=all" would
yield "--debug=all" as the first word, but with it we'll get "-" as
intended. Then "-s" for "-s", "-Bs" for "-s -B" etc.

1. 0c3b4aac8ec (git-gui: Support of "make -s" in: do not output
   anything of the build itself, 2007-03-07)
2. b777434383b (Support of "make -s": do not output anything of the
   build itself, 2007-03-07)
3. bb2300976ba (Documentation/Makefile: make most operations "quiet",
   2009-03-27)

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
17 months agol10n: fr: v2.39 rnd 1
Jean-Noël Avila [Sat, 26 Nov 2022 14:51:31 +0000 (15:51 +0100)] 
l10n: fr: v2.39 rnd 1

Signed-off-by: Jean-Noël Avila <jn.avila@free.fr>
17 months agol10n: po-id for 2.39 (round 1)
Bagas Sanjaya [Sun, 27 Nov 2022 08:55:35 +0000 (15:55 +0700)] 
l10n: po-id for 2.39 (round 1)

All of updates are new strings translation.

Update following components:

  * builtin/bundle.c
  * builtin/clone.c
  * builtin/commit.c
  * builtin/describe.c
  * builtin/diff.c
  * builtin/fsck.c
  * builtin/gc.c
  * builtin/merge-tree.c
  * builtin/repack.c
  * builtin/revert.c
  * builtin/stash.c
  * builtin/upload-pack.c
  * builtin/worktree.c
  * bundle-uri.c
  * push.c
  * revision.c
  * scalar.c

Translate following new components:

  * builtin/patch-id.c
  * t/helper/test-cache-tree.c
  * t/helper/test-fast-rebase.c
  * t/helper/test-reach.c
  * t/helper/test-serve-v2.c
  * t/helper/test-simple-ipc.c

Signed-off-by: Bagas Sanjaya <bagasdotme@gmail.com>
po revision bump

Signed-off-by: Bagas Sanjaya <bagasdotme@gmail.com>
17 months agoGit 2.39-rc1 v2.39.0-rc1
Junio C Hamano [Wed, 30 Nov 2022 02:00:35 +0000 (11:00 +0900)] 
Git 2.39-rc1

Signed-off-by: Junio C Hamano <gitster@pobox.com>
17 months agoMerge branch 'ps/gnumake-4.4-fix'
Junio C Hamano [Wed, 30 Nov 2022 01:57:19 +0000 (10:57 +0900)] 
Merge branch 'ps/gnumake-4.4-fix'

* ps/gnumake-4.4-fix:
  Makefile: avoid multiple patterns when recipes generate one file

17 months agol10n: sv.po: Update Swedish translation (5501t0f0)
Peter Krefting [Tue, 29 Nov 2022 21:46:18 +0000 (22:46 +0100)] 
l10n: sv.po: Update Swedish translation (5501t0f0)

Signed-off-by: Peter Krefting <peter@softwolves.pp.se>
17 months agoA bit more before -rc1
Junio C Hamano [Tue, 29 Nov 2022 01:40:38 +0000 (10:40 +0900)] 
A bit more before -rc1

Signed-off-by: Junio C Hamano <gitster@pobox.com>
17 months agoMerge branch 'ab/doc-synopsis-and-cmd-usage'
Junio C Hamano [Tue, 29 Nov 2022 01:41:06 +0000 (10:41 +0900)] 
Merge branch 'ab/doc-synopsis-and-cmd-usage'

Doc and message fix.

* ab/doc-synopsis-and-cmd-usage:
  i18n: fix command template placeholder format

17 months agoMerge branch 'km/merge-recursive-typofix'
Junio C Hamano [Tue, 29 Nov 2022 01:41:06 +0000 (10:41 +0900)] 
Merge branch 'km/merge-recursive-typofix'

Fix an old typo in an error message.

* km/merge-recursive-typofix:
  merge-recursive: fix variable typo in error message

17 months agoMerge branch 'jx/ci-ubuntu-fix'
Junio C Hamano [Tue, 29 Nov 2022 01:41:05 +0000 (10:41 +0900)] 
Merge branch 'jx/ci-ubuntu-fix'

Adjust the GitHub CI to newer ubuntu release.

* jx/ci-ubuntu-fix:
  ci: install python on ubuntu
  ci: use the same version of p4 on both Linux and macOS
  ci: remove the pipe after "p4 -V" to catch errors
  github-actions: run gcc-8 on ubuntu-20.04 image

17 months agoMerge branch 'jh/trace2-timers-and-counters'
Junio C Hamano [Tue, 29 Nov 2022 01:41:05 +0000 (10:41 +0900)] 
Merge branch 'jh/trace2-timers-and-counters'

Test fix.

* jh/trace2-timers-and-counters:
  trace2 tests: guard pthread test with "PTHREAD"

17 months agoMerge branch 'ah/chainlint-cpuinfo-parse-fix'
Junio C Hamano [Tue, 29 Nov 2022 01:41:05 +0000 (10:41 +0900)] 
Merge branch 'ah/chainlint-cpuinfo-parse-fix'

The format of a line in /proc/cpuinfo that describes a CPU on s390x
looked different from everybody else, and the code in chainlint.pl
failed to parse it.

* ah/chainlint-cpuinfo-parse-fix:
  chainlint.pl: fix /proc/cpuinfo regexp

17 months agoMerge branch 'gc/resolve-alternate-symlinks'
Junio C Hamano [Tue, 29 Nov 2022 01:41:05 +0000 (10:41 +0900)] 
Merge branch 'gc/resolve-alternate-symlinks'

Resolve symbolic links when processing the locations of alternate
object stores, since failing to do so can lead to confusing and buggy
behavior.

* gc/resolve-alternate-symlinks:
  object-file: use real paths when adding alternates

17 months agoAnother batch before -rc1
Junio C Hamano [Mon, 28 Nov 2022 02:49:55 +0000 (11:49 +0900)] 
Another batch before -rc1

Signed-off-by: Junio C Hamano <gitster@pobox.com>
17 months agoMerge branch 'ab/fewer-the-index-macros'
Junio C Hamano [Mon, 28 Nov 2022 03:13:46 +0000 (12:13 +0900)] 
Merge branch 'ab/fewer-the-index-macros'

Progress on removing 'the_index' convenience wrappers.

* ab/fewer-the-index-macros:
  cocci: apply "pending" index-compatibility to some "builtin/*.c"
  cache.h & test-tool.h: add & use "USE_THE_INDEX_VARIABLE"
  {builtin/*,repository}.c: add & use "USE_THE_INDEX_VARIABLE"
  cocci: apply "pending" index-compatibility to "t/helper/*.c"
  cocci & cache.h: apply variable section of "pending" index-compatibility
  cocci & cache.h: apply a selection of "pending" index-compatibility
  cocci: add a index-compatibility.pending.cocci
  read-cache API & users: make discard_index() return void
  cocci & cache.h: remove rarely used "the_index" compat macros
  builtin/{grep,log}.: don't define "USE_THE_INDEX_COMPATIBILITY_MACROS"
  cache.h: remove unused "the_index" compat macros

17 months agoMerge branch 'sg/plug-line-log-leaks'
Junio C Hamano [Mon, 28 Nov 2022 03:13:45 +0000 (12:13 +0900)] 
Merge branch 'sg/plug-line-log-leaks'

A handful of leaks in the line-log machinery have been plugged.

* sg/plug-line-log-leaks:
  diff.c: use diff_free_queue()
  line-log: free the diff queues' arrays when processing merge commits
  line-log: free diff queue when processing non-merge commits

17 months agoMerge branch 'es/locate-httpd-module-location-in-test'
Junio C Hamano [Mon, 28 Nov 2022 03:13:45 +0000 (12:13 +0900)] 
Merge branch 'es/locate-httpd-module-location-in-test'

Add one more candidate directory that may house httpd modules while
running tests.

* es/locate-httpd-module-location-in-test:
  lib-httpd: extend module location auto-detection

17 months agoMerge branch 'zk/push-use-bitmaps'
Junio C Hamano [Mon, 28 Nov 2022 03:13:44 +0000 (12:13 +0900)] 
Merge branch 'zk/push-use-bitmaps'

Test fix.

* zk/push-use-bitmaps:
  t5516: fail to run in verbose mode

17 months agoMerge branch 'ew/prune-with-missing-objects-pack'
Junio C Hamano [Mon, 28 Nov 2022 03:13:43 +0000 (12:13 +0900)] 
Merge branch 'ew/prune-with-missing-objects-pack'

"git prune" may try to iterate over .git/objects/pack for trash
files to remove in it, and loudly fail when the directory is
missing, which is not necessary.  The command has been taught to
ignore such a failure.

* ew/prune-with-missing-objects-pack:
  prune: quiet ENOENT on missing directories

17 months agoMerge branch 'rs/list-objects-filter-leakfix'
Junio C Hamano [Mon, 28 Nov 2022 03:13:43 +0000 (12:13 +0900)] 
Merge branch 'rs/list-objects-filter-leakfix'

Leakfix.

* rs/list-objects-filter-leakfix:
  list-objects-filter: plug combine_filter_data leak

17 months agoMerge branch 'pw/config-int-parse-fixes'
Junio C Hamano [Mon, 28 Nov 2022 03:13:43 +0000 (12:13 +0900)] 
Merge branch 'pw/config-int-parse-fixes'

Assorted fixes of parsing end-user input as integers.

* pw/config-int-parse-fixes:
  git_parse_signed(): avoid integer overflow
  config: require at least one digit when parsing numbers
  git_parse_unsigned: reject negative values

17 months agoMerge branch 'jk/parse-object-type-mismatch'
Junio C Hamano [Mon, 28 Nov 2022 03:13:42 +0000 (12:13 +0900)] 
Merge branch 'jk/parse-object-type-mismatch'

`parse_object()` hardening when checking for the existence of a
suspected blob object.

* jk/parse-object-type-mismatch:
  parse_object(): simplify blob conditional
  parse_object(): check on-disk type of suspected blob
  parse_object(): drop extra "has" check before checking object type

17 months agoMakefile: avoid multiple patterns when recipes generate one file
Paul Smith [Sun, 27 Nov 2022 22:42:51 +0000 (17:42 -0500)] 
Makefile: avoid multiple patterns when recipes generate one file

A GNU make pattern rule with multiple targets has always meant that
a single invocation of the recipe will build all the targets.
However in older versions of GNU make a recipe that did not really
build all the targets would be tolerated.

Starting with GNU make 4.4 this behavior is deprecated and pattern
rules are expected to generate files to match all the patterns.
If not all targets are created then GNU make will not consider any
target up to date and will re-run the recipe when it is run again.

Modify Documentation/Makefile to split the man page-creating pattern
rule into a separate pattern rule for each pattern.

Reported-by: Alexander Kanavin <alex.kanavin@gmail.com>
Signed-off-by: Paul Smith <psmith@gnu.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
17 months agoi18n: fix command template placeholder format
Jean-Noël Avila [Sat, 26 Nov 2022 17:24:02 +0000 (17:24 +0000)] 
i18n: fix command template placeholder format

Signed-off-by: Jean-Noël Avila <jn.avila@free.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
17 months agomerge-recursive: fix variable typo in error message
Kyle Meyer [Fri, 25 Nov 2022 17:37:45 +0000 (12:37 -0500)] 
merge-recursive: fix variable typo in error message

Signed-off-by: Kyle Meyer <kyle@kyleam.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
17 months agoci: install python on ubuntu
Jiang Xin [Fri, 25 Nov 2022 09:59:54 +0000 (17:59 +0800)] 
ci: install python on ubuntu

Python is missing from the default ubuntu-22.04 runner image, which
prevents git-p4 from working. To install python on ubuntu, we need
to provide the correct package names:

 * On Ubuntu 18.04 (bionic), "/usr/bin/python2" is provided by the
   "python" package, and "/usr/bin/python3" is provided by the "python3"
   package.

 * On Ubuntu 20.04 (focal) and above, "/usr/bin/python2" is provided by
   the "python2" package which has a different name from bionic, and
   "/usr/bin/python3" is provided by "python3".

Since the "ubuntu-latest" runner image has a higher version, its
safe to use "python2" or "python3" package name.

Helped-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Jiang Xin <zhiyou.jx@alibaba-inc.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
17 months agoci: use the same version of p4 on both Linux and macOS
Jiang Xin [Fri, 25 Nov 2022 09:59:53 +0000 (17:59 +0800)] 
ci: use the same version of p4 on both Linux and macOS

There would be a segmentation fault when running p4 v16.2 on ubuntu
22.04 which is the latest version of ubuntu runner image for github
actions.

By checking each version from [1], p4d version 21.1 and above can work
properly on ubuntu 22.04. But version 22.x will break some p4 test
cases. So p4 version 21.x is exactly the version we can use.

With this update, the versions of p4 for Linux and macOS happen to be
the same. So we can add the version number directly into the "P4WHENCE"
variable, and reuse it in p4 installation for macOS.

By removing the "LINUX_P4_VERSION" variable from "ci/lib.sh", the
comment left above has nothing to do with p4, but still applies to
git-lfs. Since we have a fixed version of git-lfs installed on Linux,
we may have a different version on macOS.

[1]: https://cdist2.perforce.com/perforce/

Reviewed-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Helped-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Jiang Xin <zhiyou.jx@alibaba-inc.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
17 months agoci: remove the pipe after "p4 -V" to catch errors
Jiang Xin [Fri, 25 Nov 2022 09:59:52 +0000 (17:59 +0800)] 
ci: remove the pipe after "p4 -V" to catch errors

When installing p4 as a dependency, we used to pipe output of "p4 -V"
and "p4d -V" to validate the installation and output a condensed version
information. But this would hide potential errors of p4 and would stop
with an empty output. E.g.: p4d version 16.2 running on ubuntu 22.04
causes sigfaults, even before it produces any output.

By removing the pipe after "p4 -V" and "p4d -V", we may get a
verbose output, and stop immediately on errors because we have "set
-e" in "ci/lib.sh". Since we won't look at these trace logs unless
something fails, just including the raw output seems most sensible.

Reviewed-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Helped-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Jiang Xin <zhiyou.jx@alibaba-inc.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
17 months agogithub-actions: run gcc-8 on ubuntu-20.04 image
Jiang Xin [Fri, 25 Nov 2022 09:59:51 +0000 (17:59 +0800)] 
github-actions: run gcc-8 on ubuntu-20.04 image

GitHub starts to upgrade its runner image "ubuntu-latest" from version
"ubuntu-20.04" to version "ubuntu-22.04". It will fail to find and
install "gcc-8" package on the new runner image.

Change some of the runner images from "ubuntu-latest" to "ubuntu-20.04"
in order to install "gcc-8" as a dependency.

The first revision of this patch tried to replace "$runs_on_pool" in
"ci/*.sh" with a new "$runs_on_os" environment variable based on the
"os" field in the matrix strategy. But these "os" fields in matrix
strategies are obsolete legacies from commit [1] and commit [2], and
are no longer useful. So remove these unused "os" fields.

[1]: c08bb26010 (CI: rename the "Linux32" job to lower-case "linux32",
                 2021-11-23)
[2]: 25715419bf (CI: don't run "make test" twice in one job, 2021-11-23)

Reviewed-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Helped-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Jiang Xin <zhiyou.jx@alibaba-inc.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
17 months agoobject-file: use real paths when adding alternates
Glen Choo [Thu, 24 Nov 2022 00:55:31 +0000 (00:55 +0000)] 
object-file: use real paths when adding alternates

When adding an alternate ODB, we check if the alternate has the same
path as the object dir, and if so, we do nothing. However, that
comparison does not resolve symlinks. This makes it possible to add the
object dir as an alternate, which may result in bad behavior. For
example, it can trick "git repack -a -l -d" (possibly run by "git gc")
into thinking that all packs come from an alternate and delete all
objects.

rm -rf test &&
git clone https://github.com/git/git test &&
(
cd test &&
ln -s objects .git/alt-objects &&
# -c repack.updateserverinfo=false silences a warning about not
# being able to update "info/refs", it isn't needed to show the
# bad behavior
GIT_ALTERNATE_OBJECT_DIRECTORIES=".git/alt-objects" git \
-c repack.updateserverinfo=false repack -a -l -d  &&
# It's broken!
git status
# Because there are no more objects!
ls .git/objects/pack
)

Fix this by resolving symlinks and relative paths before comparing the
alternate and object dir. This lets us clean up a number of issues noted
in 37a95862c6 (alternates: re-allow relative paths from environment,
2016-11-07):

- Now that we compare the real paths, duplicate detection is no longer
  foiled by relative paths.
- Using strbuf_realpath() allows us to "normalize" paths that
  strbuf_normalize_path() can't, so we can stop silently ignoring errors
  when "normalizing" paths from the environment.
- We now store an absolute path based on getcwd() (the "future
  direction" named in 37a95862c6), so chdir()-ing in the process no
  longer changes the directory pointed to by the alternate. This is a
  change in behavior, but a desirable one.

Signed-off-by: Glen Choo <chooglen@google.com>
Acked-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
17 months agotrace2 tests: guard pthread test with "PTHREAD"
Ævar Arnfjörð Bjarmason [Thu, 24 Nov 2022 21:48:21 +0000 (22:48 +0100)] 
trace2 tests: guard pthread test with "PTHREAD"

Since 81071626ba1 (trace2: add global counter mechanism, 2022-10-24)
these tests have been failing when git is compiled with NO_PTHREADS=Y,
which is always the case e.g. if 'uname -s' is "NONSTOP_KERNEL".

Reported-by: Randall S. Becker <randall.becker@nexbridge.ca>
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
17 months agoGit 2.39-rc0 v2.39.0-rc0
Junio C Hamano [Wed, 23 Nov 2022 02:09:23 +0000 (11:09 +0900)] 
Git 2.39-rc0

Signed-off-by: Junio C Hamano <gitster@pobox.com>
17 months agoMerge branch 'mh/gitcredentials-generate'
Junio C Hamano [Wed, 23 Nov 2022 02:22:25 +0000 (11:22 +0900)] 
Merge branch 'mh/gitcredentials-generate'

Doc update.

* mh/gitcredentials-generate:
  Docs: describe how a credential-generating helper works

17 months agoMerge branch 'ps/receive-use-only-advertised'
Junio C Hamano [Wed, 23 Nov 2022 02:22:25 +0000 (11:22 +0900)] 
Merge branch 'ps/receive-use-only-advertised'

"git receive-pack" used to use all the local refs as the boundary for
checking connectivity of the data "git push" sent, but now it uses
only the refs that it advertised to the pusher. In a repository with
the .hideRefs configuration, this reduces the resources needed to
perform the check.
cf. <221028.86bkpw805n.gmgdl@evledraar.gmail.com>
cf. <xmqqr0yrizqm.fsf@gitster.g>

* ps/receive-use-only-advertised:
  receive-pack: only use visible refs for connectivity check
  rev-parse: add `--exclude-hidden=` option
  revision: add new parameter to exclude hidden refs
  revision: introduce struct to handle exclusions
  revision: move together exclusion-related functions
  refs: get rid of global list of hidden refs
  refs: fix memory leak when parsing hideRefs config

17 months agoMerge branch 'jt/submodule-on-demand'
Junio C Hamano [Wed, 23 Nov 2022 02:22:25 +0000 (11:22 +0900)] 
Merge branch 'jt/submodule-on-demand'

Push all submodules recursively with
'--recurse-submodules=on-demand'.

* jt/submodule-on-demand:
  Doc: document push.recurseSubmodules=only

17 months agoMerge branch 'sz/macos-fsmonitor-symlinks'
Junio C Hamano [Wed, 23 Nov 2022 02:22:25 +0000 (11:22 +0900)] 
Merge branch 'sz/macos-fsmonitor-symlinks'

Fix an issue where core.fsmonitor on macOS would not notice created
or modified symbolic links.

* sz/macos-fsmonitor-symlinks:
  fsmonitor--daemon: on macOS support symlink

17 months agoMerge branch 'ew/delta-islands-free'
Junio C Hamano [Wed, 23 Nov 2022 02:22:25 +0000 (11:22 +0900)] 
Merge branch 'ew/delta-islands-free'

Free structures related to delta islands after use.

* ew/delta-islands-free:
  delta-islands: free island-related data after use

17 months agoMerge branch 'mg/notes-newline'
Junio C Hamano [Wed, 23 Nov 2022 02:22:24 +0000 (11:22 +0900)] 
Merge branch 'mg/notes-newline'

Avoid a stray empty newline in the template when creating new notes.

* mg/notes-newline:
  notes: avoid empty line in template

17 months agoMerge branch 'tb/howto-maintain-git-fixes'
Junio C Hamano [Wed, 23 Nov 2022 02:22:24 +0000 (11:22 +0900)] 
Merge branch 'tb/howto-maintain-git-fixes'

A pair of bugfixes to the Documentation/howto/maintain-git.txt guide.

* tb/howto-maintain-git-fixes:
  Documentation: build redo-seen.sh from jch..seen
  Documentation: build redo-jch.sh from master..jch

17 months agoMerge branch 'es/chainlint-lineno'
Junio C Hamano [Wed, 23 Nov 2022 02:22:24 +0000 (11:22 +0900)] 
Merge branch 'es/chainlint-lineno'

Teach chainlint.pl to show corresponding line numbers when printing
the source of a test.

* es/chainlint-lineno:
  chainlint: prefix annotated test definition with line numbers
  chainlint: latch line numbers at which each token starts and ends
  chainlint: sidestep impoverished macOS "terminfo"

17 months agoMerge branch 'pw/rebase-no-reflog-action'
Junio C Hamano [Wed, 23 Nov 2022 02:22:24 +0000 (11:22 +0900)] 
Merge branch 'pw/rebase-no-reflog-action'

Avoid setting GIT_REFLOG_ACTION to improve readability of the
sequencer internals.

* pw/rebase-no-reflog-action:
  rebase: stop exporting GIT_REFLOG_ACTION
  sequencer: stop exporting GIT_REFLOG_ACTION

17 months agoMerge branch 'ab/t7610-timeout'
Junio C Hamano [Wed, 23 Nov 2022 02:22:24 +0000 (11:22 +0900)] 
Merge branch 'ab/t7610-timeout'

Fix a source of flakiness in CI when compiling with SANITIZE=leak.

* ab/t7610-timeout:
  t7610: use "file:///dev/null", not "/dev/null", fixes MinGW
  t7610: fix flaky timeout issue, don't clone from example.com

17 months agoMerge branch 'rp/maintenance-qol'
Junio C Hamano [Wed, 23 Nov 2022 02:22:23 +0000 (11:22 +0900)] 
Merge branch 'rp/maintenance-qol'

'git maintenance register' is taught to write configuration to an
arbitrary path, and 'git for-each-repo' is taught to expand tilde
characters in paths.

* rp/maintenance-qol:
  builtin/gc.c: fix use-after-free in maintenance_unregister()
  maintenance --unregister: fix uninit'd data use & -Wdeclaration-after-statement
  maintenance: add option to register in a specific config
  for-each-repo: interpolate repo path arguments

17 months agoMerge branch 'pw/strict-label-lookups'
Junio C Hamano [Wed, 23 Nov 2022 02:22:23 +0000 (11:22 +0900)] 
Merge branch 'pw/strict-label-lookups'

Correct an error where `git rebase` would mistakenly use a branch or
tag named "refs/rewritten/xyz" when missing a rebase label.

* pw/strict-label-lookups:
  sequencer: tighten label lookups
  sequencer: unify label lookup

17 months agoMerge branch 'gc/redact-h2h3-headers'
Junio C Hamano [Wed, 23 Nov 2022 02:22:23 +0000 (11:22 +0900)] 
Merge branch 'gc/redact-h2h3-headers'

Redact headers from cURL's h2h3 module in GIT_CURL_VERBOSE and
others.

* gc/redact-h2h3-headers:
  http: redact curl h2h3 headers in info
  t: run t5551 tests with both HTTP and HTTP/2

17 months agoMerge branch 'ab/coccicheck-incremental'
Junio C Hamano [Wed, 23 Nov 2022 02:22:23 +0000 (11:22 +0900)] 
Merge branch 'ab/coccicheck-incremental'

"make coccicheck" is time consuming. It has been made to run more
incrementally.

* ab/coccicheck-incremental:
  Makefile: don't create a ".build/.build/" for cocci, fix output
  spatchcache: add a ccache-alike for "spatch"
  cocci: run against a generated ALL.cocci
  cocci rules: remove <id>'s from rules that don't need them
  Makefile: copy contrib/coccinelle/*.cocci to build/
  cocci: optimistically use COMPUTE_HEADER_DEPENDENCIES
  cocci: make "coccicheck" rule incremental
  cocci: split off "--all-includes" from SPATCH_FLAGS
  cocci: split off include-less "tests" from SPATCH_FLAGS
  Makefile: split off SPATCH_BATCH_SIZE comment from "cocci" heading
  Makefile: have "coccicheck" re-run if flags change
  Makefile: add ability to TAB-complete cocci *.patch rules
  cocci rules: remove unused "F" metavariable from pending rule
  Makefile + shared.mak: rename and indent $(QUIET_SPATCH_T)

17 months agoMerge branch 'es/chainlint-output'
Junio C Hamano [Wed, 23 Nov 2022 02:22:23 +0000 (11:22 +0900)] 
Merge branch 'es/chainlint-output'

Teach chainlint.pl to annotate the original test definition instead
of the token stream.

* es/chainlint-output:
  chainlint: annotate original test definition rather than token stream
  chainlint: latch start/end position of each token
  chainlint: tighten accuracy when consuming input stream
  chainlint: add explanatory comments

17 months agoMerge branch 'js/remove-stale-scalar-repos'
Junio C Hamano [Wed, 23 Nov 2022 02:22:23 +0000 (11:22 +0900)] 
Merge branch 'js/remove-stale-scalar-repos'

'scalar reconfigure -a' is taught to automatically remove
scalar.repo entires which no longer exist.

* js/remove-stale-scalar-repos:
  tests(scalar): tighten the stale `scalar.repo` test some
  scalar reconfigure -a: remove stale `scalar.repo` entries

17 months agoMerge branch 'dd/bisect-helper-subcommand'
Junio C Hamano [Wed, 23 Nov 2022 02:22:22 +0000 (11:22 +0900)] 
Merge branch 'dd/bisect-helper-subcommand'

Fix a regression in the bisect-helper which mistakenly treats
arguments to the command given to 'git bisect run' as arguments to
the helper.

* dd/bisect-helper-subcommand:
  bisect--helper: parse subcommand with OPT_SUBCOMMAND
  bisect--helper: move all subcommands into their own functions
  bisect--helper: remove unused options

17 months agoMerge branch 'ab/submodule-helper-prep-only'
Junio C Hamano [Wed, 23 Nov 2022 02:22:22 +0000 (11:22 +0900)] 
Merge branch 'ab/submodule-helper-prep-only'

Preparation to remove git-submodule.sh and replace it with a builtin.

* ab/submodule-helper-prep-only:
  submodule--helper: use OPT_SUBCOMMAND() API
  submodule--helper: drop "update --prefix <pfx>" for "-C <pfx> update"
  submodule--helper: remove --prefix from "absorbgitdirs"
  submodule API & "absorbgitdirs": remove "----recursive" option
  submodule.c: refactor recursive block out of absorb function
  submodule tests: test for a "foreach" blind-spot
  submodule--helper: fix a memory leak in "status"
  submodule tests: add tests for top-level flag output
  submodule--helper: move "config" to a test-tool

17 months agochainlint.pl: fix /proc/cpuinfo regexp
Andreas Hasenack [Tue, 22 Nov 2022 20:27:41 +0000 (20:27 +0000)] 
chainlint.pl: fix /proc/cpuinfo regexp

29fb2ec3 (chainlint.pl: validate test scripts in parallel,
2022-09-01) introduced a function that gets the number of cores from
/proc/cpuinfo on some systems, notably linux.

The regexp it uses (^processor\s*:) fails to match the desired lines in
the s390x architecture, where they look like this:

    processor 0: version = FF, identification = 148F67, machine = 2964

As a result, on s390x that function returns 0 as the number of cores,
and the chainlint.pl script exits without doing anything.

Signed-off-by: Andreas Hasenack <andreas.hasenack@canonical.com>
Acked-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
17 months agoparse_object(): simplify blob conditional
Ævar Arnfjörð Bjarmason [Mon, 21 Nov 2022 19:26:55 +0000 (14:26 -0500)] 
parse_object(): simplify blob conditional

Commit 8db2dad7a0 (parse_object(): check on-disk type of suspected blob,
2022-11-17) simplified the conditional for checking if we might have a
blob. But we can simplify it further. In:

  !obj || (obj && obj->type == OBJ_BLOB)

the short-circuit "OR" means "obj" will always be true on the right-hand
side. The compiler almost certainly optimized that out anyway, but
dropping it makes the conditional easier to understand for humans.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
17 months agolib-httpd: extend module location auto-detection
Eric Sunshine [Mon, 21 Nov 2022 03:01:35 +0000 (03:01 +0000)] 
lib-httpd: extend module location auto-detection

Although it is possible to manually set LIB_HTTPD_PATH and
LIB_HTTPD_MODULE_PATH to point at the location of `httpd` and its
modules, doing so is cumbersome and easily forgotten. To address this,
0d344738dc (t/lib-http.sh: Restructure finding of default httpd
location, 2010-01-02) enhanced lib-httpd.sh to automatically detect the
location of `httpd` and its modules in order to facilitate out-of-the-
box testing on a wider range of platforms. Follow that lead by further
enhancing it to automatically detect the `httpd` modules on Void Linux,
as well.

Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
17 months agot5516: fail to run in verbose mode
Jiang Xin [Mon, 21 Nov 2022 13:40:40 +0000 (21:40 +0800)] 
t5516: fail to run in verbose mode

The test case "push with config push.useBitmap" of t5516 was introduced
in commit 82f67ee13f (send-pack.c: add config push.useBitmaps,
2022-06-17). It won't work in verbose mode, e.g.:

    $ sh t5516-fetch-push.sh --run='1,115' -v

This is because "git-push" will run in a tty in this case, and the
subcommand "git pack-objects" will contain an argument "--progress"
instead of "-q". Adding a specific option "--quiet" to "git push" will
get a stable result for t5516.

Signed-off-by: Jiang Xin <zhiyou.jx@alibaba-inc.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
17 months agolist-objects-filter: plug combine_filter_data leak
René Scharfe [Sun, 20 Nov 2022 11:00:52 +0000 (12:00 +0100)] 
list-objects-filter: plug combine_filter_data leak

filter_combine__init() allocates a struct combine_filter_data object and
assigns it to the filter_data member of struct filter_options.  Release
it in the complementing filter_combine__free().

Reported-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: René Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>