]> git.ipfire.org Git - thirdparty/git.git/log
thirdparty/git.git
17 months agoMerge branch 'rs/t3920-crlf-eating-grep-fix'
Junio C Hamano [Mon, 19 Dec 2022 02:46:14 +0000 (11:46 +0900)] 
Merge branch 'rs/t3920-crlf-eating-grep-fix'

Test fix.

* rs/t3920-crlf-eating-grep-fix:
  t3920: support CR-eating grep

17 months agoMerge branch 'js/t3920-shell-and-or-fix'
Junio C Hamano [Mon, 19 Dec 2022 02:46:14 +0000 (11:46 +0900)] 
Merge branch 'js/t3920-shell-and-or-fix'

Test fix.

* js/t3920-shell-and-or-fix:
  t3920: don't ignore errors of more than one command with `|| true`

17 months agoMerge branch 'jh/fsmonitor-darwin-modernize'
Junio C Hamano [Mon, 19 Dec 2022 02:46:14 +0000 (11:46 +0900)] 
Merge branch 'jh/fsmonitor-darwin-modernize'

Stop using deprecated macOS API in fsmonitor.

* jh/fsmonitor-darwin-modernize:
  fsmonitor: eliminate call to deprecated FSEventStream function

17 months agoMerge branch 'ab/t4023-avoid-losing-exit-status-of-diff'
Junio C Hamano [Mon, 19 Dec 2022 02:46:13 +0000 (11:46 +0900)] 
Merge branch 'ab/t4023-avoid-losing-exit-status-of-diff'

Test fix.

* ab/t4023-avoid-losing-exit-status-of-diff:
  t4023: fix ignored exit codes of git

17 months agoMerge branch 'ab/t7600-avoid-losing-exit-status-of-git'
Junio C Hamano [Mon, 19 Dec 2022 02:46:13 +0000 (11:46 +0900)] 
Merge branch 'ab/t7600-avoid-losing-exit-status-of-git'

Test fix.

* ab/t7600-avoid-losing-exit-status-of-git:
  t7600: don't ignore "rev-parse" exit code in helper

17 months agoMerge branch 'ab/t5314-avoid-losing-exit-status'
Junio C Hamano [Mon, 19 Dec 2022 02:46:13 +0000 (11:46 +0900)] 
Merge branch 'ab/t5314-avoid-losing-exit-status'

Test fix.

* ab/t5314-avoid-losing-exit-status:
  t5314: check exit code of "git"

17 months agoMerge branch 'jh/t7527-unflake-by-forcing-cookie'
Junio C Hamano [Mon, 19 Dec 2022 02:46:13 +0000 (11:46 +0900)] 
Merge branch 'jh/t7527-unflake-by-forcing-cookie'

Make fsmonitor more robust to avoid the flakiness seen in t7527.

* jh/t7527-unflake-by-forcing-cookie:
  fsmonitor: fix race seen in t7527

17 months agoMerge branch 'rs/plug-pattern-list-leak-in-lof'
Junio C Hamano [Mon, 19 Dec 2022 02:46:12 +0000 (11:46 +0900)] 
Merge branch 'rs/plug-pattern-list-leak-in-lof'

Leak fix.

* rs/plug-pattern-list-leak-in-lof:
  list-objects-filter: plug pattern_list leak

17 months agoMerge branch 'rs/t4205-do-not-exit-in-test-script'
Junio C Hamano [Mon, 19 Dec 2022 02:46:12 +0000 (11:46 +0900)] 
Merge branch 'rs/t4205-do-not-exit-in-test-script'

Test fix.

* rs/t4205-do-not-exit-in-test-script:
  t4205: don't exit test script on failure

17 months agofsmonitor: eliminate call to deprecated FSEventStream function
Jeff Hostetler [Wed, 14 Dec 2022 19:12:33 +0000 (19:12 +0000)] 
fsmonitor: eliminate call to deprecated FSEventStream function

Replace the call to `FSEventStreamScheduleWithRunLoop()` function with
the suggested `FSEventStreamSetDispatchQueue()` function.

