summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2020-11-09Merge branch 'pb/ref-filter-with-crlf'Libravatar Junio C Hamano2-14/+148
A commit and tag object may have CR at the end of each and every line (you can create such an object with hash-object or using --cleanup=verbatim to decline the default clean-up action), but it would make it impossible to have a blank line to separate the title from the body of the message. Be lenient and accept a line with lone CR on it as a blank line, too. * pb/ref-filter-with-crlf: log, show: add tests for messages containing CRLF ref-filter: handle CRLF at end-of-line more gracefully
2020-11-09Merge branch 'jk/checkout-index-errors'Libravatar Junio C Hamano3-3/+34
"git checkout-index" did not consistently signal an error with its exit status. * jk/checkout-index-errors: checkout-index: propagate errors to exit code checkout-index: drop error message from empty --stage=all
2020-11-09Merge branch 'jk/perl-warning'Libravatar Junio C Hamano22-19/+30
Dev support. * jk/perl-warning: perl: check for perl warnings while running tests
2020-11-09Merge branch 'nk/diff-files-vs-fsmonitor'Libravatar Junio C Hamano6-50/+81
"git diff" and other commands that share the same machinery to compare with working tree files have been taught to take advantage of the fsmonitor data when available. * nk/diff-files-vs-fsmonitor: p7519-fsmonitor: add a git add benchmark p7519-fsmonitor: refactor to avoid code duplication perf lint: add make test-lint to perf tests t/perf: add fsmonitor perf test for git diff t/perf/p7519-fsmonitor.sh: warm cache on first git status t/perf/README: elaborate on output format fsmonitor: use fsmonitor data in `git diff`
2020-11-09Merge branch 'as/tests-cleanup'Libravatar Junio C Hamano2-2/+4
Micro clean-up of a couple of test scripts. * as/tests-cleanup: t2200,t9832: avoid using 'git' upstream in a pipe
2020-11-09Merge branch 'en/dir-rename-tests'Libravatar Junio C Hamano2-54/+553
More preliminary tests have been added to document desired outcome of various "directory rename" situations. * en/dir-rename-tests: t6423: more involved rules for renaming directories into each other t6423: update directory rename detection tests with new rule t6423: more involved directory rename test directory-rename-detection.txt: update references to regression tests
2020-11-09Merge branch 'mr/bisect-in-c-3'Libravatar Junio C Hamano2-151/+117
Rewriting "git bisect" in C continues. * mr/bisect-in-c-3: bisect--helper: retire `--bisect-autostart` subcommand bisect--helper: retire `--write-terms` subcommand bisect--helper: retire `--check-expected-revs` subcommand bisect--helper: reimplement `bisect_state` & `bisect_head` shell functions in C bisect--helper: retire `--next-all` subcommand bisect--helper: retire `--bisect-clean-state` subcommand bisect--helper: finish porting `bisect_start()` to C
2020-11-02Third batchLibravatar Junio C Hamano1-0/+80
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-11-02Merge branch 'jc/doc-final-resend'Libravatar Junio C Hamano1-3/+5
Update developer doc. * jc/doc-final-resend: SubmittingPatches: clarify the purpose of the final resend
2020-11-02Merge branch 'es/tutorial-mention-asciidoc-early'Libravatar Junio C Hamano1-2/+3
Doc update. * es/tutorial-mention-asciidoc-early: MyFirstContribution: clarify asciidoc dependency
2020-11-02Merge branch 'js/default-branch-name-part-4-minus-1'Libravatar Junio C Hamano19-108/+130
Adjust tests so that they won't scream when the default initial branch name is changed to 'main'. * js/default-branch-name-part-4-minus-1: t1400: prepare for `main` being default branch name tests: prepare aligned mentions of the default branch name t9902: prepare a test for the upcoming default branch name t3200: prepare for `main` being shorter than `master` t5703: adjust a test case for the upcoming default branch name t6200: adjust suppression pattern to also match "main" tests: start moving to a different default main branch name t9801: use `--` in preparation for default branch rename fmt-merge-msg: also suppress "into main" by default
2020-11-02Merge branch 've/userdiff-bash'Libravatar Junio C Hamano18-0/+91
The userdiff pattern learned to identify the function definition in POSIX shells and bash. * ve/userdiff-bash: userdiff: support Bash
2020-11-02Merge branch 'bc/svn-hash-oid-fix'Libravatar Junio C Hamano1-1/+1
A recent oid->hash conversion missed one spot, breaking "git svn". * bc/svn-hash-oid-fix: svn: use correct variable name for short OID
2020-11-02Merge branch 'js/t7006-cleanup'Libravatar Junio C Hamano1-42/+42
Code clean-up. * js/t7006-cleanup: t7006: Use test_path_is_* functions in test script
2020-11-02Merge branch 'en/sequencer-rollback-lock-cleanup'Libravatar Junio C Hamano1-1/+0
Code clean-up. * en/sequencer-rollback-lock-cleanup: sequencer: remove duplicate rollback_lock_file() call
2020-11-02Merge branch 'mk/diff-ignore-regex'Libravatar Junio C Hamano10-2/+226
"git diff" family of commands learned the "-I<regex>" option to ignore hunks whose changed lines all match the given pattern. * mk/diff-ignore-regex: diff: add -I<regex> that ignores matching changes merge-base, xdiff: zero out xpparam_t structures
2020-11-02Merge branch 'jt/apply-reverse-twice'Libravatar Junio C Hamano3-2/+23
"git apply -R" did not handle patches that touch the same path twice correctly, which has been corrected. This is most relevant in a patch that changes a path from a regular file to a symbolic link (and vice versa). * jt/apply-reverse-twice: apply: when -R, also reverse list of sections
2020-11-02Merge branch 'sc/sequencer-gpg-octopus'Libravatar Junio C Hamano2-1/+59
"git rebase --rebase-merges" did not correctly pass --gpg-sign command line option to underlying "git merge" when replaying a merge using non-default merge strategy or when replaying an octopus merge (because replaying a two-head merge with the default strategy was done in a separate codepath, the problem did not trigger for most users), which has been corrected. * sc/sequencer-gpg-octopus: t3435: add tests for rebase -r GPG signing sequencer: pass explicit --no-gpg-sign to merge sequencer: fix gpg option passed to merge subcommand
2020-11-02Merge branch 'en/test-selector'Libravatar Junio C Hamano5-50/+76
Our test scripts can be told to run only individual pieces while skipping others with the "--run=..." option; they were taught to take a substring of test title, in addition to numbers, to name the test pieces to run. * en/test-selector: test-lib: reduce verbosity of skipped tests t6006, t6012: adjust tests to use 'setup' instead of synonyms test-lib: allow selecting tests by substring/glob with --run
2020-11-02Merge branch 'jk/report-fn-typedef'Libravatar Junio C Hamano2-14/+16
Code clean-up. * jk/report-fn-typedef: usage: define a type for a reporting function
2020-11-02Merge branch 'nk/dir-c-comment-update'Libravatar Junio C Hamano1-3/+3
Update stale in-code comment. * nk/dir-c-comment-update: dir.c: fix comments to agree with argument name
2020-11-02Merge branch 'jk/no-common'Libravatar Junio C Hamano1-0/+1
Dev support to catch a tentative definition of a variable in our C code as an error. * jk/no-common: config.mak.dev: build with -fno-common
2020-11-02Merge branch 'as/sample-push-to-checkout-hook'Libravatar Junio C Hamano1-0/+78
Add a sample 'push-to-checkout' hook, that performs the same as what the built-in default action does. * as/sample-push-to-checkout-hook: hook: add sample template for push-to-checkout
2020-11-02Merge branch 'jk/fast-import-marks-cleanup'Libravatar Junio C Hamano1-1/+0
Code clean-up. * jk/fast-import-marks-cleanup: fast-import: remove duplicated option-parsing line
2020-11-02Merge branch 'lo/zsh-completion'Libravatar Junio C Hamano1-1/+2
Update instructions for command line completion (in contrib/) for zsh. * lo/zsh-completion: completion: fix zsh installation instructions
2020-11-02Merge branch 'tk/credential-config'Libravatar Junio C Hamano2-0/+29
"git credential' didn't honor the core.askPass configuration variable (among other things), which has been corrected. * tk/credential-config: credential: load default config
2020-11-02Merge branch 'dl/diff-merge-base'Libravatar Junio C Hamano11-141/+356
"git diff A...B" learned "git diff --merge-base A B", which is a longer short-hand to say the same thing. * dl/diff-merge-base: contrib/completion: complete `git diff --merge-base` builtin/diff-tree: learn --merge-base builtin/diff-index: learn --merge-base t4068: add --merge-base tests diff-lib: define diff_get_merge_base() diff-lib: accept option flags in run_diff_index() contrib/completion: extract common diff/difftool options git-diff.txt: backtick quote command text git-diff-index.txt: make --cached description a proper sentence t4068: remove unnecessary >tmp
2020-11-02Merge branch 'bk/sob-dco'Libravatar Junio C Hamano22-54/+60
Document that the meaning of a Signed-off-by trailer can vary from project to project in the end-user documentation, and clarify what it means to this project. * bk/sob-dco: Documentation: stylistically normalize references to Signed-off-by: SubmittingPatches: clarify DCO is our --signoff rule Documentation: clarify and expand description of --signoff doc: preparatory clean-up of description on the sign-off option
2020-11-02Merge branch 'ds/maintenance-commit-graph-auto-fix'Libravatar Junio C Hamano2-1/+48
Test-coverage enhancement of running commit-graph task "git maintenance" as needed led to discovery and fix of a bug. * ds/maintenance-commit-graph-auto-fix: maintenance: core.commitGraph=false prevents writes maintenance: test commit-graph auto condition
2020-11-02Merge branch 'ds/commit-graph-merging-fix'Libravatar Junio C Hamano3-4/+34
When "git commit-graph" detects the same commit recorded more than once while it is merging the layers, it used to die. The code now ignores all but one of them and continues. * ds/commit-graph-merging-fix: commit-graph: don't write commit-graph when disabled commit-graph: ignore duplicates when merging layers
2020-11-02Merge branch 'es/test-cmp-typocatcher'Libravatar Junio C Hamano1-14/+2
A test helper "test_cmp A B" was taught to diagnose missing files A or B as a bug in test, but some tests legitimately wanted to notice a failure to even create file B as an error, in addition to leaving the expected result in it, and were misdiagnosed as a bug. This has been corrected. * es/test-cmp-typocatcher: Revert "test_cmp: diagnose incorrect arguments"
2020-11-02Merge branch 'jk/fast-import-marks-alloc-fix'Libravatar Junio C Hamano2-14/+68
"git fast-import" wasted a lot of memory when many marks were in use. * jk/fast-import-marks-alloc-fix: fast-import: fix over-allocation of marks storage
2020-11-02Merge branch 'js/avoid-split-sideband-message'Libravatar Junio C Hamano4-1/+33
The side-band status report can be sent at the same time as the primary payload multiplexed, but the demultiplexer on the receiving end incorrectly split a single status report into two, which has been corrected. * js/avoid-split-sideband-message: test-pkt-line: drop colon from sideband identity sideband: report unhandled incomplete sideband messages as bugs sideband: avoid reporting incomplete sideband messages
2020-10-30Second batchLibravatar Junio C Hamano1-0/+5
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-10-30Merge branch 'js/ci-ghwf-dedup-tests'Libravatar Junio C Hamano1-27/+31
GitHub Actions automated test improvement to skip tests on a tree identical to what has already been tested. * js/ci-ghwf-dedup-tests: ci: make the "skip-if-redundant" check more defensive ci: work around old records of GitHub runs
2020-10-30Merge branch 'dl/resurrect-update-for-sha256'Libravatar Junio C Hamano1-7/+6
"git resurrect" script (in contrib/) learned that the object names may be longer than 40-hex depending on the hash function in use. * dl/resurrect-update-for-sha256: contrib/git-resurrect.sh: use hash-agnostic OID pattern contrib/git-resurrect.sh: indent with tabs
2020-10-30Merge branch 'cm/t7xxx-cleanup'Libravatar Junio C Hamano3-258/+217
Micro clean-up. * cm/t7xxx-cleanup: t7102: prepare expected output inside test_expect_* block t7201: put each command on a separate line t7201: use 'git -C' to avoid subshell t7102,t7201: remove whitespace after redirect operator t7102,t7201: remove unnecessary blank spaces in test body t7101,t7102,t7201: modernize test formatting
2020-10-30Merge branch 'ct/t0000-use-test-path-is-file'Libravatar Junio C Hamano1-1/+1
Micro clean-up of a test script. * ct/t0000-use-test-path-is-file: t0000: use test_path_is_file instead of "test -f"
2020-10-30Merge branch 'en/t7518-unflake'Libravatar Junio C Hamano1-1/+1
Work around flakiness in a test. * en/t7518-unflake: t7518: fix flaky grep invocation
2020-10-29Sync with Git 2.29.2Libravatar Junio C Hamano1-0/+12
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-10-29Git 2.29.2Libravatar Junio C Hamano3-2/+14
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-10-29Merge branch 'cc/doc-filter-branch-typofix' into maintLibravatar Junio C Hamano1-1/+1
Docfix. * cc/doc-filter-branch-typofix: filter-branch doc: fix filter-repo typo
2020-10-29Merge branch 'jk/committer-date-is-author-date-fix' into maintLibravatar Junio C Hamano3-5/+5
In 2.29, "--committer-date-is-author-date" option of "rebase" and "am" subcommands lost the e-mail address by mistake, which has been corrected. * jk/committer-date-is-author-date-fix: rebase: fix broken email with --committer-date-is-author-date am: fix broken email with --committer-date-is-author-date t3436: check --committer-date-is-author-date result more carefully
2020-10-29log, show: add tests for messages containing CRLFLibravatar Philippe Blain1-0/+18
A previous commit adjusted the code in ref-filter.c so that messages containing CRLF are now correctly parsed and displayed. Add tests to also check that `git log` and `git show` correctly handle such messages, to prevent futur regressions if these commands are refactored to use the ref-filter API. Signed-off-by: Philippe Blain <levraiphilippeblain@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-10-29ref-filter: handle CRLF at end-of-line more gracefullyLibravatar Philippe Blain2-14/+130
The ref-filter code does not correctly handle commit or tag messages that use CRLF as the line terminator. Such messages can be created with the `--cleanup=verbatim` option of `git commit` and `git tag`, or by using `git commit-tree` directly. The function `find_subpos` in ref-filter.c looks for two consecutive LFs to find the end of the subject line, a sequence which is absent in messages using CRLF. This results in the whole message being parsed as the subject line (`%(contents:subject)`), and the body of the message (`%(contents:body)`) being empty. Moreover, in `copy_subject`, which wants to return the subject as a single line, '\n' is replaced by space, but '\r' is untouched. This impacts the output of `git branch`, `git tag` and `git for-each-ref`. This behaviour is a regression for `git branch --verbose`, which bisects down to 949af0684c (branch: use ref-filter printing APIs, 2017-01-10). Adjust the ref-filter code to be more lenient by hardening the logic in `copy_subject` and `find_subpos` to correctly parse messages containing CRLF. Add a new test script, 't3920-crlf-messages.sh', to test the behaviour of commands using either the ref-filter or the pretty APIs with messages using CRLF line endings. The function `test_crlf_subject_body_and_contents` can be used to test that the `--format` option of `branch`, `tag`, `for-each-ref`, `log` and `show` correctly displays the subject, body and raw content of commit and tag messages using CRLF. Test the output of `branch`, `tag` and `for-each-ref` with such commits. Helped-by: Junio C Hamano <gitster@pobox.com> Helped-by: Eric Sunshine <sunshine@sunshineco.com> Signed-off-by: Philippe Blain <levraiphilippeblain@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-10-27First batchLibravatar Junio C Hamano1-0/+38
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-10-27Merge branch 'dl/checkout-guess'Libravatar Junio C Hamano8-20/+109
"git checkout" learned to use checkout.guess configuration variable and enable/disable its "--[no-]guess" option accordingly. * dl/checkout-guess: checkout: learn to respect checkout.guess Documentation/config/checkout: replace sq with backticks
2020-10-27Merge branch 'dl/checkout-p-merge-base'Libravatar Junio C Hamano7-1/+56
"git checkout -p A...B [-- <path>]" did not work, even though the same command without "-p" correctly used the merge-base between commits A and B. * dl/checkout-p-merge-base: t2016: add a NEEDSWORK about the PERL prerequisite add-patch: add NEEDSWORK about comparing commits Doc: document "A...B" form for <tree-ish> in checkout and switch builtin/checkout: fix `git checkout -p HEAD...` bug
2020-10-27Merge branch 'sb/clone-origin'Libravatar Junio C Hamano9-23/+158
"git clone" learned clone.defaultremotename configuration variable to customize what nickname to use to call the remote the repository was cloned from. * sb/clone-origin: clone: allow configurable default for `-o`/`--origin` clone: read new remote name from remote_name instead of option_origin clone: validate --origin option before use refs: consolidate remote name validation remote: add tests for add and rename with invalid names clone: use more conventional config/option layering clone: add tests for --template and some disallowed option pairs
2020-10-27Merge branch 'sk/force-if-includes'Libravatar Junio C Hamano15-18/+447
"git push --force-with-lease[=<ref>]" can easily be misused to lose commits unless the user takes good care of their own "git fetch". A new option "--force-if-includes" attempts to ensure that what is being force-pushed was created after examining the commit at the tip of the remote ref that is about to be force-replaced. * sk/force-if-includes: t, doc: update tests, reference for "--force-if-includes" push: parse and set flag for "--force-if-includes" push: add reflog check for "--force-if-includes"