summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2021-09-10Merge branch 'ba/object-info'Libravatar Junio C Hamano1-2/+3
Leakfix. * ba/object-info: protocol-caps.c: fix memory leak in send_info()
2021-09-10Merge branch 'ab/commit-graph-usage'Libravatar Junio C Hamano3-46/+74
Fixes on usage message from "git commit-graph". * ab/commit-graph-usage: commit-graph: show "unexpected subcommand" error commit-graph: show usage on "commit-graph [write|verify] garbage" commit-graph: early exit to "usage" on !argc multi-pack-index: refactor "goto usage" pattern commit-graph: use parse_options_concat() commit-graph: remove redundant handling of -h commit-graph: define common usage with a macro
2021-09-10Merge branch 'mh/send-email-reset-in-reply-to'Libravatar Junio C Hamano2-9/+62
Even when running "git send-email" without its own threaded discussion support, a threading related header in one message is carried over to the subsequent message to result in an unwanted threading, which has been corrected. * mh/send-email-reset-in-reply-to: send-email: avoid incorrect header propagation
2021-09-10Merge branch 'rs/more-fspathcmp'Libravatar Junio C Hamano1-4/+1
Code simplification. * rs/more-fspathcmp: merge-recursive: use fspathcmp() in path_hashmap_cmp()
2021-09-10Merge branch 'sg/set-ceiling-during-tests'Libravatar Junio C Hamano1-1/+2
Buggy tests could damage repositories outside the throw-away test area we created. We now by default export GIT_CEILING_DIRECTORIES to limit the damage from such a stray test. * sg/set-ceiling-during-tests: test-lib: set GIT_CEILING_DIRECTORIES to protect the surrounding repository
2021-09-10Merge branch 'jh/sparse-index-resize-fix'Libravatar Junio C Hamano1-0/+1
The sparse-index support can corrupt the index structure by storing a stale and/or uninitialized data, which has been corrected. * jh/sparse-index-resize-fix: sparse-index: copy dir_hash in ensure_full_index()
2021-09-10Merge branch 'es/walken-tutorial-fix'Libravatar Junio C Hamano1-2/+2
Typofix. * es/walken-tutorial-fix: doc: fix syntax error and the format of printf
2021-09-10Merge branch 'tb/add-objects-in-unpacked-packs-simplify'Libravatar Junio C Hamano4-74/+24
Code simplification with reduced memory usage. * tb/add-objects-in-unpacked-packs-simplify: builtin/pack-objects.c: remove duplicate hash lookup builtin/pack-objects.c: simplify add_objects_in_unpacked_packs() object-store.h: teach for_each_packed_object to ignore kept packs
2021-09-10Merge branch 'ps/fetch-omit-formatting-under-quiet'Libravatar Junio C Hamano1-5/+12
"git fetch --quiet" optimization to avoid useless computation of info that will never be displayed. * ps/fetch-omit-formatting-under-quiet: fetch: skip formatting updated refs with `--quiet`
2021-09-10Merge branch 'ka/want-ref-in-namespace'Libravatar Junio C Hamano3-48/+192
"git upload-pack" which runs on the other side of "git fetch" forgot to take the ref namespaces into account when handling want-ref requests. * ka/want-ref-in-namespace: docs: clarify the interaction of transfer.hideRefs and namespaces upload-pack.c: treat want-ref relative to namespace t5730: introduce fetch command helper
2021-09-10Merge branch 'zh/cherry-pick-advice'Libravatar Junio C Hamano3-11/+42
The advice message that "git cherry-pick" gives when it asks conflicted replay of a commit to be resolved by the end user has been updated. * zh/cherry-pick-advice: cherry-pick: use better advice message
2021-09-10Merge branch 'js/advise-when-skipping-cherry-picked'Libravatar Junio C Hamano7-6/+38
"git rebase" by default skips changes that are equivalent to commits that are already in the history the branch is rebased onto; give messages when this happens to let the users be aware of skipped commits, and also teach them how to tell "rebase" to keep duplicated changes. * js/advise-when-skipping-cherry-picked: sequencer: advise if skipping cherry-picked commit
2021-09-08The fourth batchLibravatar Junio C Hamano1-0/+33
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2021-09-08Merge branch 'sg/column-nl'Libravatar Junio C Hamano3-2/+20
The parser for the "--nl" option of "git column" has been corrected. * sg/column-nl: column: fix parsing of the '--nl' option
2021-09-08Merge branch 'cb/makefile-apple-clang'Libravatar Junio C Hamano1-6/+3
Build update for Apple clang. * cb/makefile-apple-clang: build: catch clang that identifies itself as "$VENDOR clang" build: clang version may not be followed by extra words build: update detect-compiler for newer Xcode version
2021-09-08Merge branch 'ps/ls-refs-strbuf-optim'Libravatar Junio C Hamano1-8/+11
Micro-optimization for the wire protocol driver. * ps/ls-refs-strbuf-optim: ls-refs: reuse buffer when sending refs
2021-09-08Merge branch 'rs/branch-allow-deleting-dangling'Libravatar Junio C Hamano3-2/+16
"git branch -D <branch>" used to refuse to remove a broken branch ref that points at a missing commit, which has been corrected. * rs/branch-allow-deleting-dangling: branch: allow deleting dangling branches with --force
2021-09-08Merge branch 'mt/quiet-with-delayed-checkout'Libravatar Junio C Hamano5-5/+80
The delayed checkout code path in "git checkout" etc. were chatty even when --quiet and/or --no-progress options were given. * mt/quiet-with-delayed-checkout: checkout: make delayed checkout respect --quiet and --no-progress
2021-09-08Merge branch 'rs/xopen-reports-open-failures'Libravatar 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-09-08Merge branch 'dd/diff-files-unmerged-fix'Libravatar Junio C Hamano2-0/+57
"git diff --relative" segfaulted and/or produced incorrect result when there are unmerged paths. * dd/diff-files-unmerged-fix: diff-lib: ignore paths that are outside $cwd if --relative asked
2021-09-08Merge branch 'dd/t6300-wo-gpg-fix'Libravatar 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-09-08Merge branch 'mh/credential-leakfix'Libravatar Junio C Hamano1-0/+1
Leak fix. * mh/credential-leakfix: credential: fix leak in credential_apply_config()
2021-09-08Merge branch 'jk/t5323-no-pack-test-fix'Libravatar Junio C Hamano1-2/+2
Test fix. * jk/t5323-no-pack-test-fix: t5323: drop mentions of "master"
2021-09-08Merge branch 'js/maintenance-launchctl-fix'Libravatar 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-09-08Merge branch 'ab/rebase-fatal-fatal-fix'Libravatar Junio C Hamano1-1/+1
Error message fix. * ab/rebase-fatal-fatal-fix: rebase: emit one "fatal" in "fatal: fatal: <error>"
2021-09-08Merge branch 'ab/ls-remote-packet-trace'Libravatar Junio C Hamano2-3/+5
Debugging aid fix. * ab/ls-remote-packet-trace: ls-remote: set packet_trace_identity(<name>)
2021-09-08Merge branch 'rs/git-mmap-uses-malloc'Libravatar Junio C Hamano1-1/+6
mmap() imitation used to call xmalloc() that dies upon malloc() failure, which has been corrected to just return an error to the caller to be handled. * rs/git-mmap-uses-malloc: compat: let git_mmap use malloc(3) directly
2021-09-08Merge branch 'ga/send-email-sendmail-cmd'Libravatar Junio C Hamano1-1/+1
Test fix. * ga/send-email-sendmail-cmd: t9001: PATH must not use Windows-style paths
2021-09-08Merge branch 'me/t5582-cleanup'Libravatar Junio C Hamano1-1/+0
Test fix. * me/t5582-cleanup: t5582: remove spurious 'cd "$D"' line
2021-09-03The third batchLibravatar Junio C Hamano1-0/+25
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2021-09-03Merge branch 'sg/make-fix-ar-invocation'Libravatar Junio C Hamano1-2/+2
Build fix. * sg/make-fix-ar-invocation: Makefile: remove archives before manipulating them with 'ar'
2021-09-03Merge branch 'ti/tcsh-completion-regression-fix'Libravatar 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-09-03Merge branch 'fc/completion-updates'Libravatar 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-09-03Merge branch 'pw/rebase-r-fixes'Libravatar Junio C Hamano4-58/+155
Various bugs in "git rebase -r" have been fixed. * pw/rebase-r-fixes: rebase -r: fix merge -c with a merge strategy rebase -r: don't write .git/MERGE_MSG when fast-forwarding rebase -i: add another reword test rebase -r: make 'merge -c' behave like reword
2021-09-03Merge branch 'pw/rebase-skip-final-fix'Libravatar Junio C Hamano3-6/+28
Checking out all the paths from HEAD during the last conflicted step in "git rebase" and continuing would cause the step to be skipped (which is expected), but leaves MERGE_MSG file behind in $GIT_DIR and confuses the next "git commit", which has been corrected. * pw/rebase-skip-final-fix: rebase --continue: remove .git/MERGE_MSG rebase --apply: restore some tests t3403: fix commit authorship
2021-09-03Merge branch 'cb/ci-use-upload-artifacts-v1'Libravatar Junio C Hamano1-1/+1
Use upload-artifacts v1 (instead of v2) for 32-bit linux, as the new version has a blocker bug for that architecture. * cb/ci-use-upload-artifacts-v1: ci: use upload-artifacts v1 for dockerized jobs
2021-09-03Merge branch 'jk/commit-edit-fixup-fix'Libravatar Junio C Hamano2-3/+11
"git commit --fixup" now works with "--edit" again, after it was broken in v2.32. * jk/commit-edit-fixup-fix: commit: restore --edit when combined with --fixup
2021-09-03Merge branch 'ps/connectivity-optim'Libravatar Junio C Hamano9-46/+127
The revision traversal API has been optimized by taking advantage of the commit-graph, when available, to determine if a commit is reachable from any of the existing refs. * ps/connectivity-optim: revision: avoid hitting packfiles when commits are in commit-graph commit-graph: split out function to search commit position revision: stop retrieving reference twice connected: do not sort input revisions revision: separate walk and unsorted flags
2021-09-01docs: clarify the interaction of transfer.hideRefs and namespacesLibravatar Kim Altintop1-5/+9
Expand the section about namespaces in the documentation of `transfer.hideRefs` to point out the subtle differences between `upload-pack` and `receive-pack`. ffcfb68176 (upload-pack.c: treat want-ref relative to namespace, 2021-07-30) taught `upload-pack` to reject `want-ref`s for hidden refs, which is now mentioned. It is clarified that at no point the name of a hidden ref is revealed, but the object id it points to may. Signed-off-by: Kim Altintop <kim@eagain.st> Reviewed-by: Jonathan Tan <jonathantanmy@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2021-09-01upload-pack.c: treat want-ref relative to namespaceLibravatar Kim Altintop2-7/+146
When 'upload-pack' runs within the context of a git namespace, treat any 'want-ref' lines the client sends as relative to that namespace. Also check if the wanted ref is hidden via 'hideRefs'. If it is hidden, respond with an error as if the ref didn't exist. Helped-by: Jonathan Tan <jonathantanmy@google.com> Signed-off-by: Kim Altintop <kim@eagain.st> Reviewed-by: Jonathan Tan <jonathantanmy@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2021-09-01t5730: introduce fetch command helperLibravatar Kim Altintop1-36/+37
Assembling a "raw" fetch command to be fed directly to "test-tool serve-v2" is extracted into a test helper. Suggested-by: Junio C Hamano <gitster@pobox.com> Signed-off-by: Kim Altintop <kim@eagain.st> Reviewed-by: Jonathan Tan <jonathantanmy@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2021-08-31protocol-caps.c: fix memory leak in send_info()Libravatar Ævar Arnfjörð Bjarmason1-2/+3
Fix a memory leak in a2ba162cda (object-info: support for retrieving object info, 2021-04-20) which appears to have been based on a misunderstanding of how the pkt-line.c API works. There is no need to strdup() input to packet_writer_write(), it's just a printf()-like format function. This fixes a potentially large memory leak, since the number of OID lines the "object-info" call can be arbitrarily large (or a small one if the request is small). This makes t5701-git-serve.sh pass again under SANITIZE=leak, as it did before a2ba162cda2. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Acked-by: Bruno Albuquerque <bga@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2021-08-30commit-graph: show "unexpected subcommand" errorLibravatar Ævar Arnfjörð Bjarmason2-1/+16
Bring the "commit-graph" command in line with the error output and general pattern in cmd_multi_pack_index(). Let's test for that output, and also cover the same potential bug as was fixed in the multi-pack-index command in 88617d11f9d (multi-pack-index: fix potential segfault without sub-command, 2021-07-19). Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Reviewed-by: Taylor Blau <me@ttaylorr.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2021-08-30commit-graph: show usage on "commit-graph [write|verify] garbage"Libravatar Ævar Arnfjörð Bjarmason2-0/+9
Change the parse_options() invocation in the commit-graph code to error on unknown leftover argv elements, in addition to the existing and implicit erroring via parse_options() on unknown options. We'd already error in cmd_commit_graph() on e.g.: git commit-graph unknown verify git commit-graph --unknown verify But here we're calling parse_options() twice more for the "write" and "verify" subcommands. We did not do the same checking for leftover argv elements there. As a result we'd silently accept garbage in these subcommands, let's not do that. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Reviewed-by: Taylor Blau <me@ttaylorr.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2021-08-30commit-graph: early exit to "usage" on !argcLibravatar Ævar Arnfjörð Bjarmason1-6/+7
Rather than guarding all of the !argc with an additional "if" arm let's do an early goto to "usage". This also makes it clear that "save_commit_buffer" is not needed in this case. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Reviewed-by: Taylor Blau <me@ttaylorr.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2021-08-30multi-pack-index: refactor "goto usage" patternLibravatar Ævar Arnfjörð Bjarmason1-6/+5
Refactor the "goto usage" pattern added in cd57bc41bbc (builtin/multi-pack-index.c: display usage on unrecognized command, 2021-03-30) and 88617d11f9d (multi-pack-index: fix potential segfault without sub-command, 2021-07-19) to maintain the same brevity, but in a form that doesn't run afoul of the recommendation in CodingGuidelines about braces: When there are multiple arms to a conditional and some of them require braces, enclose even a single line block in braces for consistency[...] Let's also change "argv == 0" to juts "!argv", per: Do not explicitly compare an integral value with constant 0 or '\0', or a pointer value with constant NULL[...] I'm changing this because in a subsequent commit I'll make builtin/commit-graph.c use the same pattern, having the two similarly structured commands match aids readability. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Reviewed-by: Taylor Blau <me@ttaylorr.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2021-08-30commit-graph: use parse_options_concat()Libravatar Ævar Arnfjörð Bjarmason1-16/+21
Make use of the parse_options_concat() so we don't need to copy/paste common options like --object-dir. This is inspired by a similar change to "checkout" in 2087182272 (checkout: split options[] array in three pieces, 2019-03-29), and the same pattern in the multi-pack-index command, see 60ca94769ce (builtin/multi-pack-index.c: split sub-commands, 2021-03-30). A minor behavior change here is that now we're going to list both --object-dir and --progress first, before we'd list --progress along with other options. Co-authored-by: Taylor Blau <me@ttaylorr.com> Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Reviewed-by: Taylor Blau <me@ttaylorr.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2021-08-30commit-graph: remove redundant handling of -hLibravatar Ævar Arnfjörð Bjarmason1-4/+0
If we don't handle the -h option here like most parse_options() users we'll fall through and it'll do the right thing for us. I think this code added in 4ce58ee38d (commit-graph: create git-commit-graph builtin, 2018-04-02) was always redundant, parse_options() did this at the time, and the commit-graph code never used PARSE_OPT_NO_INTERNAL_HELP. We don't need a test for this, it's tested by the t0012-help.sh test added in d691551192a (t0012: test "-h" with builtins, 2017-05-30). Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Reviewed-by: Taylor Blau <me@ttaylorr.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2021-08-30commit-graph: define common usage with a macroLibravatar Ævar Arnfjörð Bjarmason1-14/+17
Share the usage message between these three variables by using a macro. Before this new options needed to copy/paste the usage information, see e.g. 809e0327f5 (builtin/commit-graph.c: introduce '--max-new-filters=<n>', 2020-09-18). See b25b727494f (builtin/multi-pack-index.c: define common usage with a macro, 2021-03-30) for another use of this pattern (but on-list this one came first). Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Reviewed-by: Taylor Blau <me@ttaylorr.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2021-08-30sequencer: advise if skipping cherry-picked commitLibravatar Josh Steadmon7-6/+38
Silently skipping commits when rebasing with --no-reapply-cherry-picks (currently the default behavior) can cause user confusion. Issue warnings when this happens, as well as advice on how to preserve the skipped commits. These warnings and advice are displayed only when using the (default) "merge" rebase backend. Update the git-rebase docs to mention the warnings and advice. Signed-off-by: Josh Steadmon <steadmon@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>