The MacOS version of the builtin FSMonitor feature uses the
`FSEventStreamScheduleWithRunLoop()` function to drive the event loop
and process FSEvents from the system.  This routine has now been
deprecated by Apple.  The MacOS 13 (Ventura) compiler tool chain now
generates a warning when compiling calls to this function.  In
DEVELOPER=1 mode, this now causes a compile error.

The `FSEventStreamSetDispatchQueue()` function is conceptually similar
and is the suggested replacement.  However, there are some subtle
thread-related differences.

Previously, the event stream would be processed by the
`fsm_listen__loop()` thread while it was in the `CFRunLoopRun()`
method.  (Conceptually, this was a blocking call on the lifetime of
the event stream where our thread drove the event loop and individual
events were handled by the `fsevent_callback()`.)

With the change, a "dispatch queue" is created and FSEvents will be
processed by a hidden queue-related thread (that calls the
`fsevent_callback()` on our behalf).  Our `fsm_listen__loop()` thread
maintains the original blocking model by waiting on a mutex/condition
variable pair while the hidden thread does all of the work.

While the deprecated API used by the original were introduced in
macOS 10.5 (Oct 2007), the API used by the updated code were
introduced back in macOS 10.6 (Aug 2009) and has been available
since then.  So this change _could_ break those who have happily
been using 10.5 (if there were such people), but these two dates
both predate the oldest versions of macOS Apple seems to support
anyway, so we should be safe.

Signed-off-by: Jeff Hostetler <jeffhostetler@github.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
17 months agoStart the 2.40 cycle
Junio C Hamano [Wed, 14 Dec 2022 08:43:27 +0000 (17:43 +0900)] 
Start the 2.40 cycle

Signed-off-by: Junio C Hamano <gitster@pobox.com>
17 months agoMerge branch 'js/t0021-windows-pwd'
Junio C Hamano [Wed, 14 Dec 2022 08:42:18 +0000 (17:42 +0900)] 
Merge branch 'js/t0021-windows-pwd'

Test fix.

* js/t0021-windows-pwd:
  t0021: use Windows-friendly `pwd`

17 months agoMerge branch 'sa/git-var-empty'
Junio C Hamano [Wed, 14 Dec 2022 06:55:47 +0000 (15:55 +0900)] 
Merge branch 'sa/git-var-empty'

"git var UNKNOWN_VARIABLE" and "git var VARIABLE" with the variable
given an empty value used to behave identically.  Now the latter
just gives an empty output, while the former still gives an error
message.

* sa/git-var-empty:
  var: allow GIT_EDITOR to return null
  var: do not print usage() with a correct invocation

17 months agoMerge branch 'rs/multi-filter-args'
Junio C Hamano [Wed, 14 Dec 2022 06:55:46 +0000 (15:55 +0900)] 
Merge branch 'rs/multi-filter-args'

Fix a bug where `pack-objects` would not respect multiple `--filter`
arguments when invoked directly.

* rs/multi-filter-args:
  list-objects-filter: remove OPT_PARSE_LIST_OBJECTS_FILTER_INIT()
  pack-objects: simplify --filter handling
  pack-objects: fix handling of multiple --filter options
  t5317: demonstrate failure to handle multiple --filter options
  t5317: stop losing return codes of git ls-files

17 months agoMerge branch 'tl/pack-bitmap-absolute-paths'
Junio C Hamano [Wed, 14 Dec 2022 06:55:46 +0000 (15:55 +0900)] 
Merge branch 'tl/pack-bitmap-absolute-paths'

The pack-bitmap machinery is taught to log the paths of redundant
bitmap(s) to trace2 instead of stderr.

* tl/pack-bitmap-absolute-paths:
  pack-bitmap.c: trace bitmap ignore logs when midx-bitmap is found
  pack-bitmap.c: break out of the bitmap loop early if not tracing
  pack-bitmap.c: avoid exposing absolute paths
  pack-bitmap.c: remove unnecessary "open_pack_index()" calls

