]> git.ipfire.org Git - thirdparty/git.git/log
thirdparty/git.git
21 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

21 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

21 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

21 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>
21 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`

21 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

21 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

21 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

21 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'

21 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

21 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

21 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

21 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>
21 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)

21 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

21 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>
21 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>
21 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>
21 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

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

21 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

21 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

21 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

21 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

21 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

21 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

21 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

21 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

21 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

21 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

21 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>
21 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>
21 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>
21 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

21 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

21 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

21 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>
21 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>
21 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>
21 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>
21 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>
21 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>
21 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>
21 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)

21 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

21 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)

21 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)

21 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

21 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>
21 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>
21 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>
21 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>
21 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>
21 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>
21 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>
21 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>
21 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

21 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

21 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>
21 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>
21 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>
21 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>
21 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>
21 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

21 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>
21 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>
21 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>
21 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>
21 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>
21 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>
21 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>
21 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

21 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

21 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

21 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"

21 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

21 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

21 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>
21 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>
21 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>
21 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

21 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

21 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

21 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

21 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

21 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

21 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

21 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

21 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>
21 months agogit-jump: invoke emacs/emacsclient
Yoichi Nakayama [Sun, 27 Nov 2022 01:18:53 +0000 (01:18 +0000)] 
git-jump: invoke emacs/emacsclient

It works with GIT_EDITOR="emacs", "emacsclient" or "emacsclient -t"

Signed-off-by: Yoichi Nakayama <yoichi.nakayama@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
21 months agogit-jump: move valid-mode check earlier
Jeff King [Sun, 27 Nov 2022 01:18:52 +0000 (01:18 +0000)] 
git-jump: move valid-mode check earlier

We check if the "mode" argument supplied by the user is valid by seeing
if we have a mode_$mode function defined. But we don't do that until
after creating the tempfile. This is wasteful (we create a tempfile but
never use it), and makes it harder to add new options (the recent stdout
option exits before creating the tempfile, so it misses the check and
"git jump --stdout foo" will produce "git-jump: 92: mode_foo: not found"
rather than the regular usage message).

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
21 months agogit-jump: add an optional argument '--stdout'
Yoichi Nakayama [Sun, 27 Nov 2022 01:18:51 +0000 (01:18 +0000)] 
git-jump: add an optional argument '--stdout'

It can be used with M-x grep on Emacs.

Signed-off-by: Yoichi Nakayama <yoichi.nakayama@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
21 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>
21 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>
21 months agovar: allow GIT_EDITOR to return null
Sean Allred [Sat, 26 Nov 2022 14:17:57 +0000 (14:17 +0000)] 
var: allow GIT_EDITOR to return null

The handling to die early when there is no EDITOR is valuable when
used in normal code (i.e., editor.c). In git-var, where
null/empty-string is a perfectly valid value to return, it doesn't
make as much sense.

Remove this handling from `git var GIT_EDITOR` so that it does not
fail so noisily when there is no defined editor.

Signed-off-by: Sean Allred <allred.sean@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
21 months agovar: do not print usage() with a correct invocation
Sean Allred [Sat, 26 Nov 2022 14:17:56 +0000 (14:17 +0000)] 
var: do not print usage() with a correct invocation

Before, git-var could print usage() even if the command was invoked
correctly with a variable defined in git_vars -- provided that its
read() function returned NULL.

Now, we only print usage() only if it was called with a logical
variable that wasn't defined -- regardless of read().

Since we now know the variable is valid when we call read_var(), we
can avoid printing usage() here (and exiting with code 129) and
instead exit quietly with code 1. While exiting with a different code
can be a breaking change, it's far better than changing the exit
status more generally from 'failure' to 'success'.

Signed-off-by: Sean Allred <allred.sean@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
21 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>
21 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>
21 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>
21 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>