From 63b33047c1428dbf4f480b384962c6c8c0e841dd Mon Sep 17 00:00:00 2001 From: DongHun Kwak Date: Wed, 3 Mar 2021 15:16:41 +0900 Subject: [PATCH] Imported Upstream version 2.19.0 --- .gitignore | 3 + .mailmap | 11 +- Documentation/.gitignore | 1 + Documentation/Makefile | 1 + Documentation/RelNotes/2.14.5.txt | 16 - Documentation/RelNotes/2.14.6.txt | 54 - Documentation/RelNotes/2.15.3.txt | 6 - Documentation/RelNotes/2.15.4.txt | 11 - Documentation/RelNotes/2.16.5.txt | 6 - Documentation/RelNotes/2.16.6.txt | 8 - Documentation/RelNotes/2.17.2.txt | 12 - Documentation/RelNotes/2.17.3.txt | 12 - Documentation/RelNotes/2.17.4.txt | 16 - Documentation/RelNotes/2.17.5.txt | 22 - Documentation/RelNotes/2.18.1.txt | 6 - Documentation/RelNotes/2.18.2.txt | 8 - Documentation/RelNotes/2.18.3.txt | 5 - Documentation/RelNotes/2.18.4.txt | 5 - Documentation/RelNotes/2.19.0.txt | 615 ++ Documentation/SubmittingPatches | 4 +- Documentation/config.txt | 353 +- Documentation/diff-config.txt | 12 + Documentation/diff-options.txt | 36 +- Documentation/doc-diff | 109 + Documentation/fetch-options.txt | 19 + Documentation/git-apply.txt | 10 +- Documentation/git-bisect-lk2009.txt | 2 +- Documentation/git-branch.txt | 8 +- Documentation/git-cat-file.txt | 10 + Documentation/git-checkout.txt | 9 + Documentation/git-commit-graph.txt | 14 +- Documentation/git-config.txt | 21 + Documentation/git-fast-import.txt | 15 - Documentation/git-for-each-ref.txt | 2 +- Documentation/git-fsck.txt | 3 + Documentation/git-gc.txt | 4 + Documentation/git-grep.txt | 16 +- Documentation/git-help.txt | 5 + Documentation/git-imap-send.txt | 4 +- Documentation/git-interpret-trailers.txt | 9 +- Documentation/git-merge.txt | 16 +- Documentation/git-notes.txt | 2 +- Documentation/git-p4.txt | 8 + Documentation/git-range-diff.txt | 252 + Documentation/git-rebase.txt | 144 +- Documentation/git-repack.txt | 5 + Documentation/git-send-email.txt | 17 +- Documentation/git-show-index.txt | 26 +- Documentation/git-status.txt | 2 +- Documentation/git-submodule.txt | 15 +- Documentation/git-svn.txt | 2 +- Documentation/git-tag.txt | 2 +- Documentation/git-update-index.txt | 19 +- Documentation/git-worktree.txt | 13 + Documentation/giteveryday.txt | 2 +- Documentation/githooks.txt | 7 + Documentation/gitignore.txt | 2 +- Documentation/gitmodules.txt | 5 +- Documentation/gitsubmodules.txt | 2 +- Documentation/glossary-content.txt | 2 +- Documentation/pull-fetch-param.txt | 2 +- Documentation/revisions.txt | 3 +- Documentation/technical/api-directory-listing.txt | 2 +- Documentation/technical/api-gitattributes.txt | 2 +- Documentation/technical/commit-graph-format.txt | 10 +- Documentation/technical/commit-graph.txt | 51 +- .../technical/directory-rename-detection.txt | 115 + .../technical/hash-function-transition.txt | 202 +- Documentation/technical/http-protocol.txt | 4 +- Documentation/technical/pack-protocol.txt | 7 +- Documentation/technical/partial-clone.txt | 208 +- Documentation/technical/protocol-v2.txt | 31 +- GIT-VERSION-GEN | 2 +- Makefile | 51 +- RelNotes | 2 +- advice.c | 55 +- advice.h | 2 + alloc.c | 66 +- alloc.h | 21 + apply.c | 108 +- apply.h | 31 +- archive-tar.c | 15 +- archive-zip.c | 17 +- archive.c | 50 +- archive.h | 17 +- attr.c | 52 +- attr.h | 32 +- banned.h | 30 + bisect.c | 14 +- bisect.h | 2 + blame.c | 126 +- blame.h | 25 +- blob.c | 11 +- blob.h | 2 +- branch.c | 20 +- branch.h | 13 + builtin.h | 2 + builtin/add.c | 9 +- builtin/am.c | 25 +- builtin/apply.c | 2 +- builtin/archive.c | 2 +- builtin/blame.c | 17 +- builtin/branch.c | 68 +- builtin/cat-file.c | 112 +- builtin/check-attr.c | 6 +- builtin/checkout-index.c | 3 +- builtin/checkout.c | 72 +- builtin/clean.c | 31 +- builtin/clone.c | 28 +- builtin/commit-graph.c | 101 +- builtin/commit-tree.c | 5 +- builtin/commit.c | 82 +- builtin/config.c | 77 +- builtin/describe.c | 30 +- builtin/diff-tree.c | 17 +- builtin/diff.c | 14 +- builtin/difftool.c | 11 +- builtin/fast-export.c | 71 +- builtin/fetch.c | 200 +- builtin/fmt-merge-msg.c | 29 +- builtin/fsck.c | 44 +- builtin/gc.c | 7 + builtin/grep.c | 28 +- builtin/hash-object.c | 1 + builtin/help.c | 16 + builtin/index-pack.c | 7 +- builtin/init-db.c | 3 +- builtin/log.c | 35 +- builtin/ls-files.c | 17 +- builtin/ls-tree.c | 1 + builtin/merge-base.c | 7 +- builtin/merge-recursive.c | 4 +- builtin/merge-tree.c | 4 +- builtin/merge.c | 114 +- builtin/mktag.c | 1 + builtin/mktree.c | 1 + builtin/name-rev.c | 36 +- builtin/notes.c | 4 +- builtin/pack-objects.c | 160 +- builtin/prune-packed.c | 1 + builtin/prune.c | 7 +- builtin/pull.c | 29 +- builtin/push.c | 8 +- builtin/range-diff.c | 116 + builtin/read-tree.c | 2 +- builtin/receive-pack.c | 26 +- builtin/reflog.c | 16 +- builtin/remote.c | 8 +- builtin/repack.c | 183 +- builtin/replace.c | 96 +- builtin/reset.c | 8 +- builtin/rev-list.c | 16 +- builtin/rev-parse.c | 9 +- builtin/revert.c | 9 +- builtin/rm.c | 4 +- builtin/send-pack.c | 6 +- builtin/shortlog.c | 5 +- builtin/show-branch.c | 51 +- show-index.c => builtin/show-index.c | 3 +- builtin/show-ref.c | 1 + builtin/submodule--helper.c | 177 +- builtin/tag.c | 3 +- builtin/unpack-file.c | 1 + builtin/unpack-objects.c | 10 +- builtin/update-index.c | 46 +- builtin/update-ref.c | 25 +- builtin/upload-archive.c | 3 +- builtin/upload-pack.c | 2 +- builtin/verify-commit.c | 5 +- builtin/worktree.c | 20 +- builtin/write-tree.c | 5 +- bulk-checkin.c | 1 + bulk-checkin.h | 2 + bundle.c | 11 +- cache-tree.c | 16 +- cache-tree.h | 19 +- cache.h | 319 +- checkout.c | 37 +- checkout.h | 4 +- ci/lib-travisci.sh | 2 +- ci/print-test-failures.sh | 55 +- ci/run-build-and-tests.sh | 1 + ci/run-static-analysis.sh | 21 +- ci/util/extract-trash-dirs.sh | 50 + color.c | 3 + color.h | 7 + column.h | 1 + combine-diff.c | 1 + command-list.txt | 1 + commit-graph.c | 476 +- commit-graph.h | 29 +- commit-slab-decl.h | 43 + commit-slab-impl.h | 94 + commit-slab.h | 115 +- commit.c | 256 +- commit.h | 48 +- compat/mingw.c | 141 +- compat/mingw.h | 18 +- compat/precompose_utf8.h | 3 +- compat/vcbuild/README | 4 +- config.c | 162 +- config.h | 40 +- config.mak.dev | 5 + config.mak.uname | 14 +- connect.c | 79 +- connect.h | 2 + connected.c | 6 +- connected.h | 8 + contrib/coccinelle/commit.cocci | 2 +- contrib/completion/git-completion.bash | 439 +- contrib/credential/netrc/Makefile | 3 + contrib/credential/netrc/t-git-credential-netrc.sh | 9 +- contrib/credential/netrc/test.pl | 5 +- contrib/git-jump/README | 12 +- contrib/git-jump/git-jump | 2 +- contrib/mw-to-git/t/t9360-mw-to-git-clone.sh | 2 +- contrib/subtree/t/t7900-subtree.sh | 121 +- contrib/vscode/.gitattributes | 1 + contrib/vscode/README.md | 14 + contrib/vscode/init.sh | 375 + convert.c | 92 +- convert.h | 63 +- credential.c | 67 +- credential.h | 16 - csum-file.h | 2 + diff-lib.c | 15 +- diff.c | 448 +- diff.h | 140 +- diffcore-rename.c | 1 + diffcore.h | 54 +- dir-iterator.h | 2 + dir.c | 38 +- dir.h | 16 +- entry.c | 10 +- environment.c | 20 +- ewah/bitmap.c | 32 - ewah/ewah_bitmap.c | 249 +- ewah/ewah_io.c | 91 - ewah/ewah_rlw.c | 8 - ewah/ewok.h | 33 - ewah/ewok_rlw.h | 1 - exec-cmd.c | 2 +- fast-import.c | 47 +- fetch-negotiator.c | 20 + fetch-negotiator.h | 58 + fetch-pack.c | 445 +- fetch-pack.h | 22 + fsck.c | 286 +- fsck.h | 1 + fsmonitor.h | 3 + generate-cmdlist.sh | 19 + git-add--interactive.perl | 2 +- git-compat-util.h | 12 +- git-filter-branch.sh | 1 + git-instaweb.sh | 20 +- git-mergetool.sh | 8 +- git-p4.py | 364 +- git-rebase--interactive.sh | 804 +- git-rebase--merge.sh | 4 +- git-rebase--preserve-merges.sh | 1012 ++ git-rebase.sh | 77 +- git-send-email.perl | 49 +- git-submodule.sh | 49 +- git.c | 9 +- gpg-interface.c | 113 +- gpg-interface.h | 4 +- grep.c | 311 +- grep.h | 24 +- help.c | 86 + help.h | 46 +- hex.c | 6 +- http-backend.c | 104 +- http-push.c | 16 +- http.c | 5 +- json-writer.c | 414 + json-writer.h | 105 + khash.h | 3 + line-log.c | 6 +- line-range.c | 2 +- line-range.h | 12 +- linear-assignment.c | 201 + linear-assignment.h | 22 + list-objects-filter-options.c | 2 + list-objects-filter.c | 1 + list-objects-filter.h | 4 + list-objects.c | 11 +- list-objects.h | 4 + ll-merge.c | 4 +- ll-merge.h | 2 + log-tree.c | 63 +- mailinfo.h | 2 + mailmap.c | 1 + mailmap.h | 2 + match-trees.c | 44 +- mem-pool.c | 114 +- mem-pool.h | 23 + merge-blobs.c | 1 + merge-recursive.c | 269 +- merge-recursive.h | 5 +- merge.c | 31 - negotiator/default.c | 176 + negotiator/default.h | 8 + negotiator/skipping.c | 250 + negotiator/skipping.h | 8 + notes-cache.c | 4 +- notes-merge.c | 6 +- notes-merge.h | 4 + notes-utils.c | 4 +- notes-utils.h | 3 + notes.c | 1 + notes.h | 3 + object-store.h | 214 + object.c | 177 +- object.h | 48 +- oidmap.h | 1 + pack-bitmap-write.c | 11 +- pack-bitmap.c | 344 +- pack-bitmap.h | 23 +- pack-objects.c | 4 + pack-objects.h | 60 +- packfile.c | 26 +- packfile.h | 22 +- parse-options-cb.c | 2 +- parse-options.c | 61 +- patch-ids.h | 6 + path.c | 114 +- path.h | 43 +- pathspec.c | 2 +- pathspec.h | 2 + pkt-line.c | 26 +- po/bg.po | 7453 ++++++++----- po/de.po | 5183 +++++---- po/es.po | 7328 ++++++++----- po/fr.po | 7384 ++++++++----- po/git.pot | 7316 ++++++++----- po/ru.po | 10552 ++++++++++++------- po/sv.po | 7373 ++++++++----- po/vi.po | 7376 ++++++++----- po/zh_CN.po | 7411 ++++++++----- preload-index.c | 2 +- pretty.c | 10 +- pretty.h | 4 + range-diff.c | 435 + range-diff.h | 9 + reachable.c | 8 +- reachable.h | 2 + read-cache.c | 331 +- ref-filter.c | 272 +- reflog-walk.c | 7 +- reflog-walk.h | 1 + refs.c | 73 +- refs.h | 2 + refs/files-backend.c | 37 +- refs/packed-backend.c | 1 + refs/refs-internal.h | 9 +- refspec.c | 15 +- refspec.h | 5 +- remote-curl.c | 2 +- remote-testsvn.c | 1 + remote.c | 34 +- remote.h | 2 + replace-object.c | 8 +- replace-object.h | 2 +- repository.c | 7 + repository.h | 41 +- rerere.c | 10 +- rerere.h | 14 +- resolve-undo.c | 6 +- resolve-undo.h | 2 + revision.c | 52 +- revision.h | 78 +- send-pack.c | 7 +- send-pack.h | 4 + sequencer.c | 498 +- sequencer.h | 5 + server-info.c | 4 +- sha1-file.c | 129 +- sha1-name.c | 46 +- sha1dc/sha1.c | 12 +- shallow.c | 147 +- shortlog.h | 2 + sideband.c | 129 +- split-index.c | 58 +- strbuf.c | 22 +- string-list.c | 18 +- submodule-config.c | 100 +- submodule-config.h | 12 + submodule.c | 69 +- submodule.h | 127 +- t/.gitattributes | 2 + t/.gitignore | 1 + t/Makefile | 25 +- t/README | 4 + t/annotate-tests.sh | 4 +- t/chainlint.sed | 369 + t/chainlint/arithmetic-expansion.expect | 9 + t/chainlint/arithmetic-expansion.test | 11 + t/chainlint/bash-array.expect | 10 + t/chainlint/bash-array.test | 12 + t/chainlint/blank-line.expect | 4 + t/chainlint/blank-line.test | 10 + t/chainlint/block.expect | 12 + t/chainlint/block.test | 15 + t/chainlint/broken-chain.expect | 6 + t/chainlint/broken-chain.test | 8 + t/chainlint/case.expect | 19 + t/chainlint/case.test | 23 + .../close-nested-and-parent-together.expect | 4 + t/chainlint/close-nested-and-parent-together.test | 3 + t/chainlint/close-subshell.expect | 25 + t/chainlint/close-subshell.test | 27 + t/chainlint/command-substitution.expect | 9 + t/chainlint/command-substitution.test | 11 + t/chainlint/comment.expect | 4 + t/chainlint/comment.test | 11 + t/chainlint/complex-if-in-cuddled-loop.expect | 10 + t/chainlint/complex-if-in-cuddled-loop.test | 11 + t/chainlint/cuddled-if-then-else.expect | 7 + t/chainlint/cuddled-if-then-else.test | 7 + t/chainlint/cuddled-loop.expect | 5 + t/chainlint/cuddled-loop.test | 7 + t/chainlint/cuddled.expect | 21 + t/chainlint/cuddled.test | 23 + t/chainlint/exit-loop.expect | 24 + t/chainlint/exit-loop.test | 27 + t/chainlint/exit-subshell.expect | 5 + t/chainlint/exit-subshell.test | 6 + t/chainlint/for-loop.expect | 11 + t/chainlint/for-loop.test | 19 + t/chainlint/here-doc-close-subshell.expect | 2 + t/chainlint/here-doc-close-subshell.test | 5 + .../here-doc-multi-line-command-subst.expect | 5 + t/chainlint/here-doc-multi-line-command-subst.test | 9 + t/chainlint/here-doc-multi-line-string.expect | 4 + t/chainlint/here-doc-multi-line-string.test | 8 + t/chainlint/here-doc.expect | 9 + t/chainlint/here-doc.test | 37 + t/chainlint/if-in-loop.expect | 12 + t/chainlint/if-in-loop.test | 15 + t/chainlint/if-then-else.expect | 19 + t/chainlint/if-then-else.test | 28 + t/chainlint/incomplete-line.expect | 4 + t/chainlint/incomplete-line.test | 12 + t/chainlint/inline-comment.expect | 9 + t/chainlint/inline-comment.test | 12 + t/chainlint/loop-in-if.expect | 12 + t/chainlint/loop-in-if.test | 15 + .../multi-line-nested-command-substitution.expect | 18 + .../multi-line-nested-command-substitution.test | 18 + t/chainlint/multi-line-string.expect | 15 + t/chainlint/multi-line-string.test | 27 + t/chainlint/negated-one-liner.expect | 5 + t/chainlint/negated-one-liner.test | 7 + t/chainlint/nested-cuddled-subshell.expect | 19 + t/chainlint/nested-cuddled-subshell.test | 31 + t/chainlint/nested-here-doc.expect | 7 + t/chainlint/nested-here-doc.test | 33 + t/chainlint/nested-subshell-comment.expect | 11 + t/chainlint/nested-subshell-comment.test | 13 + t/chainlint/nested-subshell.expect | 12 + t/chainlint/nested-subshell.test | 14 + t/chainlint/one-liner.expect | 9 + t/chainlint/one-liner.test | 12 + t/chainlint/p4-filespec.expect | 4 + t/chainlint/p4-filespec.test | 5 + t/chainlint/pipe.expect | 8 + t/chainlint/pipe.test | 12 + t/chainlint/semicolon.expect | 20 + t/chainlint/semicolon.test | 25 + t/chainlint/subshell-here-doc.expect | 11 + t/chainlint/subshell-here-doc.test | 39 + t/chainlint/subshell-one-liner.expect | 14 + t/chainlint/subshell-one-liner.test | 24 + t/chainlint/t7900-subtree.expect | 10 + t/chainlint/t7900-subtree.test | 22 + t/chainlint/while-loop.expect | 11 + t/chainlint/while-loop.test | 19 + t/check-non-portable-shell.pl | 34 +- t/helper/test-drop-caches.c | 11 +- t/helper/test-json-writer.c | 565 + t/helper/test-path-utils.c | 113 - t/helper/test-pkt-line.c | 33 + t/helper/test-repository.c | 82 + t/helper/test-run-command.c | 138 +- t/helper/test-tool.c | 2 + t/helper/test-tool.h | 4 + t/lib-credential.sh | 2 +- t/lib-gpg.sh | 28 +- t/lib-gpg/gpgsm-gen-key.in | 8 + t/lib-gpg/gpgsm_cert.p12 | Bin 0 -> 2652 bytes t/lib-httpd.sh | 22 + t/lib-httpd/apache.conf | 8 + t/lib-httpd/apply-one-time-sed.sh | 22 + t/lib-rebase.sh | 6 +- t/lib-submodule-update.sh | 8 +- t/t0000-basic.sh | 4 +- t/t0001-init.sh | 10 +- t/t0003-attributes.sh | 27 +- t/t0008-ignores.sh | 9 +- t/t0019-json-writer.sh | 331 + t/t0019/parse_json.perl | 55 + t/t0020-crlf.sh | 12 +- t/t0021-conversion.sh | 6 +- t/t0028-working-tree-encoding.sh | 6 +- t/t0030-stripspace.sh | 39 +- t/t0040-parse-options.sh | 4 +- t/t0060-path-utils.sh | 45 +- t/t0061-run-command.sh | 9 +- t/t0070-fundamental.sh | 2 +- t/t0090-cache-tree.sh | 4 +- t/t0203-gettext-setlocale-sanity.sh | 4 +- t/t0300-credentials.sh | 152 +- t/t0410-partial-clone.sh | 93 +- t/t1004-read-tree-m-u-wf.sh | 14 +- t/t1005-read-tree-reset.sh | 10 +- t/t1006-cat-file.sh | 17 +- t/t1008-read-tree-overlay.sh | 2 +- t/t1011-read-tree-sparse-checkout.sh | 3 +- t/t1014-read-tree-confusing.sh | 1 - t/t1015-read-index-unmerged.sh | 123 + t/t1020-subdirectory.sh | 2 +- t/t1050-large.sh | 6 +- t/t1300-config.sh | 94 +- t/t1305-config-include.sh | 2 +- t/t1306-xdg-files.sh | 6 +- t/t1308-config-set.sh | 2 +- t/t1400-update-ref.sh | 20 +- t/t1403-show-ref.sh | 46 +- t/t1404-update-ref-errors.sh | 4 +- t/t1410-reflog.sh | 7 +- t/t1411-reflog-show.sh | 9 +- t/t1450-fsck.sh | 14 +- t/t1501-work-tree.sh | 2 +- t/t1507-rev-parse-upstream.sh | 9 +- t/t1510-repo-setup.sh | 24 +- t/t1512-rev-parse-disambiguation.sh | 6 +- t/t1600-index.sh | 3 +- t/t1700-split-index.sh | 6 +- t/t2013-checkout-submodule.sh | 6 +- t/t2016-checkout-patch.sh | 24 +- t/t2024-checkout-dwim.sh | 63 + t/t2025-worktree-add.sh | 25 + t/t2103-update-index-ignore-missing.sh | 2 +- t/t2200-add-update.sh | 3 +- t/t2202-add-addremove.sh | 17 +- t/t2203-add-intent.sh | 62 +- t/t2204-add-ignored.sh | 8 +- t/t3000-ls-files-others.sh | 2 +- t/t3001-ls-files-others-exclude.sh | 21 +- t/t3004-ls-files-basic.sh | 6 +- t/t3005-ls-files-relative.sh | 8 +- t/t3006-ls-files-long.sh | 2 +- t/t3008-ls-files-lazy-init-name-hash.sh | 8 +- t/t3030-merge-recursive.sh | 340 +- t/t3031-merge-criscross.sh | 2 +- t/t3035-merge-sparse.sh | 58 + t/t3050-subprojects-fetch.sh | 8 +- t/t3070-wildmatch.sh | 3 +- t/t3102-ls-tree-wildcards.sh | 2 +- t/t3200-branch.sh | 80 +- t/t3201-branch-contains.sh | 15 +- t/t3206-range-diff.sh | 145 + t/t3206/history.export | 604 ++ t/t3210-pack-refs.sh | 12 +- t/t3301-notes.sh | 12 +- t/t3308-notes-merge.sh | 2 +- t/t3310-notes-merge-manual-resolve.sh | 14 +- t/t3400-rebase.sh | 8 +- t/t3401-rebase-and-am-rename.sh | 213 + t/t3402-rebase-merge.sh | 4 +- t/t3404-rebase-interactive.sh | 86 +- t/t3405-rebase-malformed.sh | 11 +- t/t3418-rebase-continue.sh | 40 +- t/t3420-rebase-autostash.sh | 8 +- t/t3422-rebase-incompatible-options.sh | 88 + t/t3423-rebase-reword.sh | 48 + t/t3430-rebase-merges.sh | 81 +- t/t3507-cherry-pick-conflict.sh | 13 + t/t3510-cherry-pick-sequence.sh | 14 +- t/t3600-rm.sh | 14 +- t/t3700-add.sh | 11 +- t/t3701-add-interactive.sh | 59 +- t/t3903-stash.sh | 2 +- t/t3904-stash-patch.sh | 8 +- t/t3910-mac-os-precompose.sh | 3 +- t/t4001-diff-rename.sh | 2 +- t/t4010-diff-pathspec.sh | 7 +- t/t4011-diff-symlink.sh | 12 +- t/t4012-diff-binary.sh | 6 +- t/t4013-diff-various.sh | 2 +- t/t4014-format-patch.sh | 6 +- t/t4015-diff-whitespace.sh | 264 +- t/t4018/php-abstract-class | 4 + t/t4018/php-class | 4 + t/t4018/php-final-class | 4 + t/t4018/php-function | 4 + t/t4018/php-interface | 4 + t/t4018/php-method | 7 + t/t4018/php-trait | 7 + t/t4019-diff-wserror.sh | 2 +- t/t4024-diff-optimize-common.sh | 16 +- t/t4025-hunk-header.sh | 8 +- t/t4027-diff-submodule.sh | 29 +- t/t4039-diff-assume-unchanged.sh | 3 +- t/t4041-diff-submodule-option.sh | 22 +- t/t4047-diff-dirstat.sh | 4 +- t/t4051-diff-function-context.sh | 2 +- t/t4060-diff-submodule-option-diff-format.sh | 20 +- t/t4116-apply-reverse.sh | 2 +- t/t4121-apply-diffs.sh | 2 +- t/t4124-apply-ws-rule.sh | 2 +- t/t4132-apply-removal.sh | 5 +- t/t4135-apply-weird-filenames.sh | 10 +- t/t4150-am.sh | 43 +- t/t4200-rerere.sh | 9 +- t/t4201-shortlog.sh | 2 +- t/t4202-log.sh | 43 +- t/t4203-mailmap.sh | 4 +- t/t4208-log-magic-pathspec.sh | 26 + t/t4210-log-i18n.sh | 6 +- t/t4211-line-log.sh | 7 +- t/t4212-log-corrupt.sh | 6 +- t/t4254-am-corrupt.sh | 2 +- t/t4300-merge-tree.sh | 34 +- t/t5300-pack-object.sh | 2 +- t/t5302-pack-index.sh | 2 +- t/t5304-prune.sh | 3 +- t/t5310-pack-bitmaps.sh | 18 +- t/t5313-pack-bounds-checks.sh | 3 +- t/t5314-pack-cycle-detection.sh | 3 +- t/t5317-pack-objects-filter-objects.sh | 16 + t/t5318-commit-graph.sh | 253 +- t/t5400-send-pack.sh | 4 +- t/t5401-update-hooks.sh | 14 +- t/t5405-send-pack-rewind.sh | 3 +- t/t5406-remote-rejects.sh | 5 +- t/t5407-post-rewrite-hook.sh | 2 +- t/t5409-colorize-remote-messages.sh | 101 + t/t5500-fetch-pack.sh | 98 +- t/t5504-fetch-receive-strict.sh | 126 +- t/t5505-remote.sh | 18 +- t/t5509-fetch-push-namespaces.sh | 2 +- t/t5510-fetch.sh | 117 +- t/t5512-ls-remote.sh | 10 +- t/t5514-fetch-multiple.sh | 3 +- t/t5516-fetch-push.sh | 75 +- t/t5517-push-mirror.sh | 10 +- t/t5520-pull.sh | 24 + t/t5523-push-upstream.sh | 2 +- t/t5526-fetch-submodules.sh | 53 +- t/t5531-deep-submodule-push.sh | 2 +- t/t5533-push-cas.sh | 6 +- t/t5534-push-signed.sh | 63 +- t/t5537-fetch-shallow.sh | 45 +- t/t5541-http-push-smart.sh | 30 +- t/t5543-atomic-push.sh | 2 +- t/t5550-http-fetch-dumb.sh | 16 +- t/t5551-http-fetch-smart.sh | 26 +- t/t5552-skipping-fetch-negotiator.sh | 215 + t/t5561-http-backend.sh | 8 +- t/t5562-http-backend-content-length.sh | 167 + t/t5562/invoke-with-content-length.pl | 37 + t/t5570-git-daemon.sh | 8 +- t/t5573-pull-verify-signatures.sh | 2 +- t/t5601-clone.sh | 2 +- t/t5605-clone-local.sh | 2 +- t/t5608-clone-2gb.sh | 2 +- t/t5612-clone-refspec.sh | 9 +- t/t5616-partial-clone.sh | 108 + t/t5702-protocol-v2.sh | 78 +- t/t5703-upload-pack-ref-in-want.sh | 377 + t/t5801-remote-helpers.sh | 10 +- t/t6000-rev-list-misc.sh | 3 +- t/t6009-rev-list-parent.sh | 6 +- t/t6010-merge-base.sh | 2 +- t/t6018-rev-list-glob.sh | 14 +- t/t6019-rev-list-ancestry-path.sh | 3 +- t/t6020-merge-df.sh | 3 - t/t6022-merge-rename.sh | 3 +- t/t6029-merge-subtree.sh | 44 +- t/t6036-recursive-corner-cases.sh | 1606 ++- t/t6042-merge-rename-corner-cases.sh | 1212 ++- t/t6043-merge-rename-directories.sh | 2 +- t/t6044-merge-unrelated-index-changes.sh | 67 +- t/t6046-merge-skip-unneeded-updates.sh | 4 +- t/t6050-replace.sh | 6 + t/t6060-merge-index.sh | 3 +- t/t6112-rev-list-filters-objects.sh | 3 +- t/t6120-describe.sh | 3 +- t/t6130-pathspec-noglob.sh | 10 +- t/t6200-fmt-merge-msg.sh | 4 +- t/t6300-for-each-ref.sh | 10 + t/t7001-mv.sh | 8 +- t/t7003-filter-branch.sh | 15 + t/t7004-tag.sh | 43 +- t/t7006-pager.sh | 3 +- t/t7008-grep-binary.sh | 6 +- t/t7030-verify-tag.sh | 39 +- t/t7063-status-untracked-cache.sh | 5 +- t/t7064-wtstatus-pv2.sh | 5 +- t/t7102-reset.sh | 6 +- t/t7105-reset-patch.sh | 12 +- t/t7106-reset-unborn-branch.sh | 9 +- t/t7201-co.sh | 48 +- t/t7301-clean-interactive.sh | 41 +- t/t7400-submodule-basic.sh | 43 +- t/t7401-submodule-summary.sh | 5 +- t/t7405-submodule-merge.sh | 173 + t/t7406-submodule-update.sh | 82 +- t/t7407-submodule-foreach.sh | 38 +- t/t7408-submodule-reference.sh | 2 +- t/t7410-submodule-checkout-to.sh | 99 +- t/t7415-submodule-names.sh | 65 +- t/t7416-submodule-dash-url.sh | 204 - t/t7417-submodule-path-url.sh | 45 - t/t7501-commit.sh | 64 +- t/t7502-commit.sh | 3 +- t/t7504-commit-msg-hook.sh | 4 +- t/t7506-status-submodule.sh | 10 +- t/t7508-status.sh | 4 +- t/t7510-signed-commit.sh | 14 +- t/t7600-merge.sh | 9 +- t/t7610-mergetool.sh | 14 +- t/t7611-merge-abort.sh | 118 - t/t7612-merge-verify-signatures.sh | 2 +- t/t7810-grep.sh | 153 +- t/t7811-grep-open.sh | 18 +- t/t8003-blame-corner-cases.sh | 12 +- t/t8010-cat-file-filters.sh | 2 +- t/t9001-send-email.sh | 70 +- t/t9011-svn-da.sh | 14 +- t/t9100-git-svn-basic.sh | 2 +- t/t9101-git-svn-props.sh | 2 +- t/t9104-git-svn-follow-parent.sh | 4 +- t/t9119-git-svn-info.sh | 120 +- t/t9122-git-svn-author.sh | 6 +- t/t9129-git-svn-i18n-commitencoding.sh | 2 +- t/t9130-git-svn-authors-file.sh | 4 +- t/t9131-git-svn-empty-symlink.sh | 6 +- t/t9134-git-svn-ignore-paths.sh | 6 +- t/t9135-git-svn-moved-branch-empty-file.sh | 3 +- t/t9137-git-svn-dcommit-clobber-series.sh | 2 +- t/t9138-git-svn-authors-prog.sh | 6 +- t/t9146-git-svn-empty-dirs.sh | 20 +- t/t9147-git-svn-include-paths.sh | 6 +- t/t9152-svn-empty-dirs-after-gc.sh | 2 +- t/t9164-git-svn-dcommit-concurrent.sh | 2 +- t/t9165-git-svn-fetch-merge-branch-of-branch.sh | 2 +- t/t9200-git-cvsexportcommit.sh | 10 +- t/t9300-fast-import.sh | 70 +- t/t9302-fast-import-unpack-limit.sh | 2 +- t/t9350-fast-export.sh | 3 +- t/t9400-git-cvsserver-server.sh | 8 +- t/t9600-cvsimport.sh | 2 +- t/t9800-git-p4-basic.sh | 29 + t/t9802-git-p4-filetype.sh | 2 +- t/t9806-git-p4-options.sh | 2 +- t/t9810-git-p4-rcs.sh | 2 +- t/t9811-git-p4-label-import.sh | 2 +- t/t9814-git-p4-rename.sh | 18 +- t/t9815-git-p4-submit-fail.sh | 2 +- t/t9830-git-p4-symlink-dir.sh | 2 +- t/t9831-git-p4-triggers.sh | 2 +- t/t9833-errors.sh | 4 +- t/t9902-completion.sh | 51 +- t/t9903-bash-prompt.sh | 21 +- t/test-lib-functions.sh | 8 + t/test-lib.sh | 21 +- tag.c | 48 +- tag.h | 8 +- tempfile.h | 1 + trailer.h | 2 + transport-helper.c | 93 +- transport.c | 20 +- transport.h | 21 + tree-diff.c | 4 +- tree-walk.c | 10 +- tree-walk.h | 2 + tree.c | 24 +- tree.h | 2 +- unicode-width.h | 41 +- unpack-trees.c | 103 +- unpack-trees.h | 9 +- upload-pack.c | 98 +- url.h | 2 + urlmatch.h | 2 + userdiff.c | 4 +- utf8.c | 18 +- utf8.h | 12 +- walker.c | 13 +- worktree.h | 1 + ws.c | 2 +- wt-status.c | 26 +- xdiff-interface.c | 1 + xdiff/xdiff.h | 8 - xdiff/xdiffi.c | 29 +- xdiff/xhistogram.c | 133 +- 797 files changed, 66255 insertions(+), 35971 deletions(-) delete mode 100644 Documentation/RelNotes/2.14.5.txt delete mode 100644 Documentation/RelNotes/2.14.6.txt delete mode 100644 Documentation/RelNotes/2.15.3.txt delete mode 100644 Documentation/RelNotes/2.15.4.txt delete mode 100644 Documentation/RelNotes/2.16.5.txt delete mode 100644 Documentation/RelNotes/2.16.6.txt delete mode 100644 Documentation/RelNotes/2.17.2.txt delete mode 100644 Documentation/RelNotes/2.17.3.txt delete mode 100644 Documentation/RelNotes/2.17.4.txt delete mode 100644 Documentation/RelNotes/2.17.5.txt delete mode 100644 Documentation/RelNotes/2.18.1.txt delete mode 100644 Documentation/RelNotes/2.18.2.txt delete mode 100644 Documentation/RelNotes/2.18.3.txt delete mode 100644 Documentation/RelNotes/2.18.4.txt create mode 100644 Documentation/RelNotes/2.19.0.txt create mode 100755 Documentation/doc-diff create mode 100644 Documentation/git-range-diff.txt create mode 100644 Documentation/technical/directory-rename-detection.txt create mode 100644 alloc.h create mode 100644 banned.h create mode 100644 builtin/range-diff.c rename show-index.c => builtin/show-index.c (96%) create mode 100755 ci/util/extract-trash-dirs.sh create mode 100644 commit-slab-decl.h create mode 100644 commit-slab-impl.h create mode 100644 contrib/vscode/.gitattributes create mode 100644 contrib/vscode/README.md create mode 100755 contrib/vscode/init.sh create mode 100644 fetch-negotiator.c create mode 100644 fetch-negotiator.h create mode 100644 git-rebase--preserve-merges.sh create mode 100644 json-writer.c create mode 100644 json-writer.h create mode 100644 linear-assignment.c create mode 100644 linear-assignment.h create mode 100644 negotiator/default.c create mode 100644 negotiator/default.h create mode 100644 negotiator/skipping.c create mode 100644 negotiator/skipping.h create mode 100644 range-diff.c create mode 100644 range-diff.h create mode 100644 t/chainlint.sed create mode 100644 t/chainlint/arithmetic-expansion.expect create mode 100644 t/chainlint/arithmetic-expansion.test create mode 100644 t/chainlint/bash-array.expect create mode 100644 t/chainlint/bash-array.test create mode 100644 t/chainlint/blank-line.expect create mode 100644 t/chainlint/blank-line.test create mode 100644 t/chainlint/block.expect create mode 100644 t/chainlint/block.test create mode 100644 t/chainlint/broken-chain.expect create mode 100644 t/chainlint/broken-chain.test create mode 100644 t/chainlint/case.expect create mode 100644 t/chainlint/case.test create mode 100644 t/chainlint/close-nested-and-parent-together.expect create mode 100644 t/chainlint/close-nested-and-parent-together.test create mode 100644 t/chainlint/close-subshell.expect create mode 100644 t/chainlint/close-subshell.test create mode 100644 t/chainlint/command-substitution.expect create mode 100644 t/chainlint/command-substitution.test create mode 100644 t/chainlint/comment.expect create mode 100644 t/chainlint/comment.test create mode 100644 t/chainlint/complex-if-in-cuddled-loop.expect create mode 100644 t/chainlint/complex-if-in-cuddled-loop.test create mode 100644 t/chainlint/cuddled-if-then-else.expect create mode 100644 t/chainlint/cuddled-if-then-else.test create mode 100644 t/chainlint/cuddled-loop.expect create mode 100644 t/chainlint/cuddled-loop.test create mode 100644 t/chainlint/cuddled.expect create mode 100644 t/chainlint/cuddled.test create mode 100644 t/chainlint/exit-loop.expect create mode 100644 t/chainlint/exit-loop.test create mode 100644 t/chainlint/exit-subshell.expect create mode 100644 t/chainlint/exit-subshell.test create mode 100644 t/chainlint/for-loop.expect create mode 100644 t/chainlint/for-loop.test create mode 100644 t/chainlint/here-doc-close-subshell.expect create mode 100644 t/chainlint/here-doc-close-subshell.test create mode 100644 t/chainlint/here-doc-multi-line-command-subst.expect create mode 100644 t/chainlint/here-doc-multi-line-command-subst.test create mode 100644 t/chainlint/here-doc-multi-line-string.expect create mode 100644 t/chainlint/here-doc-multi-line-string.test create mode 100644 t/chainlint/here-doc.expect create mode 100644 t/chainlint/here-doc.test create mode 100644 t/chainlint/if-in-loop.expect create mode 100644 t/chainlint/if-in-loop.test create mode 100644 t/chainlint/if-then-else.expect create mode 100644 t/chainlint/if-then-else.test create mode 100644 t/chainlint/incomplete-line.expect create mode 100644 t/chainlint/incomplete-line.test create mode 100644 t/chainlint/inline-comment.expect create mode 100644 t/chainlint/inline-comment.test create mode 100644 t/chainlint/loop-in-if.expect create mode 100644 t/chainlint/loop-in-if.test create mode 100644 t/chainlint/multi-line-nested-command-substitution.expect create mode 100644 t/chainlint/multi-line-nested-command-substitution.test create mode 100644 t/chainlint/multi-line-string.expect create mode 100644 t/chainlint/multi-line-string.test create mode 100644 t/chainlint/negated-one-liner.expect create mode 100644 t/chainlint/negated-one-liner.test create mode 100644 t/chainlint/nested-cuddled-subshell.expect create mode 100644 t/chainlint/nested-cuddled-subshell.test create mode 100644 t/chainlint/nested-here-doc.expect create mode 100644 t/chainlint/nested-here-doc.test create mode 100644 t/chainlint/nested-subshell-comment.expect create mode 100644 t/chainlint/nested-subshell-comment.test create mode 100644 t/chainlint/nested-subshell.expect create mode 100644 t/chainlint/nested-subshell.test create mode 100644 t/chainlint/one-liner.expect create mode 100644 t/chainlint/one-liner.test create mode 100644 t/chainlint/p4-filespec.expect create mode 100644 t/chainlint/p4-filespec.test create mode 100644 t/chainlint/pipe.expect create mode 100644 t/chainlint/pipe.test create mode 100644 t/chainlint/semicolon.expect create mode 100644 t/chainlint/semicolon.test create mode 100644 t/chainlint/subshell-here-doc.expect create mode 100644 t/chainlint/subshell-here-doc.test create mode 100644 t/chainlint/subshell-one-liner.expect create mode 100644 t/chainlint/subshell-one-liner.test create mode 100644 t/chainlint/t7900-subtree.expect create mode 100644 t/chainlint/t7900-subtree.test create mode 100644 t/chainlint/while-loop.expect create mode 100644 t/chainlint/while-loop.test create mode 100644 t/helper/test-json-writer.c create mode 100644 t/helper/test-repository.c create mode 100644 t/lib-gpg/gpgsm-gen-key.in create mode 100644 t/lib-gpg/gpgsm_cert.p12 create mode 100644 t/lib-httpd/apply-one-time-sed.sh create mode 100755 t/t0019-json-writer.sh create mode 100644 t/t0019/parse_json.perl create mode 100755 t/t1015-read-index-unmerged.sh create mode 100755 t/t3035-merge-sparse.sh create mode 100755 t/t3206-range-diff.sh create mode 100644 t/t3206/history.export create mode 100755 t/t3401-rebase-and-am-rename.sh create mode 100755 t/t3422-rebase-incompatible-options.sh create mode 100755 t/t3423-rebase-reword.sh create mode 100644 t/t4018/php-abstract-class create mode 100644 t/t4018/php-class create mode 100644 t/t4018/php-final-class create mode 100644 t/t4018/php-function create mode 100644 t/t4018/php-interface create mode 100644 t/t4018/php-method create mode 100644 t/t4018/php-trait create mode 100755 t/t5409-colorize-remote-messages.sh create mode 100755 t/t5552-skipping-fetch-negotiator.sh create mode 100755 t/t5562-http-backend-content-length.sh create mode 100755 t/t5562/invoke-with-content-length.pl create mode 100755 t/t5703-upload-pack-ref-in-want.sh delete mode 100755 t/t7416-submodule-dash-url.sh delete mode 100755 t/t7417-submodule-path-url.sh diff --git a/.gitignore b/.gitignore index 388cc4b..ffceea7 100644 --- a/.gitignore +++ b/.gitignore @@ -113,12 +113,14 @@ /git-pull /git-push /git-quiltimport +/git-range-diff /git-read-tree /git-rebase /git-rebase--am /git-rebase--helper /git-rebase--interactive /git-rebase--merge +/git-rebase--preserve-merges /git-receive-pack /git-reflog /git-remote @@ -206,6 +208,7 @@ /config.mak.autogen /config.mak.append /configure +/.vscode/ /tags /TAGS /cscope* diff --git a/.mailmap b/.mailmap index df7cf63..f165222 100644 --- a/.mailmap +++ b/.mailmap @@ -35,11 +35,13 @@ Chris Wright Cord Seele Christian Couder Christian Stimming +Christopher Díaz Riveros Christopher Diaz Riveros Csaba Henk Dan Johnson Dana L. How Dana L. How Dana How Daniel Barkalow +Daniel Knittl-Frank knittl Daniel Trstenjak Daniel Trstenjak David Brown @@ -57,6 +59,7 @@ Eric S. Raymond Eric Wong Erik Faye-Lund Eyvind Bernhardsen +Fangyi Zhou Zhou Fangyi Florian Achleitner Franck Bui-Huu Frank Lichtenheld @@ -86,6 +89,8 @@ Jason McMullan Jason Riedy Jason Riedy Jay Soffian +Jean-Noël Avila Jean-Noel Avila +Jean-Noël Avila Jean-Noël AVILA Jeff King Jeff Muizelaar Jens Axboe @@ -149,6 +154,7 @@ Matt Draisey Matt Kraai Matt McCutchen Matthias Kestenholz +Matthias Rüster Matthias Ruester Matthias Urlichs Matthias Urlichs Michael Coleman @@ -213,6 +219,8 @@ Sean Estabrooks Sebastian Schuberth Seth Falcon Shawn O. Pearce +Wei Shuyu Shuyu Wei +Sidhant Sharma Sidhant Sharma [:tk] Simon Hausmann Simon Hausmann Stefan Beller @@ -253,7 +261,8 @@ Uwe Kleine-König Uwe Kleine-König Ville Skyttä -Vitaly "_Vi" Shukela +Vitaly "_Vi" Shukela +Vitaly "_Vi" Shukela Vitaly _Vi Shukela W. Trevor King William Pursell YONETANI Tomokazu diff --git a/Documentation/.gitignore b/Documentation/.gitignore index c7096f1..3ef54e0 100644 --- a/Documentation/.gitignore +++ b/Documentation/.gitignore @@ -12,3 +12,4 @@ cmds-*.txt mergetools-*.txt manpage-base-url.xsl SubmittingPatches.txt +tmp-doc-diff/ diff --git a/Documentation/Makefile b/Documentation/Makefile index d079d7c..a42dcfc 100644 --- a/Documentation/Makefile +++ b/Documentation/Makefile @@ -76,6 +76,7 @@ TECH_DOCS += technical/long-running-process-protocol TECH_DOCS += technical/pack-format TECH_DOCS += technical/pack-heuristics TECH_DOCS += technical/pack-protocol +TECH_DOCS += technical/partial-clone TECH_DOCS += technical/protocol-capabilities TECH_DOCS += technical/protocol-common TECH_DOCS += technical/protocol-v2 diff --git a/Documentation/RelNotes/2.14.5.txt b/Documentation/RelNotes/2.14.5.txt deleted file mode 100644 index 130645f..0000000 --- a/Documentation/RelNotes/2.14.5.txt +++ /dev/null @@ -1,16 +0,0 @@ -Git v2.14.5 Release Notes -========================= - -This release is to address the recently reported CVE-2018-17456. - -Fixes since v2.14.4 -------------------- - - * Submodules' "URL"s come from the untrusted .gitmodules file, but - we blindly gave it to "git clone" to clone submodules when "git - clone --recurse-submodules" was used to clone a project that has - such a submodule. The code has been hardened to reject such - malformed URLs (e.g. one that begins with a dash). - -Credit for finding and fixing this vulnerability goes to joernchen -and Jeff King, respectively. diff --git a/Documentation/RelNotes/2.14.6.txt b/Documentation/RelNotes/2.14.6.txt deleted file mode 100644 index 72b7af6..0000000 --- a/Documentation/RelNotes/2.14.6.txt +++ /dev/null @@ -1,54 +0,0 @@ -Git v2.14.6 Release Notes -========================= - -This release addresses the security issues CVE-2019-1348, -CVE-2019-1349, CVE-2019-1350, CVE-2019-1351, CVE-2019-1352, -CVE-2019-1353, CVE-2019-1354, and CVE-2019-1387. - -Fixes since v2.14.5 -------------------- - - * CVE-2019-1348: - The --export-marks option of git fast-import is exposed also via - the in-stream command feature export-marks=... and it allows - overwriting arbitrary paths. - - * CVE-2019-1349: - When submodules are cloned recursively, under certain circumstances - Git could be fooled into using the same Git directory twice. We now - require the directory to be empty. - - * CVE-2019-1350: - Incorrect quoting of command-line arguments allowed remote code - execution during a recursive clone in conjunction with SSH URLs. - - * CVE-2019-1351: - While the only permitted drive letters for physical drives on - Windows are letters of the US-English alphabet, this restriction - does not apply to virtual drives assigned via subst : - . Git mistook such paths for relative paths, allowing writing - outside of the worktree while cloning. - - * CVE-2019-1352: - Git was unaware of NTFS Alternate Data Streams, allowing files - inside the .git/ directory to be overwritten during a clone. - - * CVE-2019-1353: - When running Git in the Windows Subsystem for Linux (also known as - "WSL") while accessing a working directory on a regular Windows - drive, none of the NTFS protections were active. - - * CVE-2019-1354: - Filenames on Linux/Unix can contain backslashes. On Windows, - backslashes are directory separators. Git did not use to refuse to - write out tracked files with such filenames. - - * CVE-2019-1387: - Recursive clones are currently affected by a vulnerability that is - caused by too-lax validation of submodule names, allowing very - targeted attacks via remote code execution in recursive clones. - -Credit for finding these vulnerabilities goes to Microsoft Security -Response Center, in particular to Nicolas Joly. The `fast-import` -fixes were provided by Jeff King, the other fixes by Johannes -Schindelin with help from Garima Singh. diff --git a/Documentation/RelNotes/2.15.3.txt b/Documentation/RelNotes/2.15.3.txt deleted file mode 100644 index fd2e6f8..0000000 --- a/Documentation/RelNotes/2.15.3.txt +++ /dev/null @@ -1,6 +0,0 @@ -Git v2.15.3 Release Notes -========================= - -This release merges up the fixes that appear in v2.14.5 to address -the recently reported CVE-2018-17456; see the release notes for that -version for details. diff --git a/Documentation/RelNotes/2.15.4.txt b/Documentation/RelNotes/2.15.4.txt deleted file mode 100644 index dc241cb..0000000 --- a/Documentation/RelNotes/2.15.4.txt +++ /dev/null @@ -1,11 +0,0 @@ -Git v2.15.4 Release Notes -========================= - -This release merges up the fixes that appear in v2.14.6 to address -the security issues CVE-2019-1348, CVE-2019-1349, CVE-2019-1350, -CVE-2019-1351, CVE-2019-1352, CVE-2019-1353, CVE-2019-1354, and -CVE-2019-1387; see the release notes for that version for details. - -In conjunction with a vulnerability that was fixed in v2.20.2, -`.gitmodules` is no longer allowed to contain entries of the form -`submodule..update=!command`. diff --git a/Documentation/RelNotes/2.16.5.txt b/Documentation/RelNotes/2.16.5.txt deleted file mode 100644 index cb8ee02..0000000 --- a/Documentation/RelNotes/2.16.5.txt +++ /dev/null @@ -1,6 +0,0 @@ -Git v2.16.5 Release Notes -========================= - -This release merges up the fixes that appear in v2.14.5 to address -the recently reported CVE-2018-17456; see the release notes for that -version for details. diff --git a/Documentation/RelNotes/2.16.6.txt b/Documentation/RelNotes/2.16.6.txt deleted file mode 100644 index 438306e..0000000 --- a/Documentation/RelNotes/2.16.6.txt +++ /dev/null @@ -1,8 +0,0 @@ -Git v2.16.6 Release Notes -========================= - -This release merges up the fixes that appear in v2.14.6 and in -v2.15.4 addressing the security issues CVE-2019-1348, CVE-2019-1349, -CVE-2019-1350, CVE-2019-1351, CVE-2019-1352, CVE-2019-1353, -CVE-2019-1354, and CVE-2019-1387; see the release notes for those -versions for details. diff --git a/Documentation/RelNotes/2.17.2.txt b/Documentation/RelNotes/2.17.2.txt deleted file mode 100644 index ef021be..0000000 --- a/Documentation/RelNotes/2.17.2.txt +++ /dev/null @@ -1,12 +0,0 @@ -Git v2.17.2 Release Notes -========================= - -This release merges up the fixes that appear in v2.14.5 to address -the recently reported CVE-2018-17456; see the release notes for that -version for details. - -In addition, this release also teaches "fsck" and the server side -logic to reject pushes to repositories that attempt to create such a -problematic ".gitmodules" file as tracked contents, to help hosting -sites protect their customers by preventing malicious contents from -spreading. diff --git a/Documentation/RelNotes/2.17.3.txt b/Documentation/RelNotes/2.17.3.txt deleted file mode 100644 index 5a46c94..0000000 --- a/Documentation/RelNotes/2.17.3.txt +++ /dev/null @@ -1,12 +0,0 @@ -Git v2.17.3 Release Notes -========================= - -This release merges up the fixes that appear in v2.14.6 and in -v2.15.4 addressing the security issues CVE-2019-1348, CVE-2019-1349, -CVE-2019-1350, CVE-2019-1351, CVE-2019-1352, CVE-2019-1353, -CVE-2019-1354, and CVE-2019-1387; see the release notes for those -versions for details. - -In addition, `git fsck` was taught to identify `.gitmodules` entries -of the form `submodule..update=!command`, which have been -disallowed in v2.15.4. diff --git a/Documentation/RelNotes/2.17.4.txt b/Documentation/RelNotes/2.17.4.txt deleted file mode 100644 index 7d794ca..0000000 --- a/Documentation/RelNotes/2.17.4.txt +++ /dev/null @@ -1,16 +0,0 @@ -Git v2.17.4 Release Notes -========================= - -This release is to address the security issue: CVE-2020-5260 - -Fixes since v2.17.3 -------------------- - - * With a crafted URL that contains a newline in it, the credential - helper machinery can be fooled to give credential information for - a wrong host. The attack has been made impossible by forbidding - a newline character in any value passed via the credential - protocol. - -Credit for finding the vulnerability goes to Felix Wilhelm of Google -Project Zero. diff --git a/Documentation/RelNotes/2.17.5.txt b/Documentation/RelNotes/2.17.5.txt deleted file mode 100644 index 2abb821..0000000 --- a/Documentation/RelNotes/2.17.5.txt +++ /dev/null @@ -1,22 +0,0 @@ -Git v2.17.5 Release Notes -========================= - -This release is to address a security issue: CVE-2020-11008 - -Fixes since v2.17.4 -------------------- - - * With a crafted URL that contains a newline or empty host, or lacks - a scheme, the credential helper machinery can be fooled into - providing credential information that is not appropriate for the - protocol in use and host being contacted. - - Unlike the vulnerability CVE-2020-5260 fixed in v2.17.4, the - credentials are not for a host of the attacker's choosing; instead, - they are for some unspecified host (based on how the configured - credential helper handles an absent "host" parameter). - - The attack has been made impossible by refusing to work with - under-specified credential patterns. - -Credit for finding the vulnerability goes to Carlo Arenas. diff --git a/Documentation/RelNotes/2.18.1.txt b/Documentation/RelNotes/2.18.1.txt deleted file mode 100644 index 2098cdd..0000000 --- a/Documentation/RelNotes/2.18.1.txt +++ /dev/null @@ -1,6 +0,0 @@ -Git v2.18.1 Release Notes -========================= - -This release merges up the fixes that appear in v2.14.5 and in -v2.17.2 to address the recently reported CVE-2018-17456; see the -release notes for those versions for details. diff --git a/Documentation/RelNotes/2.18.2.txt b/Documentation/RelNotes/2.18.2.txt deleted file mode 100644 index 98b168a..0000000 --- a/Documentation/RelNotes/2.18.2.txt +++ /dev/null @@ -1,8 +0,0 @@ -Git v2.18.2 Release Notes -========================= - -This release merges up the fixes that appear in v2.14.6, v2.15.4 -and in v2.17.3, addressing the security issues CVE-2019-1348, -CVE-2019-1349, CVE-2019-1350, CVE-2019-1351, CVE-2019-1352, -CVE-2019-1353, CVE-2019-1354, and CVE-2019-1387; see the release notes -for those versions for details. diff --git a/Documentation/RelNotes/2.18.3.txt b/Documentation/RelNotes/2.18.3.txt deleted file mode 100644 index 25143f0..0000000 --- a/Documentation/RelNotes/2.18.3.txt +++ /dev/null @@ -1,5 +0,0 @@ -Git v2.18.3 Release Notes -========================= - -This release merges the security fix that appears in v2.17.4; see -the release notes for that version for details. diff --git a/Documentation/RelNotes/2.18.4.txt b/Documentation/RelNotes/2.18.4.txt deleted file mode 100644 index e8ef858..0000000 --- a/Documentation/RelNotes/2.18.4.txt +++ /dev/null @@ -1,5 +0,0 @@ -Git v2.18.4 Release Notes -========================= - -This release merges the security fix that appears in v2.17.5; see -the release notes for that version for details. diff --git a/Documentation/RelNotes/2.19.0.txt b/Documentation/RelNotes/2.19.0.txt new file mode 100644 index 0000000..a06ccf6 --- /dev/null +++ b/Documentation/RelNotes/2.19.0.txt @@ -0,0 +1,615 @@ +Git 2.19 Release Notes +====================== + +Updates since v2.18 +------------------- + +UI, Workflows & Features + + * "git diff" compares the index and the working tree. For paths + added with intent-to-add bit, the command shows the full contents + of them as added, but the paths themselves were not marked as new + files. They are now shown as new by default. + + "git apply" learned the "--intent-to-add" option so that an + otherwise working-tree-only application of a patch will add new + paths to the index marked with the "intent-to-add" bit. + + * "git grep" learned the "--column" option that gives not just the + line number but the column number of the hit. + + * The "-l" option in "git branch -l" is an unfortunate short-hand for + "--create-reflog", but many users, both old and new, somehow expect + it to be something else, perhaps "--list". This step warns when "-l" + is used as a short-hand for "--create-reflog" and warns about the + future repurposing of the it when it is used. + + * The userdiff pattern for .php has been updated. + + * The content-transfer-encoding of the message "git send-email" sends + out by default was 8bit, which can cause trouble when there is an + overlong line to bust RFC 5322/2822 limit. A new option 'auto' to + automatically switch to quoted-printable when there is such a line + in the payload has been introduced and is made the default. + + * "git checkout" and "git worktree add" learned to honor + checkout.defaultRemote when auto-vivifying a local branch out of a + remote tracking branch in a repository with multiple remotes that + have tracking branches that share the same names. + (merge 8d7b558bae ab/checkout-default-remote later to maint). + + * "git grep" learned the "--only-matching" option. + + * "git rebase --rebase-merges" mode now handles octopus merges as + well. + + * Add a server-side knob to skip commits in exponential/fibbonacci + stride in an attempt to cover wider swath of history with a smaller + number of iterations, potentially accepting a larger packfile + transfer, instead of going back one commit a time during common + ancestor discovery during the "git fetch" transaction. + (merge 42cc7485a2 jt/fetch-negotiator-skipping later to maint). + + * A new configuration variable core.usereplacerefs has been added, + primarily to help server installations that want to ignore the + replace mechanism altogether. + + * Teach "git tag -s" etc. a few configuration variables (gpg.format + that can be set to "openpgp" or "x509", and gpg..program + that is used to specify what program to use to deal with the format) + to allow x.509 certs with CMS via "gpgsm" to be used instead of + openpgp via "gnupg". + + * Many more strings are prepared for l10n. + + * "git p4 submit" learns to ask its own pre-submit hook if it should + continue with submitting. + + * The test performed at the receiving end of "git push" to prevent + bad objects from entering repository can be customized via + receive.fsck.* configuration variables; we now have gained a + counterpart to do the same on the "git fetch" side, with + fetch.fsck.* configuration variables. + + * "git pull --rebase=interactive" learned "i" as a short-hand for + "interactive". + + * "git instaweb" has been adjusted to run better with newer Apache on + RedHat based distros. + + * "git range-diff" is a reimplementation of "git tbdiff" that lets us + compare individual patches in two iterations of a topic. + + * The sideband code learned to optionally paint selected keywords at + the beginning of incoming lines on the receiving end. + + * "git branch --list" learned to take the default sort order from the + 'branch.sort' configuration variable, just like "git tag --list" + pays attention to 'tag.sort'. + + * "git worktree" command learned "--quiet" option to make it less + verbose. + + +Performance, Internal Implementation, Development Support etc. + + * The bulk of "git submodule foreach" has been rewritten in C. + + * The in-core "commit" object had an all-purpose "void *util" field, + which was tricky to use especially in library-ish part of the + code. All of the existing uses of the field has been migrated to a + more dedicated "commit-slab" mechanism and the field is eliminated. + + * A less often used command "git show-index" has been modernized. + (merge fb3010c31f jk/show-index later to maint). + + * The conversion to pass "the_repository" and then "a_repository" + throughout the object access API continues. + + * Continuing with the idea to programatically enumerate various + pieces of data required for command line completion, teach the + codebase to report the list of configuration variables + subcommands care about to help complete them. + + * Separate "rebase -p" codepath out of "rebase -i" implementation to + slim down the latter and make it easier to manage. + + * Make refspec parsing codepath more robust. + + * Some flaky tests have been fixed. + + * Continuing with the idea to programmatically enumerate various + pieces of data required for command line completion, the codebase + has been taught to enumerate options prefixed with "--no-" to + negate them. + + * Build and test procedure for netrc credential helper (in contrib/) + has been updated. + + * Remove unused function definitions and declarations from ewah + bitmap subsystem. + + * Code preparation to make "git p4" closer to be usable with Python 3. + + * Tighten the API to make it harder to misuse in-tree .gitmodules + file, even though it shares the same syntax with configuration + files, to read random configuration items from it. + + * "git fast-import" has been updated to avoid attempting to create + delta against a zero-byte-long string, which is pointless. + + * The codebase has been updated to compile cleanly with -pedantic + option. + (merge 2b647a05d7 bb/pedantic later to maint). + + * The character display width table has been updated to match the + latest Unicode standard. + (merge 570951eea2 bb/unicode-11-width later to maint). + + * test-lint now looks for broken use of "VAR=VAL shell_func" in test + scripts. + + * Conversion from uchar[40] to struct object_id continues. + + * Recent "security fix" to pay attention to contents of ".gitmodules" + while accepting "git push" was a bit overly strict than necessary, + which has been adjusted. + + * "git fsck" learns to make sure the optional commit-graph file is in + a sane state. + + * "git diff --color-moved" feature has further been tweaked. + + * Code restructuring and a small fix to transport protocol v2 during + fetching. + + * Parsing of -L[][,[]] parameters "git blame" and "git log" + take has been tweaked. + + * lookup_commit_reference() and friends have been updated to find + in-core object for a specific in-core repository instance. + + * Various glitches in the heuristics of merge-recursive strategy have + been documented in new tests. + + * "git fetch" learned a new option "--negotiation-tip" to limit the + set of commits it tells the other end as "have", to reduce wasted + bandwidth and cycles, which would be helpful when the receiving + repository has a lot of refs that have little to do with the + history at the remote it is fetching from. + + * For a large tree, the index needs to hold many cache entries + allocated on heap. These cache entries are now allocated out of a + dedicated memory pool to amortize malloc(3) overhead. + + * Tests to cover various conflicting cases have been added for + merge-recursive. + + * Tests to cover conflict cases that involve submodules have been + added for merge-recursive. + + * Look for broken "&&" chains that are hidden in subshell, many of + which have been found and corrected. + + * The singleton commit-graph in-core instance is made per in-core + repository instance. + + * "make DEVELOPER=1 DEVOPTS=pedantic" allows developers to compile + with -pedantic option, which may catch more problematic program + constructs and potential bugs. + + * Preparatory code to later add json output for telemetry data has + been added. + + * Update the way we use Coccinelle to find out-of-style code that + need to be modernised. + + * It is too easy to misuse system API functions such as strcat(); + these selected functions are now forbidden in this codebase and + will cause a compilation failure. + + * Add a script (in contrib/) to help users of VSCode work better with + our codebase. + + * The Travis CI scripts were taught to ship back the test data from + failed tests. + (merge aea8879a6a sg/travis-retrieve-trash-upon-failure later to maint). + + * The parse-options machinery learned to refrain from enclosing + placeholder string inside a "" pair automatically + without PARSE_OPT_LITERAL_ARGHELP. Existing help text for option + arguments that are not formatted correctly have been identified and + fixed. + (merge 5f0df44cd7 rs/parse-opt-lithelp later to maint). + + * Noiseword "extern" has been removed from function decls in the + header files. + + * A few atoms like %(objecttype) and %(objectsize) in the format + specifier of "for-each-ref --format=" can be filled without + getting the full contents of the object, but just with the object + header. These cases have been optimized by calling + oid_object_info() API (instead of reading and inspecting the data). + + * The end result of documentation update has been made to be + inspected more easily to help developers. + + * The API to iterate over all objects learned to optionally list + objects in the order they appear in packfiles, which helps locality + of access if the caller accesses these objects while as objects are + enumerated. + + * Improve built-in facility to catch broken &&-chain in the tests. + + * The more library-ish parts of the codebase learned to work on the + in-core index-state instance that is passed in by their callers, + instead of always working on the singleton "the_index" instance. + + * A test prerequisite defined by various test scripts with slightly + different semantics has been consolidated into a single copy and + made into a lazily defined one. + (merge 6ec633059a wc/make-funnynames-shared-lazy-prereq later to maint). + + * After a partial clone, repeated fetches from promisor remote would + have accumulated many packfiles marked with .promisor bit without + getting them coalesced into fewer packfiles, hurting performance. + "git repack" now learned to repack them. + + * Partially revert the support for multiple hash functions to regain + hash comparison performance; we'd think of a way to do this better + in the next cycle. + + * "git help --config" (which is used in command line completion) + missed the configuration variables not described in the main + config.txt file but are described in another file that is included + by it, which has been corrected. + + * The test linter code has learned that the end of here-doc mark + "EOF" can be quoted in a double-quote pair, not just in a + single-quote pair. + + +Fixes since v2.18 +----------------- + + * "git remote update" can take both a single remote nickname and a + nickname for remote groups, and the completion script (in contrib/) + has been taught about it. + (merge 9cd4382ad5 ls/complete-remote-update-names later to maint). + + * "git fetch --shallow-since=" that specifies the cut-off + point that is newer than the existing history used to end up + grabbing the entire history. Such a request now errors out. + (merge e34de73c56 nd/reject-empty-shallow-request later to maint). + + * Fix for 2.17-era regression around `core.safecrlf`. + (merge 6cb09125be as/safecrlf-quiet-fix later to maint). + + * The recent addition of "partial clone" experimental feature kicked + in when it shouldn't, namely, when there is no partial-clone filter + defined even if extensions.partialclone is set. + (merge cac1137dc4 jh/partial-clone later to maint). + + * "git send-pack --signed" (hence "git push --signed" over the http + transport) did not read user ident from the config mechanism to + determine whom to sign the push certificate as, which has been + corrected. + (merge d067d98887 ms/send-pack-honor-config later to maint). + + * "git fetch-pack --all" used to unnecessarily fail upon seeing an + annotated tag that points at an object other than a commit. + (merge c12c9df527 jk/fetch-all-peeled-fix later to maint). + + * When user edits the patch in "git add -p" and the user's editor is + set to strip trailing whitespaces indiscriminately, an empty line + that is unchanged in the patch would become completely empty + (instead of a line with a sole SP on it). The code introduced in + Git 2.17 timeframe failed to parse such a patch, but now it learned + to notice the situation and cope with it. + (merge f4d35a6b49 pw/add-p-recount later to maint). + + * The code to try seeing if a fetch is necessary in a submodule + during a fetch with --recurse-submodules got confused when the path + to the submodule was changed in the range of commits in the + superproject, sometimes showing "(null)". This has been corrected. + + * Bugfix for "rebase -i" corner case regression. + (merge a9279c6785 pw/rebase-i-keep-reword-after-conflict later to maint). + + * Recently added "--base" option to "git format-patch" command did + not correctly generate prereq patch ids. + (merge 15b76c1fb3 xy/format-patch-prereq-patch-id-fix later to maint). + + * POSIX portability fix in Makefile to fix a glitch introduced a few + releases ago. + (merge 6600054e9b dj/runtime-prefix later to maint). + + * "git filter-branch" when used with the "--state-branch" option + still attempted to rewrite the commits whose filtered result is + known from the previous attempt (which is recorded on the state + branch); the command has been corrected not to waste cycles doing + so. + (merge 709cfe848a mb/filter-branch-optim later to maint). + + * Clarify that setting core.ignoreCase to deviate from reality would + not turn a case-incapable filesystem into a case-capable one. + (merge 48294b512a ms/core-icase-doc later to maint). + + * "fsck.skipList" did not prevent a blob object listed there from + being inspected for is contents (e.g. we recently started to + inspect the contents of ".gitmodules" for certain malicious + patterns), which has been corrected. + (merge fb16287719 rj/submodule-fsck-skip later to maint). + + * "git checkout --recurse-submodules another-branch" did not report + in which submodule it failed to update the working tree, which + resulted in an unhelpful error message. + (merge ba95d4e4bd sb/submodule-move-head-error-msg later to maint). + + * "git rebase" behaved slightly differently depending on which one of + the three backends gets used; this has been documented and an + effort to make them more uniform has begun. + (merge b00bf1c9a8 en/rebase-consistency later to maint). + + * The "--ignore-case" option of "git for-each-ref" (and its friends) + did not work correctly, which has been fixed. + (merge e674eb2528 jk/for-each-ref-icase later to maint). + + * "git fetch" failed to correctly validate the set of objects it + received when making a shallow history deeper, which has been + corrected. + (merge cf1e7c0770 jt/connectivity-check-after-unshallow later to maint). + + * Partial clone support of "git clone" has been updated to correctly + validate the objects it receives from the other side. The server + side has been corrected to send objects that are directly + requested, even if they may match the filtering criteria (e.g. when + doing a "lazy blob" partial clone). + (merge a7e67c11b8 jt/partial-clone-fsck-connectivity later to maint). + + * Handling of an empty range by "git cherry-pick" was inconsistent + depending on how the range ended up to be empty, which has been + corrected. + (merge c5e358d073 jk/empty-pick-fix later to maint). + + * "git reset --merge" (hence "git merge ---abort") and "git reset --hard" + had trouble working correctly in a sparsely checked out working + tree after a conflict, which has been corrected. + (merge b33fdfc34c mk/merge-in-sparse-checkout later to maint). + + * Correct a broken use of "VAR=VAL shell_func" in a test. + (merge 650161a277 jc/t3404-one-shot-export-fix later to maint). + + * "git rev-parse ':/substring'" did not consider the history leading + only to HEAD when looking for a commit with the given substring, + when the HEAD is detached. This has been fixed. + (merge 6b3351e799 wc/find-commit-with-pattern-on-detached-head later to maint). + + * Build doc update for Windows. + (merge ede8d89bb1 nd/command-list later to maint). + + * core.commentchar is now honored when preparing the list of commits + to replay in "rebase -i". + + * "git pull --rebase" on a corrupt HEAD caused a segfault. In + general we substitute an empty tree object when running the in-core + equivalent of the diff-index command, and the codepath has been + corrected to do so as well to fix this issue. + (merge 3506dc9445 jk/has-uncommitted-changes-fix later to maint). + + * httpd tests saw occasional breakage due to the way its access log + gets inspected by the tests, which has been updated to make them + less flaky. + (merge e8b3b2e275 sg/httpd-test-unflake later to maint). + + * Tests to cover more D/F conflict cases have been added for + merge-recursive. + + * "git gc --auto" opens file descriptors for the packfiles before + spawning "git repack/prune", which would upset Windows that does + not want a process to work on a file that is open by another + process. The issue has been worked around. + (merge 12e73a3ce4 kg/gc-auto-windows-workaround later to maint). + + * The recursive merge strategy did not properly ensure there was no + change between HEAD and the index before performing its operation, + which has been corrected. + (merge 55f39cf755 en/dirty-merge-fixes later to maint). + + * "git rebase" started exporting GIT_DIR environment variable and + exposing it to hook scripts when part of it got rewritten in C. + Instead of matching the old scripted Porcelains' behaviour, + compensate by also exporting GIT_WORK_TREE environment as well to + lessen the damage. This can harm existing hooks that want to + operate on different repository, but the current behaviour is + already broken for them anyway. + (merge ab5e67d751 bc/sequencer-export-work-tree-as-well later to maint). + + * "git send-email" when using in a batched mode that limits the + number of messages sent in a single SMTP session lost the contents + of the variable used to choose between tls/ssl, unable to send the + second and later batches, which has been fixed. + (merge 636f3d7ac5 jm/send-email-tls-auth-on-batch later to maint). + + * The lazy clone support had a few places where missing but promised + objects were not correctly tolerated, which have been fixed. + + * One of the "diff --color-moved" mode "dimmed_zebra" that was named + in an unusual way has been deprecated and replaced by + "dimmed-zebra". + (merge e3f2f5f9cd es/diff-color-moved-fix later to maint). + + * The wire-protocol v2 relies on the client to send "ref prefixes" to + limit the bandwidth spent on the initial ref advertisement. "git + clone" when learned to speak v2 forgot to do so, which has been + corrected. + (merge 402c47d939 bw/clone-ref-prefixes later to maint). + + * "git diff --histogram" had a bad memory usage pattern, which has + been rearranged to reduce the peak usage. + (merge 79cb2ebb92 sb/histogram-less-memory later to maint). + + * Code clean-up to use size_t/ssize_t when they are the right type. + (merge 7726d360b5 jk/size-t later to maint). + + * The wire-protocol v2 relies on the client to send "ref prefixes" to + limit the bandwidth spent on the initial ref advertisement. "git + fetch $remote branch:branch" that asks tags that point into the + history leading to the "branch" automatically followed sent to + narrow prefix and broke the tag following, which has been fixed. + (merge 2b554353a5 jt/tag-following-with-proto-v2-fix later to maint). + + * When the sparse checkout feature is in use, "git cherry-pick" and + other mergy operations lost the skip_worktree bit when a path that + is excluded from checkout requires content level merge, which is + resolved as the same as the HEAD version, without materializing the + merge result in the working tree, which made the path appear as + deleted. This has been corrected by preserving the skip_worktree + bit (and not materializing the file in the working tree). + (merge 2b75fb601c en/merge-recursive-skip-fix later to maint). + + * The "author-script" file "git rebase -i" creates got broken when + we started to move the command away from shell script, which is + getting fixed now. + (merge 5522bbac20 es/rebase-i-author-script-fix later to maint). + + * The automatic tree-matching in "git merge -s subtree" was broken 5 + years ago and nobody has noticed since then, which is now fixed. + (merge 2ec4150713 jk/merge-subtree-heuristics later to maint). + + * "git fetch $there refs/heads/s" ought to fetch the tip of the + branch 's', but when "refs/heads/refs/heads/s", i.e. a branch whose + name is "refs/heads/s" exists at the same time, fetched that one + instead by mistake. This has been corrected to honor the usual + disambiguation rules for abbreviated refnames. + (merge 60650a48c0 jt/refspec-dwim-precedence-fix later to maint). + + * Futureproofing a helper function that can easily be misused. + (merge 65bb21e77e es/want-color-fd-defensive later to maint). + + * The http-backend (used for smart-http transport) used to slurp the + whole input until EOF, without paying attention to CONTENT_LENGTH + that is supplied in the environment and instead expecting the Web + server to close the input stream. This has been fixed. + (merge eebfe40962 mk/http-backend-content-length later to maint). + + * "git merge --abort" etc. did not clean things up properly when + there were conflicted entries in the index in certain order that + are involved in D/F conflicts. This has been corrected. + (merge ad3762042a en/abort-df-conflict-fixes later to maint). + + * "git diff --indent-heuristic" had a bad corner case performance. + (merge 301ef85401 sb/indent-heuristic-optim later to maint). + + * The "--exec" option to "git rebase --rebase-merges" placed the exec + commands at wrong places, which has been corrected. + + * "git verify-tag" and "git verify-commit" have been taught to use + the exit status of underlying "gpg --verify" to signal bad or + untrusted signature they found. + (merge 4e5dc9ca17 jc/gpg-status later to maint). + + * "git mergetool" stopped and gave an extra prompt to continue after + the last path has been handled, which did not make much sense. + (merge d651a54b8a ng/mergetool-lose-final-prompt later to maint). + + * Among the three codepaths we use O_APPEND to open a file for + appending, one used for writing GIT_TRACE output requires O_APPEND + implementation that behaves sensibly when multiple processes are + writing to the same file. POSIX emulation used in the Windows port + has been updated to improve in this area. + (merge d641097589 js/mingw-o-append later to maint). + + * "git pull --rebase -v" in a repository with a submodule barfed as + an intermediate process did not understand what "-v(erbose)" flag + meant, which has been fixed. + (merge e84c3cf3dc sb/pull-rebase-submodule later to maint). + + * Recent update to "git config" broke updating variable in a + subsection, which has been corrected. + (merge bff7df7a87 sb/config-write-fix later to maint). + + * When "git rebase -i" is told to squash two or more commits into + one, it labeled the log message for each commit with its number. + It correctly called the first one "1st commit", but the next one + was "commit #1", which was off-by-one. This has been corrected. + (merge dd2e36ebac pw/rebase-i-squash-number-fix later to maint). + + * "git rebase -i", when a 'merge ' insn in its todo list + fails, segfaulted, which has been (minimally) corrected. + (merge bc9238bb09 pw/rebase-i-merge-segv-fix later to maint). + + * "git cherry-pick --quit" failed to remove CHERRY_PICK_HEAD even + though we won't be in a cherry-pick session after it returns, which + has been corrected. + (merge 3e7dd99208 nd/cherry-pick-quit-fix later to maint). + + * In a recent update in 2.18 era, "git pack-objects" started + producing a larger than necessary packfiles by missing + opportunities to use large deltas. This has been corrected. + + * The meaning of the possible values the "core.checkStat" + configuration variable can take were not adequately documented, + which has been fixed. + (merge 9bf5d4c4e2 nd/config-core-checkstat-doc later to maint). + + * Recent "git rebase -i" update started to write bogusly formatted + author-script, with a matching broken reading code. These are + fixed. + + * Recent addition of "directory rename" heuristics to the + merge-recursive backend makes the command susceptible to false + positives and false negatives. In the context of "git am -3", + which does not know about surrounding unmodified paths and thus + cannot inform the merge machinery about the full trees involved, + this risk is particularly severe. As such, the heuristic is + disabled for "git am -3" to keep the machinery "more stupid but + predictable". + + * "git merge-base" in 2.19-rc1 has performance regression when the + (experimental) commit-graph feature is in use, which has been + mitigated. + + * Code cleanup, docfix, build fix, etc. + (merge aee9be2ebe sg/update-ref-stdin-cleanup later to maint). + (merge 037714252f jc/clean-after-sanity-tests later to maint). + (merge 5b26c3c941 en/merge-recursive-cleanup later to maint). + (merge 0dcbc0392e bw/config-refer-to-gitsubmodules-doc later to maint). + (merge bb4d000e87 bw/protocol-v2 later to maint). + (merge 928f0ab4ba vs/typofixes later to maint). + (merge d7f590be84 en/rebase-i-microfixes later to maint). + (merge 81d395cc85 js/rebase-recreate-merge later to maint). + (merge 51d1863168 tz/exclude-doc-smallfixes later to maint). + (merge a9aa3c0927 ds/commit-graph later to maint). + (merge 5cf8e06474 js/enhanced-version-info later to maint). + (merge 6aaded5509 tb/config-default later to maint). + (merge 022d2ac1f3 sb/blame-color later to maint). + (merge 5a06a20e0c bp/test-drop-caches-for-windows later to maint). + (merge dd61cc1c2e jk/ui-color-always-to-auto later to maint). + (merge 1e83b9bfdd sb/trailers-docfix later to maint). + (merge ab29f1b329 sg/fast-import-dump-refs-on-checkpoint-fix later to maint). + (merge 6a8ad880f0 jn/subtree-test-fixes later to maint). + (merge ffbd51cc60 nd/pack-objects-threading-doc later to maint). + (merge e9dac7be60 es/mw-to-git-chain-fix later to maint). + (merge fe583c6c7a rs/remote-mv-leakfix later to maint). + (merge 69885ab015 en/t3031-title-fix later to maint). + (merge 8578037bed nd/config-blame-sort later to maint). + (merge 8ad169c4ba hn/config-in-code-comment later to maint). + (merge b7446fcfdf ar/t4150-am-scissors-test-fix later to maint). + (merge a8132410ee js/typofixes later to maint). + (merge 388d0ff6e5 en/update-index-doc later to maint). + (merge e05aa688dd jc/update-index-doc later to maint). + (merge 10c600172c sg/t5310-empty-input-fix later to maint). + (merge 5641eb9465 jh/partial-clone-doc later to maint). + (merge 2711b1ad5e ab/submodule-relative-url-tests later to maint). + (merge ce528de023 ab/unconditional-free-and-null later to maint). + (merge bbc072f5d8 rs/opt-updates later to maint). + (merge 69d846f053 jk/use-compat-util-in-test-tool later to maint). + (merge 1820703045 js/larger-timestamps later to maint). + (merge c8b35b95e1 sg/t4051-fix later to maint). + (merge 30612cb670 sg/t0020-conversion-fix later to maint). + (merge 15da753709 sg/t7501-thinkofix later to maint). + (merge 79b04f9b60 sg/t3903-missing-fix later to maint). + (merge 2745817028 sg/t3420-autostash-fix later to maint). + (merge 7afb0d6777 sg/test-rebase-editor-fix later to maint). + (merge 6c6ce21baa es/freebsd-iconv-portability later to maint). diff --git a/Documentation/SubmittingPatches b/Documentation/SubmittingPatches index 2488544..b44fd51 100644 --- a/Documentation/SubmittingPatches +++ b/Documentation/SubmittingPatches @@ -298,7 +298,7 @@ smaller project it is a good discipline to follow it. The sign-off is a simple line at the end of the explanation for the patch, which certifies that you wrote it or otherwise have -the right to pass it on as a open-source patch. The rules are +the right to pass it on as an open-source patch. The rules are pretty simple: if you can certify the below D-C-O: [[dco]] @@ -403,7 +403,7 @@ don't demand). +git log -p {litdd} _$area_you_are_modifying_+ would help you find out who they are. . You get comments and suggestions for improvements. You may - even get them in a "on top of your change" patch form. + even get them in an "on top of your change" patch form. . Polish, refine, and re-send to the list and the people who spend their time to improve your patch. Go back to step (2). diff --git a/Documentation/config.txt b/Documentation/config.txt index ab641bf..eb66a11 100644 --- a/Documentation/config.txt +++ b/Documentation/config.txt @@ -344,6 +344,16 @@ advice.*:: Advice shown when you used linkgit:git-checkout[1] to move to the detach HEAD state, to instruct how to create a local branch after the fact. + checkoutAmbiguousRemoteBranchName:: + Advice shown when the argument to + linkgit:git-checkout[1] ambiguously resolves to a + remote tracking branch on more than one remote in + situations where an unambiguous argument would have + otherwise caused a remote-tracking branch to be + checked out. See the `checkout.defaultRemote` + configuration variable for how to set a given remote + to used by default in some situations where this + advice would be printed. amWorkDir:: Advice that shows the location of the patch file when linkgit:git-am[1] fails to apply it. @@ -354,7 +364,7 @@ advice.*:: Advice on what to do when you've accidentally added one git repo inside of another. ignoredHook:: - Advice shown if an hook is ignored because the hook is not + Advice shown if a hook is ignored because the hook is not set as executable. waitingForEditor:: Print a message to the terminal whenever Git is waiting for @@ -390,16 +400,19 @@ core.hideDotFiles:: default mode is 'dotGitOnly'. core.ignoreCase:: - If true, this option enables various workarounds to enable + Internal variable which enables various workarounds to enable Git to work better on filesystems that are not case sensitive, - like FAT. For example, if a directory listing finds - "makefile" when Git expects "Makefile", Git will assume + like APFS, HFS+, FAT, NTFS, etc. For example, if a directory listing + finds "makefile" when Git expects "Makefile", Git will assume it is really the same file, and continue to remember it as "Makefile". + The default is false, except linkgit:git-clone[1] or linkgit:git-init[1] will probe and set core.ignoreCase true if appropriate when the repository is created. ++ +Git relies on the proper configuration of this variable for your operating +and file system. Modifying this value may result in unexpected behavior. core.precomposeUnicode:: This option is only used by Mac OS implementation of Git. @@ -449,10 +462,20 @@ core.untrackedCache:: See linkgit:git-update-index[1]. `keep` by default. core.checkStat:: - Determines which stat fields to match between the index - and work tree. The user can set this to 'default' or - 'minimal'. Default (or explicitly 'default'), is to check - all fields, including the sub-second part of mtime and ctime. + When missing or is set to `default`, many fields in the stat + structure are checked to detect if a file has been modified + since Git looked at it. When this configuration variable is + set to `minimal`, sub-second part of mtime and ctime, the + uid and gid of the owner of the file, the inode number (and + the device number, if Git was compiled to use it), are + excluded from the check among these fields, leaving only the + whole-second part of mtime (and ctime, if `core.trustCtime` + is set) and the filesize to be checked. ++ +There are implementations of Git that do not leave usable values in +some fields (e.g. JGit); by excluding these fields from the +comparison, the `minimal` mode may help interoperability when the +same repository is used by these other systems at the same time. core.quotePath:: Commands that output paths (e.g. 'ls-files', 'diff'), will @@ -905,8 +928,14 @@ This setting defaults to "refs/notes/commits", and it can be overridden by the `GIT_NOTES_REF` environment variable. See linkgit:git-notes[1]. core.commitGraph:: - Enable git commit graph feature. Allows reading from the - commit-graph file. + If true, then git will read the commit-graph file (if it exists) + to parse the graph structure of commits. Defaults to false. See + linkgit:git-commit-graph[1] for more information. + +core.useReplaceRefs:: + If set to `false`, behave as if the `--no-replace-objects` + option was given on the command line. See linkgit:git[1] and + linkgit:git-replace[1] for more information. core.sparseCheckout:: Enable "sparse checkout" feature. See section "Sparse checkout" in @@ -974,23 +1003,28 @@ apply.whitespace:: Tells 'git apply' how to handle whitespaces, in the same way as the `--whitespace` option. See linkgit:git-apply[1]. -blame.showRoot:: - Do not treat root commits as boundaries in linkgit:git-blame[1]. - This option defaults to false. - blame.blankBoundary:: Show blank commit object name for boundary commits in linkgit:git-blame[1]. This option defaults to false. -blame.showEmail:: - Show the author email instead of author name in linkgit:git-blame[1]. - This option defaults to false. +blame.coloring:: + This determines the coloring scheme to be applied to blame + output. It can be 'repeatedLines', 'highlightRecent', + or 'none' which is the default. blame.date:: Specifies the format used to output dates in linkgit:git-blame[1]. If unset the iso format is used. For supported values, see the discussion of the `--date` option at linkgit:git-log[1]. +blame.showEmail:: + Show the author email instead of author name in linkgit:git-blame[1]. + This option defaults to false. + +blame.showRoot:: + Do not treat root commits as boundaries in linkgit:git-blame[1]. + This option defaults to false. + branch.autoSetupMerge:: Tells 'git branch' and 'git checkout' to set up new branches so that linkgit:git-pull[1] will appropriately merge from the @@ -1018,6 +1052,12 @@ branch.autoSetupRebase:: branch to track another branch. This option defaults to never. +branch.sort:: + This variable controls the sort ordering of branches when displayed by + linkgit:git-branch[1]. Without the "--sort=" option provided, the + value of this variable will be used as the default. + See linkgit:git-for-each-ref[1] field names for valid values. + branch..remote:: When on branch , it tells 'git fetch' and 'git push' which remote to fetch from/push to. The remote to push to @@ -1098,6 +1138,22 @@ browser..path:: browse HTML help (see `-w` option in linkgit:git-help[1]) or a working repository in gitweb (see linkgit:git-instaweb[1]). +checkout.defaultRemote:: + When you run 'git checkout ' and only have one + remote, it may implicitly fall back on checking out and + tracking e.g. 'origin/'. This stops working as soon + as you have more than one remote with a '' + reference. This setting allows for setting the name of a + preferred remote that should always win when it comes to + disambiguation. The typical use-case is to set this to + `origin`. ++ +Currently this is used by linkgit:git-checkout[1] when 'git checkout +' will checkout the '' branch on another remote, +and by linkgit:git-worktree[1] when 'git worktree add' refers to a +remote branch. This setting might be used for other checkout-like +commands or functionality in the future. + clean.requireForce:: A boolean to make git-clean do nothing unless given -f, -i or -n. Defaults to true. @@ -1112,6 +1168,28 @@ color.advice:: color.advice.hint:: Use customized color for hints. +color.blame.highlightRecent:: + This can be used to color the metadata of a blame line depending + on age of the line. ++ +This setting should be set to a comma-separated list of color and date settings, +starting and ending with a color, the dates should be set from oldest to newest. +The metadata will be colored given the colors if the the line was introduced +before the given timestamp, overwriting older timestamped colors. ++ +Instead of an absolute timestamp relative timestamps work as well, e.g. +2.weeks.ago is valid to address anything older than 2 weeks. ++ +It defaults to 'blue,12 month ago,white,1 month ago,red', which colors +everything older than one year blue, recent changes between one month and +one year old are kept white, and lines introduced within the last month are +colored red. + +color.blame.repeatedLines:: + Use the customized color for the part of git-blame output that + is repeated meta information per line (such as commit id, + author name, date and timezone). Defaults to cyan. + color.branch:: A boolean to enable/disable color in the output of linkgit:git-branch[1]. May be set to `always`, @@ -1139,13 +1217,6 @@ This does not affect linkgit:git-format-patch[1] or the 'git-diff-{asterisk}' plumbing commands. Can be overridden on the command line with the `--color[=]` option. -diff.colorMoved:: - If set to either a valid `` or a true value, moved lines - in a diff are colored differently, for details of valid modes - see '--color-moved' in linkgit:git-diff[1]. If simply set to - true the default color mode will be used. When set to false, - moved lines are not colored. - color.diff.:: Use customized color for diff colorization. `` specifies which part of the patch to use the specified color, and is one @@ -1156,13 +1227,16 @@ color.diff.:: (highlighting whitespace errors), `oldMoved` (deleted lines), `newMoved` (added lines), `oldMovedDimmed`, `oldMovedAlternative`, `oldMovedAlternativeDimmed`, `newMovedDimmed`, `newMovedAlternative` - and `newMovedAlternativeDimmed` (See the '' - setting of '--color-moved' in linkgit:git-diff[1] for details). + `newMovedAlternativeDimmed` (See the '' + setting of '--color-moved' in linkgit:git-diff[1] for details), + `contextDimmed`, `oldDimmed`, `newDimmed`, `contextBold`, + `oldBold`, and `newBold` (see linkgit:git-range-diff[1] for details). color.decorate.:: Use customized color for 'git log --decorate' output. `` is one of `branch`, `remoteBranch`, `tag`, `stash` or `HEAD` for local - branches, remote-tracking branches, tags, stash and HEAD, respectively. + branches, remote-tracking branches, tags, stash and HEAD, respectively + and `grafted` for grafted commits. color.grep:: When set to `always`, always highlight matches. When `false` (or @@ -1181,8 +1255,10 @@ color.grep.:: filename prefix (when not using `-h`) `function`;; function name lines (when using `-p`) -`linenumber`;; +`lineNumber`;; line number prefix (when using `-n`) +`column`;; + column number prefix (when using `--column`) `match`;; matching text (same as setting `matchContext` and `matchSelected`) `matchContext`;; @@ -1223,6 +1299,18 @@ color.push:: color.push.error:: Use customized color for push errors. +color.remote:: + If set, keywords at the start of the line are highlighted. The + keywords are "error", "warning", "hint" and "success", and are + matched case-insensitively. May be set to `always`, `false` (or + `never`) or `auto` (or `true`). If unset, then the value of + `color.ui` is used (`auto` by default). + +color.remote.:: + Use customized color for each remote keyword. `` may be + `hint`, `warning`, `success` or `error` which match the + corresponding keyword. + color.showBranch:: A boolean to enable/disable color in the output of linkgit:git-show-branch[1]. May be set to `always`, @@ -1251,33 +1339,6 @@ color.status.:: status short-format), or `unmerged` (files which have unmerged changes). -color.blame.repeatedLines:: - Use the customized color for the part of git-blame output that - is repeated meta information per line (such as commit id, - author name, date and timezone). Defaults to cyan. - -color.blame.highlightRecent:: - This can be used to color the metadata of a blame line depending - on age of the line. -+ -This setting should be set to a comma-separated list of color and date settings, -starting and ending with a color, the dates should be set from oldest to newest. -The metadata will be colored given the colors if the the line was introduced -before the given timestamp, overwriting older timestamped colors. -+ -Instead of an absolute timestamp relative timestamps work as well, e.g. -2.weeks.ago is valid to address anything older than 2 weeks. -+ -It defaults to 'blue,12 month ago,white,1 month ago,red', which colors -everything older than one year blue, recent changes between one month and -one year old are kept white, and lines introduced within the last month are -colored red. - -blame.coloring:: - This determines the coloring scheme to be applied to blame - output. It can be 'repeatedLines', 'highlightRecent', - or 'none' which is the default. - color.transport:: A boolean to enable/disable color when pushes are rejected. May be set to `always`, `false` (or `never`) or `auto` (or `true`), in which @@ -1457,10 +1518,19 @@ fetch.recurseSubmodules:: fetch.fsckObjects:: If it is set to true, git-fetch-pack will check all fetched - objects. It will abort in the case of a malformed object or a - broken link. The result of an abort are only dangling objects. - Defaults to false. If not set, the value of `transfer.fsckObjects` - is used instead. + objects. See `transfer.fsckObjects` for what's + checked. Defaults to false. If not set, the value of + `transfer.fsckObjects` is used instead. + +fetch.fsck.:: + Acts like `fsck.`, but is used by + linkgit:git-fetch-pack[1] instead of linkgit:git-fsck[1]. See + the `fsck.` documentation for details. + +fetch.fsck.skipList:: + Acts like `fsck.skipList`, but is used by + linkgit:git-fetch-pack[1] instead of linkgit:git-fsck[1]. See + the `fsck.skipList` documentation for details. fetch.unpackLimit:: If the number of objects fetched over the Git native @@ -1491,6 +1561,18 @@ fetch.output:: `full` and `compact`. Default value is `full`. See section OUTPUT in linkgit:git-fetch[1] for detail. +fetch.negotiationAlgorithm:: + Control how information about the commits in the local repository is + sent when negotiating the contents of the packfile to be sent by the + server. Set to "skipping" to use an algorithm that skips commits in an + effort to converge faster, but may result in a larger-than-necessary + packfile; The default is "default" which instructs Git to use the default algorithm + that never skips commits (unless the server has acknowledged it or one + of its descendants). + Unknown values will cause 'git fetch' to error out. ++ +See also the `--negotiation-tip` option for linkgit:git-fetch[1]. + format.attach:: Enable multipart/mixed attachments as the default for 'format-patch'. The value can also be a double quoted string @@ -1590,15 +1672,42 @@ filter..smudge:: linkgit:gitattributes[5] for details. fsck.:: - Allows overriding the message type (error, warn or ignore) of a - specific message ID such as `missingEmail`. -+ -For convenience, fsck prefixes the error/warning with the message ID, -e.g. "missingEmail: invalid author/committer line - missing email" means -that setting `fsck.missingEmail = ignore` will hide that issue. -+ -This feature is intended to support working with legacy repositories -which cannot be repaired without disruptive changes. + During fsck git may find issues with legacy data which + wouldn't be generated by current versions of git, and which + wouldn't be sent over the wire if `transfer.fsckObjects` was + set. This feature is intended to support working with legacy + repositories containing such data. ++ +Setting `fsck.` will be picked up by linkgit:git-fsck[1], but +to accept pushes of such data set `receive.fsck.` instead, or +to clone or fetch it set `fetch.fsck.`. ++ +The rest of the documentation discusses `fsck.*` for brevity, but the +same applies for the corresponding `receive.fsck.*` and +`fetch..*`. variables. ++ +Unlike variables like `color.ui` and `core.editor` the +`receive.fsck.` and `fetch.fsck.` variables will not +fall back on the `fsck.` configuration if they aren't set. To +uniformly configure the same fsck settings in different circumstances +all three of them they must all set to the same values. ++ +When `fsck.` is set, errors can be switched to warnings and +vice versa by configuring the `fsck.` setting where the +`` is the fsck message ID and the value is one of `error`, +`warn` or `ignore`. For convenience, fsck prefixes the error/warning +with the message ID, e.g. "missingEmail: invalid author/committer line +- missing email" means that setting `fsck.missingEmail = ignore` will +hide that issue. ++ +In general, it is better to enumerate existing objects with problems +with `fsck.skipList`, instead of listing the kind of breakages these +problematic objects share to be ignored, as doing the latter will +allow new instances of the same breakages go unnoticed. ++ +Setting an unknown `fsck.` value will cause fsck to die, but +doing the same for `receive.fsck.` and `fetch.fsck.` +will only cause git to warn. fsck.skipList:: The path to a sorted list of object names (i.e. one SHA-1 per @@ -1607,6 +1716,15 @@ fsck.skipList:: should be accepted despite early commits containing errors that can be safely ignored such as invalid committer email addresses. Note: corrupt objects cannot be skipped with this setting. ++ +Like `fsck.` this variable has corresponding +`receive.fsck.skipList` and `fetch.fsck.skipList` variants. ++ +Unlike variables like `color.ui` and `core.editor` the +`receive.fsck.skipList` and `fetch.fsck.skipList` variables will not +fall back on the `fsck.skipList` configuration if they aren't set. To +uniformly configure the same fsck settings in different circumstances +all three of them they must all set to the same values. gc.aggressiveDepth:: The depth parameter used in the delta compression @@ -1647,6 +1765,13 @@ this configuration variable is ignored, all packs except the base pack will be repacked. After this the number of packs should go below gc.autoPackLimit and gc.bigPackThreshold should be respected again. +gc.writeCommitGraph:: + If true, then gc will rewrite the commit-graph file when + linkgit:git-gc[1] is run. When using linkgit:git-gc[1] + '--auto' the commit-graph will be updated if housekeeping is + required. Default is false. See linkgit:git-commit-graph[1] + for details. + gc.logExpiry:: If the file gc.log exists, then `git gc --auto` won't run unless that file is more than 'gc.logExpiry' old. Default is @@ -1797,6 +1922,9 @@ gitweb.snapshot:: grep.lineNumber:: If set to true, enable `-n` option by default. +grep.column:: + If set to true, enable the `--column` option by default. + grep.patternType:: Set the default matching behavior. Using a value of 'basic', 'extended', 'fixed', or 'perl' will enable the `--basic-regexp`, `--extended-regexp`, @@ -1827,6 +1955,16 @@ gpg.program:: signed, and the program is expected to send the result to its standard output. +gpg.format:: + Specifies which key format to use when signing with `--gpg-sign`. + Default is "openpgp" and another possible value is "x509". + +gpg..program:: + Use this to customize the program used for the signing format you + chose. (see `gpg.program` and `gpg.format`) `gpg.program` can still + be used as a legacy synonym for `gpg.openpgp.program`. The default + value for `gpg.x509.program` is "gpgsm". + gui.commitMsgWidth:: Defines how wide the commit message window is in the linkgit:git-gui[1]. "75" is the default. @@ -2880,32 +3018,21 @@ receive.certNonceSlop:: receive.fsckObjects:: If it is set to true, git-receive-pack will check all received - objects. It will abort in the case of a malformed object or a - broken link. The result of an abort are only dangling objects. - Defaults to false. If not set, the value of `transfer.fsckObjects` - is used instead. + objects. See `transfer.fsckObjects` for what's checked. + Defaults to false. If not set, the value of + `transfer.fsckObjects` is used instead. receive.fsck.:: - When `receive.fsckObjects` is set to true, errors can be switched - to warnings and vice versa by configuring the `receive.fsck.` - setting where the `` is the fsck message ID and the value - is one of `error`, `warn` or `ignore`. For convenience, fsck prefixes - the error/warning with the message ID, e.g. "missingEmail: invalid - author/committer line - missing email" means that setting - `receive.fsck.missingEmail = ignore` will hide that issue. -+ -This feature is intended to support working with legacy repositories -which would not pass pushing when `receive.fsckObjects = true`, allowing -the host to accept repositories with certain known issues but still catch -other issues. + Acts like `fsck.`, but is used by + linkgit:git-receive-pack[1] instead of + linkgit:git-fsck[1]. See the `fsck.` documentation for + details. receive.fsck.skipList:: - The path to a sorted list of object names (i.e. one SHA-1 per - line) that are known to be broken in a non-fatal way and should - be ignored. This feature is useful when an established project - should be accepted despite early commits containing errors that - can be safely ignored such as invalid committer email addresses. - Note: corrupt objects cannot be skipped with this setting. + Acts like `fsck.skipList`, but is used by + linkgit:git-receive-pack[1] instead of + linkgit:git-fsck[1]. See the `fsck.skipList` documentation for + details. receive.keepAlive:: After receiving the pack from the client, `receive-pack` may @@ -3327,12 +3454,13 @@ submodule..ignore:: submodule..active:: Boolean value indicating if the submodule is of interest to git commands. This config option takes precedence over the - submodule.active config option. + submodule.active config option. See linkgit:gitsubmodules[7] for + details. submodule.active:: A repeated field which contains a pathspec used to match against a submodule's path to determine if the submodule is of interest to git - commands. + commands. See linkgit:gitsubmodules[7] for details. submodule.recurse:: Specifies if commands recurse into submodules by default. This @@ -3379,6 +3507,40 @@ transfer.fsckObjects:: When `fetch.fsckObjects` or `receive.fsckObjects` are not set, the value of this variable is used instead. Defaults to false. ++ +When set, the fetch or receive will abort in the case of a malformed +object or a link to a nonexistent object. In addition, various other +issues are checked for, including legacy issues (see `fsck.`), +and potential security issues like the existence of a `.GIT` directory +or a malicious `.gitmodules` file (see the release notes for v2.2.1 +and v2.17.1 for details). Other sanity and security checks may be +added in future releases. ++ +On the receiving side, failing fsckObjects will make those objects +unreachable, see "QUARANTINE ENVIRONMENT" in +linkgit:git-receive-pack[1]. On the fetch side, malformed objects will +instead be left unreferenced in the repository. ++ +Due to the non-quarantine nature of the `fetch.fsckObjects` +implementation it can not be relied upon to leave the object store +clean like `receive.fsckObjects` can. ++ +As objects are unpacked they're written to the object store, so there +can be cases where malicious objects get introduced even though the +"fetch" failed, only to have a subsequent "fetch" succeed because only +new incoming objects are checked, not those that have already been +written to the object store. That difference in behavior should not be +relied upon. In the future, such objects may be quarantined for +"fetch" as well. ++ +For now, the paranoid need to find some way to emulate the quarantine +environment if they'd like the same protection as "push". E.g. in the +case of an internal mirror do the mirroring in two steps, one to fetch +the untrusted objects, and then do a second "push" (which will use the +quarantine) to another internal repo, and have internal clients +consume this pushed-to repository, or embargo internal fetches and +only allow them once a full "fsck" has run (and no new fetches have +happened in the meantime). transfer.hideRefs:: String(s) `receive-pack` and `upload-pack` use to decide which @@ -3479,6 +3641,13 @@ Note that this configuration variable is ignored if it is seen in the repository-level config (this is a safety measure against fetching from untrusted repositories). +uploadpack.allowRefInWant:: + If this option is set, `upload-pack` will support the `ref-in-want` + feature of the protocol version 2 `fetch` command. This feature + is intended for the benefit of load-balanced servers which may + not have the same view of what OIDs their refs point to due to + replication delay. + url..insteadOf:: Any URL that starts with this value will be rewritten to start, instead, with . In cases where some site serves a diff --git a/Documentation/diff-config.txt b/Documentation/diff-config.txt index 77caa66..85bca83 100644 --- a/Documentation/diff-config.txt +++ b/Documentation/diff-config.txt @@ -208,3 +208,15 @@ diff.wsErrorHighlight:: whitespace errors are colored with `color.diff.whitespace`. The command line option `--ws-error-highlight=` overrides this setting. + +diff.colorMoved:: + If set to either a valid `` or a true value, moved lines + in a diff are colored differently, for details of valid modes + see '--color-moved' in linkgit:git-diff[1]. If simply set to + true the default color mode will be used. When set to false, + moved lines are not colored. + +diff.colorMovedWS:: + When moved lines are colored using e.g. the `diff.colorMoved` setting, + this option controls the `` how spaces are treated + for details of valid modes see '--color-moved-ws' in linkgit:git-diff[1]. diff --git a/Documentation/diff-options.txt b/Documentation/diff-options.txt index 4106490..0378cd5 100644 --- a/Documentation/diff-options.txt +++ b/Documentation/diff-options.txt @@ -276,16 +276,46 @@ plain:: that are added somewhere else in the diff. This mode picks up any moved line, but it is not very useful in a review to determine if a block of code was moved without permutation. -zebra:: +blocks:: Blocks of moved text of at least 20 alphanumeric characters are detected greedily. The detected blocks are - painted using either the 'color.diff.{old,new}Moved' color or + painted using either the 'color.diff.{old,new}Moved' color. + Adjacent blocks cannot be told apart. +zebra:: + Blocks of moved text are detected as in 'blocks' mode. The blocks + are painted using either the 'color.diff.{old,new}Moved' color or 'color.diff.{old,new}MovedAlternative'. The change between the two colors indicates that a new block was detected. -dimmed_zebra:: +dimmed-zebra:: Similar to 'zebra', but additional dimming of uninteresting parts of moved code is performed. The bordering lines of two adjacent blocks are considered interesting, the rest is uninteresting. + `dimmed_zebra` is a deprecated synonym. +-- + +--color-moved-ws=:: + This configures how white spaces are ignored when performing the + move detection for `--color-moved`. +ifdef::git-diff[] + It can be set by the `diff.colorMovedWS` configuration setting. +endif::git-diff[] + These modes can be given as a comma separated list: ++ +-- +ignore-space-at-eol:: + Ignore changes in whitespace at EOL. +ignore-space-change:: + Ignore changes in amount of whitespace. This ignores whitespace + at line end, and considers all other sequences of one or + more whitespace characters to be equivalent. +ignore-all-space:: + Ignore whitespace when comparing lines. This ignores differences + even if one line has whitespace where the other line has none. +allow-indentation-change:: + Initially ignore any white spaces in the move detection, then + group the moved code blocks only into a block if the change in + whitespace is the same per line. This is incompatible with the + other modes. -- --word-diff[=]:: diff --git a/Documentation/doc-diff b/Documentation/doc-diff new file mode 100755 index 0000000..f483fe4 --- /dev/null +++ b/Documentation/doc-diff @@ -0,0 +1,109 @@ +#!/bin/sh + +OPTIONS_SPEC="\ +doc-diff [options] [-- ] +-- +j=n parallel argument to pass to make +f force rebuild; do not rely on cached results +" +SUBDIRECTORY_OK=1 +. "$(git --exec-path)/git-sh-setup" + +parallel= +force= +while test $# -gt 0 +do + case "$1" in + -j) + parallel=$2; shift ;; + -f) + force=t ;; + --) + shift; break ;; + *) + usage ;; + esac + shift +done + +if test -z "$parallel" +then + parallel=$(getconf _NPROCESSORS_ONLN 2>/dev/null) + if test $? != 0 || test -z "$parallel" + then + parallel=1 + fi +fi + +test $# -gt 1 || usage +from=$1; shift +to=$1; shift + +from_oid=$(git rev-parse --verify "$from") || exit 1 +to_oid=$(git rev-parse --verify "$to") || exit 1 + +cd_to_toplevel +tmp=Documentation/tmp-doc-diff + +if test -n "$force" +then + rm -rf "$tmp" +fi + +# We'll do both builds in a single worktree, which lets "make" reuse +# results that don't differ between the two trees. +if ! test -d "$tmp/worktree" +then + git worktree add --detach "$tmp/worktree" "$from" && + dots=$(echo "$tmp/worktree" | sed 's#[^/]*#..#g') && + ln -s "$dots/config.mak" "$tmp/worktree/config.mak" +fi + +# generate_render_makefile +generate_render_makefile () { + find "$1" -type f | + while read src + do + dst=$2/${src#$1/} + printf 'all:: %s\n' "$dst" + printf '%s: %s\n' "$dst" "$src" + printf '\t@echo >&2 " RENDER $(notdir $@)" && \\\n' + printf '\tmkdir -p $(dir $@) && \\\n' + printf '\tMANWIDTH=80 man -l $< >$@+ && \\\n' + printf '\tmv $@+ $@\n' + done +} + +# render_tree +render_tree () { + # Skip install-man entirely if we already have an installed directory. + # We can't rely on make here, since "install-man" unconditionally + # copies the files (spending effort, but also updating timestamps that + # we then can't rely on during the render step). We use "mv" to make + # sure we don't get confused by a previous run that failed partway + # through. + if ! test -d "$tmp/installed/$1" + then + git -C "$tmp/worktree" checkout "$2" && + make -j$parallel -C "$tmp/worktree" \ + GIT_VERSION=omitted \ + SOURCE_DATE_EPOCH=0 \ + DESTDIR="$PWD/$tmp/installed/$1+" \ + install-man && + mv "$tmp/installed/$1+" "$tmp/installed/$1" + fi && + + # As with "installed" above, we skip the render if it's already been + # done. So using make here is primarily just about running in + # parallel. + if ! test -d "$tmp/rendered/$1" + then + generate_render_makefile "$tmp/installed/$1" "$tmp/rendered/$1+" | + make -j$parallel -f - && + mv "$tmp/rendered/$1+" "$tmp/rendered/$1" + fi +} + +render_tree $from_oid "$from" && +render_tree $to_oid "$to" && +git -C $tmp/rendered diff --no-index "$@" $from_oid $to_oid diff --git a/Documentation/fetch-options.txt b/Documentation/fetch-options.txt index 97d3217..8bc36af 100644 --- a/Documentation/fetch-options.txt +++ b/Documentation/fetch-options.txt @@ -42,6 +42,25 @@ the current repository has the same history as the source repository. .git/shallow. This option updates .git/shallow and accept such refs. +--negotiation-tip=:: + By default, Git will report, to the server, commits reachable + from all local refs to find common commits in an attempt to + reduce the size of the to-be-received packfile. If specified, + Git will only report commits reachable from the given tips. + This is useful to speed up fetches when the user knows which + local ref is likely to have commits in common with the + upstream ref being fetched. ++ +This option may be specified more than once; if so, Git will report +commits reachable from any of the given commits. ++ +The argument to this option may be a glob on ref names, a ref, or the (possibly +abbreviated) SHA-1 of a commit. Specifying a glob is equivalent to specifying +this option multiple times, one for each matching ref name. ++ +See also the `fetch.negotiationAlgorithm` configuration variable +documented in linkgit:git-config[1]. + ifndef::git-pull[] --dry-run:: Show what would be done, without making any changes. diff --git a/Documentation/git-apply.txt b/Documentation/git-apply.txt index 6722849..b9aa390 100644 --- a/Documentation/git-apply.txt +++ b/Documentation/git-apply.txt @@ -9,7 +9,7 @@ git-apply - Apply a patch to files and/or to the index SYNOPSIS -------- [verse] -'git apply' [--stat] [--numstat] [--summary] [--check] [--index] [--3way] +'git apply' [--stat] [--numstat] [--summary] [--check] [--index | --intent-to-add] [--3way] [--apply] [--no-add] [--build-fake-ancestor=] [-R | --reverse] [--allow-binary-replacement | --binary] [--reject] [-z] [-p] [-C] [--inaccurate-eof] [--recount] [--cached] @@ -74,6 +74,14 @@ OPTIONS cached data, apply the patch, and store the result in the index without using the working tree. This implies `--index`. +--intent-to-add:: + When applying the patch only to the working tree, mark new + files to be added to the index later (see `--intent-to-add` + option in linkgit:git-add[1]). This option is ignored unless + running in a Git repository and `--index` is not specified. + Note that `--index` could be implied by other options such + as `--cached` or `--3way`. + -3:: --3way:: When the patch does not apply cleanly, fall back on 3-way merge if diff --git a/Documentation/git-bisect-lk2009.txt b/Documentation/git-bisect-lk2009.txt index 78479b0..0f9ef2f 100644 --- a/Documentation/git-bisect-lk2009.txt +++ b/Documentation/git-bisect-lk2009.txt @@ -1103,7 +1103,7 @@ _____________ Combining test suites, git bisect and other systems together ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -We have seen that test suites an git bisect are very powerful when +We have seen that test suites and git bisect are very powerful when used together. It can be even more powerful if you can combine them with other systems. diff --git a/Documentation/git-branch.txt b/Documentation/git-branch.txt index 02eccbb..9767b2b 100644 --- a/Documentation/git-branch.txt +++ b/Documentation/git-branch.txt @@ -91,7 +91,6 @@ OPTIONS -D:: Shortcut for `--delete --force`. --l:: --create-reflog:: Create the branch's reflog. This activates recording of all changes made to the branch ref, enabling use of date @@ -101,6 +100,8 @@ OPTIONS The negated form `--no-create-reflog` only overrides an earlier `--create-reflog`, but currently does not negate the setting of `core.logAllRefUpdates`. ++ +The `-l` option is a deprecated synonym for `--create-reflog`. -f:: --force:: @@ -267,10 +268,11 @@ start-point is either a local or remote-tracking branch. order of the value. You may use the --sort= option multiple times, in which case the last key becomes the primary key. The keys supported are the same as those in `git - for-each-ref`. Sort order defaults to sorting based on the + for-each-ref`. Sort order defaults to the value configured for the + `branch.sort` variable if exists, or to sorting based on the full refname (including `refs/...` prefix). This lists detached HEAD (if present) first, then local branches and - finally remote-tracking branches. + finally remote-tracking branches. See linkgit:git-config[1]. --points-at :: diff --git a/Documentation/git-cat-file.txt b/Documentation/git-cat-file.txt index f90f09b..7401333 100644 --- a/Documentation/git-cat-file.txt +++ b/Documentation/git-cat-file.txt @@ -104,6 +104,16 @@ OPTIONS buffering; this is much more efficient when invoking `--batch-check` on a large number of objects. +--unordered:: + When `--batch-all-objects` is in use, visit objects in an + order which may be more efficient for accessing the object + contents than hash order. The exact details of the order are + unspecified, but if you do not require a specific order, this + should generally result in faster output, especially with + `--batch`. Note that `cat-file` will still show each object + only once, even if it is stored multiple times in the + repository. + --allow-unknown-type:: Allow -s or -t to query broken/corrupt objects of unknown type. diff --git a/Documentation/git-checkout.txt b/Documentation/git-checkout.txt index ca5fc9c..9db0292 100644 --- a/Documentation/git-checkout.txt +++ b/Documentation/git-checkout.txt @@ -38,6 +38,15 @@ equivalent to $ git checkout -b --track / ------------ + +If the branch exists in multiple remotes and one of them is named by +the `checkout.defaultRemote` configuration variable, we'll use that +one for the purposes of disambiguation, even if the `` isn't +unique across all remotes. Set it to +e.g. `checkout.defaultRemote=origin` to always checkout remote +branches from there if `` is ambiguous but exists on the +'origin' remote. See also `checkout.defaultRemote` in +linkgit:git-config[1]. ++ You could omit , in which case the command degenerates to "check out the current branch", which is a glorified no-op with rather expensive side-effects to show only the tracking information, diff --git a/Documentation/git-commit-graph.txt b/Documentation/git-commit-graph.txt index 4c97b55..dececb7 100644 --- a/Documentation/git-commit-graph.txt +++ b/Documentation/git-commit-graph.txt @@ -10,6 +10,7 @@ SYNOPSIS -------- [verse] 'git commit-graph read' [--object-dir ] +'git commit-graph verify' [--object-dir ] 'git commit-graph write' [--object-dir ] @@ -37,12 +38,16 @@ Write a commit graph file based on the commits found in packfiles. + With the `--stdin-packs` option, generate the new commit graph by walking objects only in the specified pack-indexes. (Cannot be combined -with --stdin-commits.) +with `--stdin-commits` or `--reachable`.) + With the `--stdin-commits` option, generate the new commit graph by walking commits starting at the commits specified in stdin as a list of OIDs in hex, one OID per line. (Cannot be combined with ---stdin-packs.) +`--stdin-packs` or `--reachable`.) ++ +With the `--reachable` option, generate the new commit graph by walking +commits starting at all refs. (Cannot be combined with `--stdin-commits` +or `--stdin-packs`.) + With the `--append` option, include all commits that are present in the existing commit-graph file. @@ -52,6 +57,11 @@ existing commit-graph file. Read a graph file given by the commit-graph file and output basic details about the graph file. Used for debugging purposes. +'verify':: + +Read the commit-graph file and verify its contents against the object +database. Used to check for corrupted data. + EXAMPLES -------- diff --git a/Documentation/git-config.txt b/Documentation/git-config.txt index 18ddc78..8e24043 100644 --- a/Documentation/git-config.txt +++ b/Documentation/git-config.txt @@ -453,6 +453,27 @@ http.sslverify false include::config.txt[] +BUGS +---- +When using the deprecated `[section.subsection]` syntax, changing a value +will result in adding a multi-line key instead of a change, if the subsection +is given with at least one uppercase character. For example when the config +looks like + +-------- + [section.subsection] + key = value1 +-------- + +and running `git config section.Subsection.key value2` will result in + +-------- + [section.subsection] + key = value1 + key = value2 +-------- + + GIT --- Part of the linkgit:git[1] suite diff --git a/Documentation/git-fast-import.txt b/Documentation/git-fast-import.txt index 9e3b958..e81117d 100644 --- a/Documentation/git-fast-import.txt +++ b/Documentation/git-fast-import.txt @@ -50,21 +50,6 @@ OPTIONS memory used by fast-import during this run. Showing this output is currently the default, but can be disabled with --quiet. ---allow-unsafe-features:: - Many command-line options can be provided as part of the - fast-import stream itself by using the `feature` or `option` - commands. However, some of these options are unsafe (e.g., - allowing fast-import to access the filesystem outside of the - repository). These options are disabled by default, but can be - allowed by providing this option on the command line. This - currently impacts only the `export-marks`, `import-marks`, and - `import-marks-if-exists` feature commands. -+ - Only enable this option if you trust the program generating the - fast-import stream! This option is enabled automatically for - remote-helpers that use the `import` capability, as they are - already trusted to run their own code. - Options for Frontends ~~~~~~~~~~~~~~~~~~~~~ diff --git a/Documentation/git-for-each-ref.txt b/Documentation/git-for-each-ref.txt index 085d177..901faef 100644 --- a/Documentation/git-for-each-ref.txt +++ b/Documentation/git-for-each-ref.txt @@ -57,7 +57,7 @@ OPTIONS `xx`; for example `%00` interpolates to `\0` (NUL), `%09` to `\t` (TAB) and `%0a` to `\n` (LF). ---color[=]: +--color[=]:: Respect any colors specified in the `--format` option. The `` field must be one of `always`, `never`, or `auto` (if `` is absent, behave as if `always` was given). diff --git a/Documentation/git-fsck.txt b/Documentation/git-fsck.txt index b9f060e..ab9a93f 100644 --- a/Documentation/git-fsck.txt +++ b/Documentation/git-fsck.txt @@ -110,6 +110,9 @@ Any corrupt objects you will have to find in backups or other archives (i.e., you can just remove them and do an 'rsync' with some other site in the hopes that somebody else has the object you have corrupted). +If core.commitGraph is true, the commit-graph file will also be inspected +using 'git commit-graph verify'. See linkgit:git-commit-graph[1]. + Extracted Diagnostics --------------------- diff --git a/Documentation/git-gc.txt b/Documentation/git-gc.txt index 24b2dd4..f5bc98c 100644 --- a/Documentation/git-gc.txt +++ b/Documentation/git-gc.txt @@ -136,6 +136,10 @@ The optional configuration variable `gc.packRefs` determines if it within all non-bare repos or it can be set to a boolean value. This defaults to true. +The optional configuration variable `gc.commitGraph` determines if +'git gc' should run 'git commit-graph write'. This can be set to a +boolean value. This defaults to false. + The optional configuration variable `gc.aggressiveWindow` controls how much time is spent optimizing the delta compression of the objects in the repository when the --aggressive option is specified. The larger diff --git a/Documentation/git-grep.txt b/Documentation/git-grep.txt index 312409a..a3049af 100644 --- a/Documentation/git-grep.txt +++ b/Documentation/git-grep.txt @@ -13,11 +13,11 @@ SYNOPSIS [-v | --invert-match] [-h|-H] [--full-name] [-E | --extended-regexp] [-G | --basic-regexp] [-P | --perl-regexp] - [-F | --fixed-strings] [-n | --line-number] + [-F | --fixed-strings] [-n | --line-number] [--column] [-l | --files-with-matches] [-L | --files-without-match] [(-O | --open-files-in-pager) []] [-z | --null] - [-c | --count] [--all-match] [-q | --quiet] + [ -o | --only-matching ] [-c | --count] [--all-match] [-q | --quiet] [--max-depth ] [--color[=] | --no-color] [--break] [--heading] [-p | --show-function] @@ -44,6 +44,9 @@ CONFIGURATION grep.lineNumber:: If set to true, enable `-n` option by default. +grep.column:: + If set to true, enable the `--column` option by default. + grep.patternType:: Set the default matching behavior. Using a value of 'basic', 'extended', 'fixed', or 'perl' will enable the `--basic-regexp`, `--extended-regexp`, @@ -169,6 +172,10 @@ providing this option will cause it to die. --line-number:: Prefix the line number to matching lines. +--column:: + Prefix the 1-indexed byte-offset of the first match from the start of the + matching line. + -l:: --files-with-matches:: --name-only:: @@ -194,6 +201,11 @@ providing this option will cause it to die. Output \0 instead of the character that normally follows a file name. +-o:: +--only-matching:: + Print only the matched (non-empty) parts of a matching line, with each such + part on a separate output line. + -c:: --count:: Instead of showing every matched line, show the number of diff --git a/Documentation/git-help.txt b/Documentation/git-help.txt index a40fc38..83d25d8 100644 --- a/Documentation/git-help.txt +++ b/Documentation/git-help.txt @@ -45,6 +45,11 @@ OPTIONS When used with `--verbose` print description for all recognized commands. +-c:: +--config:: + List all available configuration variables. This is a short + summary of the list in linkgit:git-config[1]. + -g:: --guides:: Prints a list of useful guides on the standard output. This diff --git a/Documentation/git-imap-send.txt b/Documentation/git-imap-send.txt index 032613c..7b15744 100644 --- a/Documentation/git-imap-send.txt +++ b/Documentation/git-imap-send.txt @@ -68,8 +68,8 @@ imap.tunnel:: to the server. Required when imap.host is not set. imap.host:: - A URL identifying the server. Use a `imap://` prefix for non-secure - connections and a `imaps://` prefix for secure connections. + A URL identifying the server. Use an `imap://` prefix for non-secure + connections and an `imaps://` prefix for secure connections. Ignored when imap.tunnel is set, but required otherwise. imap.user:: diff --git a/Documentation/git-interpret-trailers.txt b/Documentation/git-interpret-trailers.txt index 9111c47..b8fafb1 100644 --- a/Documentation/git-interpret-trailers.txt +++ b/Documentation/git-interpret-trailers.txt @@ -88,7 +88,8 @@ OPTIONS Specify where all new trailers will be added. A setting provided with '--where' overrides all configuration variables and applies to all '--trailer' options until the next occurrence of - '--where' or '--no-where'. + '--where' or '--no-where'. Possible values are `after`, `before`, + `end` or `start`. --if-exists :: --no-if-exists:: @@ -96,7 +97,8 @@ OPTIONS least one trailer with the same in the message. A setting provided with '--if-exists' overrides all configuration variables and applies to all '--trailer' options until the next occurrence of - '--if-exists' or '--no-if-exists'. + '--if-exists' or '--no-if-exists'. Possible actions are `addIfDifferent`, + `addIfDifferentNeighbor`, `add`, `replace` and `doNothing`. --if-missing :: --no-if-missing:: @@ -104,7 +106,8 @@ OPTIONS trailer with the same in the message. A setting provided with '--if-missing' overrides all configuration variables and applies to all '--trailer' options until the next occurrence of - '--if-missing' or '--no-if-missing'. + '--if-missing' or '--no-if-missing'. Possible actions are `doNothing` + or `add`. --only-trailers:: Output only the trailers, not any other parts of the input. diff --git a/Documentation/git-merge.txt b/Documentation/git-merge.txt index 6a5c00e..eb36837 100644 --- a/Documentation/git-merge.txt +++ b/Documentation/git-merge.txt @@ -12,7 +12,7 @@ SYNOPSIS 'git merge' [-n] [--stat] [--no-commit] [--squash] [--[no-]edit] [-s ] [-X ] [-S[]] [--[no-]allow-unrelated-histories] - [--[no-]rerere-autoupdate] [-m ] [...] + [--[no-]rerere-autoupdate] [-m ] [-F ] [...] 'git merge' --abort 'git merge' --continue @@ -75,6 +75,14 @@ The 'git fmt-merge-msg' command can be used to give a good default for automated 'git merge' invocations. The automated message can include the branch description. +-F :: +--file=:: + Read the commit message to be used for the merge commit (in + case one is created). ++ +If `--log` is specified, a shortlog of the commits being merged +will be appended to the specified message. + --[no-]rerere-autoupdate:: Allow the rerere mechanism to update the index with the result of auto-conflict resolution if possible. @@ -122,9 +130,9 @@ merge' may need to update. To avoid recording unrelated changes in the merge commit, 'git pull' and 'git merge' will also abort if there are any changes -registered in the index relative to the `HEAD` commit. (One -exception is when the changed index entries are in the state that -would result from the merge already.) +registered in the index relative to the `HEAD` commit. (Special +narrow exceptions to this rule may exist depending on which merge +strategy is in use, but generally, the index must match HEAD.) If all named commits are already ancestors of `HEAD`, 'git merge' will exit early with the message "Already up to date." diff --git a/Documentation/git-notes.txt b/Documentation/git-notes.txt index e8dec1b..df2b64d 100644 --- a/Documentation/git-notes.txt +++ b/Documentation/git-notes.txt @@ -199,7 +199,7 @@ OPTIONS .git/NOTES_MERGE_REF symref is updated to the resulting commit. --abort:: - Abort/reset a in-progress 'git notes merge', i.e. a notes merge + Abort/reset an in-progress 'git notes merge', i.e. a notes merge with conflicts. This simply removes all files related to the notes merge. diff --git a/Documentation/git-p4.txt b/Documentation/git-p4.txt index f0de3b8..41780a5 100644 --- a/Documentation/git-p4.txt +++ b/Documentation/git-p4.txt @@ -374,6 +374,14 @@ These options can be used to modify 'git p4 submit' behavior. been submitted. Implies --disable-rebase. Can also be set with git-p4.disableP4Sync. Sync with origin/master still goes ahead if possible. +Hook for submit +~~~~~~~~~~~~~~~ +The `p4-pre-submit` hook is executed if it exists and is executable. +The hook takes no parameters and nothing from standard input. Exiting with +non-zero status from this script prevents `git-p4 submit` from launching. + +One usage scenario is to run unit tests in the hook. + Rebase options ~~~~~~~~~~~~~~ These options can be used to modify 'git p4 rebase' behavior. diff --git a/Documentation/git-range-diff.txt b/Documentation/git-range-diff.txt new file mode 100644 index 0000000..f693930 --- /dev/null +++ b/Documentation/git-range-diff.txt @@ -0,0 +1,252 @@ +git-range-diff(1) +================= + +NAME +---- +git-range-diff - Compare two commit ranges (e.g. two versions of a branch) + +SYNOPSIS +-------- +[verse] +'git range-diff' [--color=[]] [--no-color] [] + [--no-dual-color] [--creation-factor=] + ( | ... | ) + +DESCRIPTION +----------- + +This command shows the differences between two versions of a patch +series, or more generally, two commit ranges (ignoring merge commits). + +To that end, it first finds pairs of commits from both commit ranges +that correspond with each other. Two commits are said to correspond when +the diff between their patches (i.e. the author information, the commit +message and the commit diff) is reasonably small compared to the +patches' size. See ``Algorithm`` below for details. + +Finally, the list of matching commits is shown in the order of the +second commit range, with unmatched commits being inserted just after +all of their ancestors have been shown. + + +OPTIONS +------- +--no-dual-color:: + When the commit diffs differ, `git range-diff` recreates the + original diffs' coloring, and adds outer -/+ diff markers with + the *background* being red/green to make it easier to see e.g. + when there was a change in what exact lines were added. ++ +Additionally, the commit diff lines that are only present in the first commit +range are shown "dimmed" (this can be overridden using the `color.diff.` +config setting where `` is one of `contextDimmed`, `oldDimmed` and +`newDimmed`), and the commit diff lines that are only present in the second +commit range are shown in bold (which can be overridden using the config +settings `color.diff.` with `` being one of `contextBold`, +`oldBold` or `newBold`). ++ +This is known to `range-diff` as "dual coloring". Use `--no-dual-color` +to revert to color all lines according to the outer diff markers +(and completely ignore the inner diff when it comes to color). + +--creation-factor=:: + Set the creation/deletion cost fudge factor to ``. + Defaults to 60. Try a larger value if `git range-diff` erroneously + considers a large change a total rewrite (deletion of one commit + and addition of another), and a smaller one in the reverse case. + See the ``Algorithm`` section below for an explanation why this is + needed. + + :: + Compare the commits specified by the two ranges, where + `` is considered an older version of ``. + +...:: + Equivalent to passing `..` and `..`. + + :: + Equivalent to passing `..` and `..`. + Note that `` does not need to be the exact branch point + of the branches. Example: after rebasing a branch `my-topic`, + `git range-diff my-topic@{u} my-topic@{1} my-topic` would + show the differences introduced by the rebase. + +`git range-diff` also accepts the regular diff options (see +linkgit:git-diff[1]), most notably the `--color=[]` and +`--no-color` options. These options are used when generating the "diff +between patches", i.e. to compare the author, commit message and diff of +corresponding old/new commits. There is currently no means to tweak the +diff options passed to `git log` when generating those patches. + + +CONFIGURATION +------------- +This command uses the `diff.color.*` and `pager.range-diff` settings +(the latter is on by default). +See linkgit:git-config[1]. + + +EXAMPLES +-------- + +When a rebase required merge conflicts to be resolved, compare the changes +introduced by the rebase directly afterwards using: + +------------ +$ git range-diff @{u} @{1} @ +------------ + + +A typical output of `git range-diff` would look like this: + +------------ +-: ------- > 1: 0ddba11 Prepare for the inevitable! +1: c0debee = 2: cab005e Add a helpful message at the start +2: f00dbal ! 3: decafe1 Describe a bug + @@ -1,3 +1,3 @@ + Author: A U Thor + + -TODO: Describe a bug + +Describe a bug + @@ -324,5 +324,6 + This is expected. + + -+What is unexpected is that it will also crash. + ++Unexpectedly, it also crashes. This is a bug, and the jury is + ++still out there how to fix it best. See ticket #314 for details. + + Contact +3: bedead < -: ------- TO-UNDO +------------ + +In this example, there are 3 old and 3 new commits, where the developer +removed the 3rd, added a new one before the first two, and modified the +commit message of the 2nd commit as well its diff. + +When the output goes to a terminal, it is color-coded by default, just +like regular `git diff`'s output. In addition, the first line (adding a +commit) is green, the last line (deleting a commit) is red, the second +line (with a perfect match) is yellow like the commit header of `git +show`'s output, and the third line colors the old commit red, the new +one green and the rest like `git show`'s commit header. + +A naive color-coded diff of diffs is actually a bit hard to read, +though, as it colors the entire lines red or green. The line that added +"What is unexpected" in the old commit, for example, is completely red, +even if the intent of the old commit was to add something. + +To help with that, `range` uses the `--dual-color` mode by default. In +this mode, the diff of diffs will retain the original diff colors, and +prefix the lines with -/+ markers that have their *background* red or +green, to make it more obvious that they describe how the diff itself +changed. + + +Algorithm +--------- + +The general idea is this: we generate a cost matrix between the commits +in both commit ranges, then solve the least-cost assignment. + +The cost matrix is populated thusly: for each pair of commits, both +diffs are generated and the "diff of diffs" is generated, with 3 context +lines, then the number of lines in that diff is used as cost. + +To avoid false positives (e.g. when a patch has been removed, and an +unrelated patch has been added between two iterations of the same patch +series), the cost matrix is extended to allow for that, by adding +fixed-cost entries for wholesale deletes/adds. + +Example: Let commits `1--2` be the first iteration of a patch series and +`A--C` the second iteration. Let's assume that `A` is a cherry-pick of +`2,` and `C` is a cherry-pick of `1` but with a small modification (say, +a fixed typo). Visualize the commits as a bipartite graph: + +------------ + 1 A + + 2 B + + C +------------ + +We are looking for a "best" explanation of the new series in terms of +the old one. We can represent an "explanation" as an edge in the graph: + + +------------ + 1 A + / + 2 --------' B + + C +------------ + +This explanation comes for "free" because there was no change. Similarly +`C` could be explained using `1`, but that comes at some cost c>0 +because of the modification: + +------------ + 1 ----. A + | / + 2 ----+---' B + | + `----- C + c>0 +------------ + +In mathematical terms, what we are looking for is some sort of a minimum +cost bipartite matching; `1` is matched to `C` at some cost, etc. The +underlying graph is in fact a complete bipartite graph; the cost we +associate with every edge is the size of the diff between the two +commits' patches. To explain also new commits, we introduce dummy nodes +on both sides: + +------------ + 1 ----. A + | / + 2 ----+---' B + | + o `----- C + c>0 + o o + + o o +------------ + +The cost of an edge `o--C` is the size of `C`'s diff, modified by a +fudge factor that should be smaller than 100%. The cost of an edge +`o--o` is free. The fudge factor is necessary because even if `1` and +`C` have nothing in common, they may still share a few empty lines and +such, possibly making the assignment `1--C`, `o--o` slightly cheaper +than `1--o`, `o--C` even if `1` and `C` have nothing in common. With the +fudge factor we require a much larger common part to consider patches as +corresponding. + +The overall time needed to compute this algorithm is the time needed to +compute n+m commit diffs and then n*m diffs of patches, plus the time +needed to compute the least-cost assigment between n and m diffs. Git +uses an implementation of the Jonker-Volgenant algorithm to solve the +assignment problem, which has cubic runtime complexity. The matching +found in this case will look like this: + +------------ + 1 ----. A + | / + 2 ----+---' B + .--+-----' + o -' `----- C + c>0 + o ---------- o + + o ---------- o +------------ + + +SEE ALSO +-------- +linkgit:git-log[1] + +GIT +--- +Part of the linkgit:git[1] suite diff --git a/Documentation/git-rebase.txt b/Documentation/git-rebase.txt index 0e20a66..1fbc6eb 100644 --- a/Documentation/git-rebase.txt +++ b/Documentation/git-rebase.txt @@ -243,11 +243,15 @@ leave out at most one of A and B, in which case it defaults to HEAD. --keep-empty:: Keep the commits that do not change anything from its parents in the result. ++ +See also INCOMPATIBLE OPTIONS below. --allow-empty-message:: By default, rebasing commits with an empty message will fail. This option overrides that behavior, allowing commits with empty messages to be rebased. ++ +See also INCOMPATIBLE OPTIONS below. --skip:: Restart the rebasing process by skipping the current patch. @@ -271,6 +275,8 @@ branch on top of the branch. Because of this, when a merge conflict happens, the side reported as 'ours' is the so-far rebased series, starting with , and 'theirs' is the working branch. In other words, the sides are swapped. ++ +See also INCOMPATIBLE OPTIONS below. -s :: --strategy=:: @@ -280,8 +286,10 @@ other words, the sides are swapped. + Because 'git rebase' replays each commit from the working branch on top of the branch using the given strategy, using -the 'ours' strategy simply discards all patches from the , +the 'ours' strategy simply empties all patches from the , which makes little sense. ++ +See also INCOMPATIBLE OPTIONS below. -X :: --strategy-option=:: @@ -289,6 +297,8 @@ which makes little sense. This implies `--merge` and, if no strategy has been specified, `-s recursive`. Note the reversal of 'ours' and 'theirs' as noted above for the `-m` option. ++ +See also INCOMPATIBLE OPTIONS below. -S[]:: --gpg-sign[=]:: @@ -324,17 +334,21 @@ which makes little sense. and after each change. When fewer lines of surrounding context exist they all must match. By default no context is ever ignored. ++ +See also INCOMPATIBLE OPTIONS below. --f:: +--no-ff:: --force-rebase:: - Force a rebase even if the current branch is up to date and - the command without `--force` would return without doing anything. +-f:: + Individually replay all rebased commits instead of fast-forwarding + over the unchanged ones. This ensures that the entire history of + the rebased branch is composed of new commits. + -You may find this (or --no-ff with an interactive rebase) helpful after -reverting a topic branch merge, as this option recreates the topic branch with -fresh commits so it can be remerged successfully without needing to "revert -the reversion" (see the -link:howto/revert-a-faulty-merge.html[revert-a-faulty-merge How-To] for details). +You may find this helpful after reverting a topic branch merge, as this option +recreates the topic branch with fresh commits so it can be remerged +successfully without needing to "revert the reversion" (see the +link:howto/revert-a-faulty-merge.html[revert-a-faulty-merge How-To] for +details). --fork-point:: --no-fork-point:: @@ -355,19 +369,22 @@ default is `--no-fork-point`, otherwise the default is `--fork-point`. --whitespace=