17 months agoMerge branch 'yn/git-jump-emacs'
Junio C Hamano [Wed, 14 Dec 2022 06:55:46 +0000 (15:55 +0900)] 
Merge branch 'yn/git-jump-emacs'

"git jump" (in contrib/) learned to present the "quickfix list" to
its standard output (instead of letting it consumed by the editor
it invokes), and learned to also drive emacs/emacsclient.

* yn/git-jump-emacs:
  git-jump: invoke emacs/emacsclient
  git-jump: move valid-mode check earlier
  git-jump: add an optional argument '--stdout'

17 months agoMerge branch 'ab/various-leak-fixes'
Junio C Hamano [Wed, 14 Dec 2022 06:55:46 +0000 (15:55 +0900)] 
Merge branch 'ab/various-leak-fixes'

Various leak fixes.

* ab/various-leak-fixes:
  built-ins: use free() not UNLEAK() if trivial, rm dead code
  revert: fix parse_options_concat() leak
  cherry-pick: free "struct replay_opts" members
  rebase: don't leak on "--abort"
  connected.c: free the "struct packed_git"
  sequencer.c: fix "opts->strategy" leak in read_strategy_opts()
  ls-files: fix a --with-tree memory leak
  revision API: call graph_clear() in release_revisions()
  unpack-file: fix ancient leak in create_temp_file()
  built-ins & libs & helpers: add/move destructors, fix leaks
  dir.c: free "ident" and "exclude_per_dir" in "struct untracked_cache"
  read-cache.c: clear and free "sparse_checkout_patterns"
  commit: discard partial cache before (re-)reading it
  {reset,merge}: call discard_index() before returning
  tests: mark tests as passing with SANITIZE=leak

17 months agoMerge branch 'kz/merge-tree-merge-base'
Junio C Hamano [Wed, 14 Dec 2022 06:55:45 +0000 (15:55 +0900)] 
Merge branch 'kz/merge-tree-merge-base'

"merge-tree" learns a new `--merge-base` option.

* kz/merge-tree-merge-base:
  docs: fix description of the `--merge-base` option
  merge-tree.c: allow specifying the merge-base when --stdin is passed
  merge-tree.c: add --merge-base=<commit> option

17 months agoMerge branch 'dd/git-bisect-builtin'
Junio C Hamano [Wed, 14 Dec 2022 06:55:45 +0000 (15:55 +0900)] 
Merge branch 'dd/git-bisect-builtin'

`git bisect` becomes a builtin.

* dd/git-bisect-builtin:
  bisect; remove unused "git-bisect.sh" and ".gitignore" entry
  Turn `git bisect` into a full built-in
  bisect--helper: log: allow arbitrary number of arguments
  bisect--helper: handle states directly
  bisect--helper: emit usage for "git bisect"
  bisect test: test exit codes on bad usage
  bisect--helper: identify as bisect when report error
  bisect-run: verify_good: account for non-negative exit status
  bisect run: keep some of the post-v2.30.0 output
  bisect: fix output regressions in v2.30.0
  bisect: refactor bisect_run() to match CodingGuidelines
  bisect tests: test for v2.30.0 "bisect run" regressions

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 agot3920: support CR-eating grep
René Scharfe [Fri, 2 Dec 2022 16:51:13 +0000 (17:51 +0100)] 
t3920: support CR-eating grep

grep(1) converts CRLF line endings to LF on current MinGW:

   $ uname -sr
   MINGW64_NT-10.0-22621 3.3.6-341.x86_64

   $ printf 'a\r\n' | hexdump.exe -C
   00000000  61 0d 0a                                          |a..|
   00000003

   $ printf 'a\r\n' | grep . | hexdump.exe -C
   00000000  61 0a                                             |a.|
   00000002

Create the intended test file by grepping the original file with LF
line endings and adding CRs explicitly.

The missing CRs went unnoticed because test_cmp on MinGW ignores line
endings since 4d715ac05c (Windows: a test_cmp that is agnostic to random
LF <> CRLF conversions, 2013-10-26).  Fix this test anyway to avoid
depending on that special test_cmp behavior, especially since this is
the only test that needs it.

