aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2023-11-03t: convert tests to not write references via the filesystemPatrick Steinhardt4-24/+23
Some of our tests manually create, update or delete references by writing the respective new values into the filesystem directly. While this works with the current files reference backend, this will break once we have a second reference backend implementation in our codebase. Refactor these tests to instead use git-update-ref(1) or our `ref-store` test tool. The latter is required in some cases where safety checks of git-update-ref(1) would otherwise reject a reference update. While at it, refactor some of the tests to schedule the cleanup command via `test_when_finished` before modifying the repository. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2023-11-03t: allow skipping expected object ID in `ref-store update-ref`Patrick Steinhardt1-4/+7
We require the caller to pass both the old and new expected object ID to our `test-tool ref-store update-ref` helper. When trying to update a symbolic reference though it's impossible to specify the expected object ID, which means that the test would instead have to force-update the reference. This is currently impossible though. Update the helper to optionally skip verification of the old object ID in case the test passes in an empty old object ID as input. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2023-11-03Merge branch 'ps/show-ref' into ps/ref-tests-updateJunio C Hamano8-122/+373
* ps/show-ref: t: use git-show-ref(1) to check for ref existence builtin/show-ref: add new mode to check for reference existence builtin/show-ref: explicitly spell out different modes in synopsis builtin/show-ref: ensure mutual exclusiveness of subcommands builtin/show-ref: refactor options for patterns subcommand builtin/show-ref: stop using global vars for `show_one()` builtin/show-ref: stop using global variable to count matches builtin/show-ref: refactor `--exclude-existing` options builtin/show-ref: fix dead code when passing patterns builtin/show-ref: fix leaking string buffer builtin/show-ref: split up different subcommands builtin/show-ref: convert pattern to a local variable
2023-11-03strvec: drop unnecessary include of hex.hLinus Arver1-1/+0
In 41771fa435 (cache.h: remove dependence on hex.h; make other files include it explicitly, 2023-02-24) we added this as part of a larger mechanical refactor. But strvec doesn't actually depend on hex.h, so remove it. Signed-off-by: Linus Arver <linusa@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2023-11-02tests: teach callers of test_i18ngrep to use test_grepJunio C Hamano225-1191/+1191
They are equivalents and the former still exists, so as long as the only change this commit makes are to rewrite test_i18ngrep to test_grep, there won't be any new bug, even if there still are callers of test_i18ngrep remaining in the tree, or when merged to other topics that add new uses of test_i18ngrep. This patch was produced more or less with git grep -l -e 'test_i18ngrep ' 't/t[0-9][0-9][0-9][0-9]-*.sh' | xargs perl -p -i -e 's/test_i18ngrep /test_grep /' and a good way to sanity check the result yourself is to run the above in a checkout of c4603c1c (test framework: further deprecate test_i18ngrep, 2023-10-31) and compare the resulting working tree contents with the result of applying this patch to the same commit. You'll see that test_i18ngrep in a few t/lib-*.sh files corrected, in addition to the manual reproduction. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2023-11-02Git 2.43-rc0v2.43.0-rc0Junio C Hamano2-1/+89
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2023-11-02Git 2.42.1v2.42.1Junio C Hamano3-2/+90
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2023-11-02Merge branch 'ms/doc-push-fix' into maint-2.42Junio C Hamano1-1/+1
Docfix. * ms/doc-push-fix: git-push doc: more visibility for -q option
2023-11-02Merge branch 'jc/commit-new-underscore-index-fix' into maint-2.42Junio C Hamano1-4/+4
Message fix. * jc/commit-new-underscore-index-fix: commit: do not use cryptic "new_index" in end-user facing messages
2023-11-02Merge branch 'wx/merge-ort-comment-typofix' into maint-2.42Junio C Hamano1-1/+1
Typofix. * wx/merge-ort-comment-typofix: merge-ort.c: fix typo 'neeed' to 'needed'
2023-11-02Merge branch 'ps/git-repack-doc-fixes' into maint-2.42Junio C Hamano1-6/+3
Doc updates. * ps/git-repack-doc-fixes: doc/git-repack: don't mention nonexistent "--unpacked" option doc/git-repack: fix syntax for `-g` shorthand option
2023-11-02Merge branch 'ni/die-message-fix-for-git-add' into maint-2.42Junio C Hamano1-5/+5
Message updates. * ni/die-message-fix-for-git-add: builtin/add.c: clean up die() messages
2023-11-02Merge branch 'jc/am-doc-whitespace-action-fix' into maint-2.42Junio C Hamano1-2/+2
Docfix. * jc/am-doc-whitespace-action-fix: am: align placeholder for --whitespace option with apply
2023-11-02Merge branch 'jc/update-list-references-to-lore' into maint-2.42Junio C Hamano1-1/+1
Doc update. * jc/update-list-references-to-lore: doc: update list archive reference to use lore.kernel.org
2023-11-02Merge branch 'ps/rewritten-is-per-worktree-doc' into maint-2.42Junio C Hamano1-3/+4
Doc update. * ps/rewritten-is-per-worktree-doc: doc/git-worktree: mention "refs/rewritten" as per-worktree refs
2023-11-02Merge branch 'sn/cat-file-doc-update' into maint-2.42Junio C Hamano2-19/+17
"git cat-file" documentation updates. * sn/cat-file-doc-update: doc/cat-file: make synopsis and description less confusing
2023-11-02Merge branch 'jk/decoration-and-other-leak-fixes' into maint-2.42Junio C Hamano10-16/+74
Leakfix. * jk/decoration-and-other-leak-fixes: daemon: free listen_addr before returning revision: clear decoration structs during release_revisions() decorate: add clear_decoration() function
2023-11-02Merge branch 'rs/parse-opt-ctx-cleanup' into maint-2.42Junio C Hamano1-1/+0
Code clean-up. * rs/parse-opt-ctx-cleanup: parse-options: drop unused parse_opt_ctx_t member
2023-11-02Merge branch 'ob/am-msgfix' into maint-2.42Junio C Hamano1-1/+2
The parameters to generate an error message have been corrected. * ob/am-msgfix: am: fix error message in parse_opt_show_current_patch()
2023-11-02Merge branch 'hy/doc-show-is-like-log-not-diff-tree' into maint-2.42Junio C Hamano1-1/+1
Doc update. * hy/doc-show-is-like-log-not-diff-tree: show doc: redirect user to git log manual instead of git diff-tree
2023-11-02Merge branch 'ch/clean-docfix' into maint-2.42Junio C Hamano1-1/+1
Typofix. * ch/clean-docfix: git-clean doc: fix "without do cleaning" typo
2023-11-02Merge branch 'eg/config-type-path-docfix' into maint-2.42Junio C Hamano1-1/+1
Typofix. * eg/config-type-path-docfix: git-config: fix misworded --type=path explanation
2023-11-02Merge branch 'ob/t3404-typofix' into maint-2.42Junio C Hamano1-1/+1
Code clean-up. * ob/t3404-typofix: t3404-rebase-interactive.sh: fix typos in title of a rewording test
2023-11-02Merge branch 'ob/sequencer-remove-dead-code' into maint-2.42Junio C Hamano1-4/+0
Code clean-up. * ob/sequencer-remove-dead-code: sequencer: remove unreachable exit condition in pick_commits()
2023-11-02Merge branch 'rs/name-rev-use-opt-hidden-bool' into maint-2.42Junio C Hamano1-6/+2
Simplify use of parse-options API a bit. * rs/name-rev-use-opt-hidden-bool: name-rev: use OPT_HIDDEN_BOOL for --peel-tag
2023-11-02Merge branch 'rs/grep-parseopt-simplify' into maint-2.42Junio C Hamano1-3/+2
Simplify use of parse-options API a bit. * rs/grep-parseopt-simplify: grep: use OPT_INTEGER_F for --max-depth
2023-11-02Merge branch 'ob/sequencer-reword-error-message' into maint-2.42Junio C Hamano1-1/+1
Update an error message (which would probably never been seen). * ob/sequencer-reword-error-message: sequencer: fix error message on failure to copy SQUASH_MSG
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()