summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2021-10-12Merge branch 'en/pull-conflicting-options' into maintLibravatar Junio C Hamano18-83/+371
"git pull" had various corner cases that were not well thought out around its --rebase backend, e.g. "git pull --ff-only" did not stop but went ahead and rebased when the history on other side is not a descendant of our history. The series tries to fix them up. * en/pull-conflicting-options: pull: fix handling of multiple heads pull: update docs & code for option compatibility with rebasing pull: abort by default when fast-forwarding is not possible pull: make --rebase and --no-rebase override pull.ff=only pull: since --ff-only overrides, handle it first pull: abort if --ff-only is given and fast-forwarding is impossible t7601: add tests of interactions with multiple merge heads and config t7601: test interaction of merge/rebase/fast-forward flags and options
2021-10-12Merge branch 'jt/push-negotiation-fixes' into maintLibravatar Junio C Hamano6-4/+96
Bugfix for common ancestor negotiation recently introduced in "git push" codepath. * jt/push-negotiation-fixes: fetch: die on invalid --negotiation-tip hash send-pack: fix push nego. when remote has refs send-pack: fix push.negotiate with remote helper
2021-10-12Merge branch 'ab/pack-stdin-packs-fix' into maintLibravatar Junio C Hamano2-3/+124
Input validation of "git pack-objects --stdin-packs" has been corrected. * ab/pack-stdin-packs-fix: pack-objects: fix segfault in --stdin-packs option pack-objects tests: cover blindspots in stdin handling
2021-10-12Merge branch 'en/typofixes' into maintLibravatar Junio C Hamano2-2/+2
Typofixes. * en/typofixes: merge-ort: fix completely wrong comment trace2.h: fix trivial comment typo
2021-10-12Merge branch 'cb/unicode-14' into maintLibravatar Junio C Hamano1-15/+29
The unicode character width table (used for output alignment) has been updated. * cb/unicode-14: unicode: update the width tables to Unicode 14
2021-10-12Merge branch 'po/git-config-doc-mentions-help-c' into maintLibravatar Junio C Hamano1-0/+3
Doc update. * po/git-config-doc-mentions-help-c: doc: config, tell readers of `git help --config`
2021-10-12Merge branch 'kz/revindex-comment-fix' into maintLibravatar Junio C Hamano1-2/+2
Header comment fix. * kz/revindex-comment-fix: pack-revindex.h: correct the time complexity descriptions
2021-10-12Merge branch 'cb/plug-leaks-in-alloca-emu-users' into maintLibravatar Junio C Hamano2-12/+15
Leakfix. * cb/plug-leaks-in-alloca-emu-users: t0000: avoid masking git exit value through pipes tree-diff: fix leak when not HAVE_ALLOCA_H
2021-10-12Merge branch 'ma/doc-git-version' into maintLibravatar Junio C Hamano2-0/+32
Doc update. * ma/doc-git-version: documentation: add documentation for 'git version'
2021-10-12Merge branch 'rs/drop-core-compression-vars' into maintLibravatar Junio C Hamano3-5/+0
Code clean-up. * rs/drop-core-compression-vars: compression: drop write-only core_compression_* variables
2021-10-12Merge branch 'jk/t5562-racefix' into maintLibravatar Junio C Hamano1-8/+8
Test update. * jk/t5562-racefix: t5562: use alarm() to interrupt timed child-wait
2021-10-12Merge branch 'rs/setup-use-xopen-and-xdup' into maintLibravatar Junio C Hamano1-5/+3
Code clean-up. * rs/setup-use-xopen-and-xdup: setup: use xopen and xdup in sanitize_stdfds
2021-10-12Merge branch 'jc/prefix-filename-allocates' into maintLibravatar Junio C Hamano1-1/+1
Leakfix. * jc/prefix-filename-allocates: hash-object: prefix_filename() returns allocated memory these days
2021-10-12Merge branch 'ab/no-more-check-bindir' into maintLibravatar Junio C Hamano2-15/+1
Build simplification. * ab/no-more-check-bindir: Makefile: remove the check_bindir script
2021-10-12Merge branch 'bs/doc-bugreport-outdir' into maintLibravatar Junio C Hamano1-2/+2
Docfix. * bs/doc-bugreport-outdir: Documentation: fix default directory of git bugreport -o
2021-10-12Merge branch 'cb/ci-build-pedantic' into maintLibravatar Junio C Hamano3-3/+13
CI update. * cb/ci-build-pedantic: ci: run a pedantic build as part of the GitHub workflow
2021-10-12Merge branch 'rs/archive-use-object-id' into maintLibravatar Junio C Hamano1-4/+3
Code cleanup. * rs/archive-use-object-id: archive: convert queue_directory to struct object_id
2021-10-12Merge branch 'rs/show-branch-simplify' into maintLibravatar Junio C Hamano1-10/+5
Code cleanup. * rs/show-branch-simplify: show-branch: simplify rev_is_head()
2021-10-12Merge branch 'cb/remote-ndebug-fix' into maintLibravatar Junio C Hamano1-3/+3
Build fix. * cb/remote-ndebug-fix: remote: avoid -Wunused-but-set-variable in gcc with -DNDEBUG
2021-10-12Merge branch 'ab/mailmap-leakfix' into maintLibravatar Junio C Hamano1-0/+2
Leakfix. * ab/mailmap-leakfix: mailmap.c: fix a memory leak in free_mailap_{info,entry}()
2021-10-12Merge branch 'ab/gc-log-rephrase' into maintLibravatar Junio C Hamano1-1/+1
A pathname in an advice message has been made cut-and-paste ready. * ab/gc-log-rephrase: gc: remove trailing dot from "gc.log" line
2021-10-12Merge branch 'ba/object-info' into maintLibravatar Junio C Hamano1-2/+3
Leakfix. * ba/object-info: protocol-caps.c: fix memory leak in send_info()
2021-10-12Merge branch 'es/walken-tutorial-fix' into maintLibravatar Junio C Hamano1-2/+2
Typofix. * es/walken-tutorial-fix: doc: fix syntax error and the format of printf
2021-10-12Merge branch 'rs/xopen-reports-open-failures' into maintLibravatar Junio C Hamano16-53/+36
Error diagnostics improvement. * rs/xopen-reports-open-failures: use xopen() to handle fatal open(2) failures xopen: explicitly report creation failures
2021-10-12Merge branch 'dd/t6300-wo-gpg-fix' into maintLibravatar Junio C Hamano1-11/+18
Test fix. * dd/t6300-wo-gpg-fix: t6300: check for cat-file exit status code t6300: don't run cat-file on non-existent object
2021-10-12Merge branch 'mh/credential-leakfix' into maintLibravatar Junio C Hamano1-0/+1
Leak fix. * mh/credential-leakfix: credential: fix leak in credential_apply_config()
2021-10-12Merge branch 'jk/t5323-no-pack-test-fix' into maintLibravatar Junio C Hamano1-2/+2
Test fix. * jk/t5323-no-pack-test-fix: t5323: drop mentions of "master"
2021-10-12Merge branch 'js/maintenance-launchctl-fix' into maintLibravatar Junio C Hamano2-21/+87
"git maintenance" scheduler fix for macOS. * js/maintenance-launchctl-fix: maintenance: skip bootout/bootstrap when plist is registered maintenance: create `launchctl` configuration using a lock file
2021-10-12Merge branch 'ab/rebase-fatal-fatal-fix' into maintLibravatar Junio C Hamano1-1/+1
Error message fix. * ab/rebase-fatal-fatal-fix: rebase: emit one "fatal" in "fatal: fatal: <error>"
2021-10-12Merge branch 'ab/ls-remote-packet-trace' into maintLibravatar Junio C Hamano2-3/+5
Debugging aid fix. * ab/ls-remote-packet-trace: ls-remote: set packet_trace_identity(<name>)
2021-10-12Merge branch 'ga/send-email-sendmail-cmd' into maintLibravatar Junio C Hamano1-1/+1
Test fix. * ga/send-email-sendmail-cmd: t9001: PATH must not use Windows-style paths
2021-10-12Merge branch 'me/t5582-cleanup' into maintLibravatar Junio C Hamano1-1/+0
Test fix. * me/t5582-cleanup: t5582: remove spurious 'cd "$D"' line
2021-10-12Merge branch 'sg/make-fix-ar-invocation' into maintLibravatar Junio C Hamano1-2/+2
Build fix. * sg/make-fix-ar-invocation: Makefile: remove archives before manipulating them with 'ar'
2021-10-12Merge branch 'ti/tcsh-completion-regression-fix' into maintLibravatar Junio C Hamano1-2/+3
Update to the command line completion (in contrib/) for tcsh. * ti/tcsh-completion-regression-fix: completion: tcsh: Fix regression by drop of wrapper functions
2021-10-12Merge branch 'fc/completion-updates' into maintLibravatar Junio C Hamano2-7/+22
Command line completion updates. * fc/completion-updates: completion: bash: add correct suffix in variables completion: bash: fix for multiple dash commands completion: bash: fix for suboptions with value completion: bash: fix prefix detection in branch.*
2021-10-12Merge branch 'cb/ci-freebsd-update' into maintLibravatar Junio C Hamano1-1/+8
Update FreeBSD CI job * cb/ci-freebsd-update: ci: update freebsd 12 cirrus job
2021-10-12Merge branch 'cb/builtin-merge-format-string-fix' into maintLibravatar Junio C Hamano1-3/+5
Code clean-up. * cb/builtin-merge-format-string-fix: builtin/merge: avoid -Wformat-extra-args from ancient Xcode
2021-10-12Merge branch 'js/log-protocol-version' into maintLibravatar Junio C Hamano3-0/+15
Debugging aid. * js/log-protocol-version: connect, protocol: log negotiated protocol version
2021-10-12Merge branch 'en/merge-strategy-docs' into maintLibravatar Junio C Hamano6-42/+55
Documentation updates. * en/merge-strategy-docs: Update error message and code comment merge-strategies.txt: add coverage of the `ort` merge strategy git-rebase.txt: correct out-of-date and misleading text about renames merge-strategies.txt: fix simple capitalization error merge-strategies.txt: avoid giving special preference to patience algorithm merge-strategies.txt: do not imply using copy detection is desired merge-strategies.txt: update wording for the resolve strategy Documentation: edit awkward references to `git merge-recursive` directory-rename-detection.txt: small updates due to merge-ort optimizations git-rebase.txt: correct antiquated claims about --rebase-merges
2021-10-12Merge branch 'ab/bundle-doc' into maintLibravatar Junio C Hamano1-30/+117
Doc update. * ab/bundle-doc: bundle doc: replace "basis" with "prerequsite(s)" bundle doc: elaborate on rev<->ref restriction bundle doc: elaborate on object prerequisites bundle doc: rewrite the "DESCRIPTION" section
2021-09-20merge-ort: fix completely wrong commentLibravatar Elijah Newren1-1/+1
Not sure what happened, but the comment is describing code elsewhere in the file. Fix the comment to actually discuss the code that follows. Signed-off-by: Elijah Newren <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2021-09-20trace2.h: fix trivial comment typoLibravatar Elijah Newren1-1/+1
Signed-off-by: Elijah Newren <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2021-09-17unicode: update the width tables to Unicode 14Libravatar Carlo Marcelo Arenas Belón1-15/+29
Released[0] after a long beta period and including several additional zero/double width characters. [0] https://home.unicode.org/announcing-the-unicode-standard-version-14-0/ Signed-off-by: Carlo Marcelo Arenas Belón <carenas@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2021-09-16t0000: avoid masking git exit value through pipesLibravatar Carlo Marcelo Arenas Belón1-11/+12
9af0b8dbe2 (t0000-basic: more commit-tree tests., 2006-04-26) adds tests for commit-tree that mask the return exit from git as described in a378fee5b07 (Documentation: add shell guidelines, 2018-10-05). Fix the tests, to avoid pipes by using a temporary file instead. Signed-off-by: Carlo Marcelo Arenas Belón <carenas@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2021-09-16tree-diff: fix leak when not HAVE_ALLOCA_HLibravatar Carlo Marcelo Arenas Belón1-1/+3
b8ba412bf7 (tree-diff: avoid alloca for large allocations, 2016-06-07) adds a way to route some bigger allocations out of the stack and free them through the addition of two conveniently named macros, but leaves the calls to free the xalloca part, which could be also in the heap, if the system doesn't HAVE_ALLOCA_H (ex: macOS and other BSD). Add the missing free call, xalloca_free(), which is a noop if we allocated memory in the stack frame, but a real free() if we allocated in the heap instead, and while at it, change the expression to match in both macros for ease of readability. This avoids a leak reported by LSAN while running t0000 but that wouldn't fail the test (which is fixed in the next patch): SUMMARY: LeakSanitizer: 1034 byte(s) leaked in 15 allocation(s). Signed-off-by: Carlo Marcelo Arenas Belón <carenas@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2021-09-15pack-revindex.h: correct the time complexity descriptionsLibravatar Kyle Zhao1-2/+2
Time complexities for pack_pos_to_midx and midx_to_pack_pos are swapped, correct it. Signed-off-by: Kyle Zhao <kylezhao@tencent.com> Reviewed-by: Taylor Blau <me@ttaylorr.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2021-09-14documentation: add documentation for 'git version'Libravatar Matthias Aßhauer2-0/+32
While 'git version' is probably the least complex git command, it is a non-experimental user-facing builtin command. As such it should have a help page. Both `git help` and `git version` can be called as options (`--help`/`--version`) that internally get converted to the corresponding command. Add a small paragraph to Documentation/git.txt describing how these two options interact with each other and link to this help page for the sub-options that `--version` can take. Well, currently there is only one sub-option, but that could potentially increase in future versions of Git. Signed-off-by: Matthias Aßhauer <mha1993@live.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2021-09-13doc: config, tell readers of `git help --config`Libravatar Philip Oakley1-0/+3
The `git help` command gained the ability to list config variables in 3ac68a93fd (help: add --config to list all available config, 2018-05-26) but failed to tell readers of the config documenation itself. Provide that cross reference. Signed-off-by: Philip Oakley <philipoakley@iee.email> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2021-09-12compression: drop write-only core_compression_* variablesLibravatar René Scharfe3-5/+0
Since 8de7eeb54b (compression: unify pack.compression configuration parsing, 2016-11-15) the variables core_compression_level and core_compression_seen are only set, but never read. Remove them. Signed-off-by: René Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2021-09-09t5562: use alarm() to interrupt timed child-waitLibravatar Jeff King1-8/+8
The t5562 script occasionally takes 60 extra seconds to complete due to a race condition in the invoke-with-content-length.pl helper. The way it's supposed to work is this: - we set up a SIGCLD handler - we kick off http-backend and write to it with a set content-length, but _don't_ close the pipe - we sleep for 60 seconds, assuming that SIGCLD from http-backend finishing will interrupt us - after the sleep finishes (whetherby 60 seconds or because it was interrupted by the signal), we check a flag to see if our SIGCLD handler was called. If not, then we complain. This usually completes immediately, because the signal interrupts our sleep. But very occasionally the child process dies _before_ we hit the sleep, so we don't realize it. The test still completes successfully (because our $exited flag is set), but it takes an extra 60 seconds. There's no way to check the flag and sleep atomically. So the best we can do with this approach is to sleep in smaller chunks (say, 1 second) and check the flag incrementally. Then we waste a maximum of 1 second if we lose the race. This was proposed in: https://lore.kernel.org/git/20190218205028.32486-1-max@max630.net/ and it does work. But we can do better. Instead of blocking on sleep and waiting for the child signal to interrupt us, we can block on the child exiting and set an alarm signal to trigger the timeout. This lets us exit the script immediately when the child behaves (with no race possible), and wait a maximum of 60 seconds when it doesn't. Note one small subtlety: perl is very willing to restart the waitpid() call after the alarm is delivered, even if we've thrown an exception via die. "perldoc -f alarm" claims you can get around this with an eval/die combo (and even has some example code), but it doesn't seem to work for me with waitpid(); instead, we continue waiting until the child exits. So instead, we'll instruct the child process to exit in the alarm handler itself. In the original code this was done by calling close($out). That would continue to work, since our child is always http-backend, which should exit when its stdin closes. But we can be even more robust against a hung or confused child by sending a KILL signal, which should terminate it immediately. Reported-by: SZEDER Gábor <szeder.dev@gmail.com> Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>