Piping the output of grep(1) through append_cr has the side-effect of
ignoring its return value.  That means we no longer need the explicit
"|| true" to support commit messages without a body.

Signed-off-by: René Scharfe <l.s.r@web.de>
Acked-by: Philippe Blain <levraiphilippeblain@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
17 months agot0021: use Windows-friendly `pwd`
Johannes Schindelin [Tue, 6 Dec 2022 15:07:46 +0000 (15:07 +0000)] 
t0021: use Windows-friendly `pwd`

In Git for Windows, when passing paths from shell scripts to regular
Win32 executables, thanks to the MSYS2 runtime a somewhat magic path
conversion happens that lets the shell script think that there is a file
at `/git/Makefile` and the Win32 process it spawned thinks that the
shell script said `C:/git-sdk-64/git/Makefile` instead.

This conversion is documented in detail over here:
https://www.msys2.org/docs/filesystem-paths/#automatic-unix-windows-path-conversion

As all automatic conversions, there are gaps. For example, to avoid
mistaking command-line options like `/LOG=log.txt` (which are quite
common in the Windows world) from being mistaken for a Unix-style
absolute path, the MSYS2 runtime specifically exempts arguments
containing a `=` character from that conversion.

We are about to change `test_cmp` to use `git diff --no-index`, which
involves spawning precisely such a Win32 process.

In combination, this would cause a failure in `t0021-conversion.sh`
where we pass an absolute path containing an equal character to the
`test_cmp` function.

Seeing as the Unix tools like `cp` and `diff` that are used by Git's
test suite in the Git for Windows SDK (thanks to the MSYS2 project)
understand both Unix-style as well as Windows-style paths, we can stave
off this problem by simply switching to Windows-style paths and
side-stepping the need for any automatic path conversion.

Note: The `PATH` variable is obviously special, as it is colon-separated
in the MSYS2 Bash used by Git for Windows, and therefore _cannot_
contain absolute Windows-style paths, lest the colon after the drive
letter is mistaken for a path separator. Therefore, we need to be
careful to keep the Unix-style when modifying the `PATH` variable.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
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 agot3920: don't ignore errors of more than one command with `|| true`
Johannes Sixt [Mon, 21 Nov 2022 17:58:13 +0000 (18:58 +0100)] 
t3920: don't ignore errors of more than one command with `|| true`

It is customary to write `A || true` to ignore a potential error exit of
command A. But when we have a sequence `A && B && C || true && D`, then
a failure of any of A, B, or C skips to D right away. This is not
intended here. Turn the command whose failure is to be ignored into a
compound command to ensure it is the only one that is allowed to fail.

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
17 months agot4023: fix ignored exit codes of git
Ævar Arnfjörð Bjarmason [Fri, 2 Dec 2022 00:06:29 +0000 (01:06 +0100)] 
t4023: fix ignored exit codes of git

Change a "git diff-tree" command to be &&-chained so that we won't
ignore its exit code, see the ea05fd5fbf7 (Merge branch
'ab/keep-git-exit-codes-in-tests', 2022-03-16) topic for prior art.

This fixes code added in b45563a229f (rename: Break filepairs with
different types., 2007-11-30). Due to hiding the exit code we hid a
memory leak under SANITIZE=leak.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
17 months agot7600: don't ignore "rev-parse" exit code in helper
Ævar Arnfjörð Bjarmason [Fri, 2 Dec 2022 11:52:34 +0000 (12:52 +0100)] 
t7600: don't ignore "rev-parse" exit code in helper

Change the verify_mergeheads() helper the check the exit code of "git
rev-parse".

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@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 agot5314: check exit code of "git"
Ævar Arnfjörð Bjarmason [Mon, 28 Nov 2022 14:18:55 +0000 (15:18 +0100)] 
t5314: check exit code of "git"

Amend the test added in [1] to check the exit code of the "git"
invocations. An in-flight change[2] introduced a memory leak in these
invocations, which went undetected unless we were running under
"GIT_TEST_SANITIZE_LEAK_LOG=true".

