summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2022-11-30completion: add optional ignore-case when matching refsAlison Winters2-0/+27
If GIT_COMPLETION_IGNORE_CASE is set, --ignore-case will be added to git for-each-ref calls so that refs can be matched case insensitively, even when running on case sensitive filesystems. Signed-off-by: Alison Winters <alisonatwork@outlook.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-11-29l10n: sv.po: Update Swedish translation (5501t0f0)Peter Krefting1-305/+459
Signed-off-by: Peter Krefting <peter@softwolves.pp.se>
2022-11-29A bit more before -rc1Junio C Hamano1-0/+9
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-11-29Merge branch 'ab/doc-synopsis-and-cmd-usage'Junio C Hamano2-2/+2
Doc and message fix. * ab/doc-synopsis-and-cmd-usage: i18n: fix command template placeholder format
2022-11-29Merge branch 'km/merge-recursive-typofix'Junio C Hamano1-1/+1
Fix an old typo in an error message. * km/merge-recursive-typofix: merge-recursive: fix variable typo in error message
2022-11-29Merge branch 'jx/ci-ubuntu-fix'Junio C Hamano3-17/+13
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
2022-11-29Merge branch 'jh/trace2-timers-and-counters'Junio C Hamano1-2/+2
Test fix. * jh/trace2-timers-and-counters: trace2 tests: guard pthread test with "PTHREAD"
2022-11-29Merge branch 'ah/chainlint-cpuinfo-parse-fix'Junio C Hamano1-1/+1
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
2022-11-29Merge branch 'gc/resolve-alternate-symlinks'Junio C Hamano2-13/+29
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
2022-11-29pack-bitmap.c: trace bitmap ignore logs when midx-bitmap is foundJeff King1-5/+12
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>
2022-11-29pack-bitmap.c: break out of the bitmap loop early if not tracingJeff King1-1/+8
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>
2022-11-28Another batch before -rc1Junio C Hamano1-0/+20
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-11-28Merge branch 'ab/fewer-the-index-macros'Junio C Hamano51-366/+532
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
2022-11-28Merge branch 'sg/plug-line-log-leaks'Junio C Hamano3-12/+13
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
2022-11-28Merge branch 'es/locate-httpd-module-location-in-test'Junio C Hamano1-1/+2
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
2022-11-28Merge branch 'zk/push-use-bitmaps'Junio C Hamano1-3/+3
Test fix. * zk/push-use-bitmaps: t5516: fail to run in verbose mode
2022-11-28Merge branch 'ew/prune-with-missing-objects-pack'Junio C Hamano2-1/+11
"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
2022-11-28Merge branch 'rs/list-objects-filter-leakfix'Junio C Hamano1-0/+1
Leakfix. * rs/list-objects-filter-leakfix: list-objects-filter: plug combine_filter_data leak
2022-11-28Merge branch 'pw/config-int-parse-fixes'Junio C Hamano4-5/+43
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
2022-11-28Merge branch 'jk/parse-object-type-mismatch'Junio C Hamano2-5/+4
`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
2022-11-28Makefile: avoid multiple patterns when recipes generate one filePaul Smith1-2/+10
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>
2022-11-27git-jump: invoke emacs/emacsclientYoichi Nakayama1-1/+16
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>
2022-11-27git-jump: move valid-mode check earlierJeff King1-1/+2
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>
2022-11-27git-jump: add an optional argument '--stdout'Yoichi Nakayama2-2/+33
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>
2022-11-27i18n: fix command template placeholder formatJean-Noël Avila2-2/+2
Signed-off-by: Jean-Noël Avila <jn.avila@free.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-11-27merge-recursive: fix variable typo in error messageKyle Meyer1-1/+1
Signed-off-by: Kyle Meyer <kyle@kyleam.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-11-27send-email: relay '-v N' to format-patchKyle Meyer2-1/+14
send-email relays unrecognized arguments to its format-patch call. Passing '-v N' leads to an error because -v is consumed as send-email's --validate. For example, git send-email -v 3 @{u} fails with fatal: ambiguous argument '3': unknown revision or path not in the working tree. [...] To prevent this, add the short --reroll-count option to send-email's main option list and explicitly provide it to the format-patch call. There other format-patch options that send-email doesn't relay properly, including at least -n, -N, and the diff option -D. Punt on these because dealing with them is more complicated: * they would require configuring send-email to not ignore option case * send-email makes three GetOptions() calls with different sets of options, the last being the main set of options. Unlike -v, which is consumed by the last GetOptions call, the -n, -N, and -D options are consumed as abbreviations by the earlier calls. Signed-off-by: Kyle Meyer <kyle@kyleam.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-11-27var: allow GIT_EDITOR to return nullSean Allred2-6/+63
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>
2022-11-27var: do not print usage() with a correct invocationSean Allred2-10/+15
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>
2022-11-27ci: install python on ubuntuJiang Xin2-5/+5
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>
2022-11-27ci: use the same version of p4 on both Linux and macOSJiang Xin2-3/+2
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>
2022-11-27ci: remove the pipe after "p4 -V" to catch errorsJiang Xin1-2/+2
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>
2022-11-27github-actions: run gcc-8 on ubuntu-20.04 imageJiang Xin3-7/+4
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>
2022-11-25docs: fix description of the `--merge-base` optionKyle Zhao1-2/+2
Signed-off-by: Kyle Zhao <kylezhao@tencent.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-11-25object-file: use real paths when adding alternatesGlen Choo2-13/+29
When adding an alternate ODB, we check if the alternate has the same path as the object dir, and if so, we do nothing. However, that comparison does not resolve symlinks. This makes it possible to add the object dir as an alternate, which may result in bad behavior. For example, it can trick "git repack -a -l -d" (possibly run by "git gc") into thinking that all packs come from an alternate and delete all objects. rm -rf test && git clone https://github.com/git/git test && ( cd test && ln -s objects .git/alt-objects && # -c repack.updateserverinfo=false silences a warning about not # being able to update "info/refs", it isn't needed to show the # bad behavior GIT_ALTERNATE_OBJECT_DIRECTORIES=".git/alt-objects" git \ -c repack.updateserverinfo=false repack -a -l -d && # It's broken! git status # Because there are no more objects! ls .git/objects/pack ) Fix this by resolving symlinks and relative paths before comparing the alternate and object dir. This lets us clean up a number of issues noted in 37a95862c6 (alternates: re-allow relative paths from environment, 2016-11-07): - Now that we compare the real paths, duplicate detection is no longer foiled by relative paths. - Using strbuf_realpath() allows us to "normalize" paths that strbuf_normalize_path() can't, so we can stop silently ignoring errors when "normalizing" paths from the environment. - We now store an absolute path based on getcwd() (the "future direction" named in 37a95862c6), so chdir()-ing in the process no longer changes the directory pointed to by the alternate. This is a change in behavior, but a desirable one. Signed-off-by: Glen Choo <chooglen@google.com> Acked-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-11-25trace2 tests: guard pthread test with "PTHREAD"Ævar Arnfjörð Bjarmason1-2/+2
Since 81071626ba1 (trace2: add global counter mechanism, 2022-10-24) these tests have been failing when git is compiled with NO_PTHREADS=Y, which is always the case e.g. if 'uname -s' is "NONSTOP_KERNEL". Reported-by: Randall S. Becker <randall.becker@nexbridge.ca> Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-11-23Git 2.39-rc0v2.39.0-rc0Junio C Hamano2-1/+38
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-11-23Merge branch 'mh/gitcredentials-generate'Junio C Hamano1-3/+5
Doc update. * mh/gitcredentials-generate: Docs: describe how a credential-generating helper works
2022-11-23Merge branch 'ps/receive-use-only-advertised'Junio C Hamano15-82/+410
"git receive-pack" used to use all the local refs as the boundary for checking connectivity of the data "git push" sent, but now it uses only the refs that it advertised to the pusher. In a repository with the .hideRefs configuration, this reduces the resources needed to perform the check. cf. <221028.86bkpw805n.gmgdl@evledraar.gmail.com> cf. <xmqqr0yrizqm.fsf@gitster.g> * ps/receive-use-only-advertised: receive-pack: only use visible refs for connectivity check rev-parse: add `--exclude-hidden=` option revision: add new parameter to exclude hidden refs revision: introduce struct to handle exclusions revision: move together exclusion-related functions refs: get rid of global list of hidden refs refs: fix memory leak when parsing hideRefs config
2022-11-23Merge branch 'jt/submodule-on-demand'Junio C Hamano5-15/+73
Push all submodules recursively with '--recurse-submodules=on-demand'. * jt/submodule-on-demand: Doc: document push.recurseSubmodules=only
2022-11-23Merge branch 'sz/macos-fsmonitor-symlinks'Junio C Hamano1-1/+1
Fix an issue where core.fsmonitor on macOS would not notice created or modified symbolic links. * sz/macos-fsmonitor-symlinks: fsmonitor--daemon: on macOS support symlink
2022-11-23Merge branch 'ew/delta-islands-free'Junio C Hamano1-20/+51
Free structures related to delta islands after use. * ew/delta-islands-free: delta-islands: free island-related data after use
2022-11-23Merge branch 'mg/notes-newline'Junio C Hamano1-1/+1
Avoid a stray empty newline in the template when creating new notes. * mg/notes-newline: notes: avoid empty line in template
2022-11-23Merge branch 'tb/howto-maintain-git-fixes'Junio C Hamano1-2/+7
A pair of bugfixes to the Documentation/howto/maintain-git.txt guide. * tb/howto-maintain-git-fixes: Documentation: build redo-seen.sh from jch..seen Documentation: build redo-jch.sh from master..jch
2022-11-23Merge branch 'es/chainlint-lineno'Junio C Hamano2-23/+49
Teach chainlint.pl to show corresponding line numbers when printing the source of a test. * es/chainlint-lineno: chainlint: prefix annotated test definition with line numbers chainlint: latch line numbers at which each token starts and ends chainlint: sidestep impoverished macOS "terminfo"
2022-11-23Merge branch 'pw/rebase-no-reflog-action'Junio C Hamano3-32/+46
Avoid setting GIT_REFLOG_ACTION to improve readability of the sequencer internals. * pw/rebase-no-reflog-action: rebase: stop exporting GIT_REFLOG_ACTION sequencer: stop exporting GIT_REFLOG_ACTION
2022-11-23Merge branch 'ab/t7610-timeout'Junio C Hamano1-2/+2
Fix a source of flakiness in CI when compiling with SANITIZE=leak. * ab/t7610-timeout: t7610: use "file:///dev/null", not "/dev/null", fixes MinGW t7610: fix flaky timeout issue, don't clone from example.com
2022-11-23Merge branch 'rp/maintenance-qol'Junio C Hamano5-22/+69
'git maintenance register' is taught to write configuration to an arbitrary path, and 'git for-each-repo' is taught to expand tilde characters in paths. * rp/maintenance-qol: builtin/gc.c: fix use-after-free in maintenance_unregister() maintenance --unregister: fix uninit'd data use & -Wdeclaration-after-statement maintenance: add option to register in a specific config for-each-repo: interpolate repo path arguments
2022-11-23Merge branch 'pw/strict-label-lookups'Junio C Hamano2-25/+45
Correct an error where `git rebase` would mistakenly use a branch or tag named "refs/rewritten/xyz" when missing a rebase label. * pw/strict-label-lookups: sequencer: tighten label lookups sequencer: unify label lookup
2022-11-23Merge branch 'gc/redact-h2h3-headers'Junio C Hamano5-11/+77
Redact headers from cURL's h2h3 module in GIT_CURL_VERBOSE and others. * gc/redact-h2h3-headers: http: redact curl h2h3 headers in info t: run t5551 tests with both HTTP and HTTP/2