aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2023-11-02Merge branch 'bc/more-git-var' into maint-2.42Junio C Hamano2-1/+10
Fix-up for a topic that already has graduated. * bc/more-git-var: var: avoid a segmentation fault when `HOME` is unset
2023-11-02Merge branch 'jk/ci-retire-allow-ref' into maint-2.42Junio C Hamano3-30/+21
CI update. * jk/ci-retire-allow-ref: ci: deprecate ci/config/allow-ref script ci: allow branch selection through "vars"
2023-11-02Merge branch 'ws/git-svn-retire-faketerm' into maint-2.42Junio C Hamano1-18/+2
Code clean-up. * ws/git-svn-retire-faketerm: git-svn: drop FakeTerm hack
2023-11-02Merge branch 'ch/t6300-verify-commit-test-cleanup' into maint-2.42Junio C Hamano2-4/+2
Test clean-up. * ch/t6300-verify-commit-test-cleanup: t/t6300: drop magic filtering t/lib-gpg: forcibly run a trustdb update
2023-11-02Merge branch 'jc/mv-d-to-d-error-message-fix' into maint-2.42Junio C Hamano1-1/+1
Typofix in an error message. * jc/mv-d-to-d-error-message-fix: mv: fix error for moving directory to another
2023-11-02Merge branch 'ja/worktree-orphan' into maint-2.42Junio C Hamano1-1/+1
Typofix in an error message. * ja/worktree-orphan: builtin/worktree.c: fix typo in "forgot fetch" msg
2023-11-02Merge branch 'ob/t9001-indent-fix' into maint-2.42Junio C Hamano1-2/+2
Test style fix. * ob/t9001-indent-fix: t9001: fix indentation in test_no_confirm()
2023-11-02Merge branch 'jk/function-pointer-mismatches-fix' into maint-2.42Junio C Hamano2-8/+13
Code clean-up to please clang-18. * jk/function-pointer-mismatches-fix: hashmap: use expected signatures for comparison functions
2023-11-02Merge branch 'ds/upload-pack-error-sequence-fix' into maint-2.42Junio C Hamano1-2/+3
Error message generation fix. * ds/upload-pack-error-sequence-fix: upload-pack: fix exit code when denying fetch of unreachable object ID upload-pack: fix race condition in error messages
2023-11-02Merge branch 'ws/git-push-doc-grammofix' into maint-2.42Junio C Hamano1-1/+1
Doc update. * ws/git-push-doc-grammofix: git-push.txt: fix grammar
2023-11-02Merge branch 'jk/test-pass-ubsan-options-to-http-test' into maint-2.42Junio C Hamano2-0/+4
UBSAN options were not propagated through the test framework to git run via the httpd, unlike ASAN options, which has been corrected. * jk/test-pass-ubsan-options-to-http-test: test-lib: set UBSAN_OPTIONS to match ASan
2023-11-02Merge branch 'tb/send-email-extract-valid-address-error-message-fix' into ↵Junio C Hamano1-3/+3
maint-2.42 An error message given by "git send-email" when given a malformed address did not give correct information, which has been corrected. * tb/send-email-extract-valid-address-error-message-fix: git-send-email.perl: avoid printing undef when validating addresses
2023-11-02Merge branch 'jk/redact-h2h3-headers-fix' into maint-2.42Junio C Hamano1-6/+31
HTTP Header redaction code has been adjusted for a newer version of cURL library that shows its traces differently from earlier versions. * jk/redact-h2h3-headers-fix: http: update curl http/2 info matching for curl 8.3.0 http: factor out matching of curl http/2 trace lines
2023-11-02Merge branch 'pb/completion-aliases-doc' into maint-2.42Junio C Hamano1-0/+1
Clarify how "alias.foo = : git cmd ; aliased-command-string" should be spelled with necessary whitespaces around punctuation marks to work. * pb/completion-aliases-doc: completion: improve doc for complex aliases
2023-11-02Merge branch 'js/diff-cached-fsmonitor-fix' into maint-2.42Junio C Hamano2-6/+11
"git diff --cached" codepath did not fill the necessary stat information for a file when fsmonitor knows it is clean and ended up behaving as if it is not clean, which has been corrected. * js/diff-cached-fsmonitor-fix: diff-lib: fix check_removed when fsmonitor is on
2023-11-02Merge branch 'js/systemd-timers-wsl-fix' into maint-2.42Junio C Hamano1-1/+1
Update "git maintainance" timers' implementation based on systemd timers to work with WSL. * js/systemd-timers-wsl-fix: maintenance(systemd): support the Windows Subsystem for Linux
2023-11-02Merge branch 'pw/diff-no-index-from-named-pipes' into maint-2.42Junio C Hamano2-0/+20
"git diff --no-index -R <(one) <(two)" did not work correctly, which has been corrected. * pw/diff-no-index-from-named-pipes: diff --no-index: fix -R with stdin
2023-11-02Merge branch 'js/complete-checkout-t' into maint-2.42Junio C Hamano2-4/+12
The completion script (in contrib/) has been taught to treat the "-t" option to "git checkout" and "git switch" just like the "--track" option, to complete remote-tracking branches. * js/complete-checkout-t: completion(switch/checkout): treat --track and -t the same
2023-11-02Merge branch 'rs/grep-no-no-or' into maint-2.42Junio C Hamano1-1/+1
"git grep -e A --no-or -e B" is accepted, even though the negation of "or" did not mean anything, which has been tightened. * rs/grep-no-no-or: grep: reject --no-or
2023-11-02Merge branch 'so/diff-doc-for-patch-update' into maint-2.42Junio C Hamano1-7/+1
References from description of the `--patch` option in various manual pages have been simplified and improved. * so/diff-doc-for-patch-update: doc/diff-options: fix link to generating patch section
2023-11-02Merge branch 'pw/rebase-i-after-failure' into maint-2.42Junio C Hamano5-103/+228
Various fixes to the behaviour of "rebase -i" when the command got interrupted by conflicting changes. cf. <6b927687-cf6e-d73e-78fb-bd4f46736928@gmx.de> * pw/rebase-i-after-failure: rebase -i: fix adding failed command to the todo list rebase --continue: refuse to commit after failed command rebase: fix rewritten list for failed pick sequencer: factor out part of pick_commits() sequencer: use rebase_path_message() rebase -i: remove patch file after conflict resolution rebase -i: move unlink() calls
2023-11-02Merge branch 'ks/ref-filter-sort-numerically' into maint-2.42Junio C Hamano2-10/+26
"git for-each-ref --sort='contents:size'" sorts the refs according to size numerically, giving a ref that points at a blob twelve-byte (12) long before showing a blob hundred-byte (100) long. * ks/ref-filter-sort-numerically: ref-filter: sort numerically when ":size" is used
2023-11-02Merge branch 'jk/diff-result-code-cleanup' into maint-2.42Junio C Hamano17-95/+81
"git diff --no-such-option" and other corner cases around the exit status of the "diff" command has been corrected. * jk/diff-result-code-cleanup: diff: drop useless "status" parameter from diff_result_code() diff: drop useless return values in git-diff helpers diff: drop useless return from run_diff_{files,index} functions diff: die when failing to read index in git-diff builtin diff: show usage for unknown builtin_diff_files() options diff-files: avoid negative exit value diff: spell DIFF_INDEX_CACHED out when calling run_diff_index()
2023-11-02Merge branch 'ob/sequencer-empty-hint-fix' into maint-2.42Junio C Hamano2-2/+6
The use of API between two calls to require_clean_work_tree() from the sequencer code has been cleaned up for consistency. * ob/sequencer-empty-hint-fix: sequencer: rectify empty hint in call of require_clean_work_tree()
2023-11-02Merge branch 'ts/unpacklimit-config-fix' into maint-2.42Junio C Hamano4-9/+84
transfer.unpackLimit ought to be used as a fallback, but overrode fetch.unpackLimit and receive.unpackLimit instead. * ts/unpacklimit-config-fix: transfer.unpackLimit: fetch/receive.unpackLimit takes precedence
2023-11-02Merge branch 'jc/diff-exit-code-with-w-fixes' into maint-2.42Junio C Hamano3-18/+64
"git diff -w --exit-code" with various options did not work correctly, which is being addressed. * jc/diff-exit-code-with-w-fixes: diff: the -w option breaks --exit-code for --raw and other output modes t4040: remove test that succeeded for a wrong reason diff: teach "--stat -w --exit-code" to notice differences diff: mode-only change should be noticed by "--patch -w --exit-code" diff: move the fallback "--exit-code" code down
2023-11-02Merge branch 'tb/commit-graph-verify-fix' into maint-2.42Junio C Hamano2-20/+36
The commit-graph verification code that detects mixture of zero and non-zero generation numbers has been updated. * tb/commit-graph-verify-fix: commit-graph: avoid repeated mixed generation number warnings t/t5318-commit-graph.sh: test generation zero transitions during fsck commit-graph: verify swapped zero/non-zero generation cases commit-graph: introduce `commit_graph_generation_from_graph()`
2023-11-02Merge branch 'jc/ci-skip-same-commit' into maint-2.42Junio C Hamano1-0/+13
Tweak GitHub Actions CI so that pushing the same commit to multiple branch tips at the same time will not waste building and testing the same thing twice. * jc/ci-skip-same-commit: ci: avoid building from the same commit in parallel
2023-11-02Merge branch 'ds/scalar-updates' into maint-2.42Junio C Hamano5-44/+115
Scalar updates. * ds/scalar-updates: scalar reconfigure: help users remove buggy repos setup: add discover_git_directory_reason() scalar: add --[no-]src option
2023-11-02Merge branch 'mp/rebase-label-length-limit' into maint-2.42Junio C Hamano4-6/+62
Overly long label names used in the sequencer machinery are now chopped to fit under filesystem limitation. * mp/rebase-label-length-limit: rebase: allow overriding the maximal length of the generated labels sequencer: truncate labels to accommodate loose refs
2023-11-02Merge branch 'js/ci-coverity' into maint-2.42Junio C Hamano1-0/+163
GitHub CI workflow has learned to trigger Coverity check. * js/ci-coverity: coverity: detect and report when the token or project is incorrect coverity: allow running on macOS coverity: support building on Windows coverity: allow overriding the Coverity project coverity: cache the Coverity Build Tool ci: add a GitHub workflow to submit Coverity scans
2023-11-02Merge branch 'jk/test-lsan-denoise-output' into maint-2.42Junio C Hamano1-0/+1
Tests with LSan from time to time seem to emit harmless message that makes our tests unnecessarily flakey; we work it around by filtering the uninteresting output. * jk/test-lsan-denoise-output: test-lib: ignore uninteresting LSan output
2023-11-02Merge branch 'js/ci-san-skip-p4-and-svn-tests' into maint-2.42Junio C Hamano1-0/+2
Flakey "git p4" tests, as well as "git svn" tests, are now skipped in the (rather expensive) sanitizer CI job. * js/ci-san-skip-p4-and-svn-tests: ci(linux-asan-ubsan): let's save some time
2023-11-02Merge branch 'tb/mark-more-tests-as-leak-free' into maint-2.42Junio C Hamano4-0/+5
Tests that are known to pass with LSan are now marked as such. * tb/mark-more-tests-as-leak-free: leak tests: mark t5583-push-branches.sh as leak-free leak tests: mark t3321-notes-stripspace.sh as leak-free leak tests: mark a handful of tests as leak-free
2023-10-21merge-ort.c: fix typo 'neeed' to 'needed'王常新1-1/+1
Signed-off-by: 王常新 <wchangxin824@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2023-10-20git-push doc: more visibility for -q optionMichal Suchanek1-1/+1
The "-v" option is shown in the SYNOPSIS section near the top, but "-q" is not shown anywhere there. List "-q" alongside "-v". Signed-off-by: Michal Suchanek <msuchanek@suse.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2023-10-18am: align placeholder for --whitespace option with applyJunio C Hamano1-2/+2
`git am` passes the value given to its `--whitespace` option through to the underlying `git apply`, and the value is called <action> over there. Fix the documentation for the command that calls the value <option> to say <action> instead. Note that the option help given by `git am -h` already calls the value <action>, so there is no need to make a matching change there. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2023-10-17commit: do not use cryptic "new_index" in end-user facing messagesJunio C Hamano1-4/+4
These error messages say "new_index" as if that spelling has some significance to the end users (e.g. the file "$GIT_DIR/new_index" has some issues), but that is not the case at all. The i18n folks were made to include the word literally in the translated messages, which was not a good idea at all. Spell it "new index", as we are just telling the users that we failed to create a new index file. The term is expected to be translated to the end-users' languages, not left as if it were a literal file name. This dates all the way back to the first re-implemenation of "git commit" command in C (the scripted version did not have such wording in its error messages), in f5bbc322 (Port git commit to C., 2007-11-08). Signed-off-by: Junio C Hamano <gitster@pobox.com>
2023-10-17builtin/add.c: clean up die() messagesNaomi Ibe1-5/+5
As described in the CodingGuidelines document, a single line message given to die() and its friends should not capitalize its first word, and should not add full-stop at the end. Signed-off-by: Naomi Ibe <naomi.ibeh69@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2023-10-16doc/git-repack: don't mention nonexistent "--unpacked" optionPatrick Steinhardt1-5/+2
The documentation for geometric repacking mentions a "--unpacked" option that supposedly changes how loose objects are rolled up. This option has never existed, and the implied behaviour, namely to include all unpacked objects into the resulting packfile, is in fact the default behaviour. Correct the documentation to not mention this option. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2023-10-16doc/git-repack: fix syntax for `-g` shorthand optionPatrick Steinhardt1-1/+1
The `-g` switch is a shorthand for `--geometric=` and allows the user to specify the geometric. The documentation is wrong though and indicates that the syntax for the shorthand is `-g=<factor>`. In fact though, the option must be specified without the equals sign via `-g<factor>`. Fix the syntax accordingly. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2023-10-10doc/git-worktree: mention "refs/rewritten" as per-worktree refsPatrick Steinhardt1-3/+4
Some references are special in the context of worktrees as they are considered to be per-worktree instead of shared across all of the worktrees. Most importantly, this includes "refs/worktree/" that have explicitly been designed such that users can create per-woorktree refs. But there are also special references that have an associated meaning like "refs/bisect/", which is used to track state of git-bisect(1). These special per-worktree references are documented in git-worktree(1), but one instance is missing. In a9be29c9817 (sequencer: make refs generated by the `label` command worktree-local, 2018-04-25), we have converted "refs/rewritten/" to be a per-worktree reference as well. These references are used by our sequencer infrastructure to generate labels for rebased commits. So in order to allow for multiple concurrent rebases to happen in different worktrees, these references need to be tracked per worktree. We forgot to update our documentation to mention these new per-worktree references, which is fixed by this patch. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2023-10-09doc/cat-file: make synopsis and description less confusingŠtěpán Němec2-19/+17
The DESCRIPTION's "first form" is actually the 1st, 2nd, 3rd and 5th form in SYNOPSIS, the "second form" is the 4th one. Interestingly, this state of affairs was introduced in 97fe7250753b (cat-file docs: fix SYNOPSIS and "-h" output, 2021-12-28) with the claim of "Now the two will match again." ("the two" being DESCRIPTION and SYNOPSIS)... The description also suffers from other correctness and clarity issues, e.g., the "first form" paragraph discusses -p, -s and -t, but leaves out -e, which is included in the corresponding SYNOPSIS section; the second paragraph mentions <format>, which doesn't occur in SYNOPSIS at all, and of the three batch options, really only describes the behavior of --batch-check. Also the mention of "drivers" seems an implementation detail not adding much clarity in a short summary (and isn't expanded upon in the rest of the man page, either). Rather than trying to maintain one-to-one (or N-to-M) correspondence between the DESCRIPTION and SYNOPSIS forms, creating duplication and providing opportunities for error, shorten the former into a concise summary describing the two general modes of operation: batch and non-batch, leaving details to the subsequent manual sections. While here, fix a grammar error in the description of -e and make the following further minor improvements: NAME: shorten ("content or type and size" isn't the whole story; say "details" and leave the actual details to later sections) SYNOPSIS and --help: move the (--textconv | --filters) form before --batch, closer to the other non-batch forms Signed-off-by: Štěpán Němec <stepnem@smrk.net> Acked-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2023-10-06doc: update list archive reference to use lore.kernel.orgJunio C Hamano1-1/+1
No disrespect to other mailing list archives, but the local part of their URLs will become pretty much meaningless once the archives go out of service, and we learned the lesson hard way when $gmane stopped serving. Let's point into https://lore.kernel.org/ for an article that can be found there, because the local part of the URL has the Message-Id: that can be used to find the same message in other archives, even if lore goes down. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2023-10-05daemon: free listen_addr before returningJeff King2-16/+23
We build up a string list of listen addresses from the command-line arguments, but never free it. This causes t5811 to complain of a leak (though curiously it seems to do so only when compiled with gcc, not with clang). To handle this correctly, we have to do a little refactoring: - there are two exit points from the main function, depending on whether we are entering the main loop or serving a single client (since rather than a traditional fork model, we re-exec ourselves with the extra "--serve" argument to accommodate Windows). We don't need --listen at all in the --serve case, of course, but it is passed along by the parent daemon, which simply copies all of the command-line options it got. - we just "return serve()" to run the main loop, giving us no chance to do any cleanup So let's use a "ret" variable to store the return code, and give ourselves a single exit point at the end. That gives us one place to do cleanup. Note that this code also uses the "use a no-dup string-list, but allocate strings we add to it" trick, meaning string_list_clear() will not realize it should free them. We can fix this by switching to a "dup" string-list, but using the "append_nodup" function to add to it (this is preferable to tweaking the strdup_strings flag before clearing, as it puts all the subtle memory-ownership code together). Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2023-10-05revision: clear decoration structs during release_revisions()Jeff King4-0/+22
The point of release_revisions() is to free memory associated with the rev_info struct, but we have several "struct decoration" members that are left untouched. Since the previous commit introduced a function to do that, we can just call it. We do have to provide some specialized callbacks to map the void pointers onto real ones (the alternative would be casting the existing function pointers; this generally works because "void *" is usually interchangeable with a struct pointer, but it is technically forbidden by the standard). Since the line-log code does not expose the type it stores in the decoration (nor of course the function to free it), I put this behind a generic line_log_free() entry point. It's possible we may need to add more line-log specific bits anyway (running t4211 shows a number of other leaks in the line-log code). While this doubtless cleans up many leaks triggered by the test suite, the only script which becomes leak-free is t4217, as it does very little beyond a simple traversal (its existing leak was from the use of --children, which is now fixed). Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2023-10-05decorate: add clear_decoration() functionJeff King4-0/+29
There's not currently any way to free the resources associated with a decoration struct. As a result, we have several memory leaks which cannot easily be plugged. Let's add a "clear" function and make use of it in the example code of t9004. This removes the only leak from that script, so we can mark it as passing the leak sanitizer. Curiously this leak is found only when running SANITIZE=leak with clang, but not with gcc. But it is a bog-standard leak: we allocate some memory in a local variable struct, and then exit main() without releasing it. I'm not sure why gcc doesn't find it. After this patch, both compilers report it as leak-free. Note that the clear function takes a callback to free the individual entries. That's not needed for our example (which is just decorating with ints), but will be for real callers. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2023-10-05coverity: detect and report when the token or project is incorrectJohannes Schindelin1-1/+12
When trying to obtain the MD5 of the Coverity Scan Tool (in order to decide whether a cached version can be used or a new version has to be downloaded), it is possible to get a 401 (Authorization required) due to either an incorrect token, or even more likely due to an incorrect Coverity project name. Seeing an authorization failure that is caused by an incorrect project name was somewhat surprising to me when developing the Coverity workflow, as I found such a failure suggestive of an incorrect token instead. So let's provide a helpful error message about that specifically when encountering authentication issues. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2023-10-03parse-options: drop unused parse_opt_ctx_t memberRené Scharfe1-1/+0
5c387428f1 (parse-options: don't emit "ambiguous option" for aliases, 2019-04-29) added "updated_options" to struct parse_opt_ctx_t, but it has never been used. Remove it. Signed-off-by: René Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2023-09-25coverity: allow running on macOSJohannes Schindelin1-2/+20
For completeness' sake, let's add support for submitting macOS builds to Coverity Scan. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>