Note that the in-flight change made 8 test files fail, but as far as I
can tell only this one would have had its exit code hidden unless
under "GIT_TEST_SANITIZE_LEAK_LOG=true". The rest would be caught
without it.

We could pick other variable names here than "ln%d", e.g. "commit",
"dummy_blob" and "file_blob", but having the "rev-parse" invocations
aligned makes the difference between them more readable, so let's pick
"ln%d".

1. 4cf2143e029 (pack-objects: break delta cycles before delta-search
   phase, 2016-08-11)
2. https://lore.kernel.org/git/221128.868rjvmi3l.gmgdl@evledraar.gmail.com/
3. faececa53f9 (test-lib: have the "check" mode for SANITIZE=leak
   consider leak logs, 2022-07-28)

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
17 months agofsmonitor: fix race seen in t7527
Jeff Hostetler [Thu, 1 Dec 2022 23:32:14 +0000 (23:32 +0000)] 
fsmonitor: fix race seen in t7527

Fix racy tests in t7527 by forcing the use of cookie files during all
types of queries.  There were originaly observed on M1 macs with file
system encryption enabled.

There were a series of simple tests, such as "edit some files" and
"create some files", that started the daemon with GIT_TRACE_FSMONITOR
enabled so that the daemon would emit "event: <path>" messages to the
trace log.  The test would make worktree modifications and then grep
the log file to confirm it contained the expected trace messages.
The greps would occasionally racily-fail.  The expected messages
were always present in the log file, just not yet always present
when the greps ran.

NEEDSWORK: One could argue that the tests should use the `test-tool
fsmonitor-client query` and search for the expected pathnames in the
output rather than grepping the trace log, but I'll leave that for a
later exercise.

The racy tests called `test-tool fsmonitor-client query --token 0`
before grepping the log file.  (Presumably to introduce a small delay
and/or to let the daemon sync with the file system following the last
modification, but that was not always sufficient and hence the race.)

When the query arg is just "0", the daemon treated it as a V1
(aka timestamp-relative request) and responded with a "trivial
response" and a new token, but without trying to catch up to the
the file system event stream.  So the "event: <path>" messages
may or may not yet be in the log file when the grep commands
started.

FWIW, if the tests had sent `--token builtin:0:0` instead, it would
have forced a slightly different code path in the daemon that would
cause the daemon to use a cookie file and let it catch up with the
file system event stream.  I did not see any test failures with this
change.

Instead of modifying the test, I updated the fsmonitor--daemon to
always use a cookie file and catch up to the file system on any
query operation, regardless of the format of the request token.
This is safer.

FWIW, I think the effect of the race was limited to the test.
Commands like `git status` would always do a full scan when getting a
trivial response.  The fact that the daemon was slighly behind the
file system when it generated the response token would cause a second
`git status` to get a few extra paths that the client would have to
examine, but it would not be missing paths.

FWIW, I also think that an earlier version of the code always did
the cookie file for all types of queries, but it was optimized out
during a round of reviews or rework and we didn't notice the race.

Signed-off-by: Jeff Hostetler <jeffhostetler@github.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
17 months agolist-objects-filter: plug pattern_list leak
René Scharfe [Thu, 1 Dec 2022 17:49:41 +0000 (18:49 +0100)] 
list-objects-filter: plug pattern_list leak

filter_sparse_oid__init() uses add_patterns_from_blob_to_list() to
populate the struct pattern_list member of struct filter_sparse_data.
Release it in the complementing filter_sparse_free().

Signed-off-by: René Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
17 months agot4205: don't exit test script on failure
René Scharfe [Thu, 1 Dec 2022 21:48:24 +0000 (22:48 +0100)] 
t4205: don't exit test script on failure

Only abort the individual check instead of exiting the whole test script
if git show fails.  Noticed with GIT_TEST_PASSING_SANITIZE_LEAK=check.

Helped-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: René Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
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 agolist-objects-filter: remove OPT_PARSE_LIST_OBJECTS_FILTER_INIT()
René Scharfe [Tue, 29 Nov 2022 12:26:44 +0000 (13:26 +0100)] 
list-objects-filter: remove OPT_PARSE_LIST_OBJECTS_FILTER_INIT()

