Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2022-06-28git-submodule.sh: remove unused top-level "--branch" argumentÆvar Arnfjörð Bjarmason
In 5c08dbbdf1a (git-submodule: fix subcommand parser, 2008-01-15) the "--branch" option was supported as an option to "git submodule" itself, i.e. "git submodule --branch" as a side-effect of its implementation. Then in b57e8119e6e (submodule: teach set-branch subcommand, 2019-02-08) when the "set-branch" subcommand was added the assertion that we shouldn't have "--branch" anywhere except as an argument to "add" and "set-branch" was copy/pasted from the adjacent check for "--cache" added (or rather modified) in 496eeeb19b9 (git-submodule.sh: avoid "test <cond> -a/-o <cond>", 2014-06-10). But there's been a logic error in that check, which at a glance looked like it should be supporting: git submodule --branch <branch> (add | set-branch) [<options>] But due to "||" in the condition (as opposed to "&&" for "--cache") if we have "--branch" here already we'll emit usage, even for "add" and "set-branch". So in addition to never having documented this form, it hasn't worked since b57e8119e6e was released with v2.22.0. So it's safe to remove this code. I.e. we don't want to support the form noted above, but only: git submodule (add | set-branch) --branch <branch> [<options>] Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-06-28git-submodule.sh: make the "$cached" variable a booleanÆvar Arnfjörð Bjarmason
Remove the assignment of "$1" to the "$cached" variable. As seen in the initial implementation in 70c7ac22de6 (Add git-submodule command, 2007-05-26) we only need to keep track of if we've seen the --cached option, not save the "--cached" string for later use. In 28f9af5d25e (git-submodule summary: code framework, 2008-03-11) "$1" was assigned to it, but since there was no reason to do so let's stop doing it. This trivial change will make it easier to reason about an eventual change that'll remove the cmd_summary() function in favor of dispatching to "git submodule--helper summary" directly. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-06-28git-submodule.sh: remove unused $prefix variableÆvar Arnfjörð Bjarmason
Remove the $prefix variable which isn't used anymore, and hasn't been since b3c5f5cb048 (submodule: move core cmd_update() logic to C, 2022-03-15). Before that we'd use it to invoke "git submodule--helper" with the "--recursive-prefix" option, but since b3c5f5cb048 that "git submodule--helper" option is only used when it invokes itself. So the "--recursive-prefix" option is still in use, but at this point only when the helper invokes itself during submodule recursion. See the "--recursive-prefix" option added in c51f8f94e5b (submodule--helper: run update procedures from C, 2021-08-24). Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-06-28git-submodule.sh: remove unused sanitize_submodule_env()Ævar Arnfjörð Bjarmason
The sanitize_submodule_env() function was last used before b3c5f5cb048 (submodule: move core cmd_update() logic to C, 2022-03-15), let's remove it. This also allows us to remove clear_local_git_env() from git-sh-setup.sh. That function hasn't been documented in Documentation/git-sh-setup.sh, and since 14111fc4927 (git: submodule honor -c credential.* from command line, 2016-02-29) it had only been used in the sanitize_submodule_env() function being removed here. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-06-14Git 2.37-rc0v2.37.0-rc0Junio C Hamano
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-06-14Merge branch 'gc/document-config-worktree-scope'Junio C Hamano
Doc update. * gc/document-config-worktree-scope: config: document and test the 'worktree' scope
2022-06-14Merge branch 'js/wait-or-whine-can-fail'Junio C Hamano
We used to log an error return from wait_or_whine() as process termination of the waited child, which was incorrect. * js/wait-or-whine-can-fail: run-command: don't spam trace2_child_exit()
2022-06-14Merge branch 'ab/remote-free-fix'Junio C Hamano
Use-after-free (with another forget-to-free) fix. * ab/remote-free-fix: remote.c: don't dereference NULL in freeing loop remote.c: remove braces from one-statement "for"-loops
2022-06-14Merge branch 'sn/fsmonitor-missing-clock'Junio C Hamano
Sample watchman interface hook sometimes failed to produce correctly formatted JSON message, which has been corrected. * sn/fsmonitor-missing-clock: fsmonitor: query watchman with right valid json
2022-06-14Merge branch 'zh/read-cache-copy-name-entry-fix'Junio C Hamano
Remove redundant copying (with index v3 and older) or possible over-reading beyond end of mmapped memory (with index v4) has been corrected. * zh/read-cache-copy-name-entry-fix: read-cache.c: reduce unnecessary cache entry name copying
2022-06-14Merge branch 'tb/show-ref-optim'Junio C Hamano
"git show-ref --heads" (and "--tags") still iterated over all the refs only to discard refs outside the specified area, which has been corrected. * tb/show-ref-optim: builtin/show-ref.c: avoid over-iterating with --heads, --tags
2022-06-14Merge branch 'ds/credentials-in-url'Junio C Hamano
The "fetch.credentialsInUrl" configuration variable controls what happens when a URL with embedded login credential is used. * ds/credentials-in-url: remote: create fetch.credentialsInUrl config
2022-06-14Merge branch 'jt/unparse-commit-upon-graft-change'Junio C Hamano
Updating the graft information invalidates the list of parents of in-core commit objects that used to be in the graft file. * jt/unparse-commit-upon-graft-change: commit,shallow: unparse commits if grafts changed
2022-06-14Merge branch 'ab/hooks-regression-fix'Junio C Hamano
In Git 2.36 we revamped the way how hooks are invoked. One change that is end-user visible is that the output of a hook is no longer directly connected to the standard output of "git" that spawns the hook, which was noticed post release. This is getting corrected. * ab/hooks-regression-fix: hook API: fix v2.36.0 regression: hooks should be connected to a TTY run-command: add an "ungroup" option to run_process_parallel()
2022-06-14Merge branch 'tl/ls-tree-oid-only'Junio C Hamano
Add tests for a regression fixed earlier. * tl/ls-tree-oid-only: ls-tree: test for the regression in 9c4d58ff2c3
2022-06-14Merge branch 'pb/range-diff-with-submodule'Junio C Hamano
"git -c diff.submodule=log range-diff" did not show anything for submodules that changed in the ranges being compared, and "git -c diff.submodule=diff range-diff" did not work correctly. Fix this by including the "--submodule=short" output unconditionally to be compared. * pb/range-diff-with-submodule: range-diff: show submodule changes irrespective of diff.submodule
2022-06-11Ninth batchJunio C Hamano
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-06-11Merge branch 'ab/bug-if-bug'Junio C Hamano
A new bug() and BUG_if_bug() API is introduced to make it easier to uniformly log "detect multiple bugs and abort in the end" pattern. * ab/bug-if-bug: cache-tree.c: use bug() and BUG_if_bug() receive-pack: use bug() and BUG_if_bug() parse-options.c: use optbug() instead of BUG() "opts" check parse-options.c: use new bug() API for optbug() usage.c: add a non-fatal bug() function to go with BUG() common-main.c: move non-trace2 exit() behavior out of trace2.c
2022-06-11Merge branch 'jy/gitweb-xhtml5'Junio C Hamano
Update the doctype written in gitweb output to xhtml5. * jy/gitweb-xhtml5: gitweb: switch to an XHTML5 DOCTYPE
2022-06-11Merge branch 'jh/builtin-fsmonitor-part3'Junio C Hamano
More fsmonitor--daemon. * jh/builtin-fsmonitor-part3: (30 commits) t7527: improve implicit shutdown testing in fsmonitor--daemon fsmonitor--daemon: allow --super-prefix argument t7527: test Unicode NFC/NFD handling on MacOS t/lib-unicode-nfc-nfd: helper prereqs for testing unicode nfc/nfd t/helper/hexdump: add helper to print hexdump of stdin fsmonitor: on macOS also emit NFC spelling for NFD pathname t7527: test FSMonitor on case insensitive+preserving file system fsmonitor: never set CE_FSMONITOR_VALID on submodules t/perf/p7527: add perf test for builtin FSMonitor t7527: FSMonitor tests for directory moves fsmonitor: optimize processing of directory events fsm-listen-darwin: shutdown daemon if worktree root is moved/renamed fsm-health-win32: force shutdown daemon if worktree root moves fsm-health-win32: add polling framework to monitor daemon health fsmonitor--daemon: stub in health thread fsmonitor--daemon: rename listener thread related variables fsmonitor--daemon: prepare for adding health thread fsmonitor--daemon: cd out of worktree root fsm-listen-darwin: ignore FSEvents caused by xattr changes on macOS unpack-trees: initialize fsmonitor_has_run_once in o->result ...
2022-06-11Merge branch 'gc/zero-length-branch-config-fix'Junio C Hamano
A misconfigured 'branch..remote' led to a bug in configuration parsing. * gc/zero-length-branch-config-fix: remote.c: reject 0-length branch names remote.c: don't BUG() on 0-length branch names
2022-06-11Merge branch 'ab/env-array'Junio C Hamano
Rename .env_array member to .env in the child_process structure. * ab/env-array: run-command API users: use "env" not "env_array" in comments & names run-command API: rename "env_array" to "env"
2022-06-11Merge branch 'cb/buggy-gcc-12-workaround'Junio C Hamano
With a more targetted workaround in http.c in another topic, we may be able to lift this blanket "GCC12 dangling-pointer warning is broken and unsalvageable" workaround. * cb/buggy-gcc-12-workaround: Revert -Wno-error=dangling-pointer
2022-06-09Sync with 'maint'Junio C Hamano
2022-06-09Prepare for 2.36.2Junio C Hamano
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-06-09Merge branch 'jc/clone-remote-name-leak-fix' into maintJunio C Hamano
"git clone --origin X" leaked piece of memory that held value read from the clone.defaultRemoteName configuration variable, which has been plugged. source: <xmqqlevl4ysk.fsf@gitster.g> * jc/clone-remote-name-leak-fix: clone: plug a miniscule leak
2022-06-09Merge branch 'ds/midx-normalize-pathname-before-comparison' into maintJunio C Hamano
The path taken by "git multi-pack-index" command from the end user was compared with path internally prepared by the tool withut first normalizing, which lead to duplicated paths not being noticed, which has been corrected. source: <pull.1221.v2.git.1650911234.gitgitgadget@gmail.com> * ds/midx-normalize-pathname-before-comparison: cache: use const char * for get_object_directory() multi-pack-index: use --object-dir real path midx: use real paths in lookup_multi_pack_index()
2022-06-09Merge branch 'ah/rebase-keep-base-fix' into maintJunio C Hamano
"git rebase --keep-base <upstream> <branch-to-rebase>" computed the commit to rebase onto incorrectly, which has been corrected. source: <20220421044233.894255-1-alexhenrie24@gmail.com> * ah/rebase-keep-base-fix: rebase: use correct base for --keep-base when a branch is given
2022-06-09Merge branch 'pw/test-malloc-with-sanitize-address' into maintJunio C Hamano
Avoid problems from interaction between malloc_check and address sanitizer. source: <pull.1210.git.1649507317350.gitgitgadget@gmail.com> * pw/test-malloc-with-sanitize-address: tests: make SANITIZE=address imply TEST_NO_MALLOC_CHECK
2022-06-09Merge branch 'rs/commit-summary-wo-break-rewrite' into maintJunio C Hamano
The commit summary shown after making a commit is matched to what is given in "git status" not to use the break-rewrite heuristics. source: <c35bd0aa-2e46-e710-2b39-89f18bad0097@web.de> * rs/commit-summary-wo-break-rewrite: commit, sequencer: turn off break_opt for commit summary
2022-06-09Merge branch 'mg/detect-compiler-in-c-locale' into maintJunio C Hamano
Build procedure fixup. source: <f306f43f375bc9b9c98e85260587442e5d9ef0ba.1652094958.git.git@grubix.eu> * mg/detect-compiler-in-c-locale: detect-compiler: make detection independent of locale
2022-06-09Merge branch 'cb/ci-make-p4-optional' into maintJunio C Hamano
macOS CI jobs have been occasionally flaky due to tentative version skew between perforce and the homebrew packager. Instead of failing the whole CI job, just let it skip the p4 tests when this happens. source: <20220512223940.238367-1-gitster@pobox.com> * cb/ci-make-p4-optional: ci: use https, not http to download binaries from perforce.com ci: reintroduce prevention from perforce being quarantined in macOS ci: avoid brew for installing perforce ci: make failure to find perforce more user friendly
2022-06-09Merge branch 'ab/valgrind-fixes' into maintJunio C Hamano
A bit of test framework fixes with a few fixes to issues found by valgrind. source: <20220512223218.237544-1-gitster@pobox.com> * ab/valgrind-fixes: commit-graph.c: don't assume that stat() succeeds object-file: fix a unpack_loose_header() regression in 3b6a8db3b03 log test: skip a failing mkstemp() test under valgrind tests: using custom GIT_EXEC_PATH breaks --valgrind tests
2022-06-09Merge branch 'jc/archive-add-file-normalize-mode' into maintJunio C Hamano
"git archive --add-file=<path>" picked up the raw permission bits from the path and propagated to zip output in some cases, without normalization, which has been corrected (tar output did not have this issue). source: <xmqqmtfme8v6.fsf@gitster.g> * jc/archive-add-file-normalize-mode: archive: do not let on-disk mode leak to zip archives
2022-06-09Merge branch 'jc/show-branch-g-current' into maintJunio C Hamano
The "--current" option of "git show-branch" should have been made incompatible with the "--reflog" mode, but this was not enforced, which has been corrected. source: <xmqqh76mf7s4.fsf_-_@gitster.g> * jc/show-branch-g-current: show-branch: -g and --current are incompatible
2022-06-09Merge branch 'jc/update-ozlabs-url' into maintJunio C Hamano
Update URL to the gitk repository. * jc/update-ozlabs-url: SubmittingPatches: use more stable git.ozlabs.org URL
2022-06-09Merge branch 'jc/http-clear-finished-pointer' into maintJunio C Hamano
Meant to go with js/ci-gcc-12-fixes. source: <xmqq7d68ytj8.fsf_-_@gitster.g> * jc/http-clear-finished-pointer: http.c: clear the 'finished' member once we are done with it
2022-06-09Merge branch 'js/ci-gcc-12-fixes' into maintJunio C Hamano
Fixes real problems noticed by gcc 12 and works around false positives. source: <pull.1238.git.1653351786.gitgitgadget@gmail.com> * js/ci-gcc-12-fixes: dir.c: avoid "exceeds maximum object size" error with GCC v12.x nedmalloc: avoid new compile error compat/win32/syslog: fix use-after-realloc
2022-06-08config: document and test the 'worktree' scopeGlen Choo
Test that "git config --show-scope" shows the "worktree" scope, and add it to the list of scopes in Documentation/git-config.txt. "git config --help" does not need to be updated because it already mentions "worktree". Signed-off-by: Glen Choo <chooglen@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-06-08Eighth batchJunio C Hamano
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-06-08Merge branch 'jc/all-negative-pathspec'Junio C Hamano
A git subcommand like "git add -p" spawns a separate git process while relaying its command line arguments. A pathspec with only negative elements was mistakenly passed with an empty string, which has been corrected. * jc/all-negative-pathspec: pathspec: correct an empty string used as a pathspec element
2022-06-08Merge branch 'js/scalar-diagnose'Junio C Hamano
Implementation of "scalar diagnose" subcommand. * js/scalar-diagnose: scalar: teach `diagnose` to gather loose objects information scalar: teach `diagnose` to gather packfile info scalar diagnose: include disk space information scalar: implement `scalar diagnose` scalar: validate the optional enlistment argument archive --add-virtual-file: allow paths containing colons archive: optionally add "virtual" files
2022-06-08Merge branch 'rs/document-archive-prefix'Junio C Hamano
The documentation on the interaction between "--add-file" and "--prefix" options of "git archive" has been improved. * rs/document-archive-prefix: archive: improve documentation of --prefix
2022-06-08Merge branch 'fh/transport-push-leakfix'Junio C Hamano
Leakfix. * fh/transport-push-leakfix: transport: free local and remote refs in transport_push() transport: unify return values and exit point from transport_push() transport: remove unnecessary indenting in transport_push()
2022-06-08Merge branch 'js/ci-github-workflow-markup'Junio C Hamano
Update the GitHub workflow support to make it quicker to get to the failing test. * js/ci-github-workflow-markup: ci: call `finalize_test_case_output` a little later ci(github): mention where the full logs can be found ci: use `--github-workflow-markup` in the GitHub workflow ci(github): avoid printing test case preamble twice ci(github): skip the logs of the successful test cases ci: optionally mark up output in the GitHub workflow ci/run-build-and-tests: add some structure to the GitHub workflow output ci: make it easier to find failed tests' logs in the GitHub workflow ci/run-build-and-tests: take a more high-level view test(junit): avoid line feeds in XML attributes tests: refactor --write-junit-xml code ci: fix code style
2022-06-08Merge branch 'ab/plug-leak-in-revisions'Junio C Hamano
Plug the memory leaks from the trickiest API of all, the revision walker. * ab/plug-leak-in-revisions: (27 commits) revisions API: add a TODO for diff_free(&revs->diffopt) revisions API: have release_revisions() release "topo_walk_info" revisions API: have release_revisions() release "date_mode" revisions API: call diff_free(&revs->pruning) in revisions_release() revisions API: release "reflog_info" in release revisions() revisions API: clear "boundary_commits" in release_revisions() revisions API: have release_revisions() release "prune_data" revisions API: have release_revisions() release "grep_filter" revisions API: have release_revisions() release "filter" revisions API: have release_revisions() release "cmdline" revisions API: have release_revisions() release "mailmap" revisions API: have release_revisions() release "commits" revisions API users: use release_revisions() for "prune_data" users revisions API users: use release_revisions() with UNLEAK() revisions API users: use release_revisions() in builtin/log.c revisions API users: use release_revisions() in http-push.c revisions API users: add "goto cleanup" for release_revisions() stash: always have the owner of "stash_info" free it revisions API users: use release_revisions() needing REV_INFO_INIT revision.[ch]: document and move code declared around "init" ...
2022-06-08Merge branch 'yw/cmake-updates'Junio C Hamano
CMake updates. * yw/cmake-updates: cmake: remove (_)UNICODE def on Windows in CMakeLists.txt cmake: add pcre2 support cmake: fix CMakeLists.txt on Linux
2022-06-07run-command: don't spam trace2_child_exit()Josh Steadmon
In rare cases[1], wait_or_whine() cannot determine a child process's status (and will return -1 in this case). This can cause Git to issue trace2 child_exit events despite the fact that the child may still be running. In pathological cases, we've seen > 80 million exit events in our trace logs for a single child process. Fix this by only issuing trace2 events in finish_command_in_signal() if we get a value other than -1 from wait_or_whine(). This can lead to missing child_exit events in such a case, but that is preferable to duplicating events on a scale that threatens to fill the user's filesystem with invalid trace logs. [1]: This can happen when: * waitpid() returns -1 and errno != EINTR * waitpid() returns an invalid PID * the status set by waitpid() has neither the WIFEXITED() nor WIFSIGNALED() flags Signed-off-by: Josh Steadmon <steadmon@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-06-07hook API: fix v2.36.0 regression: hooks should be connected to a TTYÆvar Arnfjörð Bjarmason
Fix a regression reported[1] against f443246b9f2 (commit: convert {pre-commit,prepare-commit-msg} hook to hook.h, 2021-12-22): Due to using the run_process_parallel() API in the earlier 96e7225b310 (hook: add 'run' subcommand, 2021-12-22) we'd capture the hook's stderr and stdout, and thus lose the connection to the TTY in the case of e.g. the "pre-commit" hook. As a preceding commit notes GNU parallel's similar --ungroup option also has it emit output faster. While we're unlikely to have hooks that emit truly massive amounts of output (or where the performance thereof matters) it's still informative to measure the overhead. In a similar "seq" test we're now ~30% faster: $ cat .git/hooks/seq-hook; git hyperfine -L rev origin/master,HEAD~0 -s 'make CFLAGS=-O3' './git hook run seq-hook' #!/bin/sh seq 100000000 Benchmark 1: ./git hook run seq-hook' in 'origin/master Time (mean ± σ): 787.1 ms ± 13.6 ms [User: 701.6 ms, System: 534.4 ms] Range (min … max): 773.2 ms … 806.3 ms 10 runs Benchmark 2: ./git hook run seq-hook' in 'HEAD~0 Time (mean ± σ): 603.4 ms ± 1.6 ms [User: 573.1 ms, System: 30.3 ms] Range (min … max): 601.0 ms … 606.2 ms 10 runs Summary './git hook run seq-hook' in 'HEAD~0' ran 1.30 ± 0.02 times faster than './git hook run seq-hook' in 'origin/master' 1. https://lore.kernel.org/git/CA+dzEBn108QoMA28f0nC8K21XT+Afua0V2Qv8XkR8rAeqUCCZw@mail.gmail.com/ Reported-by: Anthony Sottile <asottile@umich.edu> Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> [jc: minor fix-up to tests for consistency] Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-06-07remote.c: don't dereference NULL in freeing loopÆvar Arnfjörð Bjarmason
Fix a bug in fd3cb0501e1 (remote: move static variables into per-repository struct, 2021-11-17) where we'd free(remote->pushurl[i]) after having NULL'd out remote->pushurl. itself. We free "remote->pushurl" in the next "for"-loop, so doing this appears to have been a copy/paste error. Before this change GCC 12's -fanalyzer would correctly note that we'd dereference NULL in this case, this change fixes that: remote.c: In function ‘remote_clear’: remote.c:153:17: error: dereference of NULL ‘*remote.pushurl’ [CWE-476] [-Werror=analyzer-null-dereference] 153 | free((char *)remote->pushurl[i]); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ [...] Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>