OPT_PARSE_LIST_OBJECTS_FILTER_INIT() with a non-NULL second argument
passes a function pointer via an object pointer, which is undefined.  It
may work fine on platforms that implement C99 extension J.5.7 (Function
pointer casts).  Remove the unused macro and avoid the dependency on
that extension.

Signed-off-by: René Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
17 months agopack-objects: simplify --filter handling
René Scharfe [Tue, 29 Nov 2022 12:25:05 +0000 (13:25 +0100)] 
pack-objects: simplify --filter handling

pack-objects uses OPT_PARSE_LIST_OBJECTS_FILTER_INIT() to initialize the
a rev_info struct lazily before populating its filter member using the
--filter option values.  It tracks whether the initialization is needed
using the .have_revs member of the callback data.

There is a better way: Use a stand-alone list_objects_filter_options
struct and build a rev_info struct with its .filter member after option
parsing.  This allows using the simpler OPT_PARSE_LIST_OBJECTS_FILTER()
and getting rid of the extra callback mechanism.

Even simpler would be using a struct rev_info as before 5cb28270a1
(pack-objects: lazily set up "struct rev_info", don't leak, 2022-03-28),
but that would expose a memory leak caused by repo_init_revisions()
followed by release_revisions() without a setup_revisions() call in
between.

Using list_objects_filter_options also allows pushing the rev_info
struct into get_object_list(), where it arguably belongs. Either way,
this is all left for later.

Helped-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>
17 months agopack-objects: fix handling of multiple --filter options
René Scharfe [Tue, 29 Nov 2022 12:23:53 +0000 (13:23 +0100)] 
pack-objects: fix handling of multiple --filter options

Since 5cb28270a1 (pack-objects: lazily set up "struct rev_info", don't
leak, 2022-03-28) --filter options given to git pack-objects overrule
earlier ones, letting only the leftmost win and leaking the memory
allocated for earlier ones.  Fix that by only initializing the rev_info
struct once.

Signed-off-by: René Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
17 months agot5317: demonstrate failure to handle multiple --filter options
René Scharfe [Tue, 29 Nov 2022 12:22:26 +0000 (13:22 +0100)] 
t5317: demonstrate failure to handle multiple --filter options

git pack-objects should accept multiple --filter options as documented
in Documentation/rev-list-options.txt, but currently the last one wins.
Show that using tests with multiple blob size limits

Signed-off-by: René Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
17 months agot5317: stop losing return codes of git ls-files
René Scharfe [Tue, 29 Nov 2022 12:21:17 +0000 (13:21 +0100)] 
t5317: stop losing return codes of git ls-files

fb2d0db502 (test-lib-functions: add parsing helpers for ls-files and
ls-tree, 2022-04-04) not only started to use helper functions, it also
started to pipe the output of git ls-files into them directly, without
using a temporary file.  No explanation was given.  This causes the
return code of that git command to be ignored.

Revert that part of the change, use temporary files and check the return
code of git ls-files again.

Suggested-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>
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 agopack-bitmap.c: trace bitmap ignore logs when midx-bitmap is found
Jeff King [Mon, 28 Nov 2022 14:09:53 +0000 (22:09 +0800)] 
pack-bitmap.c: trace bitmap ignore logs when midx-bitmap is found

When we find a midx bitmap, we do not bother checking for pack
bitmaps, since we can use only one. But since we will warn of unused
bitmaps via trace2, let's continue looking for pack bitmaps when
tracing is enabled.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Teng Long <dyroneteng@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
17 months agopack-bitmap.c: break out of the bitmap loop early if not tracing
Jeff King [Mon, 28 Nov 2022 14:09:52 +0000 (22:09 +0800)] 
pack-bitmap.c: break out of the bitmap loop early if not tracing

After opening a bitmap successfully, we try opening others only
because we want to report that other bitmap files are ignored in
the trace2 log.  When trace2 is not enabled, we do not have to
do any of that.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Teng Long <dyroneteng@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
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