Compare
d2af22cc2106465592833299b10b055f60902ef2..aae63be1d8391401e0ad1663ed159bcd03326b0a
reftable/stack: remove `REFTABLE_STACK_NEW_ADDITION_RELOAD`
In 80e7342ea8 (reftable/stack: allow locking of outdated stacks,
2024-09-24), the `REFTABLE_STACK_NEW_ADDITION_RELOAD` was introduced so
that callers of `reftable_stack_init_addition()` can also reload the
stack if there was a concurrent update made before the lock was
obtained.
Then 16684b6fae (refs/reftable: always reload stacks when creating
lock, 2025-08-12) updated all of the remaining call-sites to propagate
this flag to ensure that we always reload the stack whenever there was a
concurrent update.
As all calls to `reftable_stack_init_addition()` inevitably propagate
the flag, it is safe to remove the flag and its associated code and make
the reloading of the stack the default flow. This makes it easier to
follow the flow and simplifies the logic.
The only exceptions are:
1. Unit tests, where we explicitly do not propagate the flag. These
tests are now modified with the new status quo.
2. `reftable_stack_clean()`, which was propagating 0 to
`reftable_stack_new_addition()` but was then manually reloading the
stack after. Here the new flow will achieve the same, while also
allowing us to remove the manual reload.
This also makes two checks for 'REFTABLE_OUTDATED_ERROR' redundant, so
remove them also.
Signed-off-by: Karthik Nayak <karthik.188@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Karthik Nayak <karthik.188@gmail.com> · 2026-08-24 09:30 UTC · committed by Junio C Hamano
218 files changed,
+11846
−3909
- .b4-config
- .b4-cover-template
- .cirrus.yml
- .clang-format
- .editorconfig
- .gitattributes
- .github/CONTRIBUTING.md
- .github/workflows/check-style.yml
- .github/workflows/check-whitespace.yml
- .github/workflows/coverity.yml
- .github/workflows/l10n.yml
- .github/workflows/main.yml
- .gitignore
- .gitlab-ci.yml
- .mailmap
- .tsan-suppressions
- Cargo.toml
- Documentation/BreakingChanges.adoc
- Documentation/CodingGuidelines
- Documentation/Makefile
- Documentation/MyFirstContribution.adoc
- Documentation/MyFirstObjectWalk.adoc
- Documentation/RelNotes/1.6.2.4.adoc
- Documentation/RelNotes/2.43.7.adoc
- Documentation/RelNotes/2.44.4.adoc
- Documentation/RelNotes/2.45.4.adoc
- Documentation/RelNotes/2.46.4.adoc
- Documentation/RelNotes/2.47.3.adoc
- Documentation/RelNotes/2.48.2.adoc
- Documentation/RelNotes/2.49.1.adoc
- Documentation/RelNotes/2.50.1.adoc
- Documentation/RelNotes/2.51.0.adoc
- Documentation/RelNotes/2.51.1.adoc
- Documentation/RelNotes/2.51.2.adoc
- Documentation/RelNotes/2.52.0.adoc
- Documentation/RelNotes/2.53.0.adoc
- Documentation/RelNotes/2.54.0.adoc
- Documentation/RelNotes/2.54.1.adoc
- Documentation/RelNotes/2.55.0.adoc
- Documentation/RelNotes/2.56.0.adoc
- Documentation/SubmittingPatches
- Documentation/asciidoc.conf.in
- Documentation/asciidoctor-extensions.rb.in
- Documentation/blame-options.adoc
- Documentation/config.adoc
- Documentation/config/advice.adoc
- Documentation/config/alias.adoc
- Documentation/config/am.adoc
- Documentation/config/apply.adoc
- Documentation/config/bitmap-pseudo-merge.adoc
- Documentation/config/branch.adoc
- Documentation/config/commitgraph.adoc
- Documentation/config/core.adoc
- Documentation/config/difftool.adoc
- Documentation/config/extensions.adoc
- Documentation/config/feature.adoc
- Documentation/config/fetch.adoc
- Documentation/config/format.adoc
- Documentation/config/fsmonitor--daemon.adoc
- Documentation/config/gpg.adoc
- Documentation/config/grep.adoc
- Documentation/config/gui.adoc
- Documentation/config/hook.adoc
- Documentation/config/http.adoc
- Documentation/config/imap.adoc
- Documentation/config/init.adoc
- Documentation/config/log.adoc
- Documentation/config/maintenance.adoc
- Documentation/config/merge.adoc
- Documentation/config/mergetool.adoc
- Documentation/config/pack.adoc
- Documentation/config/promisor.adoc
- Documentation/config/pull.adoc
- Documentation/config/push.adoc
- Documentation/config/remote.adoc
- Documentation/config/repack.adoc
- Documentation/config/replay.adoc
- Documentation/config/safe.adoc
- Documentation/config/sendemail.adoc
- Documentation/config/sideband.adoc
- Documentation/config/stash.adoc
- Documentation/config/status.adoc
- Documentation/config/submodule.adoc
- Documentation/config/tag.adoc
- Documentation/config/trailer.adoc
- Documentation/config/worktree.adoc
- Documentation/date-formats.adoc
- Documentation/diff-algorithm-option.adoc
- Documentation/diff-context-options.adoc
- Documentation/diff-format.adoc
- Documentation/diff-generate-patch.adoc
- Documentation/diff-options.adoc
- Documentation/fetch-options.adoc
- Documentation/for-each-ref-options.adoc
- Documentation/format-patch-caveats.adoc
- Documentation/format-patch-end-of-commit-message.adoc
- Documentation/fsck-msgids.adoc
- Documentation/git-add.adoc
- Documentation/git-am.adoc
- Documentation/git-apply.adoc
- Documentation/git-archive.adoc
- Documentation/git-backfill.adoc
- Documentation/git-bisect.adoc
- Documentation/git-blame.adoc
- Documentation/git-branch.adoc
- Documentation/git-cat-file.adoc
- Documentation/git-check-attr.adoc
- Documentation/git-check-ignore.adoc
- Documentation/git-check-ref-format.adoc
- Documentation/git-checkout.adoc
- Documentation/git-clone.adoc
- Documentation/git-commit-graph.adoc
- Documentation/git-commit.adoc
- Documentation/git-config.adoc
- Documentation/git-count-objects.adoc
- Documentation/git-describe.adoc
- Documentation/git-diff.adoc
- Documentation/git-difftool.adoc
- Documentation/git-fast-export.adoc
- Documentation/git-fast-import.adoc
- Documentation/git-fetch.adoc
- Documentation/git-fmt-merge-msg.adoc
- Documentation/git-for-each-ref.adoc
- Documentation/git-format-patch.adoc
- Documentation/git-format-rev.adoc
- Documentation/git-fsck.adoc
- Documentation/git-fsmonitor--daemon.adoc
- Documentation/git-gc.adoc
- Documentation/git-grep.adoc
- Documentation/git-history.adoc
- Documentation/git-hook.adoc
- Documentation/git-http-fetch.adoc
- Documentation/git-imap-send.adoc
- Documentation/git-index-pack.adoc
- Documentation/git-init.adoc
- Documentation/git-interpret-trailers.adoc
- Documentation/git-last-modified.adoc
- Documentation/git-log.adoc
- Documentation/git-ls-files.adoc
- Documentation/git-maintenance.adoc
- Documentation/git-merge-file.adoc
- Documentation/git-merge-tree.adoc
- Documentation/git-merge.adoc
- Documentation/git-multi-pack-index.adoc
- Documentation/git-p4.adoc
- Documentation/git-pack-objects.adoc
- Documentation/git-pack-refs.adoc
- Documentation/git-patch-id.adoc
- Documentation/git-pull.adoc
- Documentation/git-push.adoc
- Documentation/git-range-diff.adoc
- Documentation/git-read-tree.adoc
- Documentation/git-rebase.adoc
- Documentation/git-reflog.adoc
- Documentation/git-refs.adoc
- Documentation/git-remote.adoc
- Documentation/git-repack.adoc
- Documentation/git-replace.adoc
- Documentation/git-replay.adoc
- Documentation/git-repo.adoc
- Documentation/git-request-pull.adoc
- Documentation/git-rerere.adoc
- Documentation/git-reset.adoc
- Documentation/git-restore.adoc
- Documentation/git-rev-parse.adoc
- Documentation/git-send-email.adoc
- Documentation/git-send-pack.adoc
- Documentation/git-shortlog.adoc
- Documentation/git-show.adoc
- Documentation/git-sparse-checkout.adoc
- Documentation/git-stage.adoc
- Documentation/git-stash.adoc
- Documentation/git-status.adoc
- Documentation/git-submodule.adoc
- Documentation/git-svn.adoc
- Documentation/git-switch.adoc
- Documentation/git-tag.adoc
- Documentation/git-update-index.adoc
- Documentation/git-update-ref.adoc
- Documentation/git-upload-pack.adoc
- Documentation/git-url-parse.adoc
- Documentation/git-var.adoc
- Documentation/git-whatchanged.adoc
- Documentation/git-worktree.adoc
- Documentation/git.adoc
- Documentation/gitattributes.adoc
- Documentation/gitcli.adoc
- Documentation/gitcredentials.adoc
- Documentation/gitcvs-migration.adoc
- Documentation/gitdatamodel.adoc
- Documentation/gitfaq.adoc
- Documentation/gitformat-index.adoc
- Documentation/gitformat-loose.adoc
- Documentation/gitformat-pack.adoc
- Documentation/githooks.adoc
- Documentation/gitignore.adoc
- Documentation/gitk.adoc
- Documentation/gitmodules.adoc
- Documentation/gitpacking.adoc
- Documentation/gitprotocol-http.adoc
- Documentation/gitprotocol-pack.adoc
- Documentation/gitprotocol-v2.adoc
- Documentation/gitremote-helpers.adoc
- Documentation/gitsubmodules.adoc
- Documentation/gittutorial.adoc
- Documentation/gitweb.conf.adoc
- Documentation/glossary-content.adoc
- Documentation/howto/meson.build
- Documentation/line-range-format.adoc
- Documentation/line-range-options.adoc
- Documentation/lint-delimited-sections.perl
- Documentation/lint-documentation-style.perl
- Documentation/lint-gitlink.perl
- Documentation/merge-options.adoc
- Documentation/mergetools/vimdiff.adoc
- Documentation/meson.build
- Documentation/pack-refs-options.adoc
- Documentation/pretty-formats.adoc
added .b4-config mode 100644
| @@ -0,0 +1,6 @@ | |||
| 1 | + | # Note that these are default values that you can tweak via the typical | |
| 2 | + | # git-config(1) machinery. You thus shouldn't ever have to change this file. | |
| 3 | + | # See also https://b4.docs.kernel.org/en/latest/config.html. | |
| 4 | + | [b4] | |
| 5 | + | send-same-thread = shallow | |
| 6 | + | prep-cover-template = ./.b4-cover-template | |
added .b4-cover-template mode 100644
| @@ -0,0 +1,12 @@ | |||
| 1 | + | ${cover} | |
| 2 | + | ||
| 3 | + | --- | |
| 4 | + | ${shortlog} | |
| 5 | + | ||
| 6 | + | ${diffstat} | |
| 7 | + | ||
| 8 | + | ${range_diff} | |
| 9 | + | --- | |
| 10 | + | base-commit: ${base_commit} | |
| 11 | + | change-id: ${change_id} | |
| 12 | + | ${prerequisites} | |
modified .cirrus.yml
| @@ -5,11 +5,13 @@ freebsd_task: | |||
| 5 | 5 | env: | |
| 6 | 6 | GIT_PROVE_OPTS: "--timer --jobs 10" | |
| 7 | 7 | GIT_TEST_OPTS: "--no-chain-lint --no-bin-wrappers" | |
| 8 | - | MAKEFLAGS: "-j4" | |
| 8 | + | GIT_SKIP_TESTS: t7815.12 | |
| 9 | + | MAKEFLAGS: -j4 | |
| 9 | 10 | DEFAULT_TEST_TARGET: prove | |
| 11 | + | DEFAULT_UNIT_TEST_TARGET: unit-tests-prove | |
| 10 | 12 | DEVELOPER: 1 | |
| 11 | 13 | freebsd_instance: | |
| 12 | - | image_family: freebsd-13-4 | |
| 14 | + | image_family: freebsd-14-3 | |
| 13 | 15 | memory: 2G | |
| 14 | 16 | install_script: | |
| 15 | 17 | pkg install -y gettext gmake perl5 | |
| @@ -19,4 +21,4 @@ freebsd_task: | |||
| 19 | 21 | build_script: | |
| 20 | 22 | - su git -c gmake | |
| 21 | 23 | test_script: | |
| 22 | - | - su git -c 'gmake DEFAULT_UNIT_TEST_TARGET=unit-tests-prove test unit-tests' | |
| 24 | + | - su git -c 'gmake test unit-tests' | |
modified .clang-format
| @@ -12,7 +12,15 @@ UseTab: Always | |||
| 12 | 12 | TabWidth: 8 | |
| 13 | 13 | IndentWidth: 8 | |
| 14 | 14 | ContinuationIndentWidth: 8 | |
| 15 | - | ColumnLimit: 80 | |
| 15 | + | ||
| 16 | + | # While we do want to enforce a character limit of 80 characters, we often | |
| 17 | + | # allow lines to overflow that limit to prioritize readability. Setting a | |
| 18 | + | # character limit here with penalties has been finicky and creates too many | |
| 19 | + | # false positives. | |
| 20 | + | # | |
| 21 | + | # NEEDSWORK: It would be nice if we can find optimal settings to ensure we | |
| 22 | + | # can re-enable the limit here. | |
| 23 | + | ColumnLimit: 0 | |
| 16 | 24 | ||
| 17 | 25 | # C Language specifics | |
| 18 | 26 | Language: Cpp | |
| @@ -141,7 +149,7 @@ SpaceBeforeCaseColon: false | |||
| 141 | 149 | # f(); | |
| 142 | 150 | # } | |
| 143 | 151 | # } | |
| 144 | - | SpaceBeforeParens: ControlStatements | |
| 152 | + | SpaceBeforeParens: ControlStatementsExceptControlMacros | |
| 145 | 153 | ||
| 146 | 154 | # Don't insert spaces inside empty '()' | |
| 147 | 155 | SpaceInEmptyParentheses: false | |
| @@ -210,16 +218,11 @@ MaxEmptyLinesToKeep: 1 | |||
| 210 | 218 | # No empty line at the start of a block. | |
| 211 | 219 | KeepEmptyLinesAtTheStartOfBlocks: false | |
| 212 | 220 | ||
| 213 | - | # Penalties | |
| 214 | - | # This decides what order things should be done if a line is too long | |
| 215 | - | PenaltyBreakAssignment: 5 | |
| 216 | - | PenaltyBreakBeforeFirstCallParameter: 5 | |
| 217 | - | PenaltyBreakComment: 5 | |
| 218 | - | PenaltyBreakFirstLessLess: 0 | |
| 219 | - | PenaltyBreakOpenParenthesis: 300 | |
| 220 | - | PenaltyBreakString: 5 | |
| 221 | - | PenaltyExcessCharacter: 10 | |
| 222 | - | PenaltyReturnTypeOnItsOwnLine: 300 | |
| 223 | - | ||
| 224 | 221 | # Don't sort #include's | |
| 225 | 222 | SortIncludes: false | |
| 223 | + | ||
| 224 | + | # Remove optional braces of control statements (if, else, for, and while) | |
| 225 | + | # according to the LLVM coding style. This avoids braces on simple | |
| 226 | + | # single-statement bodies of statements but keeps braces if one side of | |
| 227 | + | # if/else if/.../else cascade has multi-statement body. | |
| 228 | + | RemoveBracesLLVM: true | |
modified .editorconfig
| @@ -8,6 +8,10 @@ insert_final_newline = true | |||
| 8 | 8 | indent_style = tab | |
| 9 | 9 | tab_width = 8 | |
| 10 | 10 | ||
| 11 | + | [templates/hooks/*.sample] | |
| 12 | + | indent_style = tab | |
| 13 | + | tab_width = 8 | |
| 14 | + | ||
| 11 | 15 | [*.py] | |
| 12 | 16 | indent_style = space | |
| 13 | 17 | indent_size = 4 | |
modified .gitattributes
| @@ -1,13 +1,13 @@ | |||
| 1 | - | * whitespace=!indent,trail,space | |
| 2 | - | *.[ch] whitespace=indent,trail,space diff=cpp | |
| 3 | - | *.sh whitespace=indent,trail,space text eol=lf | |
| 1 | + | * whitespace=trail,space | |
| 2 | + | *.[ch] whitespace=indent,trail,space,incomplete diff=cpp | |
| 3 | + | *.sh whitespace=indent,trail,space,incomplete text eol=lf | |
| 4 | 4 | *.perl text eol=lf diff=perl | |
| 5 | - | *.pl text eof=lf diff=perl | |
| 5 | + | *.pl text eol=lf diff=perl | |
| 6 | 6 | *.pm text eol=lf diff=perl | |
| 7 | 7 | *.py text eol=lf diff=python | |
| 8 | 8 | *.bat text eol=crlf | |
| 9 | 9 | CODE_OF_CONDUCT.md -whitespace | |
| 10 | - | /Documentation/**/*.adoc text eol=lf | |
| 10 | + | /Documentation/**/*.adoc text eol=lf whitespace=trail,space,incomplete | |
| 11 | 11 | /command-list.txt text eol=lf | |
| 12 | 12 | /GIT-VERSION-GEN text eol=lf | |
| 13 | 13 | /mergetools/* text eol=lf | |
| @@ -17,3 +17,5 @@ CODE_OF_CONDUCT.md -whitespace | |||
| 17 | 17 | /Documentation/gitk.adoc conflict-marker-size=32 | |
| 18 | 18 | /Documentation/user-manual.adoc conflict-marker-size=32 | |
| 19 | 19 | /t/t????-*.sh conflict-marker-size=32 | |
| 20 | + | /t/unit-tests/clar/test/expected/* whitespace=-blank-at-eof | |
| 21 | + | /templates/hooks/*.sample whitespace=indent,trail,space,incomplete text eol=lf | |
modified .github/CONTRIBUTING.md
| @@ -10,7 +10,8 @@ conveniently send your Pull Requests commits to our mailing list. | |||
| 10 | 10 | ||
| 11 | 11 | Please read ["A note from the maintainer"](https://git.kernel.org/pub/scm/git/git.git/plain/MaintNotes?h=todo) | |
| 12 | 12 | to learn how the Git project is managed, and how you can work with it. | |
| 13 | - | In addition, we highly recommend you to read [our submission guidelines](../Documentation/SubmittingPatches). | |
| 13 | + | In addition, we highly recommend you to read | |
| 14 | + | [our submission guidelines](https://git-scm.com/docs/SubmittingPatches). | |
| 14 | 15 | ||
| 15 | 16 | If you prefer video, then [this talk](https://www.youtube.com/watch?v=Q7i_qQW__q4&feature=youtu.be&t=6m4s) | |
| 16 | 17 | might be useful to you as the presenter walks you through the contribution | |
modified .github/workflows/check-style.yml
| @@ -20,7 +20,7 @@ jobs: | |||
| 20 | 20 | jobname: ClangFormat | |
| 21 | 21 | runs-on: ubuntu-latest | |
| 22 | 22 | steps: | |
| 23 | - | - uses: actions/checkout@v4 | |
| 23 | + | - uses: actions/checkout@v6 | |
| 24 | 24 | with: | |
| 25 | 25 | fetch-depth: 0 | |
| 26 | 26 | ||
modified .github/workflows/check-whitespace.yml
| @@ -19,7 +19,7 @@ jobs: | |||
| 19 | 19 | check-whitespace: | |
| 20 | 20 | runs-on: ubuntu-latest | |
| 21 | 21 | steps: | |
| 22 | - | - uses: actions/checkout@v4 | |
| 22 | + | - uses: actions/checkout@v6 | |
| 23 | 23 | with: | |
| 24 | 24 | fetch-depth: 0 | |
| 25 | 25 | ||
modified .github/workflows/coverity.yml
| @@ -38,10 +38,10 @@ jobs: | |||
| 38 | 38 | COVERITY_LANGUAGE: cxx | |
| 39 | 39 | COVERITY_PLATFORM: overridden-below | |
| 40 | 40 | steps: | |
| 41 | - | - uses: actions/checkout@v4 | |
| 41 | + | - uses: actions/checkout@v6 | |
| 42 | 42 | - name: install minimal Git for Windows SDK | |
| 43 | 43 | if: contains(matrix.os, 'windows') | |
| 44 | - | uses: git-for-windows/setup-git-for-windows-sdk@v1 | |
| 44 | + | uses: git-for-windows/setup-git-for-windows-sdk@v2 | |
| 45 | 45 | - run: ci/install-dependencies.sh | |
| 46 | 46 | if: contains(matrix.os, 'ubuntu') || contains(matrix.os, 'macos') | |
| 47 | 47 | env: | |
| @@ -98,7 +98,7 @@ jobs: | |||
| 98 | 98 | # A cache miss will add ~30s to create, but a cache hit will save minutes. | |
| 99 | 99 | - name: restore the Coverity Build Tool | |
| 100 | 100 | id: cache | |
| 101 | - | uses: actions/cache/restore@v4 | |
| 101 | + | uses: actions/cache/restore@v5 | |
| 102 | 102 | with: | |
| 103 | 103 | path: ${{ runner.temp }}/cov-analysis | |
| 104 | 104 | key: cov-build-${{ env.COVERITY_LANGUAGE }}-${{ env.COVERITY_PLATFORM }}-${{ steps.lookup.outputs.hash }} | |
| @@ -141,7 +141,7 @@ jobs: | |||
| 141 | 141 | esac | |
| 142 | 142 | - name: cache the Coverity Build Tool | |
| 143 | 143 | if: steps.cache.outputs.cache-hit != 'true' | |
| 144 | - | uses: actions/cache/save@v4 | |
| 144 | + | uses: actions/cache/save@v5 | |
| 145 | 145 | with: | |
| 146 | 146 | path: ${{ runner.temp }}/cov-analysis | |
| 147 | 147 | key: cov-build-${{ env.COVERITY_LANGUAGE }}-${{ env.COVERITY_PLATFORM }}-${{ steps.lookup.outputs.hash }} | |
modified .github/workflows/l10n.yml
| @@ -63,7 +63,7 @@ jobs: | |||
| 63 | 63 | origin \ | |
| 64 | 64 | ${{ github.ref }} \ | |
| 65 | 65 | $args | |
| 66 | - | - uses: actions/setup-go@v5 | |
| 66 | + | - uses: actions/setup-go@v6 | |
| 67 | 67 | with: | |
| 68 | 68 | go-version: '>=1.16' | |
| 69 | 69 | cache: false | |
| @@ -92,7 +92,7 @@ jobs: | |||
| 92 | 92 | cat git-po-helper.out | |
| 93 | 93 | exit $exit_code | |
| 94 | 94 | - name: Create comment in pull request for report | |
| 95 | - | uses: mshick/add-pr-comment@v2 | |
| 95 | + | uses: mshick/add-pr-comment@v3 | |
| 96 | 96 | if: >- | |
| 97 | 97 | always() && | |
| 98 | 98 | github.event_name == 'pull_request_target' && | |
modified .github/workflows/main.yml
| @@ -63,7 +63,7 @@ jobs: | |||
| 63 | 63 | echo "skip_concurrent=$skip_concurrent" >>$GITHUB_OUTPUT | |
| 64 | 64 | - name: skip if the commit or tree was already tested | |
| 65 | 65 | id: skip-if-redundant | |
| 66 | - | uses: actions/github-script@v7 | |
| 66 | + | uses: actions/github-script@v9 | |
| 67 | 67 | if: steps.check-ref.outputs.enabled == 'yes' | |
| 68 | 68 | with: | |
| 69 | 69 | github-token: ${{secrets.GITHUB_TOKEN}} | |
| @@ -112,8 +112,8 @@ jobs: | |||
| 112 | 112 | group: windows-build-${{ github.ref }} | |
| 113 | 113 | cancel-in-progress: ${{ needs.ci-config.outputs.skip_concurrent == 'yes' }} | |
| 114 | 114 | steps: | |
| 115 | - | - uses: actions/checkout@v4 | |
| 116 | - | - uses: git-for-windows/setup-git-for-windows-sdk@v1 | |
| 115 | + | - uses: actions/checkout@v6 | |
| 116 | + | - uses: git-for-windows/setup-git-for-windows-sdk@v2 | |
| 117 | 117 | - name: build | |
| 118 | 118 | shell: bash | |
| 119 | 119 | env: | |
| @@ -123,7 +123,7 @@ jobs: | |||
| 123 | 123 | - name: zip up tracked files | |
| 124 | 124 | run: git archive -o artifacts/tracked.tar.gz HEAD | |
| 125 | 125 | - name: upload tracked files and build artifacts | |
| 126 | - | uses: actions/upload-artifact@v4 | |
| 126 | + | uses: actions/upload-artifact@v7 | |
| 127 | 127 | with: | |
| 128 | 128 | name: windows-artifacts | |
| 129 | 129 | path: artifacts | |
| @@ -140,24 +140,24 @@ jobs: | |||
| 140 | 140 | cancel-in-progress: ${{ needs.ci-config.outputs.skip_concurrent == 'yes' }} | |
| 141 | 141 | steps: | |
| 142 | 142 | - name: download tracked files and build artifacts | |
| 143 | - | uses: actions/download-artifact@v4 | |
| 143 | + | uses: actions/download-artifact@v8 | |
| 144 | 144 | with: | |
| 145 | 145 | name: windows-artifacts | |
| 146 | 146 | path: ${{github.workspace}} | |
| 147 | 147 | - name: extract tracked files and build artifacts | |
| 148 | 148 | shell: bash | |
| 149 | 149 | run: tar xf artifacts.tar.gz && tar xf tracked.tar.gz | |
| 150 | - | - uses: git-for-windows/setup-git-for-windows-sdk@v1 | |
| 150 | + | - uses: git-for-windows/setup-git-for-windows-sdk@v2 | |
| 151 | 151 | - name: test | |
| 152 | 152 | shell: bash | |
| 153 | - | run: . /etc/profile && ci/run-test-slice.sh ${{matrix.nr}} 10 | |
| 153 | + | run: . /etc/profile && ci/run-test-slice.sh $((${{matrix.nr}} + 1)) 10 | |
| 154 | 154 | - name: print test failures | |
| 155 | 155 | if: failure() && env.FAILED_TEST_ARTIFACTS != '' | |
| 156 | 156 | shell: bash | |
| 157 | 157 | run: ci/print-test-failures.sh | |
| 158 | 158 | - name: Upload failed tests' directories | |
| 159 | 159 | if: failure() && env.FAILED_TEST_ARTIFACTS != '' | |
| 160 | - | uses: actions/upload-artifact@v4 | |
| 160 | + | uses: actions/upload-artifact@v7 | |
| 161 | 161 | with: | |
| 162 | 162 | name: failed-tests-windows-${{ matrix.nr }} | |
| 163 | 163 | path: ${{env.FAILED_TEST_ARTIFACTS}} | |
| @@ -173,10 +173,10 @@ jobs: | |||
| 173 | 173 | group: vs-build-${{ github.ref }} | |
| 174 | 174 | cancel-in-progress: ${{ needs.ci-config.outputs.skip_concurrent == 'yes' }} | |
| 175 | 175 | steps: | |
| 176 | - | - uses: actions/checkout@v4 | |
| 177 | - | - uses: git-for-windows/setup-git-for-windows-sdk@v1 | |
| 176 | + | - uses: actions/checkout@v6 | |
| 177 | + | - uses: git-for-windows/setup-git-for-windows-sdk@v2 | |
| 178 | 178 | - name: initialize vcpkg | |
| 179 | - | uses: actions/checkout@v4 | |
| 179 | + | uses: actions/checkout@v6 | |
| 180 | 180 | with: | |
| 181 | 181 | repository: 'microsoft/vcpkg' | |
| 182 | 182 | path: 'compat/vcbuild/vcpkg' | |
| @@ -186,7 +186,7 @@ jobs: | |||
| 186 | 186 | repository: git/git | |
| 187 | 187 | definitionId: 9 | |
| 188 | 188 | - name: add msbuild to PATH | |
| 189 | - | uses: microsoft/setup-msbuild@v2 | |
| 189 | + | uses: microsoft/setup-msbuild@v3 | |
| 190 | 190 | - name: copy dlls to root | |
| 191 | 191 | shell: cmd | |
| 192 | 192 | run: compat\vcbuild\vcpkg_copy_dlls.bat release | |
| @@ -208,7 +208,7 @@ jobs: | |||
| 208 | 208 | - name: zip up tracked files | |
| 209 | 209 | run: git archive -o artifacts/tracked.tar.gz HEAD | |
| 210 | 210 | - name: upload tracked files and build artifacts | |
| 211 | - | uses: actions/upload-artifact@v4 | |
| 211 | + | uses: actions/upload-artifact@v7 | |
| 212 | 212 | with: | |
| 213 | 213 | name: vs-artifacts | |
| 214 | 214 | path: artifacts | |
| @@ -224,9 +224,9 @@ jobs: | |||
| 224 | 224 | group: vs-test-${{ matrix.nr }}-${{ github.ref }} | |
| 225 | 225 | cancel-in-progress: ${{ needs.ci-config.outputs.skip_concurrent == 'yes' }} | |
| 226 | 226 | steps: | |
| 227 | - | - uses: git-for-windows/setup-git-for-windows-sdk@v1 | |
| 227 | + | - uses: git-for-windows/setup-git-for-windows-sdk@v2 | |
| 228 | 228 | - name: download tracked files and build artifacts | |
| 229 | - | uses: actions/download-artifact@v4 | |
| 229 | + | uses: actions/download-artifact@v8 | |
| 230 | 230 | with: | |
| 231 | 231 | name: vs-artifacts | |
| 232 | 232 | path: ${{github.workspace}} | |
| @@ -237,14 +237,14 @@ jobs: | |||
| 237 | 237 | shell: bash | |
| 238 | 238 | env: | |
| 239 | 239 | NO_SVN_TESTS: 1 | |
| 240 | - | run: . /etc/profile && ci/run-test-slice.sh ${{matrix.nr}} 10 | |
| 240 | + | run: . /etc/profile && ci/run-test-slice.sh $((${{matrix.nr}} + 1)) 10 | |
| 241 | 241 | - name: print test failures | |
| 242 | 242 | if: failure() && env.FAILED_TEST_ARTIFACTS != '' | |
| 243 | 243 | shell: bash | |
| 244 | 244 | run: ci/print-test-failures.sh | |
| 245 | 245 | - name: Upload failed tests' directories | |
| 246 | 246 | if: failure() && env.FAILED_TEST_ARTIFACTS != '' | |
| 247 | - | uses: actions/upload-artifact@v4 | |
| 247 | + | uses: actions/upload-artifact@v7 | |
| 248 | 248 | with: | |
| 249 | 249 | name: failed-tests-windows-vs-${{ matrix.nr }} | |
| 250 | 250 | path: ${{env.FAILED_TEST_ARTIFACTS}} | |
| @@ -258,8 +258,8 @@ jobs: | |||
| 258 | 258 | group: windows-meson-build-${{ github.ref }} | |
| 259 | 259 | cancel-in-progress: ${{ needs.ci-config.outputs.skip_concurrent == 'yes' }} | |
| 260 | 260 | steps: | |
| 261 | - | - uses: actions/checkout@v4 | |
| 262 | - | - uses: actions/setup-python@v5 | |
| 261 | + | - uses: actions/checkout@v6 | |
| 262 | + | - uses: actions/setup-python@v6 | |
| 263 | 263 | - name: Set up dependencies | |
| 264 | 264 | shell: pwsh | |
| 265 | 265 | run: pip install meson ninja | |
| @@ -270,7 +270,7 @@ jobs: | |||
| 270 | 270 | shell: pwsh | |
| 271 | 271 | run: meson compile -C build | |
| 272 | 272 | - name: Upload build artifacts | |
| 273 | - | uses: actions/upload-artifact@v4 | |
| 273 | + | uses: actions/upload-artifact@v7 | |
| 274 | 274 | with: | |
| 275 | 275 | name: windows-meson-artifacts | |
| 276 | 276 | path: build | |
| @@ -286,19 +286,29 @@ jobs: | |||
| 286 | 286 | group: windows-meson-test-${{ matrix.nr }}-${{ github.ref }} | |
| 287 | 287 | cancel-in-progress: ${{ needs.ci-config.outputs.skip_concurrent == 'yes' }} | |
| 288 | 288 | steps: | |
| 289 | - | - uses: actions/checkout@v4 | |
| 290 | - | - uses: actions/setup-python@v5 | |
| 289 | + | - uses: actions/checkout@v6 | |
| 290 | + | - uses: actions/setup-python@v6 | |
| 291 | 291 | - name: Set up dependencies | |
| 292 | 292 | shell: pwsh | |
| 293 | 293 | run: pip install meson ninja | |
| 294 | 294 | - name: Download build artifacts | |
| 295 | - | uses: actions/download-artifact@v4 | |
| 295 | + | uses: actions/download-artifact@v8 | |
| 296 | 296 | with: | |
| 297 | 297 | name: windows-meson-artifacts | |
| 298 | 298 | path: build | |
| 299 | 299 | - name: Test | |
| 300 | - | shell: pwsh | |
| 301 | - | run: meson test -C build --list | Select-Object -Skip 1 | Select-String .* | Group-Object -Property { $_.LineNumber % 10 } | Where-Object Name -EQ ${{ matrix.nr }} | ForEach-Object { meson test -C build --no-rebuild --print-errorlogs $_.Group } | |
| 300 | + | shell: bash | |
| 301 | + | run: ci/run-test-slice-meson.sh build $((${{matrix.nr}} + 1)) 10 | |
| 302 | + | - name: print test failures | |
| 303 | + | if: failure() && env.FAILED_TEST_ARTIFACTS != '' | |
| 304 | + | shell: bash | |
| 305 | + | run: ci/print-test-failures.sh | |
| 306 | + | - name: Upload failed tests' directories | |
| 307 | + | if: failure() && env.FAILED_TEST_ARTIFACTS != '' | |
| 308 | + | uses: actions/upload-artifact@v7 | |
| 309 | + | with: | |
| 310 | + | name: failed-tests-windows-meson-${{ matrix.nr }} | |
| 311 | + | path: ${{env.FAILED_TEST_ARTIFACTS}} | |
| 302 | 312 | ||
| 303 | 313 | regular: | |
| 304 | 314 | name: ${{matrix.vector.jobname}} (${{matrix.vector.pool}}) | |
| @@ -313,16 +323,16 @@ jobs: | |||
| 313 | 323 | vector: | |
| 314 | 324 | - jobname: osx-clang | |
| 315 | 325 | cc: clang | |
| 316 | - | pool: macos-13 | |
| 326 | + | pool: macos-14 | |
| 317 | 327 | - jobname: osx-reftable | |
| 318 | 328 | cc: clang | |
| 319 | - | pool: macos-13 | |
| 329 | + | pool: macos-14 | |
| 320 | 330 | - jobname: osx-gcc | |
| 321 | 331 | cc: gcc-13 | |
| 322 | - | pool: macos-13 | |
| 332 | + | pool: macos-14 | |
| 323 | 333 | - jobname: osx-meson | |
| 324 | 334 | cc: clang | |
| 325 | - | pool: macos-13 | |
| 335 | + | pool: macos-14 | |
| 326 | 336 | env: | |
| 327 | 337 | CC: ${{matrix.vector.cc}} | |
| 328 | 338 | CC_PACKAGE: ${{matrix.vector.cc_package}} | |
| @@ -331,7 +341,7 @@ jobs: | |||
| 331 | 341 | TEST_OUTPUT_DIRECTORY: ${{github.workspace}}/t | |
| 332 | 342 | runs-on: ${{matrix.vector.pool}} | |
| 333 | 343 | steps: | |
| 334 | - | - uses: actions/checkout@v4 | |
| 344 | + | - uses: actions/checkout@v6 | |
| 335 | 345 | - run: ci/install-dependencies.sh | |
| 336 | 346 | - run: ci/run-build-and-tests.sh | |
| 337 | 347 | - name: print test failures | |
| @@ -339,7 +349,7 @@ jobs: | |||
| 339 | 349 | run: ci/print-test-failures.sh | |
| 340 | 350 | - name: Upload failed tests' directories | |
| 341 | 351 | if: failure() && env.FAILED_TEST_ARTIFACTS != '' | |
| 342 | - | uses: actions/upload-artifact@v4 | |
| 352 | + | uses: actions/upload-artifact@v7 | |
| 343 | 353 | with: | |
| 344 | 354 | name: failed-tests-${{matrix.vector.jobname}} | |
| 345 | 355 | path: ${{env.FAILED_TEST_ARTIFACTS}} | |
| @@ -352,7 +362,7 @@ jobs: | |||
| 352 | 362 | CI_JOB_IMAGE: ubuntu-latest | |
| 353 | 363 | runs-on: ubuntu-latest | |
| 354 | 364 | steps: | |
| 355 | - | - uses: actions/checkout@v4 | |
| 365 | + | - uses: actions/checkout@v6 | |
| 356 | 366 | - run: ci/install-dependencies.sh | |
| 357 | 367 | - run: ci/run-build-and-minimal-fuzzers.sh | |
| 358 | 368 | dockerized: | |
| @@ -379,6 +389,8 @@ jobs: | |||
| 379 | 389 | - jobname: linux-breaking-changes | |
| 380 | 390 | cc: gcc | |
| 381 | 391 | image: ubuntu:rolling | |
| 392 | + | - jobname: fedora-breaking-changes-meson | |
| 393 | + | image: fedora:latest | |
| 382 | 394 | - jobname: linux-leaks | |
| 383 | 395 | image: ubuntu:rolling | |
| 384 | 396 | cc: gcc | |
| @@ -395,9 +407,7 @@ jobs: | |||
| 395 | 407 | image: alpine:latest | |
| 396 | 408 | # Supported until 2025-04-02. | |
| 397 | 409 | - jobname: linux32 | |
| 398 | - | image: i386/ubuntu:focal | |
| 399 | - | - jobname: pedantic | |
| 400 | - | image: fedora:latest | |
| 410 | + | image: i386/ubuntu:20.04 | |
| 401 | 411 | # A RHEL 8 compatible distro. Supported until 2029-05-31. | |
| 402 | 412 | - jobname: almalinux-8 | |
| 403 | 413 | image: almalinux:8 | |
| @@ -410,7 +420,9 @@ jobs: | |||
| 410 | 420 | CI_JOB_IMAGE: ${{matrix.vector.image}} | |
| 411 | 421 | CUSTOM_PATH: /custom | |
| 412 | 422 | runs-on: ubuntu-latest | |
| 413 | - | container: ${{matrix.vector.image}} | |
| 423 | + | container: | |
| 424 | + | image: ${{ matrix.vector.image }} | |
| 425 | + | options: ${{ github.repository_visibility == 'private' && '--pids-limit 16384 --ulimit nproc=16384:16384 --ulimit nofile=32768:32768' || '' }} | |
| 414 | 426 | steps: | |
| 415 | 427 | - name: prepare libc6 for actions | |
| 416 | 428 | if: matrix.vector.jobname == 'linux32' | |
| @@ -429,17 +441,17 @@ jobs: | |||
| 429 | 441 | else | |
| 430 | 442 | apt-get -q update && apt-get -q -y install git | |
| 431 | 443 | fi | |
| 432 | - | - uses: actions/checkout@v4 | |
| 444 | + | - uses: actions/checkout@v6 | |
| 433 | 445 | - run: ci/install-dependencies.sh | |
| 434 | 446 | - run: useradd builder --create-home | |
| 435 | 447 | - run: chown -R builder . | |
| 436 | - | - run: sudo --preserve-env --set-home --user=builder ci/run-build-and-tests.sh | |
| 448 | + | - run: chmod a+w $GITHUB_ENV && sudo --preserve-env --set-home --user=builder ci/run-build-and-tests.sh | |
| 437 | 449 | - name: print test failures | |
| 438 | 450 | if: failure() && env.FAILED_TEST_ARTIFACTS != '' | |
| 439 | 451 | run: sudo --preserve-env --set-home --user=builder ci/print-test-failures.sh | |
| 440 | 452 | - name: Upload failed tests' directories | |
| 441 | 453 | if: failure() && env.FAILED_TEST_ARTIFACTS != '' | |
| 442 | - | uses: actions/upload-artifact@v4 | |
| 454 | + | uses: actions/upload-artifact@v7 | |
| 443 | 455 | with: | |
| 444 | 456 | name: failed-tests-${{matrix.vector.jobname}} | |
| 445 | 457 | path: ${{env.FAILED_TEST_ARTIFACTS}} | |
| @@ -448,16 +460,31 @@ jobs: | |||
| 448 | 460 | if: needs.ci-config.outputs.enabled == 'yes' | |
| 449 | 461 | env: | |
| 450 | 462 | jobname: StaticAnalysis | |
| 451 | - | CI_JOB_IMAGE: ubuntu-22.04 | |
| 452 | - | runs-on: ubuntu-22.04 | |
| 463 | + | CI_JOB_IMAGE: ubuntu-latest | |
| 464 | + | runs-on: ubuntu-latest | |
| 453 | 465 | concurrency: | |
| 454 | 466 | group: static-analysis-${{ github.ref }} | |
| 455 | 467 | cancel-in-progress: ${{ needs.ci-config.outputs.skip_concurrent == 'yes' }} | |
| 456 | 468 | steps: | |
| 457 | - | - uses: actions/checkout@v4 | |
| 469 | + | - uses: actions/checkout@v6 | |
| 458 | 470 | - run: ci/install-dependencies.sh | |
| 459 | 471 | - run: ci/run-static-analysis.sh | |
| 460 | 472 | - run: ci/check-directional-formatting.bash | |
| 473 | + | rust-analysis: | |
| 474 | + | needs: ci-config | |
| 475 | + | if: needs.ci-config.outputs.enabled == 'yes' | |
| 476 | + | env: | |
| 477 | + | jobname: RustAnalysis | |
| 478 | + | CI_JOB_IMAGE: ubuntu:rolling | |
| 479 | + | runs-on: ubuntu-latest | |
| 480 | + | container: ubuntu:rolling | |
| 481 | + | concurrency: | |
| 482 | + | group: rust-analysis-${{ github.ref }} | |
| 483 | + | cancel-in-progress: ${{ needs.ci-config.outputs.skip_concurrent == 'yes' }} | |
| 484 | + | steps: | |
| 485 | + | - uses: actions/checkout@v6 | |
| 486 | + | - run: ci/install-dependencies.sh | |
| 487 | + | - run: ci/run-rust-checks.sh | |
| 461 | 488 | sparse: | |
| 462 | 489 | needs: ci-config | |
| 463 | 490 | if: needs.ci-config.outputs.enabled == 'yes' | |
| @@ -469,7 +496,7 @@ jobs: | |||
| 469 | 496 | group: sparse-${{ github.ref }} | |
| 470 | 497 | cancel-in-progress: ${{ needs.ci-config.outputs.skip_concurrent == 'yes' }} | |
| 471 | 498 | steps: | |
| 472 | - | - uses: actions/checkout@v4 | |
| 499 | + | - uses: actions/checkout@v6 | |
| 473 | 500 | - name: Install other dependencies | |
| 474 | 501 | run: ci/install-dependencies.sh | |
| 475 | 502 | - run: make sparse | |
| @@ -485,6 +512,6 @@ jobs: | |||
| 485 | 512 | CI_JOB_IMAGE: ubuntu-latest | |
| 486 | 513 | runs-on: ubuntu-latest | |
| 487 | 514 | steps: | |
| 488 | - | - uses: actions/checkout@v4 | |
| 515 | + | - uses: actions/checkout@v6 | |
| 489 | 516 | - run: ci/install-dependencies.sh | |
| 490 | 517 | - run: ci/test-documentation.sh | |
modified .gitignore
| @@ -1,4 +1,6 @@ | |||
| 1 | 1 | /fuzz_corpora | |
| 2 | + | /target/ | |
| 3 | + | /Cargo.lock | |
| 2 | 4 | /GIT-BUILD-DIR | |
| 3 | 5 | /GIT-BUILD-OPTIONS | |
| 4 | 6 | /GIT-CFLAGS | |
| @@ -69,6 +71,7 @@ | |||
| 69 | 71 | /git-for-each-ref | |
| 70 | 72 | /git-for-each-repo | |
| 71 | 73 | /git-format-patch | |
| 74 | + | /git-format-rev | |
| 72 | 75 | /git-fsck | |
| 73 | 76 | /git-fsck-objects | |
| 74 | 77 | /git-fsmonitor--daemon | |
| @@ -77,6 +80,7 @@ | |||
| 77 | 80 | /git-grep | |
| 78 | 81 | /git-hash-object | |
| 79 | 82 | /git-help | |
| 83 | + | /git-history | |
| 80 | 84 | /git-hook | |
| 81 | 85 | /git-http-backend | |
| 82 | 86 | /git-http-fetch | |
| @@ -87,6 +91,7 @@ | |||
| 87 | 91 | /git-init-db | |
| 88 | 92 | /git-interpret-trailers | |
| 89 | 93 | /git-instaweb | |
| 94 | + | /git-last-modified | |
| 90 | 95 | /git-log | |
| 91 | 96 | /git-ls-files | |
| 92 | 97 | /git-ls-remote | |
| @@ -139,6 +144,7 @@ | |||
| 139 | 144 | /git-repack | |
| 140 | 145 | /git-replace | |
| 141 | 146 | /git-replay | |
| 147 | + | /git-repo | |
| 142 | 148 | /git-request-pull | |
| 143 | 149 | /git-rerere | |
| 144 | 150 | /git-reset | |
| @@ -177,6 +183,7 @@ | |||
| 177 | 183 | /git-update-server-info | |
| 178 | 184 | /git-upload-archive | |
| 179 | 185 | /git-upload-pack | |
| 186 | + | /git-url-parse | |
| 180 | 187 | /git-var | |
| 181 | 188 | /git-verify-commit | |
| 182 | 189 | /git-verify-pack | |
modified .gitlab-ci.yml
| @@ -42,13 +42,15 @@ test:linux: | |||
| 42 | 42 | - jobname: linux-reftable | |
| 43 | 43 | image: ubuntu:rolling | |
| 44 | 44 | CC: clang | |
| 45 | - | - jobname: linux-breaking-changes | |
| 46 | - | image: ubuntu:20.04 | |
| 47 | - | CC: gcc | |
| 48 | 45 | - jobname: linux-TEST-vars | |
| 49 | 46 | image: ubuntu:20.04 | |
| 50 | 47 | CC: gcc | |
| 51 | 48 | CC_PACKAGE: gcc-8 | |
| 49 | + | - jobname: linux-breaking-changes | |
| 50 | + | image: ubuntu:rolling | |
| 51 | + | CC: gcc | |
| 52 | + | - jobname: fedora-breaking-changes-meson | |
| 53 | + | image: fedora:latest | |
| 52 | 54 | - jobname: linux-leaks | |
| 53 | 55 | image: ubuntu:rolling | |
| 54 | 56 | CC: gcc | |
| @@ -58,18 +60,25 @@ test:linux: | |||
| 58 | 60 | - jobname: linux-asan-ubsan | |
| 59 | 61 | image: ubuntu:rolling | |
| 60 | 62 | CC: clang | |
| 61 | - | - jobname: pedantic | |
| 62 | - | image: fedora:latest | |
| 63 | + | - jobname: linux-meson | |
| 64 | + | image: ubuntu:rolling | |
| 65 | + | CC: gcc | |
| 63 | 66 | - jobname: linux-musl-meson | |
| 64 | 67 | image: alpine:latest | |
| 68 | + | # Supported until 2025-04-02. | |
| 65 | 69 | - jobname: linux32 | |
| 66 | 70 | image: i386/ubuntu:20.04 | |
| 67 | - | - jobname: linux-meson | |
| 68 | - | image: ubuntu:rolling | |
| 69 | - | CC: gcc | |
| 71 | + | # A RHEL 8 compatible distro. Supported until 2029-05-31. | |
| 72 | + | - jobname: almalinux-8 | |
| 73 | + | image: almalinux:8 | |
| 74 | + | # Supported until 2026-08-31. | |
| 75 | + | - jobname: debian-11 | |
| 76 | + | image: debian:11 | |
| 70 | 77 | artifacts: | |
| 71 | 78 | paths: | |
| 72 | 79 | - t/failed-test-artifacts | |
| 80 | + | reports: | |
| 81 | + | junit: build/meson-logs/testlog.junit.xml | |
| 73 | 82 | when: on_failure | |
| 74 | 83 | ||
| 75 | 84 | test:osx: | |
| @@ -77,15 +86,10 @@ test:osx: | |||
| 77 | 86 | stage: test | |
| 78 | 87 | needs: [ ] | |
| 79 | 88 | tags: | |
| 80 | - | - saas-macos-medium-m1 | |
| 89 | + | - saas-macos-large-m2pro | |
| 81 | 90 | variables: | |
| 82 | - | TEST_OUTPUT_DIRECTORY: "/Volumes/RAMDisk" | |
| 91 | + | TEST_OUTPUT_DIRECTORY: "/tmp/test-output" | |
| 83 | 92 | before_script: | |
| 84 | - | # Create a 4GB RAM disk that we use to store test output on. This small hack | |
| 85 | - | # significantly speeds up tests by more than a factor of 2 because the | |
| 86 | - | # macOS runners use network-attached storage as disks, which is _really_ | |
| 87 | - | # slow with the many small writes that our tests do. | |
| 88 | - | - sudo diskutil apfs create $(hdiutil attach -nomount ram://8192000) RAMDisk | |
| 89 | 93 | - ./ci/install-dependencies.sh | |
| 90 | 94 | script: | |
| 91 | 95 | - ./ci/run-build-and-tests.sh | |
| @@ -99,19 +103,27 @@ test:osx: | |||
| 99 | 103 | parallel: | |
| 100 | 104 | matrix: | |
| 101 | 105 | - jobname: osx-clang | |
| 102 | - | image: macos-14-xcode-15 | |
| 106 | + | image: macos-15-xcode-16 | |
| 103 | 107 | CC: clang | |
| 104 | 108 | - jobname: osx-reftable | |
| 105 | - | image: macos-14-xcode-15 | |
| 109 | + | image: macos-26-xcode-26 | |
| 106 | 110 | CC: clang | |
| 107 | 111 | - jobname: osx-meson | |
| 108 | - | image: macos-14-xcode-15 | |
| 112 | + | image: macos-26-xcode-26 | |
| 109 | 113 | CC: clang | |
| 110 | 114 | artifacts: | |
| 111 | 115 | paths: | |
| 112 | 116 | - t/failed-test-artifacts | |
| 117 | + | reports: | |
| 118 | + | junit: build/meson-logs/testlog.junit.xml | |
| 113 | 119 | when: on_failure | |
| 114 | 120 | ||
| 121 | + | .windows_before_script: &windows_before_script | |
| 122 | + | # Disabling realtime monitoring fails on some of the runners, but it | |
| 123 | + | # significantly speeds up test execution in the case where it works. We thus | |
| 124 | + | # try our luck, but ignore any failures. | |
| 125 | + | - Set-MpPreference -DisableRealtimeMonitoring $true; $true | |
| 126 | + | ||
| 115 | 127 | build:mingw64: | |
| 116 | 128 | stage: build | |
| 117 | 129 | tags: | |
| @@ -119,6 +131,7 @@ build:mingw64: | |||
| 119 | 131 | variables: | |
| 120 | 132 | NO_PERL: 1 | |
| 121 | 133 | before_script: | |
| 134 | + | - *windows_before_script | |
| 122 | 135 | - ./ci/install-sdk.ps1 -directory "git-sdk" | |
| 123 | 136 | script: | |
| 124 | 137 | - git-sdk/usr/bin/bash.exe -l -c 'ci/make-test-artifacts.sh artifacts' | |
| @@ -134,7 +147,11 @@ test:mingw64: | |||
| 134 | 147 | needs: | |
| 135 | 148 | - job: "build:mingw64" | |
| 136 | 149 | artifacts: true | |
| 150 | + | variables: | |
| 151 | + | # Windows runners don't have enough RAM to run EXPENSIVE tests. | |
| 152 | + | GIT_TEST_LONG: false | |
| 137 | 153 | before_script: | |
| 154 | + | - *windows_before_script | |
| 138 | 155 | - git-sdk/usr/bin/bash.exe -l -c 'tar xf artifacts/artifacts.tar.gz' | |
| 139 | 156 | - New-Item -Path .git/info -ItemType Directory | |
| 140 | 157 | - New-Item .git/info/exclude -ItemType File -Value "/git-sdk" | |
| @@ -145,26 +162,27 @@ test:mingw64: | |||
| 145 | 162 | parallel: 10 | |
| 146 | 163 | ||
| 147 | 164 | .msvc-meson: | |
| 165 | + | variables: | |
| 166 | + | TEST_OUTPUT_DIRECTORY: "C:/Git-Test" | |
| 148 | 167 | tags: | |
| 149 | 168 | - saas-windows-medium-amd64 | |
| 169 | + | cache: | |
| 170 | + | key: | |
| 171 | + | files: | |
| 172 | + | - ci/install-dependencies.ps1 | |
| 173 | + | paths: | |
| 174 | + | - .dependencies | |
| 150 | 175 | before_script: | |
| 151 | - | - choco install -y git meson ninja openssl | |
| 152 | - | - Import-Module $env:ChocolateyInstall\helpers\chocolateyProfile.psm1 | |
| 153 | - | - refreshenv | |
| 154 | - | # The certificate store for Python on Windows is broken and fails to fetch | |
| 155 | - | # certificates, see https://bugs.python.org/issue36011. This seems to | |
| 156 | - | # mostly be an issue with how the GitLab image is set up as it is a | |
| 157 | - | # non-issue on GitHub Actions. Work around the issue by importing | |
| 158 | - | # cetrificates manually. | |
| 159 | - | - Invoke-WebRequest https://curl.haxx.se/ca/cacert.pem -OutFile cacert.pem | |
| 160 | - | - openssl pkcs12 -export -nokeys -in cacert.pem -out certs.pfx -passout "pass:" | |
| 161 | - | - Import-PfxCertificate -CertStoreLocation Cert:\LocalMachine\Root -FilePath certs.pfx | |
| 176 | + | - *windows_before_script | |
| 177 | + | - ./ci/install-dependencies.ps1 | |
| 178 | + | - $env:Path = "C:\Meson;C:\Rust\bin;$env:Path" | |
| 179 | + | - New-Item -Path $env:TEST_OUTPUT_DIRECTORY -ItemType Directory | |
| 162 | 180 | ||
| 163 | 181 | build:msvc-meson: | |
| 164 | 182 | extends: .msvc-meson | |
| 165 | 183 | stage: build | |
| 166 | 184 | script: | |
| 167 | - | - meson setup build --vsenv -Dperl=disabled -Dbackend_max_links=1 -Dcredential_helpers=wincred | |
| 185 | + | - meson setup build --vsenv -Dperl=disabled -Dbackend_max_links=1 -Dcredential_helpers=wincred -Dtest_output_directory="$TEST_OUTPUT_DIRECTORY" | |
| 168 | 186 | - meson compile -C build | |
| 169 | 187 | artifacts: | |
| 170 | 188 | paths: | |
| @@ -178,8 +196,24 @@ test:msvc-meson: | |||
| 178 | 196 | - job: "build:msvc-meson" | |
| 179 | 197 | artifacts: true | |
| 180 | 198 | script: | |
| 181 | - | - meson test -C build --list | Select-Object -Skip 1 | Select-String .* | Group-Object -Property { $_.LineNumber % $Env:CI_NODE_TOTAL + 1 } | Where-Object Name -EQ $Env:CI_NODE_INDEX | ForEach-Object { meson test -C build --no-rebuild --print-errorlogs $_.Group; if (!$?) { exit $LASTEXITCODE } } | |
| 199 | + | - | | |
| 200 | + | & "C:/Program Files/Git/usr/bin/bash.exe" -l -c 'ci/run-test-slice-meson.sh build $CI_NODE_INDEX $CI_NODE_TOTAL' | |
| 201 | + | variables: | |
| 202 | + | # Windows runners don't have enough RAM to run EXPENSIVE tests. | |
| 203 | + | GIT_TEST_LONG: false | |
| 204 | + | after_script: | |
| 205 | + | - | | |
| 206 | + | if ($env:CI_JOB_STATUS -ne "success") { | |
| 207 | + | & "C:/Program Files/Git/usr/bin/bash.exe" -l -c 'ci/print-test-failures.sh' | |
| 208 | + | Move-Item -Path "$env:TEST_OUTPUT_DIRECTORY/failed-test-artifacts" -Destination t/ | |
| 209 | + | } | |
| 182 | 210 | parallel: 10 | |
| 211 | + | artifacts: | |
| 212 | + | paths: | |
| 213 | + | - t/failed-test-artifacts | |
| 214 | + | reports: | |
| 215 | + | junit: build/meson-logs/testlog.junit.xml | |
| 216 | + | when: on_failure | |
| 183 | 217 | ||
| 184 | 218 | test:fuzz-smoke-tests: | |
| 185 | 219 | image: ubuntu:latest | |
| @@ -193,7 +227,7 @@ test:fuzz-smoke-tests: | |||
| 193 | 227 | - ./ci/run-build-and-minimal-fuzzers.sh | |
| 194 | 228 | ||
| 195 | 229 | static-analysis: | |
| 196 | - | image: ubuntu:22.04 | |
| 230 | + | image: ubuntu:latest | |
| 197 | 231 | stage: analyze | |
| 198 | 232 | needs: [ ] | |
| 199 | 233 | variables: | |
| @@ -204,6 +238,17 @@ static-analysis: | |||
| 204 | 238 | - ./ci/run-static-analysis.sh | |
| 205 | 239 | - ./ci/check-directional-formatting.bash | |
| 206 | 240 | ||
| 241 | + | rust-analysis: | |
| 242 | + | image: ubuntu:rolling | |
| 243 | + | stage: analyze | |
| 244 | + | needs: [ ] | |
| 245 | + | variables: | |
| 246 | + | jobname: RustAnalysis | |
| 247 | + | before_script: | |
| 248 | + | - ./ci/install-dependencies.sh | |
| 249 | + | script: | |
| 250 | + | - ./ci/run-rust-checks.sh | |
| 251 | + | ||
| 207 | 252 | check-whitespace: | |
| 208 | 253 | image: ubuntu:latest | |
| 209 | 254 | stage: analyze | |
modified .mailmap
| @@ -39,12 +39,13 @@ Chris Shoemaker <c.shoemaker@cox.net> | |||
| 39 | 39 | Chris Wright <chrisw@sous-sol.org> <chrisw@osdl.org> | |
| 40 | 40 | Christian Ludwig <chrissicool@gmail.com> <chrissicool@googlemail.com> | |
| 41 | 41 | Cord Seele <cowose@gmail.com> <cowose@googlemail.com> | |
| 42 | - | Christian Couder <chriscool@tuxfamily.org> <christian.couder@gmail.com> | |
| 42 | + | Christian Couder <christian.couder@gmail.com> <chriscool@tuxfamily.org> | |
| 43 | 43 | Christian Stimming <stimming@tuhh.de> <chs@ckiste.goetheallee> | |
| 44 | 44 | Christopher Díaz Riveros <chrisadr@gentoo.org> Christopher Diaz Riveros | |
| 45 | 45 | Clemens Buchacher <drizzd@gmx.net> <drizzd@aon.at> | |
| 46 | 46 | Clemens Buchacher <drizzd@gmx.net> <clemens.buchacher@intel.com> | |
| 47 | 47 | Csaba Henk <csaba@gluster.com> <csaba@lowlife.hu> | |
| 48 | + | D. Ben Knoble <ben.knoble@gmail.com> <ben.knoble+github@gmail.com> | |
| 48 | 49 | Dan Johnson <computerdruid@gmail.com> | |
| 49 | 50 | Dana L. How <danahow@gmail.com> <how@deathvalley.cswitch.com> | |
| 50 | 51 | Dana L. How <danahow@gmail.com> Dana How | |
| @@ -65,6 +66,8 @@ Derrick Stolee <stolee@gmail.com> <dstolee@microsoft.com> | |||
| 65 | 66 | Deskin Miller <deskinm@umich.edu> | |
| 66 | 67 | Đoàn Trần Công Danh <congdanhqx@gmail.com> Doan Tran Cong Danh | |
| 67 | 68 | Dirk Süsserott <newsletter@dirk.my1.cc> | |
| 69 | + | Elijah Newren <newren@gmail.com> <newren@palantir.com> | |
| 70 | + | Elijah Newren <newren@gmail.com> <newren@github.com> | |
| 68 | 71 | Emily Shaffer <nasamuffin@google.com> <emilyshaffer@google.com> | |
| 69 | 72 | Eric Blake <eblake@redhat.com> <ebb9@byu.net> | |
| 70 | 73 | Eric Hanchrow <eric.hanchrow@gmail.com> <offby1@blarg.net> | |
| @@ -81,6 +84,8 @@ Fredrik Kuivinen <frekui@gmail.com> <freku045@student.liu.se> | |||
| 81 | 84 | Frédéric Heitzmann <frederic.heitzmann@gmail.com> | |
| 82 | 85 | Garry Dolley <gdolley@ucla.edu> <gdolley@arpnetworks.com> | |
| 83 | 86 | Glen Choo <glencbz@gmail.com> <chooglen@google.com> | |
| 87 | + | Greg Hurrell <greg@hurrell.net> <greg.hurrell@datadoghq.com> | |
| 88 | + | Greg Hurrell <greg@hurrell.net> <win@wincent.com> | |
| 84 | 89 | Greg Price <price@mit.edu> <price@MIT.EDU> | |
| 85 | 90 | Greg Price <price@mit.edu> <price@ksplice.com> | |
| 86 | 91 | Heiko Voigt <hvoigt@hvoigt.net> <git-list@hvoigt.net> | |
| @@ -105,6 +110,9 @@ Jason Riedy <ejr@eecs.berkeley.edu> <ejr@cs.berkeley.edu> | |||
| 105 | 110 | Jay Soffian <jaysoffian@gmail.com> <jaysoffian+git@gmail.com> | |
| 106 | 111 | Jean-Noël Avila <jn.avila@free.fr> Jean-Noel Avila | |
| 107 | 112 | Jean-Noël Avila <jn.avila@free.fr> Jean-Noël AVILA | |
| 113 | + | Jean-Noël Avila <jn.avila@free.fr> Jean-Noel Avila <jean-noel.avila@scantech.fr> | |
| 114 | + | Jean-Noël Avila <jn.avila@free.fr> Jean-Noël AVILA <avila.jn@gmail.com> | |
| 115 | + | Jean-Noël Avila <jn.avila@free.fr> Jean-Noël Avila via GitGitGadget <gitgitgadget@gmail.com> | |
| 108 | 116 | Jeff King <peff@peff.net> <peff@github.com> | |
| 109 | 117 | Jeff Muizelaar <jmuizelaar@mozilla.com> <jeff@infidigm.net> | |
| 110 | 118 | Jens Axboe <axboe@kernel.dk> <axboe@suse.de> | |
| @@ -124,6 +132,7 @@ Jon Loeliger <jdl@jdl.com> <jdl@freescale.org> | |||
| 124 | 132 | Jon Seymour <jon.seymour@gmail.com> <jon@blackcubes.dyndns.org> | |
| 125 | 133 | Jonathan Nieder <jrnieder@gmail.com> <jrnieder@uchicago.edu> | |
| 126 | 134 | Jonathan del Strother <jon.delStrother@bestbefore.tv> <maillist@steelskies.com> | |
| 135 | + | Jonathan Tan <jonathantanmy@fastmail.com> <jonathantanmy@google.com> | |
| 127 | 136 | Josh Triplett <josh@joshtriplett.org> <josh@freedesktop.org> | |
| 128 | 137 | Josh Triplett <josh@joshtriplett.org> <josht@us.ibm.com> | |
| 129 | 138 | Julian Phillips <julian@quantumfyre.co.uk> <jp3@quantumfyre.co.uk> | |
| @@ -137,8 +146,8 @@ Junio C Hamano <gitster@pobox.com> <junkio@twinsun.com> | |||
| 137 | 146 | Kaartic Sivaraam <kaartic.sivaraam@gmail.com> <kaarticsivaraam91196@gmail.com> | |
| 138 | 147 | Karl Wiberg <kha@treskal.com> Karl Hasselström | |
| 139 | 148 | Karl Wiberg <kha@treskal.com> <kha@yoghurt.hemma.treskal.com> | |
| 140 | - | Karsten Blees <blees@dcon.de> <karsten.blees@dcon.de> | |
| 141 | - | Karsten Blees <blees@dcon.de> <karsten.blees@gmail.com> | |
| 149 | + | Karsten Blees <karsten.blees@gmail.com> <karsten.blees@dcon.de> | |
| 150 | + | Karsten Blees <karsten.blees@gmail.com> <blees@dcon.de> | |
| 142 | 151 | Kay Sievers <kay.sievers@vrfy.org> <kay.sievers@suse.de> | |
| 143 | 152 | Kay Sievers <kay.sievers@vrfy.org> <kay@mam.(none)> | |
| 144 | 153 | Kazuki Saitoh <ksaitoh560@gmail.com> kazuki saitoh <ksaitoh560@gmail.com> | |
| @@ -218,11 +227,14 @@ Peter Krefting <peter@softwolves.pp.se> <peter@softwolves.pp.se> | |||
| 218 | 227 | Peter Krefting <peter@softwolves.pp.se> <peter@svarten.intern.softwolves.pp.se> | |
| 219 | 228 | Petr Baudis <pasky@ucw.cz> <pasky@suse.cz> | |
| 220 | 229 | Petr Baudis <pasky@ucw.cz> <xpasky@machine> | |
| 221 | - | Phil Hord <hordp@cisco.com> <phil.hord@gmail.com> | |
| 230 | + | Phil Hord <phil.hord@gmail.com> <hordp@cisco.com> | |
| 231 | + | Phil Hord <phil.hord@gmail.com> <phord@purestorage.com> | |
| 222 | 232 | Philip Jägenstedt <philip@foolip.org> <philip.jagenstedt@gmail.com> | |
| 223 | 233 | Philip Oakley <philipoakley@iee.email> <philipoakley@iee.org> # secondary <philipoakley@dunelm.org.uk> | |
| 224 | 234 | Philipp A. Hartmann <pah@qo.cx> <ph@sorgh.de> | |
| 225 | 235 | Philippe Bruhat <book@cpan.org> | |
| 236 | + | Phillip Wood <phillip.wood@dunelm.org.uk> <phillip.wood123@gmail.com> | |
| 237 | + | Phillip Wood <phillip.wood@dunelm.org.uk> <phillip.wood@talktalk.net> | |
| 226 | 238 | Ralf Thielow <ralf.thielow@gmail.com> <ralf.thielow@googlemail.com> | |
| 227 | 239 | Ramsay Jones <ramsay@ramsayjones.plus.com> <ramsay@ramsay1.demon.co.uk> | |
| 228 | 240 | Ramkumar Ramachandra <r@artagnon.com> <artagnon@gmail.com> | |
| @@ -268,12 +280,14 @@ Sven Verdoolaege <skimo@kotnet.org> <skimo@liacs.nl> | |||
| 268 | 280 | SZEDER Gábor <szeder.dev@gmail.com> <szeder@ira.uka.de> | |
| 269 | 281 | Tao Qingyun <taoqy@ls-a.me> <845767657@qq.com> | |
| 270 | 282 | Tay Ray Chuan <rctay89@gmail.com> | |
| 283 | + | Taylor Blau <me@ttaylorr.com> <ttaylorr@openai.com> | |
| 271 | 284 | Ted Percival <ted@midg3t.net> <ted.percival@quest.com> | |
| 272 | 285 | Theodore Ts'o <tytso@mit.edu> | |
| 273 | 286 | Thomas Ackermann <th.acker@arcor.de> <th.acker66@arcor.de> | |
| 274 | 287 | Thomas Rast <tr@thomasrast.ch> <trast@student.ethz.ch> | |
| 275 | 288 | Thomas Rast <tr@thomasrast.ch> <trast@inf.ethz.ch> | |
| 276 | 289 | Thomas Rast <tr@thomasrast.ch> <trast@google.com> | |
| 290 | + | Tian Yuchen <cat@malon.dev> <a3205153416@gmail.com> | |
| 277 | 291 | Timo Hirvonen <tihirvon@gmail.com> <tihirvon@ee.oulu.fi> | |
| 278 | 292 | Toby Allsopp <Toby.Allsopp@navman.co.nz> <toby.allsopp@navman.co.nz> | |
| 279 | 293 | Tom Grennan <tmgrennan@gmail.com> <tgrennan@redback.com> | |
modified .tsan-suppressions
| @@ -7,7 +7,6 @@ | |||
| 7 | 7 | # A static variable is written to racily, but we always write the same value, so | |
| 8 | 8 | # in practice it (hopefully!) doesn't matter. | |
| 9 | 9 | race:^want_color$ | |
| 10 | - | race:^transfer_debug$ | |
| 11 | 10 | ||
| 12 | 11 | # A boolean value, which tells whether the replace_map has been initialized or | |
| 13 | 12 | # not, is read racily with an update. As this variable is written to only once, | |
added Cargo.toml mode 100644
| @@ -0,0 +1,10 @@ | |||
| 1 | + | [package] | |
| 2 | + | name = "gitcore" | |
| 3 | + | version = "0.1.0" | |
| 4 | + | edition = "2018" | |
| 5 | + | rust-version = "1.49.0" | |
| 6 | + | ||
| 7 | + | [lib] | |
| 8 | + | crate-type = ["staticlib"] | |
| 9 | + | ||
| 10 | + | [dependencies] | |
modified Documentation/BreakingChanges.adoc
| @@ -118,6 +118,128 @@ Cf. <2f5de416-04ba-c23d-1e0b-83bb655829a7@zombino.com>, | |||
| 118 | 118 | <20170223155046.e7nxivfwqqoprsqj@LykOS.localdomain>, | |
| 119 | 119 | <CA+EOSBncr=4a4d8n9xS4FNehyebpmX8JiUwCsXD47EQDE+DiUQ@mail.gmail.com>. | |
| 120 | 120 | ||
| 121 | + | * The default storage format for references in newly created repositories will | |
| 122 | + | be changed from "files" to "reftable". The "reftable" format provides | |
| 123 | + | multiple advantages over the "files" format: | |
| 124 | + | + | |
| 125 | + | ** It is impossible to store two references that only differ in casing on | |
| 126 | + | case-insensitive filesystems with the "files" format. This issue is common | |
| 127 | + | on Windows and macOS platforms. As the "reftable" backend does not use | |
| 128 | + | filesystem paths to encode reference names this problem goes away. | |
| 129 | + | ** Similarly, macOS normalizes path names that contain unicode characters, | |
| 130 | + | which has the consequence that you cannot store two names with unicode | |
| 131 | + | characters that are encoded differently with the "files" backend. Again, | |
| 132 | + | this is not an issue with the "reftable" backend. | |
| 133 | + | ** Deleting references with the "files" backend requires Git to rewrite the | |
| 134 | + | complete "packed-refs" file. In large repositories with many references | |
| 135 | + | this file can easily be dozens of megabytes in size, in extreme cases it | |
| 136 | + | may be gigabytes. The "reftable" backend uses tombstone markers for | |
| 137 | + | deleted references and thus does not have to rewrite all of its data. | |
| 138 | + | ** Repository housekeeping with the "files" backend typically performs | |
| 139 | + | all-into-one repacks of references. This can be quite expensive, and | |
| 140 | + | consequently housekeeping is a tradeoff between the number of loose | |
| 141 | + | references that accumulate and slow down operations that read references, | |
| 142 | + | and compressing those loose references into the "packed-refs" file. The | |
| 143 | + | "reftable" backend uses geometric compaction after every write, which | |
| 144 | + | amortizes costs and ensures that the backend is always in a | |
| 145 | + | well-maintained state. | |
| 146 | + | ** Operations that write multiple references at once are not atomic with the | |
| 147 | + | "files" backend. Consequently, Git may see in-between states when it reads | |
| 148 | + | references while a reference transaction is in the process of being | |
| 149 | + | committed to disk. | |
| 150 | + | ** Writing many references at once is slow with the "files" backend because | |
| 151 | + | every reference is created as a separate file. The "reftable" backend | |
| 152 | + | significantly outperforms the "files" backend by multiple orders of | |
| 153 | + | magnitude. | |
| 154 | + | ** The reftable backend uses a binary format with prefix compression for | |
| 155 | + | reference names. As a result, the format uses less space compared to the | |
| 156 | + | "packed-refs" file. | |
| 157 | + | + | |
| 158 | + | Users that get immediate benefit from the "reftable" backend could continue to | |
| 159 | + | opt-in to the "reftable" format manually by setting the "init.defaultRefFormat" | |
| 160 | + | config. But defaults matter, and we think that overall users will have a better | |
| 161 | + | experience with less platform-specific quirks when they use the new backend by | |
| 162 | + | default. | |
| 163 | + | + | |
| 164 | + | A prerequisite for this change is that the ecosystem is ready to support the | |
| 165 | + | "reftable" format. Most importantly, alternative implementations of Git like | |
| 166 | + | JGit, libgit2 and Gitoxide need to support it. | |
| 167 | + | ||
| 168 | + | * In new repositories, the default branch name will be `main`. We have been | |
| 169 | + | warning that the default name will change since 675704c74dd (init: | |
| 170 | + | provide useful advice about init.defaultBranch, 2020-12-11). The new name | |
| 171 | + | matches the default branch name used in new repositories by many of the | |
| 172 | + | big Git forges. | |
| 173 | + | ||
| 174 | + | * Git will require Rust as a mandatory part of the build process. While Git | |
| 175 | + | already started to adopt Rust in Git 2.49, all parts written in Rust are | |
| 176 | + | optional for the time being. This includes: | |
| 177 | + | + | |
| 178 | + | ** The Rust wrapper around libgit.a that is part of "contrib/" and which has | |
| 179 | + | been introduced in Git 2.49. | |
| 180 | + | ** Subsystems that have an alternative implementation in Rust to test | |
| 181 | + | interoperability between our C and Rust codebase. | |
| 182 | + | ** Newly written features that are not mission critical for a fully functional | |
| 183 | + | Git client. | |
| 184 | + | + | |
| 185 | + | These changes are meant as test balloons to allow distributors of Git to prepare | |
| 186 | + | for Rust becoming a mandatory part of the build process. There will be multiple | |
| 187 | + | milestones for the introduction of Rust: | |
| 188 | + | + | |
| 189 | + | -- | |
| 190 | + | 1. Initially, with Git 2.52, support for Rust will be auto-detected by Meson and | |
| 191 | + | disabled in our Makefile so that the project can sort out the initial | |
| 192 | + | infrastructure. | |
| 193 | + | 2. In Git 2.55, both build systems will default-enable support for Rust. | |
| 194 | + | Consequently, builds will break by default if Rust is not available on the | |
| 195 | + | build host. The use of Rust can still be explicitly disabled via build | |
| 196 | + | flags. | |
| 197 | + | 3. In Git 3.0, the build options will be removed and support for Rust is | |
| 198 | + | mandatory. | |
| 199 | + | -- | |
| 200 | + | + | |
| 201 | + | You can explicitly ask both Meson and our Makefile-based system to enable Rust | |
| 202 | + | by saying `meson configure -Drust=enabled` and `make WITH_RUST=YesPlease`, | |
| 203 | + | respectively. | |
| 204 | + | + | |
| 205 | + | The Git project will declare the last version before Git 3.0 to be a long-term | |
| 206 | + | support release. This long-term release will receive important bug fixes for at | |
| 207 | + | least four release cycles and security fixes for six release cycles. The Git | |
| 208 | + | project will hand over maintainership of the long-term release to distributors | |
| 209 | + | in case they need to extend the life of that long-term release even further. | |
| 210 | + | Details of how this long-term release will be handed over to the community will | |
| 211 | + | be discussed once the Git project decides to stop officially supporting it. | |
| 212 | + | + | |
| 213 | + | We will evaluate the impact on downstream distributions before making Rust | |
| 214 | + | mandatory in Git 3.0. If we see that the impact on downstream distributions | |
| 215 | + | would be significant, we may decide to defer this change to a subsequent minor | |
| 216 | + | release. This evaluation will also take into account our own experience with | |
| 217 | + | how painful it is to keep Rust an optional component. | |
| 218 | + | ||
| 219 | + | * The default value of `safe.bareRepository` will change from `all` to | |
| 220 | + | `explicit`. It is all too easy for an attacker to trick a user into cloning a | |
| 221 | + | repository that contains an embedded bare repository with malicious hooks | |
| 222 | + | configured. If the user enters that subdirectory and runs any Git command, Git | |
| 223 | + | discovers the bare repository and the hooks fire. The user does not even need | |
| 224 | + | to run a Git command explicitly: many shell prompts run `git status` in the | |
| 225 | + | background to display branch and dirty state information, and `git status` in | |
| 226 | + | turn may invoke the fsmonitor hook if so configured, making the user | |
| 227 | + | vulnerable the moment they `cd` into the directory. The `safe.bareRepository` | |
| 228 | + | configuration variable was introduced in 8959555cee (setup_git_directory(): | |
| 229 | + | add an owner check for the top-level directory, 2022-03-02) with a default of | |
| 230 | + | `all` to preserve backwards compatibility. | |
| 231 | + | + | |
| 232 | + | Changing the default to `explicit` means that Git will refuse to work with bare | |
| 233 | + | repositories that are discovered implicitly by walking up the directory tree. | |
| 234 | + | Bare repositories specified explicitly via the `--git-dir` command-line option | |
| 235 | + | or the `GIT_DIR` environment variable continue to work regardless of this | |
| 236 | + | setting. Repositories that look like a `.git` directory, a worktree, or a | |
| 237 | + | submodule directory are also unaffected. | |
| 238 | + | + | |
| 239 | + | Users who rely on implicit discovery of bare repositories can restore the | |
| 240 | + | previous behavior by setting `safe.bareRepository=all` in their global or | |
| 241 | + | system configuration. | |
| 242 | + | ||
| 121 | 243 | === Removals | |
| 122 | 244 | ||
| 123 | 245 | * Support for grafting commits has long been superseded by git-replace(1). | |
| @@ -183,6 +305,39 @@ These features will be removed. | |||
| 183 | 305 | timeframe, in preference to its synonym "--annotate-stdin". Git 3.0 | |
| 184 | 306 | removes the support for "--stdin" altogether. | |
| 185 | 307 | ||
| 308 | + | * The git-whatchanged(1) command has outlived its usefulness more than | |
| 309 | + | 10 years ago, and takes more keystrokes to type than its rough | |
| 310 | + | equivalent `git log --raw`. We have nominated the command for | |
| 311 | + | removal, have changed the command to refuse to work unless the | |
| 312 | + | `--i-still-use-this` option is given, and asked the users to report | |
| 313 | + | when they do so. | |
| 314 | + | + | |
| 315 | + | The command will be removed. | |
| 316 | + | ||
| 317 | + | * Support for `core.commentString=auto` has been deprecated and will | |
| 318 | + | be removed in Git 3.0. | |
| 319 | + | + | |
| 320 | + | cf. <xmqqa59i45wc.fsf@gitster.g> | |
| 321 | + | ||
| 322 | + | * Support for `core.preferSymlinkRefs=true` has been deprecated and will be | |
| 323 | + | removed in Git 3.0. Writing symbolic refs as symbolic links will be phased | |
| 324 | + | out in favor of using plain files using the textual representation of | |
| 325 | + | symbolic refs. | |
| 326 | + | + | |
| 327 | + | Symbolic references were initially always stored as a symbolic link. This was | |
| 328 | + | changed in 9b143c6e15 (Teach update-ref about a symbolic ref stored in a | |
| 329 | + | textfile., 2005-09-25), where a new textual symref format was introduced to | |
| 330 | + | store those symbolic refs in a plain file. In 9f0bb90d16 | |
| 331 | + | (core.prefersymlinkrefs: use symlinks for .git/HEAD, 2006-05-02), the Git | |
| 332 | + | project switched the default to use the textual symrefs in favor of symbolic | |
| 333 | + | links. | |
| 334 | + | + | |
| 335 | + | The migration away from symbolic links has happened almost 20 years ago by now, | |
| 336 | + | and there is no known reason why one should prefer them nowadays. Furthermore, | |
| 337 | + | symbolic links are not supported on some platforms. | |
| 338 | + | + | |
| 339 | + | Note that only the writing side for such symbolic links is deprecated. Reading | |
| 340 | + | such symbolic links is still supported for now. | |
| 186 | 341 | ||
| 187 | 342 | == Superseded features that will not be deprecated | |
| 188 | 343 | ||
modified Documentation/CodingGuidelines
| @@ -33,6 +33,16 @@ Git in general, a few rough rules are: | |||
| 33 | 33 | achieve and why the changes were necessary (more on this in the | |
| 34 | 34 | accompanying SubmittingPatches document). | |
| 35 | 35 | ||
| 36 | + | - A label "NEEDSWORK:" followed by a description of the things to | |
| 37 | + | be done is a way to leave in-code comments to document design | |
| 38 | + | decisions yet to be made. 80% of the work to resolve a NEEDSWORK | |
| 39 | + | comment is to decide if it still makes sense to do so, since the | |
| 40 | + | situation around the codebase may have changed since the comment | |
| 41 | + | was written. It can be a very valid change to remove an existing | |
| 42 | + | NEEDSWORK comment without doing anything else, with the commit log | |
| 43 | + | message describing a good argument why it does not make sense to do | |
| 44 | + | the thing the NEEDSWORK comment mentioned. | |
| 45 | + | ||
| 36 | 46 | Make your code readable and sensible, and don't try to be clever. | |
| 37 | 47 | ||
| 38 | 48 | As for more concrete guidelines, just imitate the existing code | |
| @@ -298,6 +308,17 @@ For C programs: | |||
| 298 | 308 | . since late 2021 with 44ba10d6, we have had variables declared in | |
| 299 | 309 | the for loop "for (int i = 0; i < 10; i++)". | |
| 300 | 310 | ||
| 311 | + | . since late 2023 with 8277dbe987 we have been using the bool type | |
| 312 | + | from <stdbool.h>. | |
| 313 | + | ||
| 314 | + | C99 features we have test balloons for: | |
| 315 | + | ||
| 316 | + | . since late 2024 with v2.48.0-rc0~20, we have test balloons for | |
| 317 | + | compound literal syntax, e.g., (struct foo){ .member = value }; | |
| 318 | + | our hope is that no platforms we care about have trouble using | |
| 319 | + | them, and officially adopt its wider use in mid 2026. Do not add | |
| 320 | + | more use of the syntax until that happens. | |
| 321 | + | ||
| 301 | 322 | New C99 features that we cannot use yet: | |
| 302 | 323 | ||
| 303 | 324 | . %z and %zu as a printf() argument for a size_t (the %z being for | |
| @@ -315,6 +336,9 @@ For C programs: | |||
| 315 | 336 | encouraged to have a blank line between the end of the declarations | |
| 316 | 337 | and the first statement in the block. | |
| 317 | 338 | ||
| 339 | + | - Do not explicitly initialize global variables to 0 or NULL; | |
| 340 | + | instead, let BSS take care of the zero initialization. | |
| 341 | + | ||
| 318 | 342 | - NULL pointers shall be written as NULL, not as 0. | |
| 319 | 343 | ||
| 320 | 344 | - When declaring pointers, the star sides with the variable | |
| @@ -416,6 +440,8 @@ For C programs: | |||
| 416 | 440 | */ | |
| 417 | 441 | _("Here is a translatable string explained by the above."); | |
| 418 | 442 | ||
| 443 | + | We do not use // comments. | |
| 444 | + | ||
| 419 | 445 | - Double negation is often harder to understand than no negation | |
| 420 | 446 | at all. | |
| 421 | 447 | ||
| @@ -610,8 +636,9 @@ For C programs: | |||
| 610 | 636 | - `S_init()` initializes a structure without allocating the | |
| 611 | 637 | structure itself. | |
| 612 | 638 | ||
| 613 | - | - `S_release()` releases a structure's contents without freeing the | |
| 614 | - | structure. | |
| 639 | + | - `S_release()` releases a structure's contents without reinitializing | |
| 640 | + | the structure for immediate reuse, and without freeing the structure | |
| 641 | + | itself. | |
| 615 | 642 | ||
| 616 | 643 | - `S_clear()` is equivalent to `S_release()` followed by `S_init()` | |
| 617 | 644 | such that the structure is directly usable after clearing it. When | |
| @@ -635,6 +662,43 @@ For C programs: | |||
| 635 | 662 | cases. However, it is recommended to find a more descriptive name wherever | |
| 636 | 663 | possible to improve the readability and maintainability of the code. | |
| 637 | 664 | ||
| 665 | + | - Bit fields should be defined without a space around the colon. E.g. | |
| 666 | + | ||
| 667 | + | unsigned my_field:1; | |
| 668 | + | unsigned other_field:1; | |
| 669 | + | unsigned field_with_longer_name:1; | |
| 670 | + | ||
| 671 | + | - When a function `F` accepts flags, those flags should be defined as `enum | |
| 672 | + | F_flags`. Individual flag definitions should start with `F` and be in | |
| 673 | + | all-uppercase letters. Flag values should be represented via bit shifts. | |
| 674 | + | E.g. | |
| 675 | + | ||
| 676 | + | enum frobnicate_flags { | |
| 677 | + | FROBNICATE_FOO = (1 << 0), | |
| 678 | + | FROBNICATE_BAR = (1 << 1), | |
| 679 | + | }; | |
| 680 | + | ||
| 681 | + | int frobnicate(enum frobnicate_flags flags); | |
| 682 | + | ||
| 683 | + | - Array names should be named in the singular form if the individual items are | |
| 684 | + | subject of use. E.g.: | |
| 685 | + | ||
| 686 | + | char *dog[] = ...; | |
| 687 | + | walk_dog(dog[0]); | |
| 688 | + | walk_dog(dog[1]); | |
| 689 | + | ||
| 690 | + | Cases where the array is employed as a whole rather than as its unit parts, | |
| 691 | + | the plural form is preferable. E.g: | |
| 692 | + | ||
| 693 | + | char *dogs[] = ...; | |
| 694 | + | walk_all_dogs(dogs); | |
| 695 | + | ||
| 696 | + | - For file timestamps, do not use "st_mtim" (and other timestamp | |
| 697 | + | members in "struct stat") unconditionally; not everybody is POSIX | |
| 698 | + | (grep for USE_ST_TIMESPEC). If you only need a timestamp in whole | |
| 699 | + | second resolution, "st_mtime" should work fine everywhere. | |
| 700 | + | ||
| 701 | + | ||
| 638 | 702 | For Perl programs: | |
| 639 | 703 | ||
| 640 | 704 | - Most of the C guidelines above apply. | |
| @@ -877,6 +941,17 @@ Characters are also surrounded by underscores: | |||
| 877 | 941 | As a side effect, backquoted placeholders are correctly typeset, but | |
| 878 | 942 | this style is not recommended. | |
| 879 | 943 | ||
| 944 | + | When documenting multiple related `git config` variables, place them on | |
| 945 | + | a separate line instead of separating them by commas. For example, do | |
| 946 | + | not write this: | |
| 947 | + | `core.var1`, `core.var2`:: | |
| 948 | + | Description common to `core.var1` and `core.var2`. | |
| 949 | + | ||
| 950 | + | Instead write this: | |
| 951 | + | `core.var1`:: | |
| 952 | + | `core.var2`:: | |
| 953 | + | Description common to `core.var1` and `core.var2`. | |
| 954 | + | ||
| 880 | 955 | Synopsis Syntax | |
| 881 | 956 | ||
| 882 | 957 | The synopsis (a paragraph with [synopsis] attribute) is automatically | |
modified Documentation/Makefile
| @@ -34,6 +34,7 @@ MAN5_TXT += gitformat-bundle.adoc | |||
| 34 | 34 | MAN5_TXT += gitformat-chunk.adoc | |
| 35 | 35 | MAN5_TXT += gitformat-commit-graph.adoc | |
| 36 | 36 | MAN5_TXT += gitformat-index.adoc | |
| 37 | + | MAN5_TXT += gitformat-loose.adoc | |
| 37 | 38 | MAN5_TXT += gitformat-pack.adoc | |
| 38 | 39 | MAN5_TXT += gitformat-signature.adoc | |
| 39 | 40 | MAN5_TXT += githooks.adoc | |
| @@ -52,6 +53,7 @@ MAN7_TXT += gitcli.adoc | |||
| 52 | 53 | MAN7_TXT += gitcore-tutorial.adoc | |
| 53 | 54 | MAN7_TXT += gitcredentials.adoc | |
| 54 | 55 | MAN7_TXT += gitcvs-migration.adoc | |
| 56 | + | MAN7_TXT += gitdatamodel.adoc | |
| 55 | 57 | MAN7_TXT += gitdiffcore.adoc | |
| 56 | 58 | MAN7_TXT += giteveryday.adoc | |
| 57 | 59 | MAN7_TXT += gitfaq.adoc | |
| @@ -119,19 +121,30 @@ TECH_DOCS += ToolsForGit | |||
| 119 | 121 | TECH_DOCS += technical/bitmap-format | |
| 120 | 122 | TECH_DOCS += technical/build-systems | |
| 121 | 123 | TECH_DOCS += technical/bundle-uri | |
| 124 | + | TECH_DOCS += technical/commit-graph | |
| 125 | + | TECH_DOCS += technical/directory-rename-detection | |
| 122 | 126 | TECH_DOCS += technical/hash-function-transition | |
| 127 | + | TECH_DOCS += technical/large-object-promisors | |
| 123 | 128 | TECH_DOCS += technical/long-running-process-protocol | |
| 124 | 129 | TECH_DOCS += technical/multi-pack-index | |
| 130 | + | TECH_DOCS += technical/packfile-uri | |
| 125 | 131 | TECH_DOCS += technical/pack-heuristics | |
| 132 | + | TECH_DOCS += technical/paint-down-to-common | |
| 126 | 133 | TECH_DOCS += technical/parallel-checkout | |
| 127 | 134 | TECH_DOCS += technical/partial-clone | |
| 128 | 135 | TECH_DOCS += technical/platform-support | |
| 129 | 136 | TECH_DOCS += technical/racy-git | |
| 130 | 137 | TECH_DOCS += technical/reftable | |
| 138 | + | TECH_DOCS += technical/remembering-renames | |
| 139 | + | TECH_DOCS += technical/repository-version | |
| 140 | + | TECH_DOCS += technical/rerere | |
| 131 | 141 | TECH_DOCS += technical/scalar | |
| 132 | 142 | TECH_DOCS += technical/send-pack-pipeline | |
| 133 | 143 | TECH_DOCS += technical/shallow | |
| 144 | + | TECH_DOCS += technical/sparse-checkout | |
| 145 | + | TECH_DOCS += technical/sparse-index | |
| 134 | 146 | TECH_DOCS += technical/trivial-merge | |
| 147 | + | TECH_DOCS += technical/unambiguous-types | |
| 135 | 148 | TECH_DOCS += technical/unit-tests | |
| 136 | 149 | SP_ARTICLES += $(TECH_DOCS) | |
| 137 | 150 | SP_ARTICLES += technical/api-index | |
| @@ -497,9 +510,26 @@ $(LINT_DOCS_FSCK_MSGIDS): ../fsck.h fsck-msgids.adoc | |||
| 497 | 510 | $(call mkdir_p_parent_template) | |
| 498 | 511 | $(QUIET_GEN)$(PERL_PATH) lint-fsck-msgids.perl \ | |
| 499 | 512 | ../fsck.h fsck-msgids.adoc $@ | |
| 500 | - | ||
| 501 | 513 | lint-docs-fsck-msgids: $(LINT_DOCS_FSCK_MSGIDS) | |
| 502 | 514 | ||
| 515 | + | ## Lint: delimited sections | |
| 516 | + | LINT_DOCS_DELIMITED_SECTIONS = $(patsubst %.adoc,.build/lint-docs/delimited-sections/%.ok,$(MAN_TXT)) | |
| 517 | + | $(LINT_DOCS_DELIMITED_SECTIONS): lint-delimited-sections.perl | |
| 518 | + | $(LINT_DOCS_DELIMITED_SECTIONS): .build/lint-docs/delimited-sections/%.ok: %.adoc | |
| 519 | + | $(call mkdir_p_parent_template) | |
| 520 | + | $(QUIET_LINT_DELIMSEC)$(PERL_PATH) lint-delimited-sections.perl $< >$@ | |
| 521 | + | .PHONY: lint-docs-delimited-sections | |
| 522 | + | lint-docs-delimited-sections: $(LINT_DOCS_DELIMITED_SECTIONS) | |
| 523 | + | ||
| 524 | + | ## Lint: Documentation style | |
| 525 | + | LINT_DOCS_DOC_STYLE = $(patsubst %.adoc,.build/lint-docs/doc-style/%.ok,$(DOC_DEP_TXT)) | |
| 526 | + | $(LINT_DOCS_DOC_STYLE): lint-documentation-style.perl | |
| 527 | + | $(LINT_DOCS_DOC_STYLE): .build/lint-docs/doc-style/%.ok: %.adoc | |
| 528 | + | $(call mkdir_p_parent_template) | |
| 529 | + | $(QUIET_LINT_DOCSTYLE)$(PERL_PATH) lint-documentation-style.perl $< >$@ | |
| 530 | + | .PHONY: lint-docs-doc-style | |
| 531 | + | lint-docs-doc-style: $(LINT_DOCS_DOC_STYLE) | |
| 532 | + | ||
| 503 | 533 | lint-docs-manpages: | |
| 504 | 534 | $(QUIET_GEN)./lint-manpages.sh | |
| 505 | 535 | ||
| @@ -510,7 +540,12 @@ lint-docs-meson: | |||
| 510 | 540 | awk "/^manpages = {$$/ {flag=1 ; next } /^}$$/ { flag=0 } flag { gsub(/^ \047/, \"\"); gsub(/\047 : [157],\$$/, \"\"); print }" meson.build | \ | |
| 511 | 541 | grep -v -e '#' -e '^$$' | \ | |
| 512 | 542 | sort >tmp-meson-diff/meson.adoc && \ | |
| 513 | - | ls git*.adoc scalar.adoc | grep -v -e git-bisect-lk2009.adoc -e git-pack-redundant.adoc -e git-tools.adoc >tmp-meson-diff/actual.adoc && \ | |
| 543 | + | ls git*.adoc scalar.adoc | \ | |
| 544 | + | grep -v -e git-bisect-lk2009.adoc \ | |
| 545 | + | -e git-pack-redundant.adoc \ | |
| 546 | + | -e git-tools.adoc \ | |
| 547 | + | -e git-whatchanged.adoc \ | |
| 548 | + | >tmp-meson-diff/actual.adoc && \ | |
| 514 | 549 | if ! cmp tmp-meson-diff/meson.adoc tmp-meson-diff/actual.adoc; then \ | |
| 515 | 550 | echo "Meson man pages differ from actual man pages:"; \ | |
| 516 | 551 | diff -u tmp-meson-diff/meson.adoc tmp-meson-diff/actual.adoc; \ | |
| @@ -523,6 +558,8 @@ lint-docs: lint-docs-fsck-msgids | |||
| 523 | 558 | lint-docs: lint-docs-gitlink | |
| 524 | 559 | lint-docs: lint-docs-man-end-blurb | |
| 525 | 560 | lint-docs: lint-docs-man-section-order | |
| 561 | + | lint-docs: lint-docs-delimited-sections | |
| 562 | + | lint-docs: lint-docs-doc-style | |
| 526 | 563 | lint-docs: lint-docs-manpages | |
| 527 | 564 | lint-docs: lint-docs-meson | |
| 528 | 565 | ||
modified Documentation/MyFirstContribution.adoc
| @@ -52,6 +52,15 @@ respond to you. It's better to ask your questions in the channel so that you | |||
| 52 | 52 | can be answered if you disconnect and so that others can learn from the | |
| 53 | 53 | conversation. | |
| 54 | 54 | ||
| 55 | + | ==== https://discord.gg/GRFVkzgxRd[#discord] on Discord | |
| 56 | + | This is an unofficial Git Discord server for everyone, from people just | |
| 57 | + | starting out with Git to those who develop it. It's a great place to ask | |
| 58 | + | questions, share tips, and connect with the broader Git community in real time. | |
| 59 | + | ||
| 60 | + | The server has channels for general discussions and specific channels for those | |
| 61 | + | who use Git and those who develop it. The server's search functionality also | |
| 62 | + | allows you to find previous conversations and answers to common questions. | |
| 63 | + | ||
| 55 | 64 | [[getting-started]] | |
| 56 | 65 | == Getting Started | |
| 57 | 66 | ||
| @@ -322,7 +331,8 @@ on the command line, including the name of our command. (If `prefix` is empty | |||
| 322 | 331 | for you, try `cd Documentation/ && ../bin-wrappers/git psuh`). That's not so | |
| 323 | 332 | helpful. So what other context can we get? | |
| 324 | 333 | ||
| 325 | - | Add a line to `#include "config.h"` and `#include "repository.h"`. | |
| 334 | + | Add a line to `#include "config.h"`, `#include "repository.h"` and | |
| 335 | + | `#include "environment.h"`. | |
| 326 | 336 | Then, add the following bits to the function body: | |
| 327 | 337 | function body: | |
| 328 | 338 | ||
| @@ -342,7 +352,7 @@ function body: | |||
| 342 | 352 | apply standard precedence rules. `repo_config_get_string_tmp()` will look up | |
| 343 | 353 | a specific key ("user.name") and give you the value. There are a number of | |
| 344 | 354 | single-key lookup functions like this one; you can see them all (and more info | |
| 345 | - | about how to use `repo_config()`) in `Documentation/technical/api-config.adoc`. | |
| 355 | + | about how to use `repo_config()`) in `config.h`. | |
| 346 | 356 | ||
| 347 | 357 | You should see that the name printed matches the one you see when you run: | |
| 348 | 358 | ||
| @@ -420,6 +430,7 @@ Add the following includes: | |||
| 420 | 430 | ---- | |
| 421 | 431 | #include "commit.h" | |
| 422 | 432 | #include "pretty.h" | |
| 433 | + | #include "strbuf.h" | |
| 423 | 434 | ---- | |
| 424 | 435 | ||
| 425 | 436 | Then, add the following lines within your implementation of `cmd_psuh()` near | |
| @@ -494,8 +505,8 @@ git-psuh - Delight users' typo with a shy horse | |||
| 494 | 505 | ||
| 495 | 506 | SYNOPSIS | |
| 496 | 507 | -------- | |
| 497 | - | [verse] | |
| 498 | - | 'git-psuh [<arg>...]' | |
| 508 | + | [synopsis] | |
| 509 | + | git psuh [<arg>...] | |
| 499 | 510 | ||
| 500 | 511 | DESCRIPTION | |
| 501 | 512 | ----------- | |
| @@ -717,9 +728,10 @@ $ prove -j$(nproc) --shuffle t[0-9]*.sh | |||
| 717 | 728 | ---- | |
| 718 | 729 | ||
| 719 | 730 | NOTE: You can also do this with `make test` or use any testing harness which can | |
| 720 | - | speak TAP. `prove` can run concurrently. `shuffle` randomizes the order the | |
| 721 | - | tests are run in, which makes them resilient against unwanted inter-test | |
| 722 | - | dependencies. `prove` also makes the output nicer. | |
| 731 | + | speak TAP. `prove` can run concurrently. `-j$(nproc)` runs tests using all | |
| 732 | + | available CPUs in parallel, but the job count can be adjusted as needed. | |
| 733 | + | `shuffle` randomizes the order the tests are run in, which makes them resilient | |
| 734 | + | against unwanted inter-test dependencies. `prove` also makes the output nicer. | |
| 723 | 735 | ||
| 724 | 736 | Go ahead and commit this change, as well. | |
| 725 | 737 | ||
| @@ -778,7 +790,7 @@ We can note a few things: | |||
| 778 | 790 | v3", etc. in place of "PATCH". For example, "[PATCH v2 1/3]" would be the first of | |
| 779 | 791 | three patches in the second iteration. Each iteration is sent with a new cover | |
| 780 | 792 | letter (like "[PATCH v2 0/3]" above), itself a reply to the cover letter of the | |
| 781 | - | previous iteration (more on that below). | |
| 793 | + | first iteration (more on that below). | |
| 782 | 794 | ||
| 783 | 795 | NOTE: A single-patch topic is sent with "[PATCH]", "[PATCH v2]", etc. without | |
| 784 | 796 | _i_/_n_ numbering (in the above thread overview, no single-patch topic appears, | |
| @@ -821,7 +833,7 @@ This patchset is part of the MyFirstContribution tutorial and should not | |||
| 821 | 833 | be merged. | |
| 822 | 834 | ---- | |
| 823 | 835 | ||
| 824 | - | At this point the tutorial diverges, in order to demonstrate two | |
| 836 | + | At this point the tutorial diverges, in order to demonstrate three | |
| 825 | 837 | different methods of formatting your patchset and getting it reviewed. | |
| 826 | 838 | ||
| 827 | 839 | The first method to be covered is GitGitGadget, which is useful for those | |
| @@ -833,9 +845,14 @@ more fine-grained control over the emails to be sent. This method requires some | |||
| 833 | 845 | setup which can change depending on your system and will not be covered in this | |
| 834 | 846 | tutorial. | |
| 835 | 847 | ||
| 848 | + | The third method to be covered is `b4`, which builds on top of `git | |
| 849 | + | format-patch` and `git send-email`. This method is the recommended way to | |
| 850 | + | submit patches via mail as it automates a lot of the bookkeeping required by | |
| 851 | + | `git send-email`. | |
| 852 | + | ||
| 836 | 853 | Regardless of which method you choose, your engagement with reviewers will be | |
| 837 | - | the same; the review process will be covered after the sections on GitGitGadget | |
| 838 | - | and `git send-email`. | |
| 854 | + | the same; the review process will be covered after the sections on GitGitGadget, | |
| 855 | + | `git send-email` and `b4`. | |
| 839 | 856 | ||
| 840 | 857 | [[howto-ggg]] | |
| 841 | 858 | == Sending Patches via GitGitGadget | |
| @@ -908,10 +925,13 @@ Now you should be able to go and check out your newly created branch on GitHub. | |||
| 908 | 925 | === Sending a PR to GitGitGadget | |
| 909 | 926 | ||
| 910 | 927 | In order to have your code tested and formatted for review, you need to start by | |
| 911 | - | opening a Pull Request against `gitgitgadget/git`. Head to | |
| 912 | - | https://github.com/gitgitgadget/git and open a PR either with the "New pull | |
| 913 | - | request" button or the convenient "Compare & pull request" button that may | |
| 914 | - | appear with the name of your newly pushed branch. | |
| 928 | + | opening a Pull Request against either `gitgitgadget/git` or `git/git`. Head to | |
| 929 | + | https://github.com/gitgitgadget/git or https://github.com/git/git and open a PR | |
| 930 | + | either with the "New pull request" button or the convenient "Compare & pull | |
| 931 | + | request" button that may appear with the name of your newly pushed branch. | |
| 932 | + | ||
| 933 | + | The differences between using `gitgitgadget/git` and `git/git` as your base can | |
| 934 | + | be found [here](https://gitgitgadget.github.io/#should-i-use-gitgitgadget-on-gitgitgadgets-git-fork-or-on-gits-github-mirror) | |
| 915 | 935 | ||
| 916 | 936 | Review the PR's title and description, as they're used by GitGitGadget | |
| 917 | 937 | respectively as the subject and body of the cover letter for your change. Refer | |
| @@ -1141,6 +1161,11 @@ NOTE: When you are sending a real patch, it will go to git@vger.kernel.org - but | |||
| 1141 | 1161 | please don't send your patchset from the tutorial to the real mailing list! For | |
| 1142 | 1162 | now, you can send it to yourself, to make sure you understand how it will look. | |
| 1143 | 1163 | ||
| 1164 | + | NOTE: After sending your patches, you can confirm that they reached the mailing | |
| 1165 | + | list by visiting https://lore.kernel.org/git/. Use the search bar to find your | |
| 1166 | + | name or the subject of your patch. If it appears, your email was successfully | |
| 1167 | + | delivered. | |
| 1168 | + | ||
| 1144 | 1169 | After you run the command above, you will be presented with an interactive | |
| 1145 | 1170 | prompt for each patch that's about to go out. This gives you one last chance to | |
| 1146 | 1171 | edit or quit sending something (but again, don't edit code this way). Once you | |
| @@ -1194,7 +1219,7 @@ between your last version and now, if it's something significant. You do not | |||
| 1194 | 1219 | need the exact same body in your second cover letter; focus on explaining to | |
| 1195 | 1220 | reviewers the changes you've made that may not be as visible. | |
| 1196 | 1221 | ||
| 1197 | - | You will also need to go and find the Message-ID of your previous cover letter. | |
| 1222 | + | You will also need to go and find the Message-ID of your first cover letter. | |
| 1198 | 1223 | You can either note it when you send the first series, from the output of `git | |
| 1199 | 1224 | send-email`, or you can look it up on the | |
| 1200 | 1225 | https://lore.kernel.org/git[mailing list]. Find your cover letter in the | |
| @@ -1207,8 +1232,8 @@ Message-ID: <foo.12345.author@example.com> | |||
| 1207 | 1232 | ||
| 1208 | 1233 | Your Message-ID is `<foo.12345.author@example.com>`. This example will be used | |
| 1209 | 1234 | below as well; make sure to replace it with the correct Message-ID for your | |
| 1210 | - | **previous cover letter** - that is, if you're sending v2, use the Message-ID | |
| 1211 | - | from v1; if you're sending v3, use the Message-ID from v2. | |
| 1235 | + | **first cover letter** - that is, for any subsequent version that you send, | |
| 1236 | + | always use the Message-ID from v1. | |
| 1212 | 1237 | ||
| 1213 | 1238 | While you're looking at the email, you should also note who is CC'd, as it's | |
| 1214 | 1239 | common practice in the mailing list to keep all CCs on a thread. You can add | |
| @@ -1276,6 +1301,87 @@ index 88f126184c..38da593a60 100644 | |||
| 1276 | 1301 | 2.21.0.392.gf8f6787159e-goog | |
| 1277 | 1302 | ---- | |
| 1278 | 1303 | ||
| 1304 | + | [[howto-b4]] | |
| 1305 | + | == Sending Patches with `b4` | |
| 1306 | + | ||
| 1307 | + | `b4` is a tool that builds on top of `git format-patch` and `git send-email`. | |
| 1308 | + | It automates much of the bookkeeping involved in sending a patch series to a | |
| 1309 | + | mailing-list-based project. | |
| 1310 | + | ||
| 1311 | + | Refer to the https://b4.docs.kernel.org/[b4 documentation] for a full reference. | |
| 1312 | + | ||
| 1313 | + | [[prep-b4]] | |
| 1314 | + | === Preparing a Patch Series | |
| 1315 | + | ||
| 1316 | + | `b4` tracks your patch series as a branch. To start tracking the `psuh` branch | |
| 1317 | + | you have been working on, run: | |
| 1318 | + | ||
| 1319 | + | ---- | |
| 1320 | + | $ b4 prep --enroll master | |
| 1321 | + | ---- | |
| 1322 | + | ||
| 1323 | + | This enrolls the current branch, using `master` as the base of the topic. `b4` | |
| 1324 | + | manages the cover letter as part of the branch, so you can edit it at any time | |
| 1325 | + | with: | |
| 1326 | + | ||
| 1327 | + | ---- | |
| 1328 | + | $ b4 prep --edit-cover | |
| 1329 | + | ---- | |
| 1330 | + | ||
| 1331 | + | The cover letter not only tracks the content of the top-level mail, but also | |
| 1332 | + | the set of recipients. You can add recipients by adding `To:` and `Cc:` | |
| 1333 | + | trailer lines. | |
| 1334 | + | ||
| 1335 | + | [[send-b4]] | |
| 1336 | + | === Sending the Patches | |
| 1337 | + | ||
| 1338 | + | Before sending the series out for real, you can inspect what `b4` would send by | |
| 1339 | + | passing `--dry-run`: | |
| 1340 | + | ||
| 1341 | + | ---- | |
| 1342 | + | $ b4 send --dry-run | |
| 1343 | + | ---- | |
| 1344 | + | ||
| 1345 | + | Once you are happy with the result, send the series with: | |
| 1346 | + | ||
| 1347 | + | ---- | |
| 1348 | + | $ b4 send | |
| 1349 | + | ---- | |
| 1350 | + | ||
| 1351 | + | [[v2-b4]] | |
| 1352 | + | === Sending v2 | |
| 1353 | + | ||
| 1354 | + | When you are ready to send a new iteration of your series, refine your | |
| 1355 | + | patches as usual using linkgit:git-rebase[1]. Note that you typically want to | |
| 1356 | + | rebase on top of the cover letter. You can configure an alias to enable easy | |
| 1357 | + | rebases going forward: | |
| 1358 | + | ||
| 1359 | + | --- | |
| 1360 | + | $ git config set alias.b4-rebase 'rebase "HEAD^{/--- b4-submit-tracking ---}"' | |
| 1361 | + | $ git b4-rebase -i | |
| 1362 | + | --- | |
| 1363 | + | ||
| 1364 | + | Before sending out the new version you should also update the cover letter with | |
| 1365 | + | `b4 prep --edit-cover` to note the relevant changes compared to the previous | |
| 1366 | + | version. You can inspect the changes between the two versions with `b4 prep | |
| 1367 | + | --compare-to=v1`. | |
| 1368 | + | ||
| 1369 | + | Same as with the first version, you can use `b4 send` to send out the second | |
| 1370 | + | version. `b4` automatically bumps the version to `v2`, generates the range-diff | |
| 1371 | + | against the previous iteration, and threads the new series as a reply to the | |
| 1372 | + | cover letter of the first version. | |
| 1373 | + | ||
| 1374 | + | [[configure-b4]] | |
| 1375 | + | === Configure b4 | |
| 1376 | + | ||
| 1377 | + | `b4` can be configured via linkgit:git-config[1]. In addition to that, projects | |
| 1378 | + | can have their own set of defaults in `.b4-config` in the root tree, which also | |
| 1379 | + | uses Git's config format. The user's configuration always takes precedence over | |
| 1380 | + | the per-project defaults. | |
| 1381 | + | ||
| 1382 | + | Refer to the https://b4.docs.kernel.org/en/latest/config.html[b4 config documentation] | |
| 1383 | + | for more information on the available options. | |
| 1384 | + | ||
| 1279 | 1385 | [[now-what]] | |
| 1280 | 1386 | == My Patch Got Emailed - Now What? | |
| 1281 | 1387 | ||
| @@ -1310,6 +1416,28 @@ previous one" patches over 2 days), reviewers would strongly prefer if a | |||
| 1310 | 1416 | single polished version came 2 days later instead, and that version with | |
| 1311 | 1417 | fewer mistakes were the only one they would need to review. | |
| 1312 | 1418 | ||
| 1419 | + | This consideration applies not only when going from the initial patch to v2, | |
| 1420 | + | but also to later iterations of the same series. There is no fixed rule for how | |
| 1421 | + | long to wait before sending a new version. A useful default is to send at most | |
| 1422 | + | one new version of the same patch series per day. This gives multiple reviewers | |
| 1423 | + | time to comment, gives reviewers across time zones a fair chance to | |
| 1424 | + | participate, lets you batch feedback together, and gives you time to think | |
| 1425 | + | through the comments you received. Knowing that you should not immediately send | |
| 1426 | + | another version also encourages you to review the patches more carefully before | |
| 1427 | + | sending them, catch small mistakes such as typos and off-by-one errors | |
| 1428 | + | yourself, and let reviewers spend more of their attention on design, | |
| 1429 | + | algorithms, and other substantial issues. | |
| 1430 | + | ||
| 1431 | + | The right timing depends on the topic and the feedback. Larger series usually | |
| 1432 | + | need more review time. If the only comments so far are minor, such as typo | |
| 1433 | + | fixes, it often makes sense to wait a little longer in case deeper reviews are | |
| 1434 | + | still coming. If the comments call for substantial rework, do not rush out an | |
| 1435 | + | updated version before you have reviewed the larger changes carefully. Instead, | |
| 1436 | + | reply to the review that prompted the rewrite, say that you are preparing a | |
| 1437 | + | substantial rework, and mention which parts of the current series will become | |
| 1438 | + | obsolete so reviewers can avoid spending time on them until the updated series | |
| 1439 | + | is ready. | |
| 1440 | + | ||
| 1313 | 1441 | ||
| 1314 | 1442 | [[reviewing]] | |
| 1315 | 1443 | === Responding to Reviews | |
| @@ -1317,11 +1445,13 @@ fewer mistakes were the only one they would need to review. | |||
| 1317 | 1445 | After a few days, you will hopefully receive a reply to your patchset with some | |
| 1318 | 1446 | comments. Woohoo! Now you can get back to work. | |
| 1319 | 1447 | ||
| 1320 | - | It's good manners to reply to each comment, notifying the reviewer that you have | |
| 1321 | - | made the change suggested, feel the original is better, or that the comment | |
| 1322 | - | inspired you to do something a new way which is superior to both the original | |
| 1323 | - | and the suggested change. This way reviewers don't need to inspect your v2 to | |
| 1324 | - | figure out whether you implemented their comment or not. | |
| 1448 | + | It's good manners to reply to each comment in the mailing list discussion | |
| 1449 | + | instead of letting the next version of your patch be your only response. Tell | |
| 1450 | + | the reviewer whether you plan to make the suggested change, keep the original, | |
| 1451 | + | or pursue a different approach. This way reviewers can respond to your reasoning | |
| 1452 | + | before you spend time preparing a version they may not agree with, and later do | |
| 1453 | + | not need to inspect your v2 to figure out whether you implemented their comment | |
| 1454 | + | or not. | |
| 1325 | 1455 | ||
| 1326 | 1456 | Reviewers may ask you about what you wrote in the patchset, either in | |
| 1327 | 1457 | the proposed commit log message or in the changes themselves. You | |
| @@ -1347,6 +1477,11 @@ effect which had not occurred to you. It is always okay to ask for clarification | |||
| 1347 | 1477 | if you aren't sure why a change was suggested, or what the reviewer is asking | |
| 1348 | 1478 | you to do. | |
| 1349 | 1479 | ||
| 1480 | + | When replying to review comments, quote only the parts of the message that are | |
| 1481 | + | relevant to your response. It is usually helpful to trim away unrelated context, | |
| 1482 | + | such as large portions of the patch that are not being discussed, while keeping | |
| 1483 | + | enough quoted text for readers to understand what you are responding to. | |
| 1484 | + | ||
| 1350 | 1485 | Make sure your email client has a plaintext email mode and it is turned on; the | |
| 1351 | 1486 | Git list rejects HTML email. Please also follow the mailing list etiquette | |
| 1352 | 1487 | outlined in the | |
modified Documentation/MyFirstObjectWalk.adoc
| @@ -43,7 +43,7 @@ Open up a new file `builtin/walken.c` and set up the command handler: | |||
| 43 | 43 | #include "builtin.h" | |
| 44 | 44 | #include "trace.h" | |
| 45 | 45 | ||
| 46 | - | int cmd_walken(int argc, const char **argv, const char *prefix) | |
| 46 | + | int cmd_walken(int argc, const char **argv, const char *prefix, struct repository *repo) | |
| 47 | 47 | { | |
| 48 | 48 | trace_printf(_("cmd_walken incoming...\n")); | |
| 49 | 49 | return 0; | |
| @@ -83,23 +83,36 @@ int cmd_walken(int argc, const char **argv, const char *prefix) | |||
| 83 | 83 | } | |
| 84 | 84 | ---- | |
| 85 | 85 | ||
| 86 | - | Also add the relevant line in `builtin.h` near `cmd_whatchanged()`: | |
| 86 | + | Also add the relevant line in `builtin.h` near `cmd_version()`: | |
| 87 | 87 | ||
| 88 | 88 | ---- | |
| 89 | - | int cmd_walken(int argc, const char **argv, const char *prefix); | |
| 89 | + | int cmd_walken(int argc, const char **argv, const char *prefix, struct repository *repo); | |
| 90 | 90 | ---- | |
| 91 | 91 | ||
| 92 | - | Include the command in `git.c` in `commands[]` near the entry for `whatchanged`, | |
| 92 | + | Include the command in `git.c` in `commands[]` near the entry for `version`, | |
| 93 | 93 | maintaining alphabetical ordering: | |
| 94 | 94 | ||
| 95 | 95 | ---- | |
| 96 | 96 | { "walken", cmd_walken, RUN_SETUP }, | |
| 97 | 97 | ---- | |
| 98 | 98 | ||
| 99 | - | Add it to the `Makefile` near the line for `builtin/worktree.o`: | |
| 99 | + | Add an entry for the new command in the both the Make and Meson build system, | |
| 100 | + | before the entry for `worktree`: | |
| 100 | 101 | ||
| 102 | + | - In the `Makefile`: | |
| 101 | 103 | ---- | |
| 104 | + | ... | |
| 102 | 105 | BUILTIN_OBJS += builtin/walken.o | |
| 106 | + | ... | |
| 107 | + | ---- | |
| 108 | + | ||
| 109 | + | - In the `meson.build` file: | |
| 110 | + | ---- | |
| 111 | + | builtin_sources = [ | |
| 112 | + | ... | |
| 113 | + | 'builtin/walken.c', | |
| 114 | + | ... | |
| 115 | + | ] | |
| 103 | 116 | ---- | |
| 104 | 117 | ||
| 105 | 118 | Build and test out your command, without forgetting to ensure the `DEVELOPER` | |
| @@ -193,7 +206,7 @@ initialization functions. | |||
| 193 | 206 | ||
| 194 | 207 | Next, we should have a look at any relevant configuration settings (i.e., | |
| 195 | 208 | settings readable and settable from `git config`). This is done by providing a | |
| 196 | - | callback to `git_config()`; within that callback, you can also invoke methods | |
| 209 | + | callback to `repo_config()`; within that callback, you can also invoke methods | |
| 197 | 210 | from other components you may need that need to intercept these options. Your | |
| 198 | 211 | callback will be invoked once per each configuration value which Git knows about | |
| 199 | 212 | (global, local, worktree, etc.). | |
| @@ -221,14 +234,14 @@ static int git_walken_config(const char *var, const char *value, | |||
| 221 | 234 | } | |
| 222 | 235 | ---- | |
| 223 | 236 | ||
| 224 | - | Make sure to invoke `git_config()` with it in your `cmd_walken()`: | |
| 237 | + | Make sure to invoke `repo_config()` with it in your `cmd_walken()`: | |
| 225 | 238 | ||
| 226 | 239 | ---- | |
| 227 | - | int cmd_walken(int argc, const char **argv, const char *prefix) | |
| 240 | + | int cmd_walken(int argc, const char **argv, const char *prefix, struct repository *repo) | |
| 228 | 241 | { | |
| 229 | 242 | ... | |
| 230 | 243 | ||
| 231 | - | git_config(git_walken_config, NULL); | |
| 244 | + | repo_config(repo, git_walken_config, NULL); | |
| 232 | 245 | ||
| 233 | 246 | ... | |
| 234 | 247 | } | |
| @@ -250,14 +263,14 @@ We'll also need to include the `revision.h` header: | |||
| 250 | 263 | ||
| 251 | 264 | ... | |
| 252 | 265 | ||
| 253 | - | int cmd_walken(int argc, const char **argv, const char *prefix) | |
| 266 | + | int cmd_walken(int argc, const char **argv, const char *prefix, struct repository *repo) | |
| 254 | 267 | { | |
| 255 | 268 | /* This can go wherever you like in your declarations.*/ | |
| 256 | 269 | struct rev_info rev; | |
| 257 | 270 | ... | |
| 258 | 271 | ||
| 259 | - | /* This should go after the git_config() call. */ | |
| 260 | - | repo_init_revisions(the_repository, &rev, prefix); | |
| 272 | + | /* This should go after the repo_config() call. */ | |
| 273 | + | repo_init_revisions(repo, &rev, prefix); | |
| 261 | 274 | ||
| 262 | 275 | ... | |
| 263 | 276 | } | |
| @@ -305,7 +318,7 @@ Then let's invoke `final_rev_info_setup()` after the call to | |||
| 305 | 318 | `repo_init_revisions()`: | |
| 306 | 319 | ||
| 307 | 320 | ---- | |
| 308 | - | int cmd_walken(int argc, const char **argv, const char *prefix) | |
| 321 | + | int cmd_walken(int argc, const char **argv, const char *prefix, struct repository *repo) | |
| 309 | 322 | { | |
| 310 | 323 | ... | |
| 311 | 324 | ||
modified Documentation/RelNotes/1.6.2.4.adoc
| @@ -37,3 +37,4 @@ exec >/var/tmp/1 | |||
| 37 | 37 | echo O=$(git describe maint) | |
| 38 | 38 | O=v1.6.2.3-38-g318b847 | |
| 39 | 39 | git shortlog --no-merges $O..maint | |
| 40 | + | --- | |
added Documentation/RelNotes/2.43.7.adoc mode 100644
| @@ -0,0 +1,73 @@ | |||
| 1 | + | Git v2.43.7 Release Notes | |
| 2 | + | ========================= | |
| 3 | + | ||
| 4 | + | This release includes fixes for CVE-2025-27613, CVE-2025-27614, | |
| 5 | + | CVE-2025-46334, CVE-2025-46835, CVE-2025-48384, CVE-2025-48385, and | |
| 6 | + | CVE-2025-48386. | |
| 7 | + | ||
| 8 | + | Fixes since v2.43.6 | |
| 9 | + | ------------------- | |
| 10 | + | ||
| 11 | + | * CVE-2025-27613, Gitk: | |
| 12 | + | ||
| 13 | + | When a user clones an untrusted repository and runs Gitk without | |
| 14 | + | additional command arguments, any writable file can be created and | |
| 15 | + | truncated. The option "Support per-file encoding" must have been | |
| 16 | + | enabled. The operation "Show origin of this line" is affected as | |
| 17 | + | well, regardless of the option being enabled or not. | |
| 18 | + | ||
| 19 | + | * CVE-2025-27614, Gitk: | |
| 20 | + | ||
| 21 | + | A Git repository can be crafted in such a way that a user who has | |
| 22 | + | cloned the repository can be tricked into running any script | |
| 23 | + | supplied by the attacker by invoking `gitk filename`, where | |
| 24 | + | `filename` has a particular structure. | |
| 25 | + | ||
| 26 | + | * CVE-2025-46334, Git GUI (Windows only): | |
| 27 | + | ||
| 28 | + | A malicious repository can ship versions of sh.exe or typical | |
| 29 | + | textconv filter programs such as astextplain. On Windows, path | |
| 30 | + | lookup can find such executables in the worktree. These programs | |
| 31 | + | are invoked when the user selects "Git Bash" or "Browse Files" from | |
| 32 | + | the menu. | |
| 33 | + | ||
| 34 | + | * CVE-2025-46835, Git GUI: | |
| 35 | + | ||
| 36 | + | When a user clones an untrusted repository and is tricked into | |
| 37 | + | editing a file located in a maliciously named directory in the | |
| 38 | + | repository, then Git GUI can create and overwrite any writable | |
| 39 | + | file. | |
| 40 | + | ||
| 41 | + | * CVE-2025-48384, Git: | |
| 42 | + | ||
| 43 | + | When reading a config value, Git strips any trailing carriage | |
| 44 | + | return and line feed (CRLF). When writing a config entry, values | |
| 45 | + | with a trailing CR are not quoted, causing the CR to be lost when | |
| 46 | + | the config is later read. When initializing a submodule, if the | |
| 47 | + | submodule path contains a trailing CR, the altered path is read | |
| 48 | + | resulting in the submodule being checked out to an incorrect | |
| 49 | + | location. If a symlink exists that points the altered path to the | |
| 50 | + | submodule hooks directory, and the submodule contains an executable | |
| 51 | + | post-checkout hook, the script may be unintentionally executed | |
| 52 | + | after checkout. | |
| 53 | + | ||
| 54 | + | * CVE-2025-48385, Git: | |
| 55 | + | ||
| 56 | + | When cloning a repository Git knows to optionally fetch a bundle | |
| 57 | + | advertised by the remote server, which allows the server-side to | |
| 58 | + | offload parts of the clone to a CDN. The Git client does not | |
| 59 | + | perform sufficient validation of the advertised bundles, which | |
| 60 | + | allows the remote side to perform protocol injection. | |
| 61 | + | ||
| 62 | + | This protocol injection can cause the client to write the fetched | |
| 63 | + | bundle to a location controlled by the adversary. The fetched | |
| 64 | + | content is fully controlled by the server, which can in the worst | |
| 65 | + | case lead to arbitrary code execution. | |
| 66 | + | ||
| 67 | + | * CVE-2025-48386, Git: | |
| 68 | + | ||
| 69 | + | The wincred credential helper uses a static buffer (`target`) as a | |
| 70 | + | unique key for storing and comparing against internal storage. This | |
| 71 | + | credential helper does not properly bounds check the available | |
| 72 | + | space remaining in the buffer before appending to it with | |
| 73 | + | `wcsncat()`, leading to potential buffer overflows. | |
added Documentation/RelNotes/2.44.4.adoc mode 100644
| @@ -0,0 +1,7 @@ | |||
| 1 | + | Git v2.44.4 Release Notes | |
| 2 | + | ========================= | |
| 3 | + | ||
| 4 | + | This release merges up the fixes that appears in v2.43.7 to address | |
| 5 | + | the following CVEs: CVE-2025-27613, CVE-2025-27614, CVE-2025-46334, | |
| 6 | + | CVE-2025-46835, CVE-2025-48384, CVE-2025-48385, and CVE-2025-48386. | |
| 7 | + | See the release notes for v2.43.7 for details. | |
added Documentation/RelNotes/2.45.4.adoc mode 100644
| @@ -0,0 +1,7 @@ | |||
| 1 | + | Git v2.45.4 Release Notes | |
| 2 | + | ========================= | |
| 3 | + | ||
| 4 | + | This release merges up the fixes that appears in v2.43.7, and v2.44.4 | |
| 5 | + | to address the following CVEs: CVE-2025-27613, CVE-2025-27614, | |
| 6 | + | CVE-2025-46334, CVE-2025-46835, CVE-2025-48384, CVE-2025-48385, and | |
| 7 | + | CVE-2025-48386. See the release notes for v2.43.7 for details. | |
added Documentation/RelNotes/2.46.4.adoc mode 100644
| @@ -0,0 +1,7 @@ | |||
| 1 | + | Git v2.46.4 Release Notes | |
| 2 | + | ========================= | |
| 3 | + | ||
| 4 | + | This release merges up the fixes that appears in v2.43.7, v2.44.4, and | |
| 5 | + | v2.45.4 to address the following CVEs: CVE-2025-27613, CVE-2025-27614, | |
| 6 | + | CVE-2025-46334, CVE-2025-46835, CVE-2025-48384, CVE-2025-48385, and | |
| 7 | + | CVE-2025-48386. See the release notes for v2.43.7 for details. | |
added Documentation/RelNotes/2.47.3.adoc mode 100644
| @@ -0,0 +1,8 @@ | |||
| 1 | + | Git v2.47.3 Release Notes | |
| 2 | + | ========================= | |
| 3 | + | ||
| 4 | + | This release merges up the fixes that appears in v2.43.7, v2.44.4, | |
| 5 | + | v2.45.4, and v2.46.4 to address the following CVEs: CVE-2025-27613, | |
| 6 | + | CVE-2025-27614, CVE-2025-46334, CVE-2025-46835, CVE-2025-48384, | |
| 7 | + | CVE-2025-48385, and CVE-2025-48386. See the release notes for v2.43.7 | |
| 8 | + | for details. | |
added Documentation/RelNotes/2.48.2.adoc mode 100644
| @@ -0,0 +1,8 @@ | |||
| 1 | + | Git v2.48.2 Release Notes | |
| 2 | + | ========================= | |
| 3 | + | ||
| 4 | + | This release merges up the fixes that appears in v2.43.7, v2.44.4, | |
| 5 | + | v2.45.4, v2.46.4, and v2.47.3 to address the following CVEs: | |
| 6 | + | CVE-2025-27613, CVE-2025-27614, CVE-2025-46334, CVE-2025-46835, | |
| 7 | + | CVE-2025-48384, CVE-2025-48385, and CVE-2025-48386. See the release | |
| 8 | + | notes for v2.43.7 for details. | |
added Documentation/RelNotes/2.49.1.adoc mode 100644
| @@ -0,0 +1,12 @@ | |||
| 1 | + | Git v2.49.1 Release Notes | |
| 2 | + | ========================= | |
| 3 | + | ||
| 4 | + | This release merges up the fixes that appear in v2.43.7, v2.44.4, | |
| 5 | + | v2.45.4, v2.46.4, v2.47.3, and v2.48.2 to address the following CVEs: | |
| 6 | + | CVE-2025-27613, CVE-2025-27614, CVE-2025-46334, CVE-2025-46835, | |
| 7 | + | CVE-2025-48384, CVE-2025-48385, and CVE-2025-48386. See the release | |
| 8 | + | notes for v2.43.7 for details. | |
| 9 | + | ||
| 10 | + | It also contains some updates to various CI bits to work around | |
| 11 | + | and/or to adjust to the deprecation of use of Ubuntu 20.04 GitHub | |
| 12 | + | Actions CI, updates to to Fedora base image. | |
added Documentation/RelNotes/2.50.1.adoc mode 100644
| @@ -0,0 +1,8 @@ | |||
| 1 | + | Git v2.50.1 Release Notes | |
| 2 | + | ========================= | |
| 3 | + | ||
| 4 | + | This release merges up the fixes that appear in v2.43.7, v2.44.4, | |
| 5 | + | v2.45.4, v2.46.4, v2.47.3, v2.48.2, and v2.49.1 to address the | |
| 6 | + | following CVEs: CVE-2025-27613, CVE-2025-27614, CVE-2025-46334, | |
| 7 | + | CVE-2025-46835, CVE-2025-48384, CVE-2025-48385, and | |
| 8 | + | CVE-2025-48386. See the release notes for v2.43.7 for details. | |
added Documentation/RelNotes/2.51.0.adoc mode 100644
| @@ -0,0 +1,341 @@ | |||
| 1 | + | Git v2.51 Release Notes | |
| 2 | + | ======================= | |
| 3 | + | ||
| 4 | + | UI, Workflows & Features | |
| 5 | + | ------------------------ | |
| 6 | + | ||
| 7 | + | * Userdiff patterns for the R language have been added. | |
| 8 | + | ||
| 9 | + | * Documentation for "git send-email" has been updated with a bit more | |
| 10 | + | credential helper and OAuth information. | |
| 11 | + | ||
| 12 | + | * "git cat-file --batch" learns to understand %(objectmode) atom to | |
| 13 | + | allow the caller to tell missing objects (due to repository | |
| 14 | + | corruption) and submodules (whose commit objects are OK to be | |
| 15 | + | missing) apart. | |
| 16 | + | ||
| 17 | + | * "git diff --no-index dirA dirB" can limit the comparison with | |
| 18 | + | pathspec at the end of the command line, just like normal "git | |
| 19 | + | diff". | |
| 20 | + | ||
| 21 | + | * "git subtree" (in contrib/) learned to grok GPG signing its commits. | |
| 22 | + | ||
| 23 | + | * "git whatchanged" that is longer to type than "git log --raw" | |
| 24 | + | which is its modern rough equivalent has outlived its usefulness | |
| 25 | + | more than 10 years ago. Plan to deprecate and remove it. | |
| 26 | + | ||
| 27 | + | * An interchange format for stash entries is defined, and subcommand | |
| 28 | + | of "git stash" to import/export has been added. | |
| 29 | + | ||
| 30 | + | * "git merge/pull" has been taught the "--compact-summary" option to | |
| 31 | + | use the compact-summary format, intead of diffstat, when showing | |
| 32 | + | the summary of the incoming changes. | |
| 33 | + | ||
| 34 | + | * "git imap-send" has been broken for a long time, which has been | |
| 35 | + | resurrected and then taught to talk OAuth2.0 etc. | |
| 36 | + | ||
| 37 | + | * Some error messages from "git imap-send" has been updated. | |
| 38 | + | ||
| 39 | + | * When "git daemon" sees a signal while attempting to accept() a new | |
| 40 | + | client, instead of retrying, it skipped it by mistake, which has | |
| 41 | + | been corrected. | |
| 42 | + | ||
| 43 | + | * The reftable ref backend has matured enough; Git 3.0 will make it | |
| 44 | + | the default format in a newly created repositories by default. | |
| 45 | + | ||
| 46 | + | * "netrc" credential helper has been improved to understand textual | |
| 47 | + | service names (like smtp) in addition to the numeric port numbers | |
| 48 | + | (like 25). | |
| 49 | + | ||
| 50 | + | * Lift the limitation to use changed-path filter in "git log" so that | |
| 51 | + | it can be used for a pathspec with multiple literal paths. | |
| 52 | + | ||
| 53 | + | * Clean up the way how signature on commit objects are exported to | |
| 54 | + | and imported from fast-import stream. | |
| 55 | + | ||
| 56 | + | * Remove unsupported, unused, and unsupportable old option from "git | |
| 57 | + | log". | |
| 58 | + | ||
| 59 | + | * Document recently added "git imap-send --list" with an example. | |
| 60 | + | ||
| 61 | + | * "git pull" learned to pay attention to pull.autostash configuration | |
| 62 | + | variable, which overrides rebase/merge.autostash. | |
| 63 | + | ||
| 64 | + | * "git for-each-ref" learns "--start-after" option to help | |
| 65 | + | applications that want to page its output. | |
| 66 | + | ||
| 67 | + | * "git switch" and "git restore" are declared to be no longer | |
| 68 | + | experimental. | |
| 69 | + | ||
| 70 | + | * "git -c alias.foo=bar foo -h baz" reported "'foo' is aliased to | |
| 71 | + | 'bar'" and then went on to run "git foo -h baz", which was | |
| 72 | + | unexpected. Tighten the rule so that alias expansion is reported | |
| 73 | + | only when "-h" is the sole option. | |
| 74 | + | ||
| 75 | + | ||
| 76 | + | Performance, Internal Implementation, Development Support etc. | |
| 77 | + | -------------------------------------------------------------- | |
| 78 | + | ||
| 79 | + | * "git pack-objects" learned to find delta bases from blobs at the | |
| 80 | + | same path, using the --path-walk API. | |
| 81 | + | ||
| 82 | + | * CodingGuidelines update. | |
| 83 | + | ||
| 84 | + | * Add settings for Solaris 10 & 11. | |
| 85 | + | ||
| 86 | + | * Meson-based build/test framework now understands TAP output | |
| 87 | + | generated by our tests. | |
| 88 | + | ||
| 89 | + | * "Do not explicitly initialize to zero" rule has been clarified in | |
| 90 | + | the CodingGuidelines document. | |
| 91 | + | ||
| 92 | + | * A test helper "test_seq" function learned the "-f <fmt>" option, | |
| 93 | + | which allowed us to simplify a lot of test scripts. | |
| 94 | + | ||
| 95 | + | * A lot of stale stuff has been removed from the contrib/ hierarchy. | |
| 96 | + | ||
| 97 | + | * "git push" and "git fetch" are taught to update refs in batches to | |
| 98 | + | gain performance. | |
| 99 | + | ||
| 100 | + | * Some code paths in "git prune" used to ignore the passed-in | |
| 101 | + | repository object and used the `the_repository` singleton instance | |
| 102 | + | instead, which has been corrected. | |
| 103 | + | ||
| 104 | + | * Update ".clang-format" and ".editorconfig" to match our style guide | |
| 105 | + | a bit better. | |
| 106 | + | ||
| 107 | + | * "make coccicheck" succeeds even when spatch made suggestions, which | |
| 108 | + | has been updated to fail in such a case. | |
| 109 | + | ||
| 110 | + | * Code clean-up around object access API. | |
| 111 | + | ||
| 112 | + | * Define .precision to more canned parse-options type to avoid bugs | |
| 113 | + | coming from using a variable with a wrong type to capture the | |
| 114 | + | parsed values. | |
| 115 | + | ||
| 116 | + | * Flipping the default hash function to SHA-256 at Git 3.0 boundary | |
| 117 | + | is planned. | |
| 118 | + | ||
| 119 | + | * Declare weather-balloon we raised for "bool" type 18 months ago a | |
| 120 | + | success and officially allow using the type in our codebase. | |
| 121 | + | ||
| 122 | + | * GIT_TEST_INSTALLED was not honored in the recent topic related to | |
| 123 | + | SHA256 hashes, which has been corrected. | |
| 124 | + | ||
| 125 | + | * The pop_most_recent_commit() function can have quite expensive | |
| 126 | + | worst case performance characteristics, which has been optimized by | |
| 127 | + | using prio-queue data structure. | |
| 128 | + | ||
| 129 | + | * Move structure definition from unrelated header file to where it | |
| 130 | + | belongs. | |
| 131 | + | ||
| 132 | + | * To help our developers, document what C99 language features are | |
| 133 | + | being considered for adoption, in addition to what past experiments | |
| 134 | + | have already decided. | |
| 135 | + | ||
| 136 | + | * The reftable unit tests are now ported to the "clar" unit testing | |
| 137 | + | framework. | |
| 138 | + | ||
| 139 | + | * Redefine where the multi-pack-index sits in the object subsystem, | |
| 140 | + | which recently was restructured to allow multiple backends that | |
| 141 | + | support a single object source that belongs to one repository. A | |
| 142 | + | MIDX does span multiple "object sources". | |
| 143 | + | ||
| 144 | + | * Reduce implicit assumption and dependence on the_repository in the | |
| 145 | + | object-file subsystem. | |
| 146 | + | ||
| 147 | + | ||
| 148 | + | Fixes since v2.50 | |
| 149 | + | ----------------- | |
| 150 | + | ||
| 151 | + | Unless otherwise noted, all the changes in 2.50.X maintenance track, | |
| 152 | + | including security updates, are included in this release. | |
| 153 | + | ||
| 154 | + | * A memory-leak in an error code path has been plugged. | |
| 155 | + | (merge 7082da85cb ly/commit-graph-graph-write-leakfix later to maint). | |
| 156 | + | ||
| 157 | + | * A memory-leak in an error code path has been plugged. | |
| 158 | + | (merge aedebdb6b9 ly/fetch-pack-leakfix later to maint). | |
| 159 | + | ||
| 160 | + | * Some leftover references to documentation source files that no | |
| 161 | + | longer exist, due to recent ".txt" -> ".adoc" renaming, have been | |
| 162 | + | corrected. | |
| 163 | + | (merge 3717a5775a jw/doc-txt-to-adoc-refs later to maint). | |
| 164 | + | ||
| 165 | + | * "git stash -p <pathspec>" improvements. | |
| 166 | + | (merge 468817bab2 pw/stash-p-pathspec-fixes later to maint). | |
| 167 | + | ||
| 168 | + | * "git send-email" incremented its internal message counter when a | |
| 169 | + | message was edited, which made logic that treats the first message | |
| 170 | + | specially misbehave, which has been corrected. | |
| 171 | + | (merge 2cc27b3501 ag/send-email-edit-threading-fix later to maint). | |
| 172 | + | ||
| 173 | + | * "git stash" recorded a wrong branch name when submodules are | |
| 174 | + | present in the current checkout, which has been corrected. | |
| 175 | + | (merge ffb36c64f2 kj/stash-onbranch-submodule-fix later to maint). | |
| 176 | + | ||
| 177 | + | * When asking to apply mailmap to both author and committer field | |
| 178 | + | while showing a commit object, the field that appears later was not | |
| 179 | + | correctly parsed and replaced, which has been corrected. | |
| 180 | + | (merge abf94a283f sa/multi-mailmap-fix later to maint). | |
| 181 | + | ||
| 182 | + | * "git maintenance" lacked the care "git gc" had to avoid holding | |
| 183 | + | onto the repository lock for too long during packing refs, which | |
| 184 | + | has been remedied. | |
| 185 | + | (merge 1b5074e614 ps/maintenance-ref-lock later to maint). | |
| 186 | + | ||
| 187 | + | * Avoid regexp_constraint and instead use comparison_constraint when | |
| 188 | + | listing functions to exclude from application of coccinelle rules, | |
| 189 | + | as spatch can be built with different regexp engine X-<. | |
| 190 | + | (merge f2ad545813 jc/cocci-avoid-regexp-constraint later to maint). | |
| 191 | + | ||
| 192 | + | * Updating submodules from the upstream did not work well when | |
| 193 | + | submodule's HEAD is detached, which has been improved. | |
| 194 | + | (merge ca62f524c1 jk/submodule-remote-lookup-cleanup later to maint). | |
| 195 | + | ||
| 196 | + | * Remove unnecessary check from "git daemon" code. | |
| 197 | + | (merge 0c856224d2 cb/daemon-fd-check-fix later to maint). | |
| 198 | + | ||
| 199 | + | * Use of sysctl() system call to learn the total RAM size used on | |
| 200 | + | BSDs has been corrected. | |
| 201 | + | (merge 781c1cf571 cb/total-ram-bsd-fix later to maint). | |
| 202 | + | ||
| 203 | + | * Drop FreeBSD 4 support and declare that we support only FreeBSD 12 | |
| 204 | + | or later, which has memmem() supported. | |
| 205 | + | (merge 0392f976a7 bs/config-mak-freebsd later to maint). | |
| 206 | + | ||
| 207 | + | * A diff-filter with negative-only specification like "git log | |
| 208 | + | --diff-filter=d" did not trigger correctly, which has been fixed. | |
| 209 | + | (merge 375ac087c5 jk/all-negative-diff-filter-fix later to maint). | |
| 210 | + | ||
| 211 | + | * A failure to open the index file for writing due to conflicting | |
| 212 | + | access did not state what went wrong, which has been corrected. | |
| 213 | + | (merge 9455397a5c hy/read-cache-lock-error-fix later to maint). | |
| 214 | + | ||
| 215 | + | * Tempfile removal fix in the codepath to sign commits with SSH keys. | |
| 216 | + | (merge 4498127b04 re/ssh-sign-buffer-fix later to maint). | |
| 217 | + | ||
| 218 | + | * Code and test clean-up around string-list API. | |
| 219 | + | (merge 6e5b26c3ff sj/string-list later to maint). | |
| 220 | + | ||
| 221 | + | * "git apply -N" should start from the current index and register | |
| 222 | + | only new files, but it instead started from an empty index, which | |
| 223 | + | has been corrected. | |
| 224 | + | (merge 2b49d97fcb rp/apply-intent-to-add-fix later to maint). | |
| 225 | + | ||
| 226 | + | * Leakfix with a new and a bit invasive test on pack-bitmap files. | |
| 227 | + | (merge bfd5522e98 ly/load-bitmap-leakfix later to maint). | |
| 228 | + | ||
| 229 | + | * "git fetch --prune" used to be O(n^2) expensive when there are many | |
| 230 | + | refs, which has been corrected. | |
| 231 | + | (merge 87d8d8c5d0 ph/fetch-prune-optim later to maint). | |
| 232 | + | ||
| 233 | + | * When a ref creation at refs/heads/foo/bar fails, the files backend | |
| 234 | + | now removes refs/heads/foo/ if the directory is otherwise not used. | |
| 235 | + | (merge a3a7f20516 ps/refs-files-remove-empty-parent later to maint). | |
| 236 | + | ||
| 237 | + | * "pack-objects" has been taught to avoid pointing into objects in | |
| 238 | + | cruft packs from midx. | |
| 239 | + | ||
| 240 | + | * "git remote" now detects remote names that overlap with each other | |
| 241 | + | (e.g., remote nickname "outer" and "outer/inner" are used at the | |
| 242 | + | same time), as it will lead to overlapping remote-tracking | |
| 243 | + | branches. | |
| 244 | + | (merge a5a727c448 jk/remote-avoid-overlapping-names later to maint). | |
| 245 | + | ||
| 246 | + | * The gpg.program configuration variable, which names a pathname to | |
| 247 | + | the (custom) GPG compatible program, can now be spelled with ~tilde | |
| 248 | + | expansion. | |
| 249 | + | (merge 7d275cd5c0 jb/gpg-program-variable-is-a-pathname later to maint). | |
| 250 | + | ||
| 251 | + | * Our <sane-ctype.h> header file relied on that the system-supplied | |
| 252 | + | <ctype.h> header is not later included, which would override our | |
| 253 | + | macro definitions, but "amazon linux" broke this assumption. Fix | |
| 254 | + | this by preemptively including <ctype.h> near the beginning of | |
| 255 | + | <sane-ctype.h> ourselves. | |
| 256 | + | (merge 9d3b33125f ps/sane-ctype-workaround later to maint). | |
| 257 | + | ||
| 258 | + | * Clean-up compat/bswap.h mess. | |
| 259 | + | (merge f4ac32c03a ss/compat-bswap-revamp later to maint). | |
| 260 | + | ||
| 261 | + | * Meson-based build did not handle libexecdir setting correctly, | |
| 262 | + | which has been corrected. | |
| 263 | + | (merge 056dbe8612 rj/meson-libexecdir-fix later to maint). | |
| 264 | + | ||
| 265 | + | * Document that we do not require "real" name when signing your | |
| 266 | + | patches off. | |
| 267 | + | (merge 1f0fed312a bc/contribution-under-non-real-names later to maint). | |
| 268 | + | ||
| 269 | + | * "git commit" that concludes a conflicted merge failed to notice and remove | |
| 270 | + | existing comment added automatically (like "# Conflicts:") when the | |
| 271 | + | core.commentstring is set to 'auto'. | |
| 272 | + | (merge 92b7c7c9f5 ac/auto-comment-char-fix later to maint). | |
| 273 | + | ||
| 274 | + | * "git rebase -i" with bogus rebase.instructionFormat configuration | |
| 275 | + | failed to produce the todo file after recording the state files, | |
| 276 | + | leading to confused "git status"; this has been corrected. | |
| 277 | + | (merge ade14bffd7 ow/rebase-verify-insn-fmt-before-initializing-state later to maint). | |
| 278 | + | ||
| 279 | + | * A few file descriptors left unclosed upon program completion in a | |
| 280 | + | few test helper programs are now closed. | |
| 281 | + | (merge 0f1b33815b hl/test-helper-fd-close later to maint). | |
| 282 | + | ||
| 283 | + | * Interactive prompt code did not correctly strip CRLF from the end | |
| 284 | + | of line on Windows. | |
| 285 | + | (merge 711a20827b js/prompt-crlf-fix later to maint). | |
| 286 | + | ||
| 287 | + | * The config API had a set of convenience wrapper functions that | |
| 288 | + | implicitly use the_repository instance; they have been removed and | |
| 289 | + | inlined at the calling sites. | |
| 290 | + | ||
| 291 | + | * "git add/etc -p" now honor the diff.context configuration variable, | |
| 292 | + | and also they learn to honor the -U<n> command-line option. | |
| 293 | + | (merge 2b3ae04011 lm/add-p-context later to maint). | |
| 294 | + | ||
| 295 | + | * The case where a new submodule takes a path where there used to be a | |
| 296 | + | completely different subproject is now dealt with a bit better than | |
| 297 | + | before. | |
| 298 | + | (merge 5ed8c5b465 kj/renamed-submodule later to maint). | |
| 299 | + | ||
| 300 | + | * The deflate codepath in "git archive --format=zip" had a | |
| 301 | + | longstanding bug coming from misuse of zlib API, which has been | |
| 302 | + | corrected. | |
| 303 | + | ||
| 304 | + | * Other code cleanup, docfix, build fix, etc. | |
| 305 | + | (merge b257adb571 lo/my-first-ow-doc-update later to maint). | |
| 306 | + | (merge 8b34b6a220 ly/sequencer-update-squash-is-fixup-only later to maint). | |
| 307 | + | (merge 5dceb8bd05 ly/do-not-localize-bug-messages later to maint). | |
| 308 | + | (merge 61372dd613 ly/commit-buffer-reencode-leakfix later to maint). | |
| 309 | + | (merge 81cd1eef7d ly/pack-bitmap-root-leakfix later to maint). | |
| 310 | + | (merge bfc9f9cc64 ly/submodule-update-failure-leakfix later to maint). | |
| 311 | + | (merge 65dff89c6b ma/doc-diff-cc-headers later to maint). | |
| 312 | + | (merge efb61591ee jm/bundle-uri-debug-output-to-fp later to maint). | |
| 313 | + | (merge a3d278bb64 ly/prepare-show-merge-leakfix later to maint). | |
| 314 | + | (merge 1fde1c5daf ac/preload-index-wo-the-repository later to maint). | |
| 315 | + | (merge 855cfc65ae rm/t2400-modernize later to maint). | |
| 316 | + | (merge 2939494284 ly/run-builtin-use-passed-in-repo later to maint). | |
| 317 | + | (merge ff73f375bb jg/mailinfo-leakfix later to maint). | |
| 318 | + | (merge 996f14c02b jj/doc-branch-markup-fix later to maint). | |
| 319 | + | (merge 1e77de1864 cb/ci-freebsd-update-to-14.3 later to maint). | |
| 320 | + | (merge b0e9d25865 jk/fix-leak-send-pack later to maint). | |
| 321 | + | (merge f3a9558c8c bs/remote-helpers-doc-markup-fix later to maint). | |
| 322 | + | (merge c4e9775c60 kh/doc-config-subcommands later to maint). | |
| 323 | + | (merge de404249ab ps/perlless-test-fixes later to maint). | |
| 324 | + | (merge 953049eed8 ts/merge-orig-head-doc-fix later to maint). | |
| 325 | + | (merge 0c83bbc704 rj/freebsd-sysinfo-build-fix later to maint). | |
| 326 | + | (merge ad7780b38f ps/doc-pack-refs-auto-with-files-backend-fix later to maint). | |
| 327 | + | (merge f4fa8a3687 rh/doc-glob-pathspec-fix later to maint). | |
| 328 | + | (merge b27be108c8 ja/doc-git-log-markup later to maint). | |
| 329 | + | (merge 14d7583beb pw/config-kvi-remove-path later to maint). | |
| 330 | + | (merge f31abb421d jc/do-not-scan-argv-without-parsing later to maint). | |
| 331 | + | (merge 26552cb62a jk/unleak-reflog-expire-entry later to maint). | |
| 332 | + | (merge 339d95fda9 jc/ci-print-test-failures-fix later to maint). | |
| 333 | + | (merge 8c3add51a8 cb/meson-avoid-broken-macos-pcre2 later to maint). | |
| 334 | + | (merge 5247da07b8 ps/meson-clar-decls-fix later to maint). | |
| 335 | + | (merge f3ef347bb2 ch/t7450-recursive-clone-test-fix later to maint). | |
| 336 | + | (merge 4ac3302a1a jc/doc-release-vs-clear later to maint). | |
| 337 | + | (merge 3bdd897413 ms/meson-with-ancient-git-wo-ls-files-dedup later to maint). | |
| 338 | + | (merge cca758d324 kh/doc-fast-import-historical later to maint). | |
| 339 | + | (merge 9b0781196a jc/test-hashmap-is-still-here later to maint). | |
| 340 | + | (merge 1bad05bacc jk/revert-squelch-compiler-warning later to maint). | |
| 341 | + | (merge 3a7e783d9c dl/squelch-maybe-uninitialized later to maint). | |
added Documentation/RelNotes/2.51.1.adoc mode 100644
| @@ -0,0 +1,99 @@ | |||
| 1 | + | Git 2.51.1 Release Notes | |
| 2 | + | ======================== | |
| 3 | + | ||
| 4 | + | There shouldn't be anything exciting to see here. This is primarily | |
| 5 | + | to flush the "do you still use it?" improvements that has landed on | |
| 6 | + | the master front, together with a handful of low-hanging, low-impact | |
| 7 | + | fixes that should be safe. | |
| 8 | + | ||
| 9 | + | ||
| 10 | + | Fixes since Git 2.51.0 | |
| 11 | + | ---------------------- | |
| 12 | + | ||
| 13 | + | * The "do you still use it?" message given by a command that is | |
| 14 | + | deeply deprecated and allow us to suggest alternatives has been | |
| 15 | + | updated. | |
| 16 | + | ||
| 17 | + | * The compatObjectFormat extension is used to hide an incomplete | |
| 18 | + | feature that is not yet usable for any purpose other than | |
| 19 | + | developing the feature further. Document it as such to discourage | |
| 20 | + | its use by mere mortals. | |
| 21 | + | ||
| 22 | + | * Manual page for "gitk" is updated with the current maintainer's | |
| 23 | + | name. | |
| 24 | + | ||
| 25 | + | * Update the instructions for using GGG in the MyFirstContribution | |
| 26 | + | document to say that a GitHub PR could be made against `git/git` | |
| 27 | + | instead of `gitgitgadget/git`. | |
| 28 | + | ||
| 29 | + | * Clang-format update to let our control macros be formatted the way we | |
| 30 | + | had them traditionally, e.g., "for_each_string_list_item()" without | |
| 31 | + | space before the parentheses. | |
| 32 | + | ||
| 33 | + | * A few places where a size_t value was cast to curl_off_t without | |
| 34 | + | checking has been updated to use the existing helper function. | |
| 35 | + | ||
| 36 | + | * The start_delayed_progress() function in the progress eye-candy API | |
| 37 | + | did not clear its internal state, making an initial delay value | |
| 38 | + | larger than 1 second ineffective, which has been corrected. | |
| 39 | + | ||
| 40 | + | * Makefile tried to run multiple "cargo build" which would not work | |
| 41 | + | very well; serialize their execution to work around this problem. | |
| 42 | + | ||
| 43 | + | * Adjust to the way newer versions of cURL selectively enable tracing | |
| 44 | + | options, so that our tests can continue to work. | |
| 45 | + | ||
| 46 | + | * During interactive rebase, using 'drop' on a merge commit led to | |
| 47 | + | an error, which has been corrected. | |
| 48 | + | ||
| 49 | + | * "git refs migrate" to migrate the reflog entries from a refs | |
| 50 | + | backend to another had a handful of bugs squashed. | |
| 51 | + | ||
| 52 | + | * "git push" had a code path that led to BUG() but it should have | |
| 53 | + | been a die(), as it is a response to a usual but invalid end-user | |
| 54 | + | action to attempt pushing an object that does not exist. | |
| 55 | + | ||
| 56 | + | * Various bugs about rename handling in "ort" merge strategy have | |
| 57 | + | been fixed. | |
| 58 | + | ||
| 59 | + | * "git diff --no-index" run inside a subdirectory under control of a | |
| 60 | + | Git repository operated at the top of the working tree and stripped | |
| 61 | + | the prefix from the output, and oddballs like "-" (stdin) did not | |
| 62 | + | work correctly because of it. Correct the set-up by undoing what | |
| 63 | + | the set-up sequence did to cwd and prefix. | |
| 64 | + | ||
| 65 | + | * Various options to "git diff" that make comparison ignore certain | |
| 66 | + | aspects of the differences (like "space changes are ignored", | |
| 67 | + | "differences in lines that match these regular expressions are | |
| 68 | + | ignored") did not work well with "--name-only" and friends. | |
| 69 | + | ||
| 70 | + | * Under a race against another process that is repacking the | |
| 71 | + | repository, especially a partially cloned one, "git fetch" may | |
| 72 | + | mistakenly think some objects we do have are missing, which has | |
| 73 | + | been corrected. | |
| 74 | + | ||
| 75 | + | * "git repack --path-walk" lost objects in some corner cases, which | |
| 76 | + | has been corrected. | |
| 77 | + | cf. <CABPp-BHFxxGrqKc0m==TjQNjDGdO=H5Rf6EFsf2nfE1=TuraOQ@mail.gmail.com> | |
| 78 | + | ||
| 79 | + | * Fixes multiple crashes around midx write-out codepaths. | |
| 80 | + | ||
| 81 | + | * A broken or malicious "git fetch" can say that it has the same | |
| 82 | + | object for many many times, and the upload-pack serving it can | |
| 83 | + | exhaust memory storing them redundantly, which has been corrected. | |
| 84 | + | ||
| 85 | + | * A corner case bug in "git log -L..." has been corrected. | |
| 86 | + | ||
| 87 | + | * Some among "git add -p" and friends ignored color.diff and/or | |
| 88 | + | color.ui configuration variables, which is an old regression, which | |
| 89 | + | has been corrected. | |
| 90 | + | ||
| 91 | + | * "git rebase -i" failed to clean-up the commit log message when the | |
| 92 | + | command commits the final one in a chain of "fixup" commands, which | |
| 93 | + | has been corrected. | |
| 94 | + | ||
| 95 | + | * Deal more gracefully with directory / file conflicts when the files | |
| 96 | + | backend is used for ref storage, by failing only the ones that are | |
| 97 | + | involved in the conflict while allowing others. | |
| 98 | + | ||
| 99 | + | Also contains various documentation updates, code cleanups and minor fixups. | |
added Documentation/RelNotes/2.51.2.adoc mode 100644
| @@ -0,0 +1,45 @@ | |||
| 1 | + | Git 2.51.2 Release Notes | |
| 2 | + | ======================== | |
| 3 | + | ||
| 4 | + | In addition to fixes for an unfortunate regression introduced in Git | |
| 5 | + | 2.51.1 that caused "git diff --quiet -w" to be not so quiet when there | |
| 6 | + | are additions, deletions and conflicts, this maintenance release merges | |
| 7 | + | more fixes/improvements that have landed on the master front, primarily | |
| 8 | + | to make the CI part of the system a bit more robust. | |
| 9 | + | ||
| 10 | + | ||
| 11 | + | Fixes since Git 2.51.1 | |
| 12 | + | ---------------------- | |
| 13 | + | ||
| 14 | + | * Recently we attempted to improve "git diff -w --quiet" and friends | |
| 15 | + | to handle cases where patch output would be suppressed, but it | |
| 16 | + | introduced a bug that emits unnecessary output, which has been | |
| 17 | + | corrected. | |
| 18 | + | ||
| 19 | + | * The code to squelch output from "git diff -w --name-status" | |
| 20 | + | etc. for paths that "git diff -w -p" would have stayed silent | |
| 21 | + | leaked output from dry-run patch generation, which has been | |
| 22 | + | corrected. | |
| 23 | + | ||
| 24 | + | * Windows "real-time monitoring" interferes with the execution of | |
| 25 | + | tests and affects negatively in both correctness and performance, | |
| 26 | + | which has been disabled in Gitlab CI. | |
| 27 | + | ||
| 28 | + | * An earlier addition to "git diff --no-index A B" to limit the | |
| 29 | + | output with pathspec after the two directories misbehaved when | |
| 30 | + | these directories were given with a trailing slash, which has been | |
| 31 | + | corrected. | |
| 32 | + | ||
| 33 | + | * The "--short" option of "git status" that meant output for humans | |
| 34 | + | and "-z" option to show NUL delimited output format did not mix | |
| 35 | + | well, and colored some but not all things. The command has been | |
| 36 | + | updated to color all elements consistently in such a case. | |
| 37 | + | ||
| 38 | + | * Unicode width table update. | |
| 39 | + | ||
| 40 | + | * Recent OpenSSH creates the Unix domain socket to communicate with | |
| 41 | + | ssh-agent under $HOME instead of /tmp, which causes our test to | |
| 42 | + | fail doe to overly long pathname in our test environment, which has | |
| 43 | + | been worked around by using "ssh-agent -T". | |
| 44 | + | ||
| 45 | + | Also contains various documentation updates, code cleanups and minor fixups. | |
added Documentation/RelNotes/2.52.0.adoc mode 100644
| @@ -0,0 +1,454 @@ | |||
| 1 | + | Git v2.52 Release Notes | |
| 2 | + | ======================= | |
| 3 | + | ||
| 4 | + | UI, Workflows & Features | |
| 5 | + | ------------------------ | |
| 6 | + | ||
| 7 | + | * The "list" subcommand of "git refs" acts as a front-end for | |
| 8 | + | "git for-each-ref". | |
| 9 | + | ||
| 10 | + | * "git cmd --help-all" now works outside repositories. | |
| 11 | + | ||
| 12 | + | * "git diff-tree" learned "--max-depth" option. | |
| 13 | + | ||
| 14 | + | * A new subcommand "git repo" gives users a way to grab various | |
| 15 | + | repository characteristics. | |
| 16 | + | ||
| 17 | + | * A new command "git last-modified" has been added to show the closest | |
| 18 | + | ancestor commit that touched each path. | |
| 19 | + | ||
| 20 | + | * The "git refs exists" command that works like "git show-ref --exists" | |
| 21 | + | has been added. | |
| 22 | + | ||
| 23 | + | * "git repo info" learns the short-hand option "-z" that is the same as | |
| 24 | + | "--format=nul", and learns to report the objects format used in the | |
| 25 | + | repository. | |
| 26 | + | ||
| 27 | + | * "core.commentChar=auto" that attempts to dynamically pick a | |
| 28 | + | suitable comment character is non-workable, as it is too much | |
| 29 | + | trouble to support for little benefit, and is marked as deprecated. | |
| 30 | + | ||
| 31 | + | * "git send-email" learned to drive "git imap-send" to store already | |
| 32 | + | sent e-mails in an IMAP folder. | |
| 33 | + | ||
| 34 | + | * The "promisor-remote" capability mechanism has been updated to | |
| 35 | + | allow the "partialCloneFilter" settings and the "token" value to be | |
| 36 | + | communicated from the server side. | |
| 37 | + | ||
| 38 | + | * Declare that "git init" that is not otherwise configured uses | |
| 39 | + | 'main' as the initial branch, not 'master', starting Git 3.0. | |
| 40 | + | ||
| 41 | + | * Keep giving hint about the default initial branch name for users | |
| 42 | + | who may be surprised after Git 3.0 switch-over. | |
| 43 | + | ||
| 44 | + | * The stash.index configuration variable can be set to make "git stash | |
| 45 | + | pop/apply" pretend that it was invoked with "--index". | |
| 46 | + | ||
| 47 | + | * "git fast-import" learned that "--signed-commits=<how>" option that | |
| 48 | + | corresponds to that of "git fast-export". | |
| 49 | + | ||
| 50 | + | * Marking a hunk 'selected' in "git add -p" and then splitting made | |
| 51 | + | all the split pieces 'selected'; this has been changed to make them | |
| 52 | + | all 'undecided', which gives better end-user experience. | |
| 53 | + | ||
| 54 | + | * Configuration variables that take a pathname as a value | |
| 55 | + | (e.g. blame.ignorerevsfile) can be marked as optional by prefixing | |
| 56 | + | ":(optional)" before its value. | |
| 57 | + | ||
| 58 | + | * Show 'P'ipe command in "git add -p". | |
| 59 | + | ||
| 60 | + | * "git sparse-checkout" subcommand learned a new "clean" action to | |
| 61 | + | prune otherwise unused working-tree files that are outside the | |
| 62 | + | areas of interest. | |
| 63 | + | ||
| 64 | + | * "git fast-import" is taught to handle signed tags, just like it | |
| 65 | + | recently learned to handle signed commits, in different ways. | |
| 66 | + | ||
| 67 | + | * A new configuration variable commitGraph.changedPaths allows to | |
| 68 | + | turn "--changed-paths" on by default for "git commit-graph". | |
| 69 | + | ||
| 70 | + | * "Symlink symref" has been added to the list of things that will | |
| 71 | + | disappear at Git 3.0 boundary. | |
| 72 | + | ||
| 73 | + | * "git maintenance" command learns the "geometric" strategy where it | |
| 74 | + | avoids doing maintenance tasks that rebuilds everything from | |
| 75 | + | scratch. | |
| 76 | + | ||
| 77 | + | * "git repo structure", a new command. | |
| 78 | + | ||
| 79 | + | * The help text and manual page of "git bisect" command have been | |
| 80 | + | made consistent with each other. | |
| 81 | + | ||
| 82 | + | ||
| 83 | + | Performance, Internal Implementation, Development Support etc. | |
| 84 | + | -------------------------------------------------------------- | |
| 85 | + | ||
| 86 | + | * string_list_split*() family of functions have been extended to | |
| 87 | + | simplify common use cases. | |
| 88 | + | ||
| 89 | + | * Arrays of strbuf is often a wrong data structure to use, and | |
| 90 | + | strbuf_split*() family of functions that create them often have | |
| 91 | + | better alternatives. Update several code paths and replace | |
| 92 | + | strbuf_split*(). | |
| 93 | + | ||
| 94 | + | * Revision traversal limited with pathspec, like "git log dir/*", | |
| 95 | + | used to ignore changed-paths Bloom filter when the pathspec | |
| 96 | + | contained wildcards; now they take advantage of the filter when | |
| 97 | + | they can. | |
| 98 | + | ||
| 99 | + | * Doc lint updates to encourage the newer and easier-to-use | |
| 100 | + | `synopsis` format, with fixes to a handful of existing uses. | |
| 101 | + | ||
| 102 | + | * Remove dependency on the_repository and other globals from the | |
| 103 | + | commit-graph code, and other changes unrelated to de-globaling. | |
| 104 | + | ||
| 105 | + | * Discord has been added to the first contribution documentation as | |
| 106 | + | another way to ask for help. | |
| 107 | + | ||
| 108 | + | * Inspired by Ezekiel's recent effort to showcase Rust interface, the | |
| 109 | + | hash function implementation used to hash lines have been updated | |
| 110 | + | to the one used for ELF symbol lookup by Glibc. | |
| 111 | + | ||
| 112 | + | * Instead of scanning for the remaining items to see if there are | |
| 113 | + | still commits to be explored in the queue, use khash to remember | |
| 114 | + | which items are still on the queue (an unacceptable alternative is | |
| 115 | + | to reserve one object flag bits). | |
| 116 | + | ||
| 117 | + | * The bulk-checkin code used to depend on a file-scope static | |
| 118 | + | singleton variable, which has been updated to pass an instance | |
| 119 | + | throughout the callchain. | |
| 120 | + | ||
| 121 | + | * The work to build on the bulk-checkin infrastructure to create many | |
| 122 | + | objects at once in a transaction and to abstract it into the | |
| 123 | + | generic object layer continues. | |
| 124 | + | ||
| 125 | + | * CodingGuidelines now spells out how bitfields are to be written. | |
| 126 | + | ||
| 127 | + | * Adjust to the way newer versions of cURL selectively enable tracing | |
| 128 | + | options, so that our tests can continue to work. | |
| 129 | + | ||
| 130 | + | * The clear_alloc_state() API function was not fully clearing the | |
| 131 | + | structure for reuse, but since nobody reuses it, replace it with a | |
| 132 | + | variant that frees the structure as well, making the callers simpler. | |
| 133 | + | ||
| 134 | + | * "git range-diff" learned a way to limit the memory consumed by | |
| 135 | + | O(N*N) cost matrix. | |
| 136 | + | ||
| 137 | + | * Some places in the code confused a variable that is *not* a boolean | |
| 138 | + | to enable color but is an enum that records what the user requested | |
| 139 | + | to do about color. A couple of bugs of this sort have been fixed, | |
| 140 | + | while the code has been cleaned up to prevent similar bugs in the | |
| 141 | + | future. | |
| 142 | + | ||
| 143 | + | * The build procedure based on meson learned a target to only build | |
| 144 | + | documentation, similar to "make doc". | |
| 145 | + | (merge ff4ec8ded0 ps/meson-build-docs later to maint). | |
| 146 | + | ||
| 147 | + | * Dip our toes a bit to (optionally) use Rust implemented helper | |
| 148 | + | called from our C code. | |
| 149 | + | ||
| 150 | + | * Documentation for "git log --pretty" options has been updated | |
| 151 | + | to make it easier to translate. | |
| 152 | + | ||
| 153 | + | * Instead of three library archives (one for git, one for reftable, | |
| 154 | + | and one for xdiff), roll everything into a single libgit.a archive. | |
| 155 | + | This would help later effort to FFI into Rust. | |
| 156 | + | ||
| 157 | + | * The beginning of SHA1-SHA256 interoperability work. | |
| 158 | + | ||
| 159 | + | * Build procedure for a few credential helpers (in contrib/) have | |
| 160 | + | been updated. | |
| 161 | + | ||
| 162 | + | * CI improvements to handle the recent Rust integration better. | |
| 163 | + | ||
| 164 | + | * The code in "git repack" machinery has been cleaned up to prepare | |
| 165 | + | for incremental update of midx files. | |
| 166 | + | ||
| 167 | + | * Two slightly different ways to get at "all the packfiles" in API | |
| 168 | + | has been cleaned up. | |
| 169 | + | ||
| 170 | + | * The code to walk revision graph to compute merge base has been | |
| 171 | + | optimized. | |
| 172 | + | ||
| 173 | + | * AI guidelines has been added to our documentation set. | |
| 174 | + | ||
| 175 | + | * Contributed credential helpers (obviously in contrib/) now have "cd | |
| 176 | + | $there && make install" target. | |
| 177 | + | ||
| 178 | + | * The "MyFirstContribution" tutorial tells the reader how to send out | |
| 179 | + | their patches; the section gained a hint to verify the message | |
| 180 | + | reached the mailing list. | |
| 181 | + | ||
| 182 | + | * The "debug" ref-backend was missing a method implementation, which | |
| 183 | + | has been corrected. | |
| 184 | + | ||
| 185 | + | * Build procedure for Wincred credential helper has been updated. | |
| 186 | + | ||
| 187 | + | * The build procedure based on meson learned to allow builders to | |
| 188 | + | specify the directory to install HTML documents. | |
| 189 | + | ||
| 190 | + | * Building "git contacts" script (in contrib/) left the resulting | |
| 191 | + | file unexecutable, which has been corrected. | |
| 192 | + | ||
| 193 | + | ||
| 194 | + | Fixes since v2.51 | |
| 195 | + | ----------------- | |
| 196 | + | ||
| 197 | + | Unless otherwise noted, all the changes in 2.51.X maintenance track, | |
| 198 | + | including security updates, are included in this release. | |
| 199 | + | ||
| 200 | + | * During interactive rebase, using 'drop' on a merge commit lead to | |
| 201 | + | an error, which was incorrect. | |
| 202 | + | ||
| 203 | + | * "git refs migrate" to migrate the reflog entries from a refs | |
| 204 | + | backend to another had a handful of bugs squashed. | |
| 205 | + | ||
| 206 | + | * "git remote rename origin upstream" failed to move origin/HEAD to | |
| 207 | + | upstream/HEAD when origin/HEAD is unborn and performed other | |
| 208 | + | renames extremely inefficiently, which has been corrected. | |
| 209 | + | (merge 16c4fa26b9 ps/remote-rename-fix later to maint). | |
| 210 | + | ||
| 211 | + | * "git describe" has been optimized by using better data structure. | |
| 212 | + | (merge 08bb69d70f rs/describe-with-prio-queue later to maint). | |
| 213 | + | ||
| 214 | + | * "git push" had a code path that led to BUG() but it should have | |
| 215 | + | been a die(), as it is a response to a usual but invalid end-user | |
| 216 | + | action to attempt pushing an object that does not exist. | |
| 217 | + | ||
| 218 | + | * Various bugs about rename handling in "ort" merge strategy have | |
| 219 | + | been fixed. | |
| 220 | + | ||
| 221 | + | * "git jump" (in contrib/) fails to parse the diff header correctly | |
| 222 | + | when a file has a space in its name, which has been corrected. | |
| 223 | + | (merge 621ce9c1c6 gh/git-jump-pathname-with-sp later to maint). | |
| 224 | + | ||
| 225 | + | * "git diff --no-index" run inside a subdirectory under control of a | |
| 226 | + | Git repository operated at the top of the working tree and stripped | |
| 227 | + | the prefix from the output, and oddballs like "-" (stdin) did not | |
| 228 | + | work correctly because of it. Correct the set-up by undoing what | |
| 229 | + | the set-up sequence did to cwd and prefix. | |
| 230 | + | ||
| 231 | + | * Various options to "git diff" that makes comparison ignore certain | |
| 232 | + | aspects of the differences (like "space changes are ignored", | |
| 233 | + | "differences in lines that match these regular expressions are | |
| 234 | + | ignored") did not work well with "--name-only" and friends. | |
| 235 | + | (merge b55e6d36eb ly/diff-name-only-with-diff-from-content later to maint). | |
| 236 | + | ||
| 237 | + | * The above caused regressions, which has been corrected. | |
| 238 | + | ||
| 239 | + | * Documentation for "git rebase" has been updated. | |
| 240 | + | (merge 3f7f2b0359 je/doc-rebase later to maint). | |
| 241 | + | ||
| 242 | + | * The start_delayed_progress() function in the progress eye-candy API | |
| 243 | + | did not clear its internal state, making an initial delay value | |
| 244 | + | larger than 1 second ineffective, which has been corrected. | |
| 245 | + | ||
| 246 | + | * The compatObjectFormat extension is used to hide an incomplete | |
| 247 | + | feature that is not yet usable for any purpose other than | |
| 248 | + | developing the feature further. Document it as such to discourage | |
| 249 | + | its use by mere mortals. | |
| 250 | + | ||
| 251 | + | * "git log -L..." compared trees of multiple parents with the tree of the | |
| 252 | + | merge result in an unnecessarily inefficient way. | |
| 253 | + | (merge 0a15bb634c sg/line-log-merge-optim later to maint). | |
| 254 | + | ||
| 255 | + | * Under a race against another process that is repacking the | |
| 256 | + | repository, especially a partially cloned one, "git fetch" may | |
| 257 | + | mistakenly think some objects we do have are missing, which has | |
| 258 | + | been corrected. | |
| 259 | + | ||
| 260 | + | * "git fetch" can clobber a symref that is dangling when the | |
| 261 | + | remote-tracking HEAD is set to auto update, which has been | |
| 262 | + | corrected. | |
| 263 | + | ||
| 264 | + | * "git describe <blob>" misbehaves and/or crashes in some corner | |
| 265 | + | cases, which has been taught to exit with failure gracefully. | |
| 266 | + | (merge 7c10e48e81 jk/describe-blob later to maint). | |
| 267 | + | ||
| 268 | + | * Manual page for "gitk" is updated with the current maintainer's | |
| 269 | + | name. | |
| 270 | + | ||
| 271 | + | * Update the instructions for using GGG in the MyFirstContribution | |
| 272 | + | document to say that a GitHub PR could be made against `git/git` | |
| 273 | + | instead of `gitgitgadget/git`. | |
| 274 | + | ||
| 275 | + | * Makefile tried to run multiple "cargo build" which would not work | |
| 276 | + | very well; serialize their execution to work around this problem. | |
| 277 | + | ||
| 278 | + | * "git repack --path-walk" lost objects in some corner cases, which | |
| 279 | + | has been corrected. | |
| 280 | + | ||
| 281 | + | * "git ls-files <pathspec>..." should not necessarily have to expand | |
| 282 | + | the index fully if a sparsified directory is excluded by the | |
| 283 | + | pathspec; the code is taught to expand the index on demand to avoid | |
| 284 | + | this. | |
| 285 | + | (merge 681f26bccc ds/ls-files-lazy-unsparse later to maint). | |
| 286 | + | ||
| 287 | + | * Windows "real-time monitoring" interferes with the execution of | |
| 288 | + | tests and affects negatively in both correctness and performance, | |
| 289 | + | which has been disabled in Gitlab CI. | |
| 290 | + | ||
| 291 | + | * A broken or malicious "git fetch" can say that it has the same | |
| 292 | + | object for many many times, and the upload-pack serving it can | |
| 293 | + | exhaust memory storing them redundantly, which has been corrected. | |
| 294 | + | ||
| 295 | + | * A corner case bug in "git log -L..." has been corrected. | |
| 296 | + | ||
| 297 | + | * "git rev-parse --short" and friends failed to disambiguate two | |
| 298 | + | objects with object names that share common prefix longer than 32 | |
| 299 | + | characters, which has been fixed. | |
| 300 | + | (merge 8655908b9e jc/longer-disambiguation-fix later to maint). | |
| 301 | + | ||
| 302 | + | * Some among "git add -p" and friends ignored color.diff and/or | |
| 303 | + | color.ui configuration variables, which is an old regression, which | |
| 304 | + | has been corrected. | |
| 305 | + | ||
| 306 | + | * "git subtree" (in contrib/) did not work correctly when splitting | |
| 307 | + | squashed subtrees, which has been improved. | |
| 308 | + | ||
| 309 | + | * Import a newer version of the clar unit testing framework. | |
| 310 | + | (merge 93dbb6b3c5 ps/clar-updates later to maint). | |
| 311 | + | ||
| 312 | + | * "git send-email --compose --reply-to=<address>" used to add | |
| 313 | + | duplicated Reply-To: header, which made mailservers unhappy. This | |
| 314 | + | has been corrected. | |
| 315 | + | (merge f448f65719 nb/send-email-no-dup-reply-to later to maint). | |
| 316 | + | ||
| 317 | + | * "git rebase -i" failed to clean-up the commit log message when the | |
| 318 | + | command commits the final one in a chain of "fixup" commands, which | |
| 319 | + | has been corrected. | |
| 320 | + | ||
| 321 | + | * There are double frees and leaks around setup_revisions() API used | |
| 322 | + | in "git stash show", which has been fixed, and setup_revisions() | |
| 323 | + | API gained a wrapper to make it more ergonomic when using it with | |
| 324 | + | strvec-manged argc/argv pairs. | |
| 325 | + | (merge a04bc71725 jk/setup-revisions-freefix later to maint). | |
| 326 | + | ||
| 327 | + | * Deal more gracefully with directory / file conflicts when the files | |
| 328 | + | backend is used for ref storage, by failing only the ones that are | |
| 329 | + | involved in the conflict while allowing others. | |
| 330 | + | ||
| 331 | + | * "git last-modified" operating in non-recursive mode used to trigger | |
| 332 | + | a BUG(), which has been corrected. | |
| 333 | + | ||
| 334 | + | * The use of "git config get" command to learn how ANSI color | |
| 335 | + | sequence is for a particular type, e.g., "git config get | |
| 336 | + | --type=color --default=reset no.such.thing", isn't very ergonomic. | |
| 337 | + | (merge e4dabf4fd6 ps/config-get-color-fixes later to maint). | |
| 338 | + | ||
| 339 | + | * The "do you still use it?" message given by a command that is | |
| 340 | + | deeply deprecated and allow us to suggest alternatives has been | |
| 341 | + | updated. | |
| 342 | + | ||
| 343 | + | * Clang-format update to let our control macros be formatted the way we | |
| 344 | + | had them traditionally, e.g., "for_each_string_list_item()" without | |
| 345 | + | space before the parentheses. | |
| 346 | + | ||
| 347 | + | * A few places where a size_t value was cast to curl_off_t without | |
| 348 | + | checking has been updated to use the existing helper function. | |
| 349 | + | ||
| 350 | + | * "git reflog write" did not honor the configured user.name/email | |
| 351 | + | which has been corrected. | |
| 352 | + | ||
| 353 | + | * Handling of an empty subdirectory of .git/refs/ in the ref-files | |
| 354 | + | backend has been corrected. | |
| 355 | + | ||
| 356 | + | * Our CI script requires "sudo" that can be told to preserve | |
| 357 | + | environment, but Ubuntu replaced with "sudo" with an implementation | |
| 358 | + | that lacks the feature. Work this around by reinstalling the | |
| 359 | + | original version. | |
| 360 | + | ||
| 361 | + | * The reftable backend learned to sanity check its on-disk data more | |
| 362 | + | carefully. | |
| 363 | + | (merge 466a3a1afd kn/reftable-consistency-checks later to maint). | |
| 364 | + | ||
| 365 | + | * A lot of code clean-up of xdiff. | |
| 366 | + | Split out of a larger topic. | |
| 367 | + | (merge 8b9c5d2e3a en/xdiff-cleanup later to maint). | |
| 368 | + | ||
| 369 | + | * "git format-patch --range-diff=... --notes=..." did not drive the | |
| 370 | + | underlying range-diff with correct --notes parameter, ending up | |
| 371 | + | comparing with different set of notes from its main patch output | |
| 372 | + | you would get from "git format-patch --notes=..." for a singleton | |
| 373 | + | patch. | |
| 374 | + | ||
| 375 | + | * The code in "git add -p" and friends to iterate over hunks was | |
| 376 | + | riddled with bugs, which has been corrected. | |
| 377 | + | ||
| 378 | + | * A few more things that patch authors can do to help maintainer to | |
| 379 | + | keep track of their topics better. | |
| 380 | + | (merge 1a41698841 tb/doc-submitting-patches later to maint). | |
| 381 | + | ||
| 382 | + | * An earlier addition to "git diff --no-index A B" to limit the | |
| 383 | + | output with pathspec after the two directories misbehaved when | |
| 384 | + | these directories were given with a trailing slash, which has been | |
| 385 | + | corrected. | |
| 386 | + | ||
| 387 | + | * The "--short" option of "git status" that meant output for humans | |
| 388 | + | and "-z" option to show NUL delimited output format did not mix | |
| 389 | + | well, and colored some but not all things. The command has been | |
| 390 | + | updated to color all elements consistently in such a case. | |
| 391 | + | ||
| 392 | + | * Unicode width table update. | |
| 393 | + | ||
| 394 | + | * GPG signing test set-up has been broken for a year, which has been | |
| 395 | + | corrected. | |
| 396 | + | (merge 516bf45749 jc/t1016-setup-fix later to maint). | |
| 397 | + | ||
| 398 | + | * Recent OpenSSH creates the Unix domain socket to communicate with | |
| 399 | + | ssh-agent under $HOME instead of /tmp, which causes our test to | |
| 400 | + | fail doe to overly long pathname in our test environment, which has | |
| 401 | + | been worked around by using "ssh-agent -T". | |
| 402 | + | ||
| 403 | + | * strbuf_split*() to split a string into multiple strbufs is often a | |
| 404 | + | wrong API to use. A few uses of it have been removed by | |
| 405 | + | simplifying the code. | |
| 406 | + | (merge 2ab72a16d9 ob/gpg-interface-cleanup later to maint). | |
| 407 | + | ||
| 408 | + | * "git shortlog" knows "--committer" and "--author" options, which | |
| 409 | + | the command line completion (in contrib/) did not handle well, | |
| 410 | + | which has been corrected. | |
| 411 | + | (merge c568fa8e1c kf/log-shortlog-completion-fix later to maint). | |
| 412 | + | ||
| 413 | + | * "git bisect" command did not react correctly to "git bisect help" | |
| 414 | + | and "git bisect unknown", which has been corrected. | |
| 415 | + | (merge 2bb3a012f3 rz/bisect-help-unknown later to maint). | |
| 416 | + | ||
| 417 | + | * The 'q'(uit) command in "git add -p" has been improved to quit | |
| 418 | + | without doing any meaningless work before leaving, and giving EOF | |
| 419 | + | (typically control-D) to the prompt is made to behave the same way. | |
| 420 | + | ||
| 421 | + | * The wildmatch code had a corner case bug that mistakenly makes | |
| 422 | + | "foo**/bar" match with "foobar", which has been corrected. | |
| 423 | + | (merge 1940a02dc1 jk/match-pathname-fix later to maint). | |
| 424 | + | ||
| 425 | + | * Tests did not set up GNUPGHOME correctly, which is fixed but some | |
| 426 | + | flaky tests are exposed in t1016, which needs to be addressed | |
| 427 | + | before this topic can move forward. | |
| 428 | + | (merge 6cd8369ef3 tz/test-prepare-gnupghome later to maint). | |
| 429 | + | ||
| 430 | + | * The patterns used in the .gitignore files use backslash in the way | |
| 431 | + | documented for fnmatch(3); document as such to reduce confusion. | |
| 432 | + | (merge 8a6d158a1d jk/doc-backslash-in-exclude later to maint). | |
| 433 | + | ||
| 434 | + | * The version of macos image used in GitHub CI has been updated to | |
| 435 | + | macos-14, as the macos-13 that we have been using got deprecated. | |
| 436 | + | Perforce binary used there has been changed to arm64 version to | |
| 437 | + | match. | |
| 438 | + | (merge 73b9cdb7c4 jc/ci-use-macos-14 later to maint). | |
| 439 | + | (merge ffff0bb0da jc/ci-use-arm64-p4-on-macos later to maint). | |
| 440 | + | ||
| 441 | + | * Other code cleanup, docfix, build fix, etc. | |
| 442 | + | (merge 529a60a885 ua/t1517-short-help-tests later to maint). | |
| 443 | + | (merge 22d421fed9 ac/deglobal-fmt-merge-log-config later to maint). | |
| 444 | + | (merge a60203a015 dk/t7005-editor-updates later to maint). | |
| 445 | + | (merge 16684b6fae ps/reftable-libgit2-cleanup later to maint). | |
| 446 | + | (merge e5c27bd3d8 je/doc-add later to maint). | |
| 447 | + | (merge 13296ac909 ps/object-store-midx-dedup-info later to maint). | |
| 448 | + | (merge f9a6705d9a tc/t0450-harden later to maint). | |
| 449 | + | (merge a66fc22bf9 rs/get-oid-with-flags-cleanup later to maint). | |
| 450 | + | (merge 15b8abde07 js/mingw-includes-cleanup later to maint). | |
| 451 | + | (merge 2cebca0582 tb/cat-file-objectmode-update later to maint). | |
| 452 | + | (merge 8f487db07a kh/doc-patch-id-1 later to maint). | |
| 453 | + | (merge f711f37b05 eb/t1016-hash-transition-fix later to maint). | |
| 454 | + | (merge 85333aa1af jk/test-delete-gpgsig-leakfix later to maint). | |
added Documentation/RelNotes/2.53.0.adoc mode 100644
| @@ -0,0 +1,336 @@ | |||
| 1 | + | Git v2.53 Release Notes | |
| 2 | + | ======================= | |
| 3 | + | ||
| 4 | + | UI, Workflows & Features | |
| 5 | + | ------------------------ | |
| 6 | + | ||
| 7 | + | * "git maintenance" command learned "is-needed" subcommand to tell if | |
| 8 | + | it is necessary to perform various maintenance tasks. | |
| 9 | + | ||
| 10 | + | * "git replay" (experimental) learned to perform ref updates itself | |
| 11 | + | in a transaction by default, instead of emitting where each refs | |
| 12 | + | should point at and leaving the actual update to another command. | |
| 13 | + | ||
| 14 | + | * "git blame" learns "--diff-algorithm=<algo>" option. | |
| 15 | + | ||
| 16 | + | * "git repo info" learned "--all" option. | |
| 17 | + | ||
| 18 | + | * Both "git apply" and "git diff" learn a new whitespace error class, | |
| 19 | + | "incomplete-line". | |
| 20 | + | ||
| 21 | + | * Add a new manual that describes the data model. | |
| 22 | + | ||
| 23 | + | * "git fast-import" learns "--signed-commits=strip-if-invalid" option | |
| 24 | + | to drop invalid cryptographic signature from objects. | |
| 25 | + | ||
| 26 | + | * The use of "revision" (a connected set of commits) has been | |
| 27 | + | clarified in the "git replay" documentation. | |
| 28 | + | ||
| 29 | + | * A help message from "git branch" now mentions "git help" instead of | |
| 30 | + | "man" when suggesting to read some documentation. | |
| 31 | + | ||
| 32 | + | * "git repo struct" learned to take "-z" as a synonym to "--format=nul". | |
| 33 | + | ||
| 34 | + | * More object database related information are shown in "git repo | |
| 35 | + | structure" output. | |
| 36 | + | ||
| 37 | + | * Improve the error message when a bad argument is given to the | |
| 38 | + | `--onto` option of "git replay". Test coverage of "git replay" has | |
| 39 | + | been improved. | |
| 40 | + | ||
| 41 | + | * The iconv library on macOS fails to correctly handle stateful | |
| 42 | + | ISO/IEC 2022:1994 encoded strings. Work it around instead of | |
| 43 | + | replacing it wholesale from homebrew. | |
| 44 | + | ||
| 45 | + | * Upstream symbolic link support on Windows from Git-for-Windows. | |
| 46 | + | ||
| 47 | + | ||
| 48 | + | Performance, Internal Implementation, Development Support etc. | |
| 49 | + | -------------------------------------------------------------- | |
| 50 | + | ||
| 51 | + | * The list of packfiles used in a running Git process is moved from | |
| 52 | + | the packed_git structure into the packfile store. | |
| 53 | + | ||
| 54 | + | * Some ref backend storage can hold not just the object name of an | |
| 55 | + | annotated tag, but the object name of the object the tag points at. | |
| 56 | + | The code to handle this information has been streamlined. | |
| 57 | + | ||
| 58 | + | * As "git diff --quiet" only cares about the existence of any | |
| 59 | + | changes, disable rename/copy detection to skip more expensive | |
| 60 | + | processing whose result will be discarded anyway. | |
| 61 | + | ||
| 62 | + | * A part of code paths that deals with loose objects has been cleaned | |
| 63 | + | up. | |
| 64 | + | ||
| 65 | + | * "make strip" has been taught to strip "scalar" as well as "git". | |
| 66 | + | ||
| 67 | + | * Dockerized jobs at the GitHub Actions CI have been taught to show | |
| 68 | + | more details of failed tests. | |
| 69 | + | ||
| 70 | + | * Code refactoring around object database sources. | |
| 71 | + | ||
| 72 | + | * Halve the memory consumed by artificial filepairs created during | |
| 73 | + | "git diff --find-copies-harder", also making the operation run | |
| 74 | + | faster. | |
| 75 | + | ||
| 76 | + | * The "git_istream" abstraction has been revamped to make it easier | |
| 77 | + | to interface with pluggable object database design. | |
| 78 | + | ||
| 79 | + | * Rewrite the only use of "mktemp()" that is subject to TOCTOU race | |
| 80 | + | and Stop using the insecure "mktemp()" function. | |
| 81 | + | (merge 10bba537c4 rs/ban-mktemp later to maint). | |
| 82 | + | ||
| 83 | + | * In-code comment update to clarify that single-letter options are | |
| 84 | + | outside of the scope of command line completion script. | |
| 85 | + | (merge dc8a00fafe jc/completion-no-single-letter-options later to maint). | |
| 86 | + | ||
| 87 | + | * MEMZERO_ARRAY() helper is introduced to avoid clearing only the | |
| 88 | + | first N bytes of an N-element array whose elements are larger than | |
| 89 | + | a byte. | |
| 90 | + | ||
| 91 | + | * "git diff-files -R --find-copies-harder" has been taught to use | |
| 92 | + | the potential copy sources from the index correctly. | |
| 93 | + | ||
| 94 | + | * Require C99 style flexible array member support from all platforms. | |
| 95 | + | ||
| 96 | + | * The code path that enumerates promisor objects have been optimized | |
| 97 | + | to skip pointlessly parsing blob objects. | |
| 98 | + | ||
| 99 | + | * Prepare test suite for Git for Windows that supports symbolic | |
| 100 | + | links. | |
| 101 | + | ||
| 102 | + | * Import newer version of "clar", unit testing framework. | |
| 103 | + | (merge 84071a6dea ps/clar-integers later to maint). | |
| 104 | + | ||
| 105 | + | * The packfile_store data structure is moved from object store to odb | |
| 106 | + | source. | |
| 107 | + | ||
| 108 | + | * The object-info API has been cleaned up. | |
| 109 | + | ||
| 110 | + | * Further preparation to upstream symbolic link support on Windows. | |
| 111 | + | ||
| 112 | + | * Remove implicit reliance on the_repository global in the APIs | |
| 113 | + | around tree objects and make it explicit which repository to work | |
| 114 | + | in. | |
| 115 | + | ||
| 116 | + | * "git bugreport" and "git version --build-options" learned to | |
| 117 | + | include use of 'gettext' feature, to make it easier to diagnose | |
| 118 | + | problems around l10n. | |
| 119 | + | ||
| 120 | + | * Dscho observed that SVN tests are taking too much time in CI leak | |
| 121 | + | checking tasks, but most time is spent not in our code but in libsvn | |
| 122 | + | code (which happen to be written in Perl), whose leaks have little | |
| 123 | + | value to discover for us. Skip SVN, P4, and CVS tests in the leak | |
| 124 | + | checking tasks. | |
| 125 | + | (merge 047bd7dfe3 js/ci-leak-skip-svn later to maint). | |
| 126 | + | ||
| 127 | + | ||
| 128 | + | Fixes since v2.52 | |
| 129 | + | ----------------- | |
| 130 | + | ||
| 131 | + | * Ever since we added whitespace rules for this project, we misspelt | |
| 132 | + | an entry, which has been corrected. | |
| 133 | + | (merge 358e94dc70 jc/gitattributes-whitespace-no-indent-fix later to maint). | |
| 134 | + | ||
| 135 | + | * The code to expand attribute macros has been rewritten to avoid | |
| 136 | + | recursion to avoid running out of stack space in an uncontrolled | |
| 137 | + | way. | |
| 138 | + | (merge 42ed046866 jk/attr-macroexpand-wo-recursion later to maint). | |
| 139 | + | ||
| 140 | + | * Adding a repository that uses a different hash function is a no-no, | |
| 141 | + | but "git submodule add" did not prevent it, which has been corrected. | |
| 142 | + | (merge 6fe288bfbc bc/submodule-force-same-hash later to maint). | |
| 143 | + | ||
| 144 | + | * An earlier check added to osx keychain credential helper to avoid | |
| 145 | + | storing the credential itself supplied was overeager and rejected | |
| 146 | + | credential material supplied by other helper backends that it would | |
| 147 | + | have wanted to store, which has been corrected. | |
| 148 | + | (merge 4580bcd235 kn/osxkeychain-idempotent-store-fix later to maint). | |
| 149 | + | ||
| 150 | + | * The "git repo structure" subcommand tried to align its output but | |
| 151 | + | mixed up byte count and display column width, which has been | |
| 152 | + | corrected. | |
| 153 | + | (merge 7a03a10a3a jx/repo-struct-utf8width-fix later to maint). | |
| 154 | + | ||
| 155 | + | * Yet another corner case fix around renames in the "ort" merge | |
| 156 | + | strategy. | |
| 157 | + | (merge a562d90a35 en/ort-rename-another-fix later to maint). | |
| 158 | + | ||
| 159 | + | * Test leakfix. | |
| 160 | + | (merge 14b561e768 jk/test-mktemp-leakfix later to maint). | |
| 161 | + | ||
| 162 | + | * Update a version of action used at the GitHub Actions CI. | |
| 163 | + | (merge cd99203f86 js/ci-github-setup-go-update later to maint). | |
| 164 | + | ||
| 165 | + | * The "return errno = EFOO, -1" construct, which is heavily used in | |
| 166 | + | compat/mingw.c and triggers warnings under "-Wcomma", has been | |
| 167 | + | rewritten to avoid the warnings. | |
| 168 | + | (merge af3919816f js/mingw-assign-comma-fix later to maint). | |
| 169 | + | ||
| 170 | + | * Makefile based build have recently been updated to build a | |
| 171 | + | libgit.a that also has reftable and xdiff objects; CMake based | |
| 172 | + | build procedure has been updated to match. | |
| 173 | + | (merge b0d5c88cca js/cmake-libgit-fix later to maint). | |
| 174 | + | ||
| 175 | + | * Under-allocation fix. | |
| 176 | + | (merge d22a488482 js/wincred-get-credential-alloc-fix later to maint). | |
| 177 | + | ||
| 178 | + | * "git worktree list" attempts to show paths to worktrees while | |
| 179 | + | aligning them, but miscounted display columns for the paths when | |
| 180 | + | non-ASCII characters were involved, which has been corrected. | |
| 181 | + | (merge 08dfa59835 pw/worktree-list-display-width-fix later to maint). | |
| 182 | + | ||
| 183 | + | * "Windows+meson" job at the GitHub Actions CI was hard to debug, as | |
| 184 | + | it did not show and save failed test artifacts, which has been | |
| 185 | + | corrected. | |
| 186 | + | (merge 17bd1108ea jk/ci-windows-meson-test-fix later to maint). | |
| 187 | + | ||
| 188 | + | * Emulation code clean-up. | |
| 189 | + | (merge 2367c6bcd6 gf/win32-pthread-cond-wait-err later to maint). | |
| 190 | + | ||
| 191 | + | * Various issues detected by Asan have been corrected. | |
| 192 | + | (merge a031b6181a jk/asan-bonanza later to maint). | |
| 193 | + | ||
| 194 | + | * "git config get --path" segfaulted on an ":(optional)path" that | |
| 195 | + | does not exist, which has been corrected. | |
| 196 | + | (merge 0bd16856ff jc/optional-path later to maint). | |
| 197 | + | ||
| 198 | + | * The "--committer-date-is-author-date" option of "git am/rebase" is | |
| 199 | + | a misguided one. The documentation is updated to discourage its | |
| 200 | + | use. | |
| 201 | + | (merge fbf3d0669f kh/doc-committer-date-is-author-date later to maint). | |
| 202 | + | ||
| 203 | + | * The option help text given by "git config unset -h" described | |
| 204 | + | the "--all" option to "replace", not "unset", multiple variables, | |
| 205 | + | which has been corrected. | |
| 206 | + | (merge 18bf67b753 rs/config-unset-opthelp-fix later to maint). | |
| 207 | + | ||
| 208 | + | * The error message given by "git config set", when the variable | |
| 209 | + | being updated has more than one values defined, used old style "git | |
| 210 | + | config" syntax with an incorrect option in its hint, both of which | |
| 211 | + | have been corrected. | |
| 212 | + | (merge df963f0df4 rs/config-set-multi-error-message-fix later to maint). | |
| 213 | + | ||
| 214 | + | * "git replay" forgot to omit the "gpgsig-sha256" extended header | |
| 215 | + | from the resulting commit the same way it omits "gpgsig", which has | |
| 216 | + | been corrected. | |
| 217 | + | (merge 9f3a115087 pw/replay-exclude-gpgsig-fix later to maint). | |
| 218 | + | ||
| 219 | + | * A few tests have been updated to work under the shell compatible | |
| 220 | + | mode of zsh. | |
| 221 | + | (merge a92f243a94 bc/zsh-testsuite later to maint). | |
| 222 | + | ||
| 223 | + | * The way patience diff finds LCS has been optimized. | |
| 224 | + | (merge c7e3b8085b yc/xdiff-patience-optim later to maint). | |
| 225 | + | ||
| 226 | + | * Recent optimization to "last-modified" command introduced use of | |
| 227 | + | uninitialized block of memory, which has been corrected. | |
| 228 | + | (merge fe4e60759b tc/last-modified-active-paths-optimization later to maint). | |
| 229 | + | ||
| 230 | + | * "git last-modified" used to mishandle "--" to mark the beginning of | |
| 231 | + | pathspec, which has been corrected. | |
| 232 | + | (merge 05491b90ce js/last-modified-with-sparse-checkouts later to maint). | |
| 233 | + | ||
| 234 | + | * Emulation code clean-up. | |
| 235 | + | (merge 42aa7603aa gf/win32-pthread-cond-init later to maint). | |
| 236 | + | ||
| 237 | + | * "git submodule add" to add a submodule under <name> segfaulted, | |
| 238 | + | when a submodule.<name>.something is already in .gitmodules file | |
| 239 | + | without defining where its submodule.<name>.path is, which has been | |
| 240 | + | corrected. | |
| 241 | + | (merge dd8e8c786e jc/submodule-add later to maint). | |
| 242 | + | ||
| 243 | + | * "git fetch" that involves fetching tags, when a tag being fetched | |
| 244 | + | needs to overwrite existing one, failed to fetch other tags, which | |
| 245 | + | has been corrected. | |
| 246 | + | (merge b7b17ec8a6 kn/fix-fetch-backfill-tag-with-batched-ref-updates later to maint). | |
| 247 | + | ||
| 248 | + | * Document "rev-list --filter-provided-objects" better. | |
| 249 | + | (merge 6d8dc99478 jt/doc-rev-list-filter-provided-objects later to maint). | |
| 250 | + | ||
| 251 | + | * Even when there is no changes in the packfile and no need to | |
| 252 | + | recompute bitmaps, "git repack" recomputed and updated the MIDX | |
| 253 | + | file, which has been corrected. | |
| 254 | + | (merge 6ce9d558ce ps/repack-avoid-noop-midx-rewrite later to maint). | |
| 255 | + | ||
| 256 | + | * Update HTTP tests to adjust for changes in curl 8.18.0 | |
| 257 | + | (merge 17f4b01da7 jk/test-curl-updates later to maint). | |
| 258 | + | ||
| 259 | + | * Workaround the "iconv" shipped as part of macOS, which is broken | |
| 260 | + | handling stateful ISO/IEC 2022 encoded strings. | |
| 261 | + | (merge cee341e9dd rs/macos-iconv-workaround later to maint). | |
| 262 | + | ||
| 263 | + | * Running "git diff" with "--name-only" and other options that allows | |
| 264 | + | us not to look at the blob contents, while objects that are lazily | |
| 265 | + | fetched from a promisor remote, caused use-after-free, which has | |
| 266 | + | been corrected. | |
| 267 | + | ||
| 268 | + | * The ort merge machinery hit an assertion failure in a history with | |
| 269 | + | criss-cross merges renamed a directory and a non-directory, which | |
| 270 | + | has been corrected. | |
| 271 | + | (merge 979ee83e8a en/ort-recursive-d-f-conflict-fix later to maint). | |
| 272 | + | ||
| 273 | + | * Diagnose invalid bundle-URI that lack the URI entry, instead of | |
| 274 | + | crashing. | |
| 275 | + | (merge 7796c14a1a sb/bundle-uri-without-uri later to maint). | |
| 276 | + | ||
| 277 | + | * Mailmap update for Karsten | |
| 278 | + | (merge e97678c4ef js/mailmap-karsten-blees later to maint). | |
| 279 | + | ||
| 280 | + | * Perf-test fixes. | |
| 281 | + | (merge 79d301c767 jk/t-perf-fixes later to maint). | |
| 282 | + | ||
| 283 | + | * Fix for a performance regression in "git cat-file". | |
| 284 | + | (merge 9e8b448dd8 jk/cat-file-avoid-bitmap-when-unneeded later to maint). | |
| 285 | + | ||
| 286 | + | * Update a FAQ entry on synching two separate repositories using the | |
| 287 | + | "git stash export/import" recently introduced. | |
| 288 | + | (merge 02fc44a989 bc/doc-stash-import-export later to maint). | |
| 289 | + | ||
| 290 | + | * "git fsck" used inconsistent set of refs to show a confused | |
| 291 | + | warning, which has been corrected. | |
| 292 | + | ||
| 293 | + | * Some error messages from the http transport layer lacked the | |
| 294 | + | terminating newline, which has been corrected. | |
| 295 | + | (merge a8227ae8d5 kt/http-backend-errors later to maint). | |
| 296 | + | ||
| 297 | + | * "git repack --geometric" did not work with promisor packs, which | |
| 298 | + | has been corrected. | |
| 299 | + | ||
| 300 | + | * The logic that avoids reusing MIDX files with a wrong checksum was | |
| 301 | + | broken, which has been corrected. | |
| 302 | + | ||
| 303 | + | * Other code cleanup, docfix, build fix, etc. | |
| 304 | + | (merge 46207a54cc qj/doc-http-bad-want-response later to maint). | |
| 305 | + | (merge df90eccd93 kh/doc-commit-extra-references later to maint). | |
| 306 | + | (merge f18aa68861 rs/xmkstemp-simplify later to maint). | |
| 307 | + | (merge fddba8f737 ja/doc-synopsis-style later to maint). | |
| 308 | + | (merge 22ce0cb639 en/xdiff-cleanup-2 later to maint). | |
| 309 | + | (merge 8ef7355a8f je/doc-pull later to maint). | |
| 310 | + | (merge 48176f953f jc/capability-leak later to maint). | |
| 311 | + | (merge 8cbbdc92f7 kh/doc-pre-commit-fix later to maint). | |
| 312 | + | (merge d4bc39a4d9 mh/doc-config-gui-gcwarning later to maint). | |
| 313 | + | (merge 41d425008a kh/doc-send-email-paragraph-fix later to maint). | |
| 314 | + | (merge d4b732899e jc/macports-darwinports later to maint). | |
| 315 | + | (merge bab391761d kj/pull-options-decl-cleanup later to maint). | |
| 316 | + | (merge 007b8994d4 rs/t4014-git-version-string-fix later to maint). | |
| 317 | + | (merge 4ce170c522 ds/doc-scalar-config later to maint). | |
| 318 | + | (merge a0c813951a jc/doc-commit-signoff-config later to maint). | |
| 319 | + | (merge 8ee262985a ja/doc-misc-fixes later to maint). | |
| 320 | + | (merge 1722c2244b mh/doc-core-attributesfile later to maint). | |
| 321 | + | (merge c469ca26c5 dk/ci-rust-fix later to maint). | |
| 322 | + | (merge 12f0be0857 gf/clear-path-cache-cleanup later to maint). | |
| 323 | + | (merge 949df6ed6b js/test-func-comment-fix later to maint). | |
| 324 | + | (merge 93f894c001 bc/checkout-error-message-fix later to maint). | |
| 325 | + | (merge abf05d856f rs/show-branch-prio-queue later to maint). | |
| 326 | + | (merge 06188ea5f3 rs/parse-config-expiry-simplify later to maint). | |
| 327 | + | (merge 861dbb1586 dd/t5403-modernise later to maint). | |
| 328 | + | (merge acffc5e9e5 ja/doc-synopsis-style-more later to maint). | |
| 329 | + | (merge 6c5c7e7071 ac/t1420-use-more-direct-check later to maint). | |
| 330 | + | (merge 2ac93bfcbc ds/builtin-doc-update later to maint). | |
| 331 | + | (merge 3f051fc9c9 kh/doc-patch-id later to maint). | |
| 332 | + | (merge 555c8464e5 je/doc-reset later to maint). | |
| 333 | + | (merge 220f888d7e ps/t1410-cleanup later to maint). | |
| 334 | + | (merge 5814b04c02 ps/config-doc-get-urlmatch-fix later to maint). | |
| 335 | + | (merge 5ae594f30b sb/doc-update-ref-markup-fix later to maint). | |
| 336 | + | (merge bc8556d066 ty/t1005-test-path-is-helpers later to maint). | |
added Documentation/RelNotes/2.54.0.adoc mode 100644
| @@ -0,0 +1,588 @@ | |||
| 1 | + | Git v2.54 Release Notes | |
| 2 | + | ======================= | |
| 3 | + | ||
| 4 | + | UI, Workflows & Features | |
| 5 | + | ------------------------ | |
| 6 | + | ||
| 7 | + | * "git add -p" and friends note what the current status of the hunk | |
| 8 | + | being shown is. | |
| 9 | + | ||
| 10 | + | * "git history" history rewriting (experimental) command has been | |
| 11 | + | added. | |
| 12 | + | ||
| 13 | + | * "git replay" is taught to drop commits that become empty (not the | |
| 14 | + | ones that are empty in the original). | |
| 15 | + | ||
| 16 | + | * The help text and the documentation for the "--expire" option of | |
| 17 | + | "git worktree [list|prune]" have been improved. | |
| 18 | + | ||
| 19 | + | * When "git show-index" is run outside a repository, it silently | |
| 20 | + | defaults to SHA-1; the tool now warns when this happens. | |
| 21 | + | ||
| 22 | + | * "git merge-file" can be run outside a repository, but it ignored | |
| 23 | + | all configuration, even the per-user ones. The command now uses | |
| 24 | + | available configuration files to find its customization. | |
| 25 | + | ||
| 26 | + | * "auto filter" logic for large-object promisor remote. | |
| 27 | + | ||
| 28 | + | * "git rev-list" and friends learn "--maximal-only" to show only the | |
| 29 | + | commits that are not reachable by other commits. | |
| 30 | + | ||
| 31 | + | * Command line completion (in contrib/) update for | |
| 32 | + | "stash import/export". | |
| 33 | + | ||
| 34 | + | * "git repo info" learns "--keys" action to list known keys. | |
| 35 | + | ||
| 36 | + | * Extend the alias configuration syntax to allow aliases using | |
| 37 | + | characters outside ASCII alphanumeric (plus '-'). | |
| 38 | + | ||
| 39 | + | * A signature on a commit that was GPG signed a long time ago ought to | |
| 40 | + | be still valid after the key that was used to sign it has expired, | |
| 41 | + | but we showed them in alarming red. | |
| 42 | + | ||
| 43 | + | * "git subtree split --prefix=P <commit>" now checks the prefix P | |
| 44 | + | against the tree of the (potentially quite different from the | |
| 45 | + | current working tree) given commit. | |
| 46 | + | ||
| 47 | + | * "git add -p" learned a new mode that allows the user to revisit a | |
| 48 | + | file that was already dealt with. | |
| 49 | + | ||
| 50 | + | * Allow the directory in which reference backends store their data to | |
| 51 | + | be specified. | |
| 52 | + | ||
| 53 | + | * "gitweb" has been taught to be mobile friendly. | |
| 54 | + | ||
| 55 | + | * "git apply --directory=./un/../normalized/path" now normalizes the | |
| 56 | + | given path before using it. | |
| 57 | + | ||
| 58 | + | * "git maintenance" starts using the "geometric" strategy by default. | |
| 59 | + | ||
| 60 | + | * "git config list" is taught to show the values interpreted for | |
| 61 | + | specific type with "--type=<X>" option. | |
| 62 | + | ||
| 63 | + | * "git add <submodule>" has been taught to honor | |
| 64 | + | submodule.<name>.ignore that is set to "all" (and requires "git add | |
| 65 | + | -f" to override it). | |
| 66 | + | ||
| 67 | + | * Hook commands are now allowed to be defined (possibly centrally) | |
| 68 | + | in the configuration files, and run multiple of them for the same | |
| 69 | + | hook event. | |
| 70 | + | ||
| 71 | + | * The way end-users can add their own "git <cmd>" subcommand by | |
| 72 | + | storing "git-<cmd>" in a directory on their $PATH has not been | |
| 73 | + | documented clearly, which has been corrected. | |
| 74 | + | ||
| 75 | + | * "git send-email" learns to pass hostname/port to Authen::SASL | |
| 76 | + | module. | |
| 77 | + | ||
| 78 | + | * "git send-email" learns to support use of client-side certificates. | |
| 79 | + | ||
| 80 | + | * "git send-email" has learned to be a bit more careful when it | |
| 81 | + | accepts charset to use from the end-user, to avoid 'y' (mistaken | |
| 82 | + | 'yes' when expecting a charset like 'UTF-8') and other nonsense. | |
| 83 | + | ||
| 84 | + | * "git status" learned to show comparison between the current branch | |
| 85 | + | and various other branches listed on status.compareBranches | |
| 86 | + | configuration. | |
| 87 | + | ||
| 88 | + | * "git repo structure" command learns to report maximum values on | |
| 89 | + | various aspects of objects it inspects. | |
| 90 | + | ||
| 91 | + | * "git rebase" learns "--trailer" option to drive the | |
| 92 | + | interpret-trailers machinery. | |
| 93 | + | ||
| 94 | + | * "git fast-import" learned to optionally replace signature on | |
| 95 | + | commits whose signatures get invalidated due to replaying by | |
| 96 | + | signing afresh. | |
| 97 | + | ||
| 98 | + | * "git history" learned the "split" subcommand. | |
| 99 | + | ||
| 100 | + | * The reference-transaction hook was taught to be triggered before | |
| 101 | + | taking locks on references in the "preparing" phase. | |
| 102 | + | ||
| 103 | + | * "git apply" now reports the name of the input file along with the | |
| 104 | + | line number when it encounters a corrupt patch, and correctly | |
| 105 | + | resets the line counter when processing multiple patch files. | |
| 106 | + | ||
| 107 | + | * The HTTP transport learned to react to "429 Too Many Requests". | |
| 108 | + | ||
| 109 | + | * "git repo info -h" and "git repo structure -h" limit their help output | |
| 110 | + | to the part that is specific to the subcommand. | |
| 111 | + | ||
| 112 | + | * "git format-patch --cover-letter" learns to use a simpler format | |
| 113 | + | instead of the traditional shortlog format to list its commits with | |
| 114 | + | a new --commit-list-format option and format.commitListFormat | |
| 115 | + | configuration variable. | |
| 116 | + | ||
| 117 | + | * `git backfill` learned to accept revision and pathspec arguments. | |
| 118 | + | ||
| 119 | + | * "git replay" (experimental) learns, in addition to "pick" and | |
| 120 | + | "replay", a new operating mode "revert". | |
| 121 | + | ||
| 122 | + | * "git replay" now supports replaying down to the root commit. | |
| 123 | + | ||
| 124 | + | * Handling of signed commits and tags in fast-import has been made more | |
| 125 | + | configurable. | |
| 126 | + | ||
| 127 | + | * "git config list" is the official way to spell "git config -l" and | |
| 128 | + | "git config --list". Use it to update the documentation. | |
| 129 | + | ||
| 130 | + | ||
| 131 | + | Performance, Internal Implementation, Development Support etc. | |
| 132 | + | -------------------------------------------------------------- | |
| 133 | + | ||
| 134 | + | * Avoid local submodule repository directory paths overlapping with | |
| 135 | + | each other by encoding submodule names before using them as path | |
| 136 | + | components. | |
| 137 | + | ||
| 138 | + | * The string_list API gains a new helper, string_list_sort_u(), and | |
| 139 | + | new unit tests to extend coverage. | |
| 140 | + | ||
| 141 | + | * Improve set-up time of a perf test. | |
| 142 | + | ||
| 143 | + | * ISO C23 redefines strchr and friends that traditionally took | |
| 144 | + | a const pointer and returned a non-const pointer derived from it to | |
| 145 | + | preserve constness (i.e., if you ask for a substring in a const | |
| 146 | + | string, you get a const pointer to the substring). Update code | |
| 147 | + | paths that used non-const pointer to receive their results that did | |
| 148 | + | not have to be non-const to adjust. | |
| 149 | + | ||
| 150 | + | * Rename three functions around the commit_list data structure. | |
| 151 | + | ||
| 152 | + | * Transaction to create objects (or not) is currently tied to the | |
| 153 | + | repository, but in the future a repository can have multiple object | |
| 154 | + | sources, which may have different transaction mechanisms. Make the | |
| 155 | + | odb transaction API per object source. | |
| 156 | + | ||
| 157 | + | * "git merge-ours" is taught to work better in a sparse checkout. | |
| 158 | + | ||
| 159 | + | * Allow recording process ID of the process that holds the lock next | |
| 160 | + | to a lockfile for diagnosis. | |
| 161 | + | ||
| 162 | + | * Reduce dependency on the_repository of xdiff-interface layer. | |
| 163 | + | ||
| 164 | + | * Code clean-up to use the commit_stack API. | |
| 165 | + | ||
| 166 | + | * "git diff --anchored=<text>" has been optimized. | |
| 167 | + | ||
| 168 | + | * A CodingGuidelines update. | |
| 169 | + | ||
| 170 | + | * Add process ancestry data to trace2 on macOS to match what we | |
| 171 | + | already do on Linux and Windows. Also adjust the way Windows | |
| 172 | + | implementation reports this information to match the other two. | |
| 173 | + | ||
| 174 | + | * A handful of places used refs_for_each_ref_in() API incorrectly, | |
| 175 | + | which has been corrected. | |
| 176 | + | ||
| 177 | + | * Some tests assumed "iconv" is available without honoring ICONV | |
| 178 | + | prerequisite, which has been corrected. | |
| 179 | + | ||
| 180 | + | * Revamp object enumeration API around odb. | |
| 181 | + | ||
| 182 | + | * Additional tests were introduced to see the interaction with netrc | |
| 183 | + | auth with auth failure on the http transport. | |
| 184 | + | ||
| 185 | + | * A couple of bugs in use of flag bits around odb API has been | |
| 186 | + | corrected, and the flag bits reordered. | |
| 187 | + | ||
| 188 | + | * Plumb gitk/git-gui build and install procedure in meson based | |
| 189 | + | builds. | |
| 190 | + | ||
| 191 | + | * The code to accept shallow "git push" has been optimized. | |
| 192 | + | ||
| 193 | + | * Simplify build procedure for oxskeychain (in contrib/). | |
| 194 | + | ||
| 195 | + | * Fix dependency screw-up in meson-based builds. | |
| 196 | + | ||
| 197 | + | * Wean the mailmap code off of the_repository dependency. | |
| 198 | + | ||
| 199 | + | * API clean-up for the worktree subsystem. | |
| 200 | + | ||
| 201 | + | * The last uses of the_repository in "tree-diff.c" have been | |
| 202 | + | eradicated. | |
| 203 | + | ||
| 204 | + | * Clean-up the code around "git repo info" command. | |
| 205 | + | ||
| 206 | + | * Mark the merge-ort codebase to prevent more uses of the_repository | |
| 207 | + | from getting added. | |
| 208 | + | ||
| 209 | + | * The core.attributesfile is intended to be set per repository, but | |
| 210 | + | was kept track of by a single global variable in-core, which has | |
| 211 | + | been corrected by moving it to per-repository data structure. | |
| 212 | + | ||
| 213 | + | * Use the hook API to replace ad-hoc invocation of hook scripts via | |
| 214 | + | the run_command() API. | |
| 215 | + | ||
| 216 | + | * Code refactoring around refs-for-each-* API functions. | |
| 217 | + | ||
| 218 | + | * The parse-options API learned to notice an options[] array with | |
| 219 | + | duplicated long options. | |
| 220 | + | (merge 237e520d81 rs/parse-options-duplicated-long-options later to maint). | |
| 221 | + | ||
| 222 | + | * The code to maintain mapping between object names in multiple hash | |
| 223 | + | functions is being added, written in Rust. | |
| 224 | + | ||
| 225 | + | * A bit of OIDmap API enhancement and cleanup. | |
| 226 | + | ||
| 227 | + | * Move gitlab CI from macOS 14 images that are being deprecated. | |
| 228 | + | ||
| 229 | + | * The object source API is getting restructured to allow plugging new | |
| 230 | + | backends. | |
| 231 | + | ||
| 232 | + | * Reduce dependence on the global the_hash_algo and the_repository | |
| 233 | + | variables of wt-status code path. | |
| 234 | + | ||
| 235 | + | * The way combined list-object filter options are parsed has been | |
| 236 | + | revamped. | |
| 237 | + | ||
| 238 | + | * Editorconfig filename patterns were specified incorrectly, making | |
| 239 | + | many source files inside subdirectories unaffected, which has been | |
| 240 | + | corrected. | |
| 241 | + | ||
| 242 | + | * The run_command() API lost its implicit dependency on the singleton | |
| 243 | + | `the_repository` instance. | |
| 244 | + | ||
| 245 | + | * The unit test helper function was taught to use backslash + | |
| 246 | + | mnemonic notation for certain control characters like "\t", instead | |
| 247 | + | of octal notation like "\011". | |
| 248 | + | ||
| 249 | + | * Adjust test-lint to allow "sed -E" to use ERE in the patterns. | |
| 250 | + | ||
| 251 | + | * Clar (unit testing framework) update from the upstream. | |
| 252 | + | ||
| 253 | + | * Reduce system overhead "git upload-pack" spends on relaying "git | |
| 254 | + | pack-objects" output to the "git fetch" running on the other end of | |
| 255 | + | the connection. | |
| 256 | + | ||
| 257 | + | * Add a coccinelle rule to break the build when "struct strbuf" gets | |
| 258 | + | passed by value. | |
| 259 | + | ||
| 260 | + | * Further work on incremental repacking using MIDX/bitmap | |
| 261 | + | ||
| 262 | + | * The logic to count objects has been cleaned up. | |
| 263 | + | ||
| 264 | + | * Tweak the build infrastructure by moving tools around. | |
| 265 | + | ||
| 266 | + | * Uses of prio_queue as a LIFO stack of commits have been written | |
| 267 | + | with commit_stack. | |
| 268 | + | ||
| 269 | + | * The cleanup of remaining bitmaps in "ahead_behind()" has been | |
| 270 | + | simplified. | |
| 271 | + | ||
| 272 | + | * split-index.c has been updated to not use the global the_repository | |
| 273 | + | and the_hash_algo variables. | |
| 274 | + | ||
| 275 | + | * The unsigned integer that is used as a bitset to specify the kind | |
| 276 | + | of branches interpret_branch_name() function has been changed to | |
| 277 | + | use a dedicated enum type. | |
| 278 | + | ||
| 279 | + | * Various updates to contrib/diff-highlight, including documentation | |
| 280 | + | updates, test improvements, and color configuration handling. | |
| 281 | + | ||
| 282 | + | * Code paths that loop over another array to push each element into a | |
| 283 | + | strvec have been rewritten to use strvec_pushv() instead. | |
| 284 | + | ||
| 285 | + | * In case homebrew breaks REG_ENHANCED again, leave an in-code comment | |
| 286 | + | to suggest use of our replacement regex as a workaround. | |
| 287 | + | ||
| 288 | + | * MinGW build updates. | |
| 289 | + | ||
| 290 | + | * The way dash 0.5.13 handles non-ASCII contents in here-doc | |
| 291 | + | is buggy and breaks our existing tests, which unfortunately | |
| 292 | + | have been rewritten to avoid triggering the bug. | |
| 293 | + | ||
| 294 | + | * Object name handling (disambiguation and abbreviation) has been | |
| 295 | + | refactored to be backend-generic, moving logic into the respective | |
| 296 | + | object database backends. | |
| 297 | + | ||
| 298 | + | * pack-objects's --stdin-packs=follow mode learns to handle | |
| 299 | + | excluded-but-open packs. | |
| 300 | + | ||
| 301 | + | * A few code paths that spawned child processes for network | |
| 302 | + | connection weren't wait(2)ing for their children and letting "init" | |
| 303 | + | reap them instead; they have been tightened. | |
| 304 | + | ||
| 305 | + | * Adjust the codebase for C23 that changes functions like strchr() | |
| 306 | + | that discarded constness when they return a pointer into a const | |
| 307 | + | string to preserve constness. | |
| 308 | + | ||
| 309 | + | * A handful of inappropriate uses of the_repository have been | |
| 310 | + | rewritten to use the right repository structure instance in the | |
| 311 | + | read-cache.c codepath. | |
| 312 | + | ||
| 313 | + | * Internals of "git fsck" have been refactored to not depend on the | |
| 314 | + | global `the_repository` variable. | |
| 315 | + | ||
| 316 | + | * Reduce dependency on `the_repository` in add-patch.c file. | |
| 317 | + | ||
| 318 | + | * The way the "git log -L<range>:<file>" feature is bolted onto the | |
| 319 | + | log/diff machinery is being reworked a bit to make the feature | |
| 320 | + | compatible with more diff options, like -S/G. | |
| 321 | + | ||
| 322 | + | * Further work to adjust the codebase for C23 that changes functions | |
| 323 | + | like strchr() that discarded constness when they return a pointer into | |
| 324 | + | a const string to preserve constness. | |
| 325 | + | ||
| 326 | + | * "git rev-list --maximal-only" has been optimized by borrowing the | |
| 327 | + | logic used by "git show-branch --independent", which computes the | |
| 328 | + | same kind of information much more efficiently. | |
| 329 | + | ||
| 330 | + | ||
| 331 | + | Fixes since v2.53 | |
| 332 | + | ----------------- | |
| 333 | + | ||
| 334 | + | * HTTP transport failed to authenticate in some code paths, which has | |
| 335 | + | been corrected. | |
| 336 | + | (merge ed0f7a62f7 ap/http-probe-rpc-use-auth later to maint). | |
| 337 | + | ||
| 338 | + | * The computation of column width made by "git diff --stat" was | |
| 339 | + | confused when pathnames contain non-ASCII characters. | |
| 340 | + | (merge 04f5d95ef7 lp/diff-stat-utf8-display-width-fix later to maint). | |
| 341 | + | ||
| 342 | + | * The "-z" and "--max-depth" documentation (and implementation of | |
| 343 | + | "-z") in the "git last-modified" command have been updated. | |
| 344 | + | (merge 9dcc09bed1 tc/last-modified-options-cleanup later to maint). | |
| 345 | + | ||
| 346 | + | * A handful of code paths that started using batched ref update API | |
| 347 | + | (after Git 2.51 or so) lost detailed error output, which have been | |
| 348 | + | corrected. | |
| 349 | + | (merge eff9299eac kn/ref-batch-output-error-reporting-fix later to maint). | |
| 350 | + | ||
| 351 | + | * "git blame --ignore-revs=... --color-lines" did not account for | |
| 352 | + | ignored revisions passing blame to the same commit an adjacent line | |
| 353 | + | gets blamed for. | |
| 354 | + | (merge d519082d4e rs/blame-ignore-colors-fix later to maint). | |
| 355 | + | ||
| 356 | + | * Coccinelle rules update. | |
| 357 | + | (merge 60614838a4 tc/memzero-array later to maint). | |
| 358 | + | ||
| 359 | + | * Giving "git last-modified" a tree (not a commit-ish) died an | |
| 360 | + | uncontrolled death, which has been corrected. | |
| 361 | + | (merge 525ef52301 tc/last-modified-not-a-tree later to maint). | |
| 362 | + | ||
| 363 | + | * Test contrib/ things in CI to catch breakages before they enter the | |
| 364 | + | "next" branch. | |
| 365 | + | (merge c591c3ceff jc/ci-test-contrib-too later to maint). | |
| 366 | + | ||
| 367 | + | * A handful of documentation pages have been modernized to use the | |
| 368 | + | "synopsis" style. | |
| 369 | + | (merge a34d1d53a6 ja/doc-synopsis-style-even-more later to maint). | |
| 370 | + | ||
| 371 | + | * Small clean-up of xdiff library to remove unnecessary data | |
| 372 | + | duplication. | |
| 373 | + | (merge 5086213bd2 pw/xdiff-cleanups later to maint). | |
| 374 | + | ||
| 375 | + | * Update sample commit-msg hook to complain when a log message has | |
| 376 | + | material mailinfo considers the end of log message in the middle. | |
| 377 | + | (merge 83804c361b pw/commit-msg-sample-hook later to maint). | |
| 378 | + | ||
| 379 | + | * "git pack-objects --stdin-packs" with "--exclude-promisor-objects" | |
| 380 | + | fetched objects that are promised, which was not wanted. This has | |
| 381 | + | been fixed. | |
| 382 | + | (merge f4eff7116d ps/pack-concat-wo-backfill later to maint). | |
| 383 | + | ||
| 384 | + | * "git switch <name>", in an attempt to create a local branch <name> | |
| 385 | + | after a remote tracking branch of the same name gave an advice | |
| 386 | + | message to disambiguate using "git checkout", which has been | |
| 387 | + | updated to use "git switch". | |
| 388 | + | (merge 12fee11f21 jc/checkout-switch-restore later to maint). | |
| 389 | + | ||
| 390 | + | * It does not make much sense to apply the "incomplete-line" | |
| 391 | + | whitespace rule to symbolic links, whose contents almost always | |
| 392 | + | lack the final newline. "git apply" and "git diff" are now taught | |
| 393 | + | to exclude them for a change to symbolic links. | |
| 394 | + | (merge 6a41481c6d jc/whitespace-incomplete-line later to maint). | |
| 395 | + | ||
| 396 | + | * "git format-patch --from=<me>" did not honor the command line | |
| 397 | + | option when writing out the cover letter, which has been corrected. | |
| 398 | + | ||
| 399 | + | * Update build procedure for mergetool documentation in meson-based builds. | |
| 400 | + | (merge 58e4eeeeb5 pw/meson-doc-mergetool later to maint). | |
| 401 | + | ||
| 402 | + | * An earlier attempt to optimize "git subtree" discarded too much | |
| 403 | + | relevant histories, which has been corrected. | |
| 404 | + | ||
| 405 | + | * A prefetch call can be triggered to access a stale diff_queue entry | |
| 406 | + | after diffcore-break breaks a filepair into two and freed the | |
| 407 | + | original entry that is no longer used, leading to a segfault, which | |
| 408 | + | has been corrected. | |
| 409 | + | (merge 2d88ab078d hy/diff-lazy-fetch-with-break-fix later to maint). | |
| 410 | + | ||
| 411 | + | * "git fetch --deepen" that tries to go beyond merged branch used to | |
| 412 | + | get confused where the updated shallow points are, which has been | |
| 413 | + | corrected. | |
| 414 | + | (merge 3ef68ff40e sp/shallow-deepen-relative-fix later to maint). | |
| 415 | + | ||
| 416 | + | * "fsck" iterates over packfiles and its access to pack data caused | |
| 417 | + | the list to be permuted, which caused it to loop forever; the code | |
| 418 | + | to access pack data by "fsck" has been updated to avoid this. | |
| 419 | + | (merge 13eb65d366 ps/fsck-stream-from-the-right-object-instance later to maint). | |
| 420 | + | ||
| 421 | + | * "git log --graph --stat" did not count the display width of colored | |
| 422 | + | graph part of its own output correctly, which has been corrected. | |
| 423 | + | (merge 064b869efc lp/diff-stat-utf8-display-width-fix later to maint). | |
| 424 | + | ||
| 425 | + | * The configuration variable format.noprefix did not behave as a | |
| 426 | + | proper boolean variable, which has now been fixed and documented. | |
| 427 | + | (merge ea3a62c40e kh/format-patch-noprefix-is-boolean later to maint). | |
| 428 | + | ||
| 429 | + | * CI fix. | |
| 430 | + | (merge eb35167dd4 ps/ci-reduce-gitlab-envsize later to maint). | |
| 431 | + | ||
| 432 | + | * "git diff --no-index --find-object=<object-name>" outside a | |
| 433 | + | repository of course wouldn't be able to find the object and died | |
| 434 | + | while parsing the command line. The command is made to die in a | |
| 435 | + | bit more user-friendly way. | |
| 436 | + | (merge b0ddc7947c mm/diff-no-index-find-object later to maint). | |
| 437 | + | ||
| 438 | + | * Fix typo-induced breakages in fsmonitor-watchman sample hook. | |
| 439 | + | (merge 41366e4677 pt/fsmonitor-watchman-sample-fix later to maint). | |
| 440 | + | ||
| 441 | + | * "git for-each-repo" started from a secondary worktree did not work | |
| 442 | + | as expected, which has been corrected. | |
| 443 | + | (merge e87493b9b4 ds/for-each-repo-w-worktree later to maint). | |
| 444 | + | ||
| 445 | + | * The construct 'test "$(command)" = expectation' loses the exit | |
| 446 | + | status from the command, which has been fixed by breaking up the | |
| 447 | + | statement into pieces. | |
| 448 | + | (merge d3edca979a fp/t3310-unhide-git-failures later to maint). | |
| 449 | + | ||
| 450 | + | * While discovering a ".git" directory, the code treats any stat() | |
| 451 | + | failure as a sign that a filesystem entity .git does not exist | |
| 452 | + | there, and ignores ".git" that is not a "gitdir" file or a | |
| 453 | + | directory. The code has been tightened to notice and report | |
| 454 | + | filesystem corruption better. | |
| 455 | + | (merge 1dd27bfbfd ty/setup-error-tightening later to maint). | |
| 456 | + | ||
| 457 | + | * Plug a few leaks where mmap'ed memory regions are not unmapped. | |
| 458 | + | (merge a8a69bbb64 jk/unleak-mmap later to maint). | |
| 459 | + | ||
| 460 | + | * A test now uses the symbolic constant $ZERO_OID instead of 40 "0" to | |
| 461 | + | work better with SHA-256 as well as SHA-1. | |
| 462 | + | (merge 30310f3cc4 ss/t3200-test-zero-oid later to maint). | |
| 463 | + | ||
| 464 | + | * Instead of hardcoded 'origin', use the configured default remote | |
| 465 | + | when fetching from submodules. | |
| 466 | + | (merge 3b5fb32da8 ng/submodule-default-remote later to maint). | |
| 467 | + | ||
| 468 | + | * The code in "git help" that shows configuration items in sorted | |
| 469 | + | order was awkwardly organized and prone to bugs. | |
| 470 | + | ||
| 471 | + | * "imap-send" used to use functions whose use is going to be removed | |
| 472 | + | with OpenSSL 4.0; rewrite them using public API that has been | |
| 473 | + | available since OpenSSL 1.1 since 2016 or so. | |
| 474 | + | (merge 6392a0b75d bb/imap-send-openssl-4.0-prep later to maint). | |
| 475 | + | ||
| 476 | + | * Fix an example in the user-manual. | |
| 477 | + | (merge 5514f14617 gj/user-manual-fix-grep-example later to maint). | |
| 478 | + | ||
| 479 | + | * The final clean-up phase of the diff output could turn the result of | |
| 480 | + | histogram diff algorithm suboptimal, which has been corrected. | |
| 481 | + | (merge e417277ae9 yc/histogram-hunk-shift-fix later to maint). | |
| 482 | + | ||
| 483 | + | * "git diff -U<num>" was too lenient in its command line parsing and | |
| 484 | + | took an empty string as a valid <num>. | |
| 485 | + | (merge 4f6a803aba ty/doc-diff-u-wo-number later to maint). | |
| 486 | + | ||
| 487 | + | * The handling of the incomplete lines at the end by "git | |
| 488 | + | diff-highlight" has been fixed. | |
| 489 | + | ||
| 490 | + | * merge-file --object-id used to trigger a BUG when run in a linked | |
| 491 | + | worktree, which has been fixed. | |
| 492 | + | (merge 57246b7c62 mr/merge-file-object-id-worktree-fix later to maint). | |
| 493 | + | ||
| 494 | + | * "git apply -p<n>" parses <n> more carefully now. | |
| 495 | + | (merge d05d84c5f5 mf/apply-p-no-atoi later to maint). | |
| 496 | + | ||
| 497 | + | * A test to run a .bat file with whitespaces in the name with arguments | |
| 498 | + | with whitespaces in them was flaky in that sometimes it got killed | |
| 499 | + | before it produced expected side effects, which has been rewritten to | |
| 500 | + | make it more robust. | |
| 501 | + | (merge 3ad4921838 jk/t0061-bat-test-update later to maint). | |
| 502 | + | ||
| 503 | + | * "git ls-remote '+refs/tags/*:refs/tags/*' https://..." run outside a | |
| 504 | + | repository would dereference a NULL while trying to see if the given | |
| 505 | + | refspec is a single-object refspec, which has been corrected. | |
| 506 | + | (merge 4e5dc601dd kj/refspec-parsing-outside-repository later to maint). | |
| 507 | + | ||
| 508 | + | * Fix a regression in writing the commit-graph where commits with dates | |
| 509 | + | exceeding 34 bits (beyond year 2514) could cause an underflow and | |
| 510 | + | crash Git during the generation data overflow chunk writing. | |
| 511 | + | ||
| 512 | + | * The value of a wrong pointer variable was referenced in an error | |
| 513 | + | message that reported that it shouldn't be NULL. | |
| 514 | + | (merge 753ecf4205 yc/path-walk-fix-error-reporting later to maint). | |
| 515 | + | ||
| 516 | + | * The check in "receive-pack" to prevent a checked out branch from | |
| 517 | + | getting updated via updateInstead mechanism has been corrected. | |
| 518 | + | ||
| 519 | + | * "git backfill" is capable of auto-detecting a sparsely checked out | |
| 520 | + | working tree, which was broken. | |
| 521 | + | (merge 339eba65a7 th/backfill-auto-detect-sparseness-fix later to maint). | |
| 522 | + | ||
| 523 | + | * add_files_to_cache() used diff_files() to detect only the paths that | |
| 524 | + | are different between the index and the working tree and add them, | |
| 525 | + | which does not need rename detection, which interfered with unnecessary | |
| 526 | + | conflicts. | |
| 527 | + | (merge c0ce43376b ng/add-files-to-cache-wo-rename later to maint). | |
| 528 | + | ||
| 529 | + | * Doc mark-up update for entries in the glossary with bulleted lists. | |
| 530 | + | (merge a65cbd87ea jk/doc-markup-sub-list-indentation later to maint). | |
| 531 | + | ||
| 532 | + | * CI dependency updates. | |
| 533 | + | (merge 4bdb17e3a8 jc/ci-github-actions-use-checkout-v5 later to maint). | |
| 534 | + | ||
| 535 | + | * Other code cleanup, docfix, build fix, etc. | |
| 536 | + | (merge d79fff4a11 jk/remote-tracking-ref-leakfix later to maint). | |
| 537 | + | (merge 7a747f972d dd/t5403-modernise later to maint). | |
| 538 | + | (merge 81021871ea sp/myfirstcontribution-include-update later to maint). | |
| 539 | + | (merge 49223593fd ac/sparse-checkout-string-list-cleanup later to maint). | |
| 540 | + | (merge a824421d36 sp/t5500-cleanup later to maint). | |
| 541 | + | (merge df1c5d7ed7 kh/doc-shortlog-fix later to maint). | |
| 542 | + | (merge 2d45507f15 am/doc-github-contributiong-link-to-submittingpatches later to maint). | |
| 543 | + | (merge 68060b9262 hs/t9160-test-paths later to maint). | |
| 544 | + | (merge 486386c687 cs/subtree-reftable-testfix later to maint). | |
| 545 | + | (merge 0728012c53 jc/diff-highlight-main-master-testfix later to maint). | |
| 546 | + | (merge 831989ef38 mc/doc-send-email-signed-off-by-cc later to maint). | |
| 547 | + | (merge c44b3f3203 sd/doc-my1c-api-config-reference-fix later to maint). | |
| 548 | + | (merge 6c21e53bad rs/version-wo-the-repository later to maint). | |
| 549 | + | (merge 10c68d2577 rs/clean-includes later to maint). | |
| 550 | + | (merge 168d575719 bk/t2003-modernise later to maint). | |
| 551 | + | (merge 6bfef81c9a kh/doc-rerere-options-xref later to maint). | |
| 552 | + | (merge aaf3cc3d8d sd/t7003-test-path-is-helpers later to maint). | |
| 553 | + | (merge 2668b6bdc4 jc/doc-rerere-update later to maint). | |
| 554 | + | (merge 2f99f50f2d jc/doc-cg-c-comment later to maint). | |
| 555 | + | (merge a454cdca42 kh/doc-am-format-sendmail later to maint). | |
| 556 | + | (merge 8b0061b5c5 jk/ref-filter-lrstrip-optim later to maint). | |
| 557 | + | (merge 5133837392 ps/ci-gitlab-msvc-updates later to maint). | |
| 558 | + | (merge 143e84958c db/doc-fetch-jobs-auto later to maint). | |
| 559 | + | (merge 0678e01f02 ap/use-test-seq-f-more later to maint). | |
| 560 | + | (merge 96286f14b0 ty/symlinks-use-unsigned-for-bitset later to maint). | |
| 561 | + | (merge b10e0cb1f3 kh/doc-am-xref later to maint). | |
| 562 | + | (merge ed84bc1c0d kh/doc-patch-id-4 later to maint). | |
| 563 | + | (merge 7451864bfa sc/pack-redundant-leakfix later to maint). | |
| 564 | + | (merge f87593ab1a cx/fetch-display-ubfix later to maint). | |
| 565 | + | (merge a66c8c7f91 jk/repo-structure-cleanup later to maint). | |
| 566 | + | (merge 5ee8782f87 ss/test-that-that-typofix later to maint). | |
| 567 | + | (merge f31b322008 fp/t3310-test-path-is-helpers later to maint). | |
| 568 | + | (merge b22ed4c4f9 kj/path-micro-code-cleanup later to maint). | |
| 569 | + | (merge a56fa1ca05 lp/doc-gitprotocol-pack-fixes later to maint). | |
| 570 | + | (merge 0d6bb8b541 ss/t3700-modernize later to maint). | |
| 571 | + | (merge 63c00a677b ss/t9123-setup-inside-test-expect-success later to maint). | |
| 572 | + | (merge beca0ca4be os/doc-git-custom-commands later to maint). | |
| 573 | + | (merge 4c223571be ty/patch-ids-document-lazy-eval later to maint). | |
| 574 | + | (merge 476365ac85 jc/doc-wholesale-replace-before-next later to maint). | |
| 575 | + | (merge 35f220b639 ss/submodule--helper-use-xmalloc later to maint). | |
| 576 | + | (merge 02cbae61df cf/constness-fixes later to maint). | |
| 577 | + | (merge 69efd53c81 ms/t7605-test-path-is-helpers later to maint). | |
| 578 | + | (merge d39cef3a1a ss/t0410-delete-object-cleanup later to maint). | |
| 579 | + | (merge 2f05039717 rj/pack-refs-tests-path-is-helpers later to maint). | |
| 580 | + | (merge 2594747ad1 jk/transport-color-leakfix later to maint). | |
| 581 | + | (merge 48430e44ac mf/t0008-cleanup later to maint). | |
| 582 | + | (merge fc8a4f15e7 gi/doc-boolean-config-typofix later to maint). | |
| 583 | + | (merge 37182267a0 kh/doc-interpret-trailers-1 later to maint). | |
| 584 | + | (merge f64c50e768 jc/rerere-modern-strbuf-handling later to maint). | |
| 585 | + | (merge 699248d89e th/t8003-unhide-git-failures later to maint). | |
| 586 | + | (merge d8e34f971b za/t2000-modernise later to maint). | |
| 587 | + | (merge 849988bc74 th/t6101-unhide-git-failures later to maint). | |
| 588 | + | (merge 0f0ce07625 sp/doc-gitignore-oowt later to maint). | |
added Documentation/RelNotes/2.54.1.adoc mode 100644
| @@ -0,0 +1,29 @@ | |||
| 1 | + | Git v2.54.1 Release Notes | |
| 2 | + | ========================= | |
| 3 | + | ||
| 4 | + | This release is primarily to merge fixes accumulated on the 'master' | |
| 5 | + | front to prepare for 2.55 release that are still relevant to 2.54.x | |
| 6 | + | maintenance track. | |
| 7 | + | ||
| 8 | + | Fixes since v2.54 | |
| 9 | + | ----------------- | |
| 10 | + | ||
| 11 | + | * Headers from glibc 2.43 when used with clang does not allow | |
| 12 | + | disabling C11 language features, causing build failures.. | |
| 13 | + | ||
| 14 | + | * Revert a recent change that introduced a regression to help mksh users. | |
| 15 | + | ||
| 16 | + | * Update various GitHub Actions versions. | |
| 17 | + | ||
| 18 | + | * Avoid hitting the pathname limit for socks proxy socket during the | |
| 19 | + | test. | |
| 20 | + | ||
| 21 | + | * To help Windows 10 installations, avoid removing files whose | |
| 22 | + | contents are still mmap()'ed. | |
| 23 | + | ||
| 24 | + | * Stop using unmaintained custom allocator in Windows build which was | |
| 25 | + | the last user of the code. | |
| 26 | + | ||
| 27 | + | * Further update to the i18n alias support to avoid regressions. | |
| 28 | + | ||
| 29 | + | Also contains minor documentation updates and code clean-ups. | |
added Documentation/RelNotes/2.55.0.adoc mode 100644
| @@ -0,0 +1,460 @@ | |||
| 1 | + | Git v2.55 Release Notes | |
| 2 | + | ======================= | |
| 3 | + | ||
| 4 | + | UI, Workflows & Features | |
| 5 | + | ------------------------ | |
| 6 | + | ||
| 7 | + | * Hook scripts defined via the configuration system can now be | |
| 8 | + | configured to run in parallel. | |
| 9 | + | ||
| 10 | + | * The userdiff driver for the Scheme language has been extended to | |
| 11 | + | cover other Lisp dialects. | |
| 12 | + | ||
| 13 | + | * Terminal control sequences coming over the sideband while talking | |
| 14 | + | to a remote repository are mostly disabled by default, except for | |
| 15 | + | ANSI color escape sequences. | |
| 16 | + | ||
| 17 | + | * "ort" merge backend improvements. | |
| 18 | + | ||
| 19 | + | * "git checkout -m another-branch" was invented to deal with local | |
| 20 | + | changes to paths that are different between the current and the new | |
| 21 | + | branch, but it gave only one chance to resolve conflicts. The command | |
| 22 | + | was taught to create a stash to save the local changes. | |
| 23 | + | ||
| 24 | + | * A new builtin "git format-rev" is introduced for pretty formatting | |
| 25 | + | one revision expression per line or commit object names found in | |
| 26 | + | running text. | |
| 27 | + | ||
| 28 | + | * "git history" learned "fixup" command. | |
| 29 | + | ||
| 30 | + | * The internal URL parsing logic has been made accessible via a new | |
| 31 | + | subcommand "git url-parse". | |
| 32 | + | ||
| 33 | + | * Misspelt proxy URL (e.g., httt://...) did not trigger any warning | |
| 34 | + | or failure, which has been corrected. We had a regression in this | |
| 35 | + | update that broke https:// proxies, but that has been caught and | |
| 36 | + | corrected. | |
| 37 | + | ||
| 38 | + | * Document the fact that .git/info/exclude is shared across worktrees | |
| 39 | + | linked to the same repository. | |
| 40 | + | ||
| 41 | + | * The command line parser for "git diff" learned a few options take | |
| 42 | + | only non-negative integers. | |
| 43 | + | ||
| 44 | + | * The graph output from commands like "git log --graph" can now be | |
| 45 | + | limited to a specified number of lanes, preventing overly wide output | |
| 46 | + | in repositories with many branches. | |
| 47 | + | ||
| 48 | + | * The fsmonitor daemon has been implemented for Linux. | |
| 49 | + | ||
| 50 | + | * "git cat-file --batch" learns an in-line command "mailmap" | |
| 51 | + | that lets the user toggle use of mailmap. | |
| 52 | + | ||
| 53 | + | * The "git pack-objects --path-walk" traversal has been integrated | |
| 54 | + | with several object filters, including blobless and sparse filters. | |
| 55 | + | ||
| 56 | + | * "git push" learned to take a "remote group" name to push to, which | |
| 57 | + | causes pushes to multiple places, just like "git fetch" would do. | |
| 58 | + | ||
| 59 | + | * The 'git-jump' command (in contrib/) has been taught to automatically | |
| 60 | + | pick a mode (merge, diff, or ws) when invoked without arguments. | |
| 61 | + | ||
| 62 | + | * The documentation for `push.default = simple` has been clarified to | |
| 63 | + | better explain its behavior, making it clear that it pushes the | |
| 64 | + | current branch to a same-named branch on the remote, and detailing | |
| 65 | + | the upstream requirements for centralized workflows. | |
| 66 | + | ||
| 67 | + | * The documentation for "--word-diff" has been extended with a bit of | |
| 68 | + | implementation detail of where these different words come from. | |
| 69 | + | ||
| 70 | + | * "git config foo.bar=baz" is not likely to be a request to read the | |
| 71 | + | value of such a variable with '=' in its name; rather it is plausible | |
| 72 | + | that the user meant "git config set foo.bar baz". Give advice when | |
| 73 | + | giving an error message. | |
| 74 | + | ||
| 75 | + | * "git rev-list" (and "git log" family of commands) learned a new "--max-count-oldest" | |
| 76 | + | that picks oldest N commits in the range instead of the usual newest. | |
| 77 | + | ||
| 78 | + | * Various AsciiDoc markup fixes in 'git config' documentation and | |
| 79 | + | related files to ensure lists and formatting are rendered correctly. | |
| 80 | + | ||
| 81 | + | ||
| 82 | + | Performance, Internal Implementation, Development Support etc. | |
| 83 | + | -------------------------------------------------------------- | |
| 84 | + | ||
| 85 | + | * Promisor remote handling has been refactored and fixed in | |
| 86 | + | preparation for auto-configuration of advertised remotes. | |
| 87 | + | ||
| 88 | + | * Rust support is enabled by default (but still allows opting out); | |
| 89 | + | in Git version 3.0, Rust will become mandatory. | |
| 90 | + | ||
| 91 | + | * Preparation of the xdiff/ codebase to work with Rust. | |
| 92 | + | ||
| 93 | + | * Use a larger buffer size in the code paths to ingest pack stream. | |
| 94 | + | ||
| 95 | + | * Refactor service routines in the ref subsystem backends. | |
| 96 | + | ||
| 97 | + | * Shrink wasted memory in Myers diff that does not account for common | |
| 98 | + | prefix and suffix removal. | |
| 99 | + | ||
| 100 | + | * Enable expensive tests to catch topics that may cause breakages on | |
| 101 | + | integration branches closer to their origin in the contributor PR | |
| 102 | + | builds. | |
| 103 | + | ||
| 104 | + | * "git merge-base" optimization. | |
| 105 | + | ||
| 106 | + | * The limit_list() function that is one of the core part of the | |
| 107 | + | revision traversal infrastructure has been optimized by replacing | |
| 108 | + | its use of linear list with priority queue. | |
| 109 | + | ||
| 110 | + | * In a lazy clone, "git cherry" and "git grep" often fetch necessary | |
| 111 | + | blob objects one by one from promisor remotes. It has been corrected | |
| 112 | + | to collect necessary object names and fetch them in bulk to gain | |
| 113 | + | reasonable performance. | |
| 114 | + | ||
| 115 | + | * The logic to determine that branches in an octopus merge are | |
| 116 | + | independent has been optimized. | |
| 117 | + | ||
| 118 | + | * The consistency checks for the files reference backend have been updated | |
| 119 | + | to skip lock files earlier, avoiding unnecessary parsing of | |
| 120 | + | intermediate files. | |
| 121 | + | ||
| 122 | + | * The negotiation tip options in "git fetch" have been reworked to | |
| 123 | + | allow requiring certain refs to be sent as "have" lines, and to | |
| 124 | + | restrict negotiation to a specific set of refs. | |
| 125 | + | ||
| 126 | + | * The repacking code has been refactored and compaction of MIDX layers | |
| 127 | + | have been implemented, and incremental strategy that does not require | |
| 128 | + | all-into-one repacking has been introduced. | |
| 129 | + | ||
| 130 | + | * ODB transaction interface is being reworked to explicitly handle | |
| 131 | + | object writes. | |
| 132 | + | ||
| 133 | + | * Add a new odb "in-memory" source that is meant to only hold | |
| 134 | + | tentative objects (like the virtual blob object that represents the | |
| 135 | + | working tree file used by "git blame"). | |
| 136 | + | ||
| 137 | + | * Many uses of the_repository has been updated to use a more | |
| 138 | + | appropriate struct repository instance in setup.c codepath. | |
| 139 | + | ||
| 140 | + | * Revision traversal optimization. | |
| 141 | + | ||
| 142 | + | * Build update. | |
| 143 | + | ||
| 144 | + | * The logic to lazy-load trees from the commit-graph has been made | |
| 145 | + | more robust by falling back to reading the commit object when | |
| 146 | + | the commit-graph is no longer available. | |
| 147 | + | ||
| 148 | + | * The "name" argument in git_connect() and related functions has been | |
| 149 | + | converted to a "service" enum to improve type safety and clarify its | |
| 150 | + | purpose. | |
| 151 | + | ||
| 152 | + | * 'git restore --staged' has been optimized to avoid unnecessarily expanding | |
| 153 | + | the sparse index when operating on paths within the sparse checkout | |
| 154 | + | definition, by handling sparse directory entries at the tree level. | |
| 155 | + | ||
| 156 | + | * "git stash -p" has been optimized by reusing cached index | |
| 157 | + | entries in its temporary index, avoiding unnecessary lstat() | |
| 158 | + | calls on unchanged files. | |
| 159 | + | ||
| 160 | + | * The check for non-stale commits in the priority queue used by | |
| 161 | + | `paint_down_to_common` and `ahead_behind` has been optimized by | |
| 162 | + | replacing an O(N) scan with an O(1) counter, yielding performance | |
| 163 | + | improvements in repositories with wide histories. | |
| 164 | + | ||
| 165 | + | * Reachability bitmap generation has been significantly optimized. By | |
| 166 | + | reordering tree traversal, caching object positions, and refining how | |
| 167 | + | pseudo-merge bitmaps are constructed, the performance of "git repack | |
| 168 | + | --write-midx-bitmaps" is improved, especially for large repositories | |
| 169 | + | and when using pseudo-merges. | |
| 170 | + | ||
| 171 | + | * Adding a decimal integer with strbuf_addf("%u") appears commonly; | |
| 172 | + | they have been optimized by using a custom formatter. | |
| 173 | + | ||
| 174 | + | * Formatting object name in full hexadecimal form has been optimized | |
| 175 | + | by using a new strbuf_add_oid_hex() helper function. | |
| 176 | + | ||
| 177 | + | * Encourage original authors to monitor the CI status. | |
| 178 | + | ||
| 179 | + | * The `git log -L` implementation has been refactored to use the | |
| 180 | + | standard diff output pipeline, enabling pickaxe and diff-filter to | |
| 181 | + | work as expected. Additionally, metadata-only diff formats like | |
| 182 | + | --raw and --name-only are now supported with -L. | |
| 183 | + | ||
| 184 | + | * The loose object source has been refactored into a proper `struct | |
| 185 | + | odb_source`. | |
| 186 | + | ||
| 187 | + | * Guidelines on how to write a cover letter for a multi-patch series | |
| 188 | + | have been added to SubmittingPatches, which also got a new marker | |
| 189 | + | to separate the section for typofixes. | |
| 190 | + | ||
| 191 | + | * The setup logic to discover and configure repositories has been | |
| 192 | + | refactored, and the initialization of the object database has been | |
| 193 | + | centralized. | |
| 194 | + | ||
| 195 | + | * Many core configuration variables have been migrated from global | |
| 196 | + | variables into 'repo_config_values' to tie them to a specific | |
| 197 | + | repository instance, avoiding cross-repository state leakage. | |
| 198 | + | ||
| 199 | + | * Streaming revision walks have been optimized by using a priority queue | |
| 200 | + | for date-sorting commits, speeding up walks repositories with many | |
| 201 | + | merges. | |
| 202 | + | ||
| 203 | + | * A recent regression in t7527 that broke TAP output has been fixed, | |
| 204 | + | some other test noise that also broke TAP output has been silenced, | |
| 205 | + | and 'prove' is now configured to fail on invalid TAP output to | |
| 206 | + | prevent future regressions. | |
| 207 | + | ||
| 208 | + | * A handful of inappropriate uses of the_repository have been | |
| 209 | + | rewritten to use the right repository structure instance in the | |
| 210 | + | unpack-trees.c codepath. | |
| 211 | + | ||
| 212 | + | * "git index-pack" has been optimized by retaining child bases in the | |
| 213 | + | delta cache instead of immediately freeing them, letting the existing | |
| 214 | + | cache limit policy decide eviction. | |
| 215 | + | ||
| 216 | + | * `git ls-files --modified` and `git ls-files --deleted` have been | |
| 217 | + | optimized to filter with pathspec before calling lstat() when there is | |
| 218 | + | only a single pathspec item, avoiding unnecessary filesystem access | |
| 219 | + | for entries that will not be shown. | |
| 220 | + | ||
| 221 | + | * The UNUSED macro in 'compat/posix.h' has been updated to use a | |
| 222 | + | newly introduced GIT_CLANG_PREREQ macro for compiler version | |
| 223 | + | checks, and the existing GIT_GNUC_PREREQ macro has been modernized | |
| 224 | + | to use explicit major/minor comparisons rather than bit-shifting. | |
| 225 | + | ||
| 226 | + | * Wean the Windows builds in GitLab CI procedure away from | |
| 227 | + | (unfortunately unreliable) Chocolatey to install dependencies. | |
| 228 | + | (merge 0e7b51fed2 ps/gitlab-ci-windows later to maint). | |
| 229 | + | ||
| 230 | + | * Build-fix for 32-bit Windows. | |
| 231 | + | ||
| 232 | + | * Xcode 15 and later has a linker set to complain when the same library | |
| 233 | + | archive is listed twice on the command line. Squelch the annoyance. | |
| 234 | + | ||
| 235 | + | ||
| 236 | + | Fixes since v2.54 | |
| 237 | + | ----------------- | |
| 238 | + | ||
| 239 | + | * Code clean-up to use the right instance of a repository instance in | |
| 240 | + | calls inside refs subsystem. | |
| 241 | + | (merge 57c590feb9 sp/refs-reduce-the-repository later to maint). | |
| 242 | + | ||
| 243 | + | * The check that implements the logic to see if an in-core cache-tree | |
| 244 | + | is fully ready to write out a tree object was broken, which has | |
| 245 | + | been corrected. | |
| 246 | + | (merge 521731213c dl/cache-tree-fully-valid-fix later to maint). | |
| 247 | + | ||
| 248 | + | * The test suite harness and many individual test scripts have been | |
| 249 | + | updated to work correctly when 'set -e' is in effect, which helps | |
| 250 | + | detect misspelled test commands. | |
| 251 | + | (merge ffe8005b9d ps/test-set-e-clean later to maint). | |
| 252 | + | ||
| 253 | + | * Revert a recent change that introduced a regression to help mksh users. | |
| 254 | + | ||
| 255 | + | * Update various GitHub Actions versions. | |
| 256 | + | ||
| 257 | + | * Avoid hitting the pathname limit for socks proxy socket during the | |
| 258 | + | test.. | |
| 259 | + | ||
| 260 | + | * To help Windows 10 installations, avoid removing files whose | |
| 261 | + | contents are still mmap()'ed. | |
| 262 | + | ||
| 263 | + | * The 'git backfill' command now rejects revision-limiting options that | |
| 264 | + | are incompatible with its operation, uses standard documentation for | |
| 265 | + | revision ranges, and includes blobs from boundary commits by default | |
| 266 | + | to improve performance of subsequent operations. | |
| 267 | + | (merge a1ad4a0fca en/backfill-fixes-and-edges later to maint). | |
| 268 | + | ||
| 269 | + | * "git grep" update. | |
| 270 | + | (merge 9ff4b5ab1b rs/grep-column-only-match-fix later to maint). | |
| 271 | + | ||
| 272 | + | * Headers from glibc 2.43 when used with clang does not allow | |
| 273 | + | disabling C11 language features, causing build failures.. | |
| 274 | + | ||
| 275 | + | * The 'http.emptyAuth=auto' configuration now correctly attempts | |
| 276 | + | Negotiate authentication before falling back to manual credentials. | |
| 277 | + | This allows seamless Kerberos ticket-based authentication without | |
| 278 | + | requiring users to explicitly set 'http.emptyAuth=true'. | |
| 279 | + | (merge 4919938d28 mc/http-emptyauth-negotiate-fix later to maint). | |
| 280 | + | ||
| 281 | + | * Ramifications of turning off commit-graph has been documented a bit | |
| 282 | + | more clearly. | |
| 283 | + | (merge 48c855bb8f kh/doc-commit-graph later to maint). | |
| 284 | + | ||
| 285 | + | * "git rebase --update-refs", when used with an rebase.instructionFormat | |
| 286 | + | with "%d" (describe) in it, tried to update local branch HEAD by | |
| 287 | + | mistake, which has been corrected. | |
| 288 | + | (merge 106b6885c7 ag/rebase-update-refs-limit-to-branches later to maint). | |
| 289 | + | ||
| 290 | + | * Tweak the way how sideband messages from remote are printed while | |
| 291 | + | we talk with a remote repository to avoid tickling terminal | |
| 292 | + | emulator glitches. | |
| 293 | + | (merge 31e8fcabd8 rs/sideband-clear-line-before-print later to maint). | |
| 294 | + | ||
| 295 | + | * The configuration variable submodule.fetchJobs was not read correctly, | |
| 296 | + | which has been corrected. | |
| 297 | + | (merge aa45a5902f sj/submodule-update-clone-config-fix later to maint). | |
| 298 | + | ||
| 299 | + | * Update code paths that assumed "unsigned long" was long enough for | |
| 300 | + | "size_t". | |
| 301 | + | (merge 7a094d68a2 js/objects-larger-than-4gb-on-windows later to maint). | |
| 302 | + | ||
| 303 | + | * Stop using unmaintained custom allocator in Windows build which was | |
| 304 | + | the last user of the code. | |
| 305 | + | ||
| 306 | + | * The computation to shorten the filenames shown in diffstat measured | |
| 307 | + | width of individual UTF-8 characters to add up, but forgot to take | |
| 308 | + | into account error cases (e.g., an invalid UTF-8 sequence, or a | |
| 309 | + | control character). | |
| 310 | + | (merge 09d86a3b98 en/diffstat-utf8-truncation-fix later to maint). | |
| 311 | + | ||
| 312 | + | * Some tests assume that bare repository accesses are by default | |
| 313 | + | allowed; rewrite some of them to avoid the assumption, rewrite | |
| 314 | + | others to explicitly set safe.bareRepository to allow them. | |
| 315 | + | (merge 985b38ca6c js/adjust-tests-to-explicitly-access-bare-repo later to maint). | |
| 316 | + | ||
| 317 | + | * Signing commit with custom encoding was passing the data to be | |
| 318 | + | signed at a wrong stage in the pipeline, which has been corrected. | |
| 319 | + | (merge 7735d7eee3 bc/sign-commit-with-custom-encoding later to maint). | |
| 320 | + | ||
| 321 | + | * Further update to the i18n alias support to avoid regressions. | |
| 322 | + | ||
| 323 | + | * "git fetch --deepen=<n>" in a full clone truncated the history to <n> | |
| 324 | + | commits deep, which has been corrected to be a no-op instead. | |
| 325 | + | (merge 2431f5e0e5 sp/shallow-deepen-on-non-shallow-repo-fix later to maint). | |
| 326 | + | ||
| 327 | + | * "git maintenance" that goes background did not use the lockfile to | |
| 328 | + | prevent multiple maintenance processes from running at the same | |
| 329 | + | time, which has been corrected. | |
| 330 | + | (merge 29364f1624 ps/maintenance-daemonize-lockfix later to maint). | |
| 331 | + | ||
| 332 | + | * Remove ineffective strbuf presizing that would have computed an | |
| 333 | + | allocation that would not have fit in the available memory anyway, | |
| 334 | + | or too small due to integer wraparound to cause immediate automatic | |
| 335 | + | growing. | |
| 336 | + | (merge a9ce8526dc jk/pretty-no-strbuf-presizing later to maint). | |
| 337 | + | ||
| 338 | + | * The HTTP walker misinterpreted the alternates file that gives an | |
| 339 | + | absolute path when the server URL does not have the final slash | |
| 340 | + | (i.e., "https://example.com" not "https://example.com/"). | |
| 341 | + | (merge b92387cd55 jk/dumb-http-alternate-fix later to maint). | |
| 342 | + | ||
| 343 | + | * "git bisect" now uses the selected terms (e.g., old/new) more | |
| 344 | + | consistently in its output. | |
| 345 | + | (merge cb55991825 jr/bisect-custom-terms-in-output later to maint). | |
| 346 | + | ||
| 347 | + | * Update GitLab CI jobs that exercise macOS. | |
| 348 | + | (merge 62319b49bb ps/gitlab-ci-macOS-improvements later to maint). | |
| 349 | + | ||
| 350 | + | * "Friday noon" asked in the morning on Sunday was parsed to be one | |
| 351 | + | day before the specified time, which has been corrected. | |
| 352 | + | (merge b809304101 ta/approxidate-noon-fix later to maint). | |
| 353 | + | ||
| 354 | + | * The GIT_WORK_TREE variable prepared to invoke the push-to-checkout | |
| 355 | + | hook was leaking into the environment even when there was no hook | |
| 356 | + | used and broke the default push-to-deploy (i.e., let "git checkout" | |
| 357 | + | update the working tree only when the working tree is clean). | |
| 358 | + | (merge 44d04e4426 ar/receive-pack-worktree-env later to maint). | |
| 359 | + | ||
| 360 | + | * A batch of documentation pages has been updated to use the modern | |
| 361 | + | synopsis style. | |
| 362 | + | (merge 2ef248ae45 ja/doc-synopsis-style-again later to maint). | |
| 363 | + | ||
| 364 | + | * The "promisor.quiet" configuration variable was not used from | |
| 365 | + | relevant submodules when commands like "grep --recurse-submodules" | |
| 366 | + | triggered a lazy fetch, which has been corrected. | |
| 367 | + | (merge fa1468a1f7 th/promisor-quiet-per-repo later to maint). | |
| 368 | + | ||
| 369 | + | * Correct use of sockaddr API in "git daemon". | |
| 370 | + | (merge 422a5bf575 st/daemon-sockaddr-fixes later to maint). | |
| 371 | + | ||
| 372 | + | * A memory leak in `fetch_and_setup_pack_index()` when verification of | |
| 373 | + | the downloaded pack index fails has been plugged. Also an obsolete | |
| 374 | + | `unlink()` call on parse failure has been cleaned up. | |
| 375 | + | ||
| 376 | + | * In t3070-wildmatch, "via ls-files" test variants with patterns | |
| 377 | + | containing backslash escapes are now skipped on Windows, avoiding 36 | |
| 378 | + | test failures caused by pathspec separator conversion. | |
| 379 | + | (merge 8c84e6802c kk/wildmatch-windows-ls-files-prereq later to maint). | |
| 380 | + | ||
| 381 | + | * A linker warning on macOS when building with Xcode 16.3 or newer has | |
| 382 | + | been avoided by passing -fno-common to the compiler when a | |
| 383 | + | sufficiently new linker is detected. | |
| 384 | + | (merge 5cd4d0d850 hn/macos-linker-warning later to maint). | |
| 385 | + | ||
| 386 | + | * Documentation and tests have been added to clarify that Git's internal | |
| 387 | + | raw timestamp format requires a `@` prefix for values less than | |
| 388 | + | 100,000,000 to prevent ambiguity with other formats like YYYYMMDD. | |
| 389 | + | (merge 4018dc29ee ls/doc-raw-timestamp-prefix later to maint). | |
| 390 | + | ||
| 391 | + | * Wording used in "format-patch --subject-prefix" documentation | |
| 392 | + | has been improved. | |
| 393 | + | (merge 4a1eb9304a lo/doc-format-patch-subject-prefix later to maint). | |
| 394 | + | ||
| 395 | + | * Advanced emulation of kill() used on Windows in GfW has been | |
| 396 | + | upstreamed to improve the symptoms like left-behind .lock files and | |
| 397 | + | that fails to let the child clean-up itself when it gets killed. | |
| 398 | + | (merge 363f1d8b3a js/win-kill-child-more-gently later to maint). | |
| 399 | + | ||
| 400 | + | * The 'git describe --contains --all' command has been fixed to | |
| 401 | + | properly honor the '--match' and '--exclude' options by passing | |
| 402 | + | them down to 'git name-rev' with the appropriate reference | |
| 403 | + | prefixes. | |
| 404 | + | (merge 1891707d1b jk/describe-contains-all-match-fix later to maint). | |
| 405 | + | ||
| 406 | + | * Various typos, grammatical errors, and duplicated words in both | |
| 407 | + | documentation and code comments have been corrected. | |
| 408 | + | (merge dc6068df67 wy/docs-typofixes later to maint). | |
| 409 | + | ||
| 410 | + | * The subprocess handshake during startup has been made gentler by using | |
| 411 | + | packet_read_line_gently() instead of packet_read_line() to prevent the | |
| 412 | + | parent Git process from dying abruptly when a configured subprocess | |
| 413 | + | (e.g., a clean/smudge filter) fails to start. | |
| 414 | + | (merge 061a68e443 mm/subprocess-handshake-fix later to maint). | |
| 415 | + | ||
| 416 | + | * The TSAN race in transfer_debug() within transport-helper.c has been | |
| 417 | + | resolved by initializing the debug flag early in | |
| 418 | + | bidirectional_transfer_loop() before spawning worker threads, allowing | |
| 419 | + | the removal of a TSAN suppression. | |
| 420 | + | (merge 85704eda18 ps/transport-helper-tsan-fix later to maint). | |
| 421 | + | ||
| 422 | + | * 'git describe' has been taught to pass the 'refs/tags/' prefix down to | |
| 423 | + | the ref iterator when '--all' is not requested, avoiding unnecessary | |
| 424 | + | iteration over non-tag refs. | |
| 425 | + | (merge 55088ac8a4 td/describe-tag-iteration later to maint). | |
| 426 | + | ||
| 427 | + | * compute_reachable_generation_numbers() in commit-graph used a 32-bit | |
| 428 | + | integer to accumulate parent generations, which is OK for generation | |
| 429 | + | number v1 (topological levels), but with generation number v2 | |
| 430 | + | (adjusted committer timestamps), it truncated timestamps beyond | |
| 431 | + | 2106. Fixed by widening the accumulator to timestamp_t. | |
| 432 | + | (merge fbcc5408fc en/commit-graph-timestamp-fix later to maint). | |
| 433 | + | ||
| 434 | + | * Other code cleanup, docfix, build fix, etc. | |
| 435 | + | (merge 80f4b802e9 ja/doc-difftool-synopsis-style later to maint). | |
| 436 | + | (merge b96490241e jc/doc-timestamps-in-stat later to maint). | |
| 437 | + | (merge ef85286e51 ss/t7004-unhide-git-failures later to maint). | |
| 438 | + | (merge 7584d10bc2 mf/format-patch-cover-letter-format-docfix later to maint). | |
| 439 | + | (merge 8547908eb3 pw/rename-to-get-current-worktree later to maint). | |
| 440 | + | (merge 890229b3f3 sg/t6112-unwanted-tilde-expansion-fix later to maint). | |
| 441 | + | (merge ab9753e7bc kh/doc-restore-double-underscores-fix later to maint). | |
| 442 | + | (merge 4a9e097228 za/t2000-modernise-more later to maint). | |
| 443 | + | (merge b635fd0725 kh/doc-log-decorate-list later to maint). | |
| 444 | + | (merge 65ea197dca jk/commit-sign-overflow-fix later to maint). | |
| 445 | + | (merge 3ccb16052a jk/apply-leakfix later to maint). | |
| 446 | + | (merge 5e6e8dc786 tb/pseudo-merge-bugfixes later to maint). | |
| 447 | + | (merge 6d09e798bc pb/doc-diff-format-updates later to maint). | |
| 448 | + | (merge 34a891a2d3 rs/trailer-fold-optim later to maint). | |
| 449 | + | (merge 499f9048e0 ps/t3903-cover-stash-include-untracked later to maint). | |
| 450 | + | (merge b56ab270aa jk/sq-dequote-cleanup later to maint). | |
| 451 | + | (merge 29d9fdcf10 rs/use-builtin-add-overflow-explicitly-on-clang later to maint). | |
| 452 | + | (merge d9982e8290 ed/check-connected-close-err-fd-2.53 later to maint). | |
| 453 | + | (merge 1740cc35d0 ed/check-connected-close-err-fd later to maint). | |
| 454 | + | (merge f4d7eb3d1c sp/doc-range-diff-takes-notes later to maint). | |
| 455 | + | (merge 83e7f3bd2b kh/free-commit-list later to maint). | |
| 456 | + | (merge d1b72b29e9 am/doc-tech-hash-typofix later to maint). | |
| 457 | + | (merge 014c454799 ak/typofixes later to maint). | |
| 458 | + | (merge 522ea8ef7d js/osxkeychain-build-wo-rust later to maint). | |
| 459 | + | (merge e8f12e0e95 jc/t1400-fifo-cleanup later to maint). | |
| 460 | + | (merge 0bf506efd4 kw/gitattributes-typofix later to maint). | |
added Documentation/RelNotes/2.56.0.adoc mode 100644
| @@ -0,0 +1,640 @@ | |||
| 1 | + | Git v2.56 Release Notes | |
| 2 | + | ======================= | |
| 3 | + | ||
| 4 | + | UI, Workflows & Features | |
| 5 | + | ------------------------ | |
| 6 | + | ||
| 7 | + | * Advice shown by "git status" when the local branch is behind or has | |
| 8 | + | diverged from its push branch has been updated to suggest "git pull | |
| 9 | + | <remote> <branch>". | |
| 10 | + | ||
| 11 | + | * The handling of promisor-remote protocol capability has been updated | |
| 12 | + | to allow the other side to add to the list of promisor remotes via the | |
| 13 | + | 'promisor.acceptFromServerURL' configuration variable. | |
| 14 | + | ||
| 15 | + | * The 'ort' merge backend has been hardened against corrupt trees by | |
| 16 | + | ensuring it aborts under appropriate error conditions. | |
| 17 | + | ||
| 18 | + | * The `fetch.followRemoteHEAD` configuration variable has been added to | |
| 19 | + | provide a default for the per-remote `remote.<name>.followRemoteHEAD` | |
| 20 | + | setting. | |
| 21 | + | ||
| 22 | + | * "git log --follow" has been updated to better handle non-linear | |
| 23 | + | history, in which the path being tracked gets renamed differently in | |
| 24 | + | multiple history lines. | |
| 25 | + | ||
| 26 | + | * The "git repo info" command has been taught new keys to output both | |
| 27 | + | absolute and relative paths for "gitdir" and "commondir", supported by | |
| 28 | + | a new path-formatting helper extracted from "git rev-parse". | |
| 29 | + | ||
| 30 | + | * When 'git push origin/main' or 'git branch origin main' is run, the | |
| 31 | + | command is now recognized as a potential typo, and advice has been | |
| 32 | + | added to offer a typo fix. | |
| 33 | + | ||
| 34 | + | * The 'git refs' toolbox has been extended with new 'create', 'delete', | |
| 35 | + | 'update', and 'rename' subcommands to create, delete, update, and | |
| 36 | + | rename references, respectively. | |
| 37 | + | ||
| 38 | + | * The experimental 'git history' command has been taught a new 'drop' | |
| 39 | + | subcommand to remove a commit, with its descendants replayed onto its | |
| 40 | + | parent. | |
| 41 | + | ||
| 42 | + | * The alignment of commit object name abbreviations in 'git blame' | |
| 43 | + | output has been optimized to reserve a column for marks (caret, | |
| 44 | + | question mark, or asterisk) only when such marks are actually shown. | |
| 45 | + | ||
| 46 | + | * Option parsing with 'git rev-parse --parseopt' and in most 'git' | |
| 47 | + | subcommands has been updated to exit with 0 (instead of 129) when the | |
| 48 | + | help option ('-h' or '--help') is requested directly by the user, | |
| 49 | + | aligning with standard Unix convention. | |
| 50 | + | ||
| 51 | + | * The '[includeIf "condition"]' conditional inclusion facility for | |
| 52 | + | configuration files has been taught to use the location of the | |
| 53 | + | worktree in its condition. | |
| 54 | + | ||
| 55 | + | * The usage string and SYNOPSIS for 'git fast-export' have been | |
| 56 | + | standardized to make them consistent with each other and with other | |
| 57 | + | commands. | |
| 58 | + | ||
| 59 | + | * 'git log --graph' has been modified to visually distinguish parentless | |
| 60 | + | 'root' commits (and commits that become roots due to history | |
| 61 | + | simplification) by indenting them, preventing them from appearing | |
| 62 | + | falsely related to unrelated commits rendered immediately above them. | |
| 63 | + | ||
| 64 | + | * Userdiff patterns for Swift have been added, with support for | |
| 65 | + | Swift-specific constructs such as attributes, modifiers, failable | |
| 66 | + | initializers, and generics. | |
| 67 | + | ||
| 68 | + | * Configuration file locking has been updated to retry for a short | |
| 69 | + | period, avoiding failures when multiple processes attempt to update | |
| 70 | + | the configuration simultaneously. | |
| 71 | + | ||
| 72 | + | * The 'remote-object-info' command has been added to 'git cat-file | |
| 73 | + | --batch-command', allowing clients to request object metadata | |
| 74 | + | (currently size) from a remote server via protocol v2 without | |
| 75 | + | downloading the entire object. Format placeholders are dynamically | |
| 76 | + | filtered on the client based on server-advertised capabilities, | |
| 77 | + | returning empty strings for inapplicable or unsupported fields. | |
| 78 | + | ||
| 79 | + | * 'git branch -d' has been taught to report when a branch cannot be | |
| 80 | + | deleted because it is being used in an active bisect run. | |
| 81 | + | ||
| 82 | + | * 'git mv' has been updated to check for a missing destination | |
| 83 | + | leading directory during the checking phase, allowing 'git mv -n' | |
| 84 | + | to report the failure. The error message when the rename(2) | |
| 85 | + | syscall fails has also been improved to name both the source and | |
| 86 | + | the destination. | |
| 87 | + | ||
| 88 | + | * 'git add' has been taught a new '--resolved' option to stage | |
| 89 | + | conflict-resolved paths, while leaving unrelated local changes | |
| 90 | + | unstaged. It scans the unmerged paths for leftover conflict | |
| 91 | + | markers and aborts if any are found. | |
| 92 | + | ||
| 93 | + | * The known limitations of the ref format migration in 'git refs' have | |
| 94 | + | been moved to be displayed as a warning admonition directly under the | |
| 95 | + | description of the 'migrate' subcommand, improving visibility. A | |
| 96 | + | reference to 'git-maintenance' has also been corrected to use the | |
| 97 | + | 'linkgit' macro. | |
| 98 | + | ||
| 99 | + | * The 'git bisect' command has been taught a | |
| 100 | + | '--reset-when-found[=<where>]' option that tells the command to | |
| 101 | + | automatically run 'git bisect reset' to jump back to the original | |
| 102 | + | state or to the found culprit. | |
| 103 | + | ||
| 104 | + | * The 'git branch' command has been taught the '--delete-merged' option | |
| 105 | + | to remove local branches that are already merged into their tracked | |
| 106 | + | remote-tracking branches. | |
| 107 | + | ||
| 108 | + | * The 'remote-object-info' command for 'git cat-file --batch-command' | |
| 109 | + | has been extended to support the '%(objecttype)' placeholder. | |
| 110 | + | ||
| 111 | + | * The usage string of 'git fast-import' has been updated to use the | |
| 112 | + | parse_options() API for displaying help, and its SYNOPSIS in the | |
| 113 | + | documentation has been standardized to match. | |
| 114 | + | ||
| 115 | + | * The error message given by 'git send-email' when a message file is | |
| 116 | + | missing a 'Subject:' header has been clarified, and the error string | |
| 117 | + | is now terminated with a newline so that Perl avoids appending its | |
| 118 | + | internal source location data. | |
| 119 | + | ||
| 120 | + | ||
| 121 | + | Performance, Internal Implementation, Development Support etc. | |
| 122 | + | -------------------------------------------------------------- | |
| 123 | + | ||
| 124 | + | * The refactoring of 'setup.c' has been continued to drop remaining | |
| 125 | + | global state (`git_work_tree_cfg`, `is_bare_repository_cfg`), updating | |
| 126 | + | `is_bare_repository()` to no longer implicitly rely on | |
| 127 | + | `the_repository`. | |
| 128 | + | ||
| 129 | + | * Project-specific configuration for b4 has been introduced, and the | |
| 130 | + | documentation has been updated to recommend using it as a | |
| 131 | + | streamlined method for submitting patches. | |
| 132 | + | ||
| 133 | + | * The default format path of git cat-file --batch has been optimized | |
| 134 | + | to use strbuf_add_oid_hex() and strbuf_add_uint() instead of | |
| 135 | + | strbuf_addf(), yielding a noticeable speedup. | |
| 136 | + | ||
| 137 | + | * Commands that list branches and tags (like git branch and git tag) | |
| 138 | + | have been optimized to pass the namespace prefix when initializing | |
| 139 | + | their ref iterator, avoiding a loose-ref scaling regression in | |
| 140 | + | repositories with many unrelated loose references. | |
| 141 | + | ||
| 142 | + | * The packed object source has been refactored into a proper struct | |
| 143 | + | odb_source. | |
| 144 | + | ||
| 145 | + | * The global configuration variables protect_hfs and protect_ntfs have | |
| 146 | + | been migrated into struct repo_config_values to tie them to | |
| 147 | + | per-repository configuration state. | |
| 148 | + | ||
| 149 | + | * The trailer sections in SubmittingPatches have been updated to | |
| 150 | + | encourage use of standard trailers. | |
| 151 | + | ||
| 152 | + | * The documentation in SubmittingPatches has been updated to clarify how | |
| 153 | + | patch contributors should respond to design and viability critiques, | |
| 154 | + | and how the resolution of such critiques should be recorded in the | |
| 155 | + | final commit messages. | |
| 156 | + | ||
| 157 | + | * The pack-objects command has been updated to support reachability | |
| 158 | + | bitmaps and delta-islands concurrently with the `--path-walk` option, | |
| 159 | + | allowing faster packaging by falling back to path-walk when bitmaps | |
| 160 | + | cannot fully satisfy the request. | |
| 161 | + | ||
| 162 | + | * Documentation on community contribution guidelines has been updated to | |
| 163 | + | encourage replying to review comments before rerolling, and to advise | |
| 164 | + | a default limit of at most one reroll per day to give reviewers across | |
| 165 | + | different time zones enough time to participate. | |
| 166 | + | ||
| 167 | + | * The lazy priority queue optimization pattern (deferring actual removal | |
| 168 | + | in 'prio_queue_get()' to allow get+put fusion) has been folded | |
| 169 | + | directly into 'prio_queue' itself, speeding up commit traversal | |
| 170 | + | workflows and simplifying callers. | |
| 171 | + | ||
| 172 | + | * The 'reprepare()' callback for object database sources has been | |
| 173 | + | generalized into a 'prepare()' callback with an optional flush cache | |
| 174 | + | flag, and a new 'odb_prepare()' wrapper has been introduced to allow | |
| 175 | + | pre-opening object database sources. | |
| 176 | + | ||
| 177 | + | * The 'whence' field in 'struct object_info' has been removed. The | |
| 178 | + | backend-specific object information retrieval has been refactored into | |
| 179 | + | an opt-in 'struct object_info_source' structure. | |
| 180 | + | ||
| 181 | + | * A racy build failure under Meson has been corrected by ensuring that | |
| 182 | + | the generated header file 'hook-list.h' is built before compiling | |
| 183 | + | files in 'builtin_sources' that depend on it. | |
| 184 | + | ||
| 185 | + | * The repository discovery and repository configuration phases, which | |
| 186 | + | were previously intertwined in 'setup.c', have been split. Repository | |
| 187 | + | discovery has been updated to populate a 'struct repo_discovery' | |
| 188 | + | without modifying the repository state, which is then taken by | |
| 189 | + | repository configuration to initialize the repository, paving the way | |
| 190 | + | for clean unification of repository configuration. | |
| 191 | + | ||
| 192 | + | * The 'SubmittingPatches' document has been updated to explicitly | |
| 193 | + | describe the expectation for contributors to retract or abandon their | |
| 194 | + | patch series when they are no longer pursuing it. | |
| 195 | + | ||
| 196 | + | * The contributor guide has been updated to advise new contributors to | |
| 197 | + | trim irrelevant quoted text when replying to review comments, matching | |
| 198 | + | the existing advice given to reviewers. | |
| 199 | + | ||
| 200 | + | * The build system has been updated to support building universal macOS | |
| 201 | + | binaries when 'Rust' is enabled, by compiling separate static archives | |
| 202 | + | for each target triple listed in 'RUST_TARGETS' and combining them | |
| 203 | + | using the macOS 'lipo' tool. The 'git-credential-osxkeychain' helper | |
| 204 | + | has been updated to link against '$(RUST_LIB)' when 'Rust' is enabled. | |
| 205 | + | ||
| 206 | + | * The test suite has been updated to use the 'test_grep' helper instead | |
| 207 | + | of bare 'grep' for test assertions, allowing file contents to be | |
| 208 | + | printed on failure for easier debugging. A new 'greplint' linter has | |
| 209 | + | been introduced to detect and prevent new bare 'grep' assertions from | |
| 210 | + | being added to the test suite. | |
| 211 | + | ||
| 212 | + | * The pipelines in 't1410-reflog.sh' have been replaced with the | |
| 213 | + | 'test_stdout_line_count' helper to avoid suppressing the exit code of | |
| 214 | + | 'git' commands, ensuring failures are not hidden from the test suite. | |
| 215 | + | ||
| 216 | + | * The cache-scanning loop in 'next_cache_entry()' has been optimized | |
| 217 | + | to avoid rescanning already-unpacked index entries, preventing a | |
| 218 | + | quadratic performance slow-down when diffing the working tree | |
| 219 | + | against a commit with a pathspec matching early index entries. | |
| 220 | + | ||
| 221 | + | * The global configuration variable 'ignore_case' (representing the | |
| 222 | + | 'core.ignorecase' configuration) has been migrated into 'struct | |
| 223 | + | repo_config_values' to tie it to a specific repository instance. | |
| 224 | + | ||
| 225 | + | * The performance of ref updates and reads using the 'reftable' backend | |
| 226 | + | in the presence of many deletion tombstone records has been optimized | |
| 227 | + | by removing the tombstone suppression flag from the merged iterator | |
| 228 | + | and instead skipping tombstones at higher-level call sites where | |
| 229 | + | iteration bounds are known. | |
| 230 | + | ||
| 231 | + | * Various code paths have been hardened against potential NULL-pointer | |
| 232 | + | dereferences and invalid file descriptor accesses flagged by | |
| 233 | + | Coverity. | |
| 234 | + | ||
| 235 | + | * The in-tree 'b4' cover letter template has been updated to include the | |
| 236 | + | 'change-id' trailer, ensuring that sent tags generated by 'b4' contain | |
| 237 | + | the required tracking information for subsequent runs. | |
| 238 | + | ||
| 239 | + | * 'git receive-pack' has been refactored to use ODB transaction | |
| 240 | + | interfaces instead of directly managing 'tmp_objdir' for staging | |
| 241 | + | incoming objects, bringing it closer to being ODB backend agnostic. | |
| 242 | + | ||
| 243 | + | * The test script 't/t9811-git-p4-label-import.sh' has been | |
| 244 | + | modernized to use 'test_path_is_file' and 'test_path_is_missing' | |
| 245 | + | instead of raw 'test -f' and '! test -f' calls. | |
| 246 | + | ||
| 247 | + | * A redundant strbuf_reset() call in the 'HAVE_GETDELIM' path of | |
| 248 | + | strbuf_getwholeline() has been removed, as getdelim() overwrites the | |
| 249 | + | buffer and the length is updated afterward. | |
| 250 | + | ||
| 251 | + | * The object database enumeration interface odb_for_each_object() has | |
| 252 | + | been taught to accept object filters, allowing the underlying backends | |
| 253 | + | to optimize the traversal by using reachability bitmaps when | |
| 254 | + | available. 'git cat-file --batch-all-objects' has been updated to use | |
| 255 | + | this generic interface, simplifying its code and avoiding direct | |
| 256 | + | access to ODB backend internals. | |
| 257 | + | ||
| 258 | + | * The test script 't/t1100-commit-tree-options.sh' has been modernized | |
| 259 | + | by converting test cases to the modern style (using single quotes and | |
| 260 | + | tab indentation) and moving the creation of the expected file inside | |
| 261 | + | the setup test so it runs under the protection of the test harness. | |
| 262 | + | ||
| 263 | + | * The test script 't/t7614-merge-signoff.sh' has been updated to avoid | |
| 264 | + | suppressing the exit code of 'git' commands in a pipe. | |
| 265 | + | ||
| 266 | + | * The 'git rev-list --no-walk' command has been corrected to restore | |
| 267 | + | pathspec filtering, which was lost when the streaming walk was | |
| 268 | + | refactored. | |
| 269 | + | ||
| 270 | + | * The ref subsystem and the worktree API have been refactored to pass a | |
| 271 | + | repository pointer down the call chain, allowing them to drop | |
| 272 | + | references to the global 'the_repository' variable. As part of this, | |
| 273 | + | the handling of the 'core.packedRefsTimeout' configuration has been | |
| 274 | + | moved into the per-repository ref store structure. | |
| 275 | + | ||
| 276 | + | * 'git branch --contains' and 'git for-each-ref --contains' have been | |
| 277 | + | optimized to use the memoized commit traversal previously used only by | |
| 278 | + | 'git tag --contains', significantly speeding up connectivity checks | |
| 279 | + | across many candidate refs with shared history. | |
| 280 | + | ||
| 281 | + | * The passing of push destination specifications in the 'remote-curl' | |
| 282 | + | helper has been simplified by removing the explicit 'count' parameter | |
| 283 | + | and relying on the NULL-termination of the array. | |
| 284 | + | ||
| 285 | + | * The dependency on the global 'the_repository' variable in the | |
| 286 | + | 'refspec.c' API has been removed by passing the hash algorithm | |
| 287 | + | explicitly to refspec-parsing functions and storing it in 'struct | |
| 288 | + | refspec'. | |
| 289 | + | ||
| 290 | + | * The enumeration of untracked and ignored files in 'git status' has | |
| 291 | + | been optimized by avoiding quadratic complexity when inserting into | |
| 292 | + | string lists, reducing the construction cost from O(n^2) to O(n log | |
| 293 | + | n). | |
| 294 | + | ||
| 295 | + | * The copy_file() and copy_file_with_time() functions have been | |
| 296 | + | refactored to take a repository parameter, allowing the removal of the | |
| 297 | + | implicit dependency on the global 'the_repository' variable in | |
| 298 | + | 'copy.c'. | |
| 299 | + | ||
| 300 | + | * The tempfile and lockfile APIs have been refactored to stop depending | |
| 301 | + | on the 'the_repository' global variable, and their callers have been | |
| 302 | + | updated to use the repository-aware variants. | |
| 303 | + | ||
| 304 | + | * The 'trust_executable_bit' (coming from the 'core.filemode' | |
| 305 | + | configuration) has been migrated into 'struct repo_config_values' to | |
| 306 | + | tie it to a specific repository instance. | |
| 307 | + | ||
| 308 | + | * The 'excludes_file' and various other global configuration variables | |
| 309 | + | (including 'editor_program', 'pager_program', 'askpass_program', and | |
| 310 | + | 'push_default') have been migrated into the per-repository structure. | |
| 311 | + | ||
| 312 | + | * The 'git stash push' command has been optimized to avoid unnecessary | |
| 313 | + | sparse index expansion when pathspecs are wholly inside the | |
| 314 | + | sparse-checkout cone. Also, a potential out-of-bounds read in the | |
| 315 | + | sparse-index expansion check helper pathspec_needs_expanded_index() | |
| 316 | + | has been fixed by consistently using the parsed, prefixed path. | |
| 317 | + | ||
| 318 | + | * The logic to write loose objects has been refactored and moved from | |
| 319 | + | 'object-file.c' to the loose backend source file 'odb/source-loose.c', | |
| 320 | + | making the loose backend more self-contained. This is achieved by | |
| 321 | + | first refactoring force_object_loose() to use generic ODB write | |
| 322 | + | interfaces instead of loose-backend internals. | |
| 323 | + | ||
| 324 | + | * Object database housekeeping in 'git gc' and 'git maintenance' has | |
| 325 | + | been refactored to be pluggable. The files-backend-specific logic, | |
| 326 | + | including incremental and geometric repacking as well as object | |
| 327 | + | pruning, has been moved out of the command implementation and into the | |
| 328 | + | files object database source, enabling future alternative object | |
| 329 | + | database backends to implement their own housekeeping services. | |
| 330 | + | ||
| 331 | + | * The image version used by the static-analysis CI job has been bumped | |
| 332 | + | to ubuntu-latest (Ubuntu 24.04), which brings in a newer Coccinelle | |
| 333 | + | version that resolves a severe performance regression. A false | |
| 334 | + | positive warning from the 'CHECK_ASSERTION_SIDE_EFFECTS' build with | |
| 335 | + | GCC 15 in the Bloom filter code has also been silenced to facilitate | |
| 336 | + | the image upgrade. | |
| 337 | + | (merge 1a1579c42d jk/ci-static-analysis-image-bump later to maint). | |
| 338 | + | ||
| 339 | + | * The alias tests in 't/t0014-alias.sh' have been updated to dynamically | |
| 340 | + | query the list of deprecated commands using 'git | |
| 341 | + | --list-cmds=deprecated' to avoid test failures when running with | |
| 342 | + | 'WITH_BREAKING_CHANGES' in a build directory that contains stale | |
| 343 | + | executables of formerly deprecated commands. | |
| 344 | + | (merge bc57ecb915 jk/t0014-dynamic-deprecated-cmds later to maint). | |
| 345 | + | ||
| 346 | + | * The code path that deals with relative paths in the diff-lib has | |
| 347 | + | been cleaned up. | |
| 348 | + | ||
| 349 | + | * The get_commit_action() function has been refactored to be a pure | |
| 350 | + | predicate by moving the side-effecting line-level log range folding to | |
| 351 | + | simplify_commit(). This ensures that evaluating a commit's action | |
| 352 | + | before the walk reaches it does not prematurely mutate its tracked | |
| 353 | + | line ranges, making it safer for potential lookahead evaluations. | |
| 354 | + | ||
| 355 | + | * Synopsis and options in the documentation for 'git format-patch', | |
| 356 | + | 'git imap-send', 'git send-email', and 'git request-pull' have been | |
| 357 | + | updated to the modern style. | |
| 358 | + | ||
| 359 | + | * A new test helper commit_body() has been introduced to print the | |
| 360 | + | message body of a commit, and various tests have been updated to use | |
| 361 | + | it instead of spelling out the command pipeline manually and losing | |
| 362 | + | the exit status of the 'git cat-file' command on the upstream of the | |
| 363 | + | pipe. | |
| 364 | + | ||
| 365 | + | * Tests for 'git merge-base --is-ancestor' have been added to cover | |
| 366 | + | exit codes (0 for success, 1 for non-ancestor, 128 for errors) and | |
| 367 | + | to ensure it cannot be combined with '--all'. | |
| 368 | + | ||
| 369 | + | * The 'TRACE2_ANCESTRY' prerequisite in the 't0213' test script has been | |
| 370 | + | refined to avoid failures under user-mode emulation by verifying that | |
| 371 | + | the ancestry collector reports the expected process names rather than | |
| 372 | + | the emulator binary name. | |
| 373 | + | ||
| 374 | + | * Concurrent downloads of packfiles via packfile URIs and dumb HTTP are | |
| 375 | + | safer by avoiding concurrent appends to the staging file. Opening in | |
| 376 | + | read-write mode with separate file offsets prevents corruption and | |
| 377 | + | preserves resumability. 'fetch-pack' now tolerates pre-existing | |
| 378 | + | '.keep' files. | |
| 379 | + | ||
| 380 | + | * The 'ssh-agent' tests in 't7528' have been fixed to work when the | |
| 381 | + | user's login shell is csh-like, by explicitly passing '-s' to | |
| 382 | + | 'ssh-agent' to force Bourne shell syntax. | |
| 383 | + | (merge d5dd17756d kl/t7528-ssh-agent-for-csh-users later to maint). | |
| 384 | + | ||
| 385 | + | * A compatibility wrapper for writev(3p) has been reintroduced, | |
| 386 | + | including fixes for CMake build and 'MAX_IO_SIZE' limits on NonStop. | |
| 387 | + | Calls to write(3p) in send_sideband() and cat_blob() have been | |
| 388 | + | refactored to use writev(3p) wrappers to reduce syscall overhead. | |
| 389 | + | ||
| 390 | + | * The creation of the on-disk data structures for the object database | |
| 391 | + | has been made pluggable, allowing future backends to customize their | |
| 392 | + | setup. As part of this, the initialization of the object database | |
| 393 | + | has been deferred, and the loading of the loose-object map has been | |
| 394 | + | detangled from repository initialization. | |
| 395 | + | ||
| 396 | + | * The 'struct odb_read_stream' and 'struct odb_write_stream' | |
| 397 | + | structures have been consolidated into a single unified 'struct | |
| 398 | + | odb_stream' structure, simplifying object database streaming APIs | |
| 399 | + | and enabling streaming of arbitrary object types. | |
| 400 | + | ||
| 401 | + | * The sequencer has been updated to release the object database before | |
| 402 | + | spawning 'git commit'. This prevents open file handles from | |
| 403 | + | blocking auto-maintenance tasks, such as repacking, on systems like | |
| 404 | + | Windows where open files cannot be easily unlinked. | |
| 405 | + | ||
| 406 | + | * The merge-base computation has been optimized by stopping the walk | |
| 407 | + | early when one side's exclusive commits in the queue are exhausted, | |
| 408 | + | yielding significant speedups for queries with one-sided histories. | |
| 409 | + | ||
| 410 | + | ||
| 411 | + | Fixes since v2.55 | |
| 412 | + | ----------------- | |
| 413 | + | ||
| 414 | + | * A regression in the error diagnosis code for invalid .git files has | |
| 415 | + | been fixed, avoiding a potential NULL-pointer crash when reporting | |
| 416 | + | that a .git file does not point to a valid repository. | |
| 417 | + | (merge 54a441bcea jk/setup-gitfile-diag-fix later to maint). | |
| 418 | + | ||
| 419 | + | * Support for hashing loose or packed objects larger than 4GB on Windows | |
| 420 | + | and other LLP64 platforms has been improved by converting object header | |
| 421 | + | buffers and data-handling functions from 'unsigned long' to 'size_t'. | |
| 422 | + | (merge d99e13d0be po/hash-object-size-t later to maint). | |
| 423 | + | ||
| 424 | + | * The display of the rebase todo list in "git status" has been | |
| 425 | + | improved to correctly abbreviate object IDs for more commands and | |
| 426 | + | avoid misinterpreting refs as object IDs. | |
| 427 | + | (merge 6f34e5f9e3 pw/status-rebase-todo later to maint). | |
| 428 | + | ||
| 429 | + | * Reference backend configuration has been updated to load lazily to | |
| 430 | + | avoid recursive calls during repository initialization when 'onbranch' | |
| 431 | + | configuration conditions are evaluated. This has also fixed a memory | |
| 432 | + | leak and allowed the unused `chdir_notify_reparent()` machinery to be | |
| 433 | + | dropped. | |
| 434 | + | (merge d6522d01df ps/refs-onbranch-fixes later to maint). | |
| 435 | + | ||
| 436 | + | * The connectivity check has been refactored to search for promisor | |
| 437 | + | objects in a generic way using the object database interface, | |
| 438 | + | rather than iterating packfiles directly. This allows connectivity | |
| 439 | + | checks to work properly in repositories that do not use packfiles. | |
| 440 | + | (merge 66ee9cb930 ps/connected-generic-promisor-checks later to maint). | |
| 441 | + | ||
| 442 | + | * A test checking interactions between git rebase --quit and | |
| 443 | + | autostash in t3420-rebase-autostash.sh has been corrected to use | |
| 444 | + | test_path_is_missing instead of ! grep on a file that shouldn't | |
| 445 | + | exist in the conflicted state. | |
| 446 | + | (merge eaad121fef sg/t3420-do-not-grep-in-missing-file later to maint). | |
| 447 | + | ||
| 448 | + | * The GPG and SSH signature parsing code has been corrected to strip | |
| 449 | + | carriage return characters only when they immediately precede line | |
| 450 | + | feeds, instead of unconditionally stripping all carriage returns. | |
| 451 | + | (merge 5dea8b690b ad/gpg-strip-cr-before-lf later to maint). | |
| 452 | + | ||
| 453 | + | * A memory leak in the 'reftable_writer_new()' initialization function | |
| 454 | + | has been fixed by delaying the allocation of 'struct reftable_writer' | |
| 455 | + | until after input options are validated. | |
| 456 | + | (merge c6fb3b9c3e jk/reftable-leakfix later to maint). | |
| 457 | + | ||
| 458 | + | * A memory leak in the '--base' handling of 'git format-patch' has been | |
| 459 | + | plugged, and the leak reporting of the test suite when running under a | |
| 460 | + | TAP harness has been improved. | |
| 461 | + | (merge 973a0373ff jk/format-patch-leakfix later to maint). | |
| 462 | + | ||
| 463 | + | * A write file stream resource leak has been fixed as part of a code | |
| 464 | + | cleanup. | |
| 465 | + | (merge ebb4d2ffa3 jc/history-message-prep-fix later to maint). | |
| 466 | + | ||
| 467 | + | * Various memory leaks in the Bloom-filter code paths that are exposed | |
| 468 | + | when running tests with the 'GIT_TEST_COMMIT_GRAPH_CHANGED_PATHS=1' | |
| 469 | + | environment variable have been plugged. | |
| 470 | + | (merge 459088ec2e jk/bloom-leak-fixes later to maint). | |
| 471 | + | ||
| 472 | + | * The wincred credential helper has been updated to avoid memory | |
| 473 | + | corruption when erasing credentials and to prevent silent | |
| 474 | + | credential loss when storing OAuth tokens, by correcting buffer | |
| 475 | + | allocations and arguments passed to safe-CRT APIs. | |
| 476 | + | (merge f635ab9ab4 js/wincred-fixes later to maint). | |
| 477 | + | ||
| 478 | + | * Various code paths that initialize a cryptographic hash context but | |
| 479 | + | bail out or finish without calling 'git_hash_final()' have been taught | |
| 480 | + | to call 'git_hash_discard()' to release allocated resources, fixing | |
| 481 | + | memory leaks when Git is built with non-default backends like | |
| 482 | + | 'OpenSSL' or 'libgcrypt'. | |
| 483 | + | (merge 600588d2aa jk/hash-algo-leak-fixes later to maint). | |
| 484 | + | ||
| 485 | + | * Various resource leaks, invalid file descriptor closures, and process | |
| 486 | + | handle ownership issues flagged by Coverity have been fixed. | |
| 487 | + | (merge 9184231173 js/coverity-fixes later to maint). | |
| 488 | + | ||
| 489 | + | * Dockerized CI jobs running in private GitHub repositories have been | |
| 490 | + | adjusted to use explicit process and file limits, preventing resource | |
| 491 | + | exhaustion errors on private runners. | |
| 492 | + | (merge bad766fbac js/ci-dockerized-pid-limit later to maint). | |
| 493 | + | ||
| 494 | + | * Various test scripts have been updated to clean up large temporary | |
| 495 | + | files and repositories, reducing peak disk usage during testing. | |
| 496 | + | Also, expensive tests have been disabled on platforms that lack | |
| 497 | + | sufficient resources (like 32-bit platforms and Windows CI runners), | |
| 498 | + | and the long test suite has been enabled in GitLab CI. | |
| 499 | + | (merge 84248444ad ps/t-fixes-for-git-test-long later to maint). | |
| 500 | + | ||
| 501 | + | * The UTF-8 precomposition wrapper on macOS has been updated to use a | |
| 502 | + | flexible array member to represent the name of a directory entry, | |
| 503 | + | preventing fortified libc checks from failing when the name is | |
| 504 | + | reallocated to be larger than 'NAME_MAX' bytes. | |
| 505 | + | (merge 1eb281159f ih/precompose-flex-array later to maint). | |
| 506 | + | ||
| 507 | + | * The 'git_hash_*()' wrappers have been updated to be used consistently | |
| 508 | + | across the codebase instead of direct calls to members of 'struct | |
| 509 | + | git_hash_algo', and 'git_hash_discard()' has been made idempotent to | |
| 510 | + | simplify cleanups. | |
| 511 | + | (merge 9e396aa553 jk/git-hash-cleanups later to maint). | |
| 512 | + | ||
| 513 | + | * The sideband demultiplexer has been updated to recognize ANSI SGR | |
| 514 | + | escape sequences that use colon-separated subfields (e.g., for | |
| 515 | + | 256-color or true-color codes). | |
| 516 | + | (merge 3792b2aea4 mm/sideband-ansi-sgr-colon-fix later to maint). | |
| 517 | + | ||
| 518 | + | * The 'reftable' code has been hardened against corrupted tables by | |
| 519 | + | fixing out-of-bounds writes, out-of-bounds reads, and abort calls | |
| 520 | + | during parsing. | |
| 521 | + | (merge ca93c27328 ps/reftable-hardening later to maint). | |
| 522 | + | ||
| 523 | + | * A description in the release notes for Git 2.55.0 has been | |
| 524 | + | retroactively updated to clarify that Rust support is enabled by | |
| 525 | + | default, but still optional, and will become mandatory in Git 3.0. | |
| 526 | + | (merge 18b2009d14 jc/relnotes-2.55-rust-fix later to maint). | |
| 527 | + | ||
| 528 | + | * The early-exit optimization in 'paint_down_to_common()' has been | |
| 529 | + | gated on the queue being generation-ordered, fixing a bug where | |
| 530 | + | 'git merge-base' (without '--all') could return incorrect results | |
| 531 | + | on repositories with v1 commit graphs and clock skew. | |
| 532 | + | (merge ae68032a8d kk/commit-reach-find-all-fix later to maint). | |
| 533 | + | ||
| 534 | + | * The client-side parser of the server-advertised bundle-URI list has | |
| 535 | + | been updated to drain the remaining response in order to avoid | |
| 536 | + | protocol desynchronization when the server sends a misconfigured list. | |
| 537 | + | Also, the server-side has been taught to omit empty configuration | |
| 538 | + | values instead of sending invalid key-value lines. | |
| 539 | + | (merge 50de1169e4 tc/bundle-uri-empty-fix later to maint). | |
| 540 | + | ||
| 541 | + | * The 'topo_levels' slab was propagated only to the topmost layer of a | |
| 542 | + | split commit-graph chain, causing topological levels for commits in | |
| 543 | + | base layers to be recomputed during incremental writes. This has been | |
| 544 | + | corrected. | |
| 545 | + | ||
| 546 | + | * The stream-based object signature verification path has been | |
| 547 | + | corrected to avoid double-closing the stream on read errors. | |
| 548 | + | (merge cfd52a74a0 ps/odb-stream-double-close-fix later to maint). | |
| 549 | + | ||
| 550 | + | * The '-i' shorthand for the '--init' option, which was accepted by the | |
| 551 | + | 'git submodule update' command until it was broken in a modernization | |
| 552 | + | of the option-parsing code, has been restored. | |
| 553 | + | (merge ff1da37f58 dm/submodule-update-i-shorthand later to maint). | |
| 554 | + | ||
| 555 | + | * An accidental use of the '%zu' format specifier in 'git | |
| 556 | + | submodule--helper' has been corrected to use 'PRIuMAX' and cast the | |
| 557 | + | value to 'uintmax_t' to avoid portability issues. | |
| 558 | + | (merge 3279c13c00 jc/submodule-helper-avoid-zu later to maint). | |
| 559 | + | ||
| 560 | + | * The rebase post-rewrite notes-copying logic has been corrected. When | |
| 561 | + | a commit is dropped during rebase (e.g., because its changes are | |
| 562 | + | already upstream), it is no longer recorded as rewritten, preventing | |
| 563 | + | its notes from being copied to an unrelated commit. | |
| 564 | + | (merge 42554b78fd pw/rebase-drop-notes-with-commit later to maint). | |
| 565 | + | ||
| 566 | + | * A few memory problems in the Rust interface to C hash functions have | |
| 567 | + | been corrected. The 'Clone' implementation of 'CryptoHasher' now | |
| 568 | + | properly initializes the context before cloning, and its 'Drop' | |
| 569 | + | implementation now discards the context to prevent leaks. | |
| 570 | + | ||
| 571 | + | * The object ID shortening and linking in the 'commitdiff' view of | |
| 572 | + | 'gitweb' has been corrected to work even when the index line carries | |
| 573 | + | a trailing file mode. | |
| 574 | + | (merge fda513d6fe tl/gitweb-shorten-hashes-with-modes later to maint). | |
| 575 | + | ||
| 576 | + | * When the push remote is specified as a URL, the fetch refspec of a | |
| 577 | + | uniquely matching configured remote is now used to find and update | |
| 578 | + | the remote-tracking branch (e.g., '@{push}'). | |
| 579 | + | ||
| 580 | + | * Traversals with '--exclude-first-parent-only' have been corrected | |
| 581 | + | to properly stop after the first parent even when it has already | |
| 582 | + | been marked as 'SEEN'. | |
| 583 | + | (merge 47382f7398 jc/exclude-first-parent-seen later to maint). | |
| 584 | + | ||
| 585 | + | * A segfault when 'git clone --revision' talks to a server that does not | |
| 586 | + | support protocol v2 (falling back to protocol v0) has been corrected. | |
| 587 | + | (merge 1034ad383f af/clone-revision-v0-segfault-fix later to maint). | |
| 588 | + | ||
| 589 | + | * rewrites_release() in 'remote.c' has been updated to free 'struct | |
| 590 | + | rewrite' instances, their '.instead_of' arrays, and their contents. | |
| 591 | + | (merge dcef3bf041 jc/remote-insteadof-leakfix later to maint). | |
| 592 | + | ||
| 593 | + | * The remote-matching logic for submodules has been corrected to resolve | |
| 594 | + | 'url.*.insteadOf' aliases before comparing the inventoried URL from | |
| 595 | + | '.gitmodules' with the URLs of configured remotes. | |
| 596 | + | ||
| 597 | + | * 'git diff --relative' running with '--cached' has been corrected to | |
| 598 | + | avoid a segfault when encountering unmerged paths outside the | |
| 599 | + | prefix. | |
| 600 | + | (merge 447126ed7d jk/diff-relative-cached-unmerged later to maint). | |
| 601 | + | ||
| 602 | + | * Two bugs in how 'git rebase' handles skipped 'fixup' and 'squash' | |
| 603 | + | commands have been fixed. One bug caused an incorrect commit count to | |
| 604 | + | be shown in the template message when multiple commands were skipped, | |
| 605 | + | and another prevented the editor from opening when the final command | |
| 606 | + | in a chain containing 'fixup -c' was skipped. | |
| 607 | + | ||
| 608 | + | * Git for Windows has been updated to avoid auto-detecting the symlink | |
| 609 | + | type if the target path starts with a slash, preventing NTLM | |
| 610 | + | credential leaks when checking out repositories with crafted | |
| 611 | + | symbolic links pointing to network shares. | |
| 612 | + | ||
| 613 | + | * 'git cat-file --batch-command' that asked for 'contents' without | |
| 614 | + | 'type' segfaults, which has been corrected. | |
| 615 | + | (merge 2abc7f0304 jk/cat-file-batch-wo-type-fix later to maint). | |
| 616 | + | ||
| 617 | + | * A memory leak in 'git merge' when run without arguments (which | |
| 618 | + | triggers the default-to-upstream path) has been fixed. A test has | |
| 619 | + | been added to cover this case. | |
| 620 | + | (merge 68cce04a02 tc/merge-default-to-upstream-leakfix later to maint). | |
| 621 | + | ||
| 622 | + | * A boundary case check in reachability bitmap traversal has been | |
| 623 | + | corrected to properly handle the object at position zero, which was | |
| 624 | + | previously skipped, leading to redundant bitmap loading. | |
| 625 | + | (merge b56b48301e dl/pack-bitmap-position-zero later to maint). | |
| 626 | + | ||
| 627 | + | * A crash in the 'sparse-index' collapse code when encountering an | |
| 628 | + | invalidated cache-tree node (due to an intent-to-add path) has been | |
| 629 | + | fixed by avoiding collapsing such subtrees. | |
| 630 | + | (merge eede1e69fe ds/sparse-index-ita-crash later to maint). | |
| 631 | + | ||
| 632 | + | * Documentation for 'git replay' has been updated to refer to its | |
| 633 | + | configuration variables. | |
| 634 | + | (merge 48c0549f5c kh/doc-replay-config later to maint). | |
| 635 | + | ||
| 636 | + | * Documentation for 'git interpret-trailers' has been updated to explain | |
| 637 | + | the format of trailer keys (alphanumeric characters and hyphens), | |
| 638 | + | replace outdated terminology, define key terms upfront, and document | |
| 639 | + | how comment lines in the input are treated. | |
| 640 | + | (merge 4515c86fd9 kh/doc-trailers later to maint). | |
modified Documentation/SubmittingPatches
| @@ -37,11 +37,64 @@ most likely to be knowledgeable enough to help you, but | |||
| 37 | 37 | they have no obligation to help you (i.e. you ask them for help, | |
| 38 | 38 | you don't demand). +git log -p {litdd} _$area_you_are_modifying_+ would | |
| 39 | 39 | help you find out who they are. | |
| 40 | + | + | |
| 41 | + | It is also a good idea to check whether your topic has been discussed | |
| 42 | + | previously on the mailing list, or whether similar work is already in | |
| 43 | + | progress. Prior discussions may contain useful context, design | |
| 44 | + | considerations, or earlier attempts at solving the same problem. Being | |
| 45 | + | aware of such discussions can help you avoid duplicating work and may | |
| 46 | + | allow you to coordinate with other contributors working in the same | |
| 47 | + | area. | |
| 40 | 48 | ||
| 41 | 49 | . You get comments and suggestions for improvements. You may even get | |
| 42 | 50 | them in an "on top of your change" patch form. You are expected to | |
| 43 | - | respond to them with "Reply-All" on the mailing list, while taking | |
| 44 | - | them into account while preparing an updated set of patches. | |
| 51 | + | respond to them with "Reply-All" on the mailing list, instead of | |
| 52 | + | letting an updated patch series be your only response. Tell | |
| 53 | + | reviewers which suggestions you plan to use, which ones you disagree | |
| 54 | + | with, and when a comment leads you to consider a different approach. | |
| 55 | + | Use these replies and any follow-up discussion as input when | |
| 56 | + | preparing an updated set of patches. | |
| 57 | + | + | |
| 58 | + | Be particularly mindful of critiques regarding the high-level design | |
| 59 | + | or viability of your proposal (e.g., questioning if the feature is | |
| 60 | + | worth implementing, or if the chosen approach is appropriate). Defend | |
| 61 | + | your design decisions on the list first and work with reviewers and | |
| 62 | + | other members to improve the design before revising the implementation. | |
| 63 | + | This will avoid wasting effort on an implementation before its design is | |
| 64 | + | solid. | |
| 65 | + | + | |
| 66 | + | Make sure that any new version explains and justifies those design | |
| 67 | + | decisions more clearly, in the cover letter and in the revised commit | |
| 68 | + | messages. Aim to make the reviewers say "it is now clear why we may | |
| 69 | + | want to do this with the updated version". | |
| 70 | + | + | |
| 71 | + | Topics with unresolved fundamental design critiques will not be | |
| 72 | + | considered ready for merging. | |
| 73 | + | + | |
| 74 | + | It is often beneficial to allow some time for reviewers to provide | |
| 75 | + | feedback before sending a new version, rather than sending an updated | |
| 76 | + | series immediately after receiving a review. This helps collect broader | |
| 77 | + | input, gives reviewers in different time zones a fair chance to comment, | |
| 78 | + | and avoids unnecessary churn from many rapid iterations. Waiting also | |
| 79 | + | encourages you to polish each version before sending it, so reviewers | |
| 80 | + | can focus on substantial issues rather than typos or other small | |
| 81 | + | mistakes. | |
| 82 | + | + | |
| 83 | + | As a rough default, avoid sending more than one new version of the same | |
| 84 | + | series per day, while considering the size of the series and the depth | |
| 85 | + | of review. | |
| 86 | + | ||
| 87 | + | . These early update iterations are expected to be full replacements, | |
| 88 | + | not incremental updates on top of what you posted already. If you | |
| 89 | + | are correcting mistakes you made in the previous iteration that a | |
| 90 | + | reviewer noticed and pointed out in their review, you _fix_ that | |
| 91 | + | mistake by rewriting your history (e.g., by using "git rebase -i") | |
| 92 | + | to pretend that you never made the mistake in the first place. In | |
| 93 | + | other words, this is a chance to pretend to be a perfect developer, | |
| 94 | + | and you are expected to take advantage of that. In the larger | |
| 95 | + | picture, nobody is interested in your earlier mistakes. Just | |
| 96 | + | present a logical progression made by a perfect developer who makes | |
| 97 | + | no mistakes while working on the topic. | |
| 45 | 98 | ||
| 46 | 99 | . Polish, refine, and re-send your patches to the list and to the people | |
| 47 | 100 | who spent their time to improve your patch. Go back to step (2). | |
| @@ -67,9 +120,23 @@ help you find out who they are. | |||
| 67 | 120 | topic are appropriate, so such an incremental updates are limited to | |
| 68 | 121 | small corrections and polishing. After a topic cooks for some time | |
| 69 | 122 | (like 7 calendar days) in 'next' without needing further tweaks on | |
| 70 | - | top, it gets merged to the 'master' branch and wait to become part | |
| 123 | + | top, it gets merged to the 'master' branch and waits to become part | |
| 71 | 124 | of the next major release. | |
| 72 | 125 | ||
| 126 | + | But sometimes things do not work as planned: | |
| 127 | + | ||
| 128 | + | . If a mailing list discussion convinces you that your changes aren't | |
| 129 | + | ideal, please explicitly retract the topic to save the maintainer | |
| 130 | + | time and effort. | |
| 131 | + | ||
| 132 | + | . If you must drop a topic due to shifting priorities, lack of time, | |
| 133 | + | or other commitments, notify the list as a courtesy so others can | |
| 134 | + | take over. Anyone can resurrect the topic later when they have the | |
| 135 | + | capacity to do so. | |
| 136 | + | ||
| 137 | + | . Topics with unaddressed review comments that remain inactive for | |
| 138 | + | four weeks may be discarded by the maintainer. | |
| 139 | + | ||
| 73 | 140 | In the following sections, many techniques and conventions are listed | |
| 74 | 141 | to help your patches get reviewed effectively in such a life cycle. | |
| 75 | 142 | ||
| @@ -212,6 +279,7 @@ Do not forget to update the documentation to describe the updated | |||
| 212 | 279 | behavior and make sure that the resulting documentation set formats | |
| 213 | 280 | well (try the Documentation/doc-diff script). | |
| 214 | 281 | ||
| 282 | + | [[typofixes]] | |
| 215 | 283 | We currently have a liberal mixture of US and UK English norms for | |
| 216 | 284 | spelling and grammar, which is somewhat unfortunate. A huge patch that | |
| 217 | 285 | touches the files all over the place only to correct the inconsistency | |
| @@ -297,6 +365,10 @@ The body should provide a meaningful commit message, which: | |||
| 297 | 365 | ||
| 298 | 366 | . alternate solutions considered but discarded, if any. | |
| 299 | 367 | ||
| 368 | + | . records the resolution of design or viability concerns raised by the | |
| 369 | + | community during the review, if any, ensuring the historical record | |
| 370 | + | explains why the chosen approach was accepted over alternatives. | |
| 371 | + | ||
| 300 | 372 | [[present-tense]] | |
| 301 | 373 | The problem statement that describes the status quo is written in the | |
| 302 | 374 | present tense. Write "The code does X when it is given input Y", | |
| @@ -349,7 +421,7 @@ or, on an older version of Git without support for --pretty=reference: | |||
| 349 | 421 | .... | |
| 350 | 422 | ||
| 351 | 423 | [[sign-off]] | |
| 352 | - | === Certify your work by adding your `Signed-off-by` trailer | |
| 424 | + | === Certify your work by adding your `Signed-off-by:` trailer | |
| 353 | 425 | ||
| 354 | 426 | To improve tracking of who did what, we ask you to certify that you | |
| 355 | 427 | wrote the patch or have the right to pass it on under the same license | |
| @@ -386,7 +458,7 @@ d. I understand and agree that this project and the contribution | |||
| 386 | 458 | this project or the open source license(s) involved. | |
| 387 | 459 | ____ | |
| 388 | 460 | ||
| 389 | - | you add a "Signed-off-by" trailer to your commit, that looks like | |
| 461 | + | you add a `Signed-off-by:` trailer to your commit, that looks like | |
| 390 | 462 | this: | |
| 391 | 463 | ||
| 392 | 464 | .... | |
| @@ -396,23 +468,42 @@ this: | |||
| 396 | 468 | This line can be added by Git if you run the git-commit command with | |
| 397 | 469 | the -s option. | |
| 398 | 470 | ||
| 399 | - | Notice that you can place your own `Signed-off-by` trailer when | |
| 471 | + | Notice that you can place your own `Signed-off-by:` trailer when | |
| 400 | 472 | forwarding somebody else's patch with the above rules for | |
| 401 | 473 | D-C-O. Indeed you are encouraged to do so. Do not forget to | |
| 402 | 474 | place an in-body "From: " line at the beginning to properly attribute | |
| 403 | 475 | the change to its true author (see (2) above). | |
| 404 | 476 | ||
| 477 | + | Place this `Signed-off-by:` trailer at the end, after trailers added by | |
| 478 | + | others and after other trailers added by you; see | |
| 479 | + | <<commit-trailers,Commit trailers>> below ("chronological order"). | |
| 480 | + | ||
| 405 | 481 | This procedure originally came from the Linux kernel project, so our | |
| 406 | 482 | rule is quite similar to theirs, but what exactly it means to sign-off | |
| 407 | 483 | your patch differs from project to project, so it may be different | |
| 408 | 484 | from that of the project you are accustomed to. | |
| 409 | 485 | ||
| 410 | 486 | [[real-name]] | |
| 411 | - | Also notice that a real name is used in the `Signed-off-by` trailer. Please | |
| 412 | - | don't hide your real name. | |
| 487 | + | Please use a known identity in the `Signed-off-by:` trailer, since we cannot | |
| 488 | + | accept anonymous contributions. It is common, but not required, to use some form | |
| 489 | + | of your real name. We realize that some contributors are not comfortable doing | |
| 490 | + | so or prefer to contribute under a pseudonym or preferred name and we can accept | |
| 491 | + | your patch either way, as long as the name and email you use are distinctive, | |
| 492 | + | identifying, and not misleading. | |
| 493 | + | ||
| 494 | + | The goal of this policy is to allow us to have sufficient information to contact | |
| 495 | + | you if questions arise about your contribution. | |
| 413 | 496 | ||
| 414 | 497 | [[commit-trailers]] | |
| 415 | - | If you like, you can put extra trailers at the end: | |
| 498 | + | === Commit trailers | |
| 499 | + | It is polite to credit people who have helped with your work to a | |
| 500 | + | substantial enough degree. This project uses commit trailers for that, | |
| 501 | + | where the credited person is written out like a Git author, i.e. with | |
| 502 | + | both their name and their email address. Note that the threshold to | |
| 503 | + | credit someone is a judgement call, and crediting someone for simple | |
| 504 | + | review work is certainly not necessary. | |
| 505 | + | ||
| 506 | + | These are the common trailers in use: | |
| 416 | 507 | ||
| 417 | 508 | . `Reported-by:` is used to credit someone who found the bug that | |
| 418 | 509 | the patch attempts to fix. | |
| @@ -425,6 +516,10 @@ If you like, you can put extra trailers at the end: | |||
| 425 | 516 | and found it to have the desired effect. | |
| 426 | 517 | . `Co-authored-by:` is used to indicate that people exchanged drafts | |
| 427 | 518 | of a patch before submitting it. | |
| 519 | + | . `Based-on-patch-by:` is used when someone else authored parts of the | |
| 520 | + | patch that you are submitting. This might be relevant if someone sent | |
| 521 | + | a patch to the mailing list with their sign-off. (Be mindful and ask | |
| 522 | + | them to sign off on it if they did not.) | |
| 428 | 523 | . `Helped-by:` is used to credit someone who suggested ideas for | |
| 429 | 524 | changes without providing the precise changes in patch form. | |
| 430 | 525 | . `Mentored-by:` is used to credit someone with helping develop a | |
| @@ -436,8 +531,70 @@ While you can also create your own trailer if the situation warrants it, we | |||
| 436 | 531 | encourage you to instead use one of the common trailers in this project | |
| 437 | 532 | highlighted above. | |
| 438 | 533 | ||
| 534 | + | Other projects might regularly refer to other kinds of data, like | |
| 535 | + | `Fixes:` and `Link:` in the Linux Kernel project, but these ones in | |
| 536 | + | particular are not used in this project. | |
| 537 | + | ||
| 439 | 538 | Only capitalize the very first letter of the trailer, i.e. favor | |
| 440 | - | "Signed-off-by" over "Signed-Off-By" and "Acked-by:" over "Acked-By". | |
| 539 | + | `Signed-off-by:` over `Signed-Off-By:` and `Acked-by:` over `Acked-By:`. | |
| 540 | + | ||
| 541 | + | As mentioned under <<dco,DCO>> above, trailers are added in | |
| 542 | + | chronological order; one person might sign-off on a patch and send it to | |
| 543 | + | someone else, who then in turn adds her own sign-off. Further, any | |
| 544 | + | trailers that you add beyond your sign-off should come before that | |
| 545 | + | sign-off. That makes it clear what trailers which person added. | |
| 546 | + | ||
| 547 | + | [[cover-letter]] | |
| 548 | + | === Cover Letter | |
| 549 | + | ||
| 550 | + | The purpose of your cover letter is to sell your changes, explain what | |
| 551 | + | they are about, and get your target audience interested enough to read | |
| 552 | + | the patches. | |
| 553 | + | ||
| 554 | + | . Every code change comes with risk of regression and maintenance cost. | |
| 555 | + | The cover letter should clearly communicate why the value of your | |
| 556 | + | proposed change is worth applying. You can also describe how the risk | |
| 557 | + | is reduced by the design choices you made while writing the patches. | |
| 558 | + | ||
| 559 | + | . Make sure your target audience can understand what the patches are | |
| 560 | + | about and why they are needed without prior context. | |
| 561 | + | ||
| 562 | + | . For a second or subsequent iteration of the same topic, make sure | |
| 563 | + | people who missed the earlier discussion can still understand what | |
| 564 | + | the patches are about, so they can judge if the topic is worth their | |
| 565 | + | time to read and comment on. | |
| 566 | + | ||
| 567 | + | . To help those who are familiar with earlier iterations, give a | |
| 568 | + | summary of changes since the previous rounds. | |
| 569 | + | ||
| 570 | + | ||
| 571 | + | [[ai]] | |
| 572 | + | === Use of Artificial Intelligence (AI) | |
| 573 | + | ||
| 574 | + | The Developer's Certificate of Origin requires contributors to certify | |
| 575 | + | that they know the origin of their contributions to the project and | |
| 576 | + | that they have the right to submit it under the project's license. | |
| 577 | + | It's not yet clear that this can be legally satisfied when submitting | |
| 578 | + | significant amount of content that has been generated by AI tools. | |
| 579 | + | ||
| 580 | + | Another issue with AI generated content is that AIs still often | |
| 581 | + | hallucinate or just produce bad code, commit messages, documentation | |
| 582 | + | or output, even when you point out their mistakes. | |
| 583 | + | ||
| 584 | + | To avoid these issues, we will reject anything that looks AI | |
| 585 | + | generated, that sounds overly formal or bloated, that looks like AI | |
| 586 | + | slop, that looks good on the surface but makes no sense, or that | |
| 587 | + | senders don’t understand or cannot explain. | |
| 588 | + | ||
| 589 | + | We strongly recommend using AI tools carefully and responsibly. | |
| 590 | + | ||
| 591 | + | Contributors would often benefit more from AI by using it to guide and | |
| 592 | + | help them step by step towards producing a solution by themselves | |
| 593 | + | rather than by asking for a full solution that they would then mostly | |
| 594 | + | copy-paste. They can also use AI to help with debugging, or with | |
| 595 | + | checking for obvious mistakes, things that can be improved, things | |
| 596 | + | that don’t match our style, guidelines or our feedback, before sending | |
| 597 | + | it to us. | |
| 441 | 598 | ||
| 442 | 599 | [[git-tools]] | |
| 443 | 600 | === Generate your patch using Git tools out of your commits. | |
| @@ -502,8 +659,8 @@ when the maintainer did not heavily participate in the discussion and | |||
| 502 | 659 | instead left the review to trusted others. | |
| 503 | 660 | ||
| 504 | 661 | Do not forget to add trailers such as `Acked-by:`, `Reviewed-by:` and | |
| 505 | - | `Tested-by:` lines as necessary to credit people who helped your | |
| 506 | - | patch, and "cc:" them when sending such a final version for inclusion. | |
| 662 | + | `Tested-by:` (see <<commit-trailers,Commit trailers>>), and "cc:" them | |
| 663 | + | when sending such a final version for inclusion. | |
| 507 | 664 | ||
| 508 | 665 | ==== `format-patch` and `send-email` | |
| 509 | 666 | ||
| @@ -513,8 +670,10 @@ your existing e-mail client (often optimized for "multipart/*" MIME | |||
| 513 | 670 | type e-mails) might render your patches unusable. | |
| 514 | 671 | ||
| 515 | 672 | NOTE: Here we outline the procedure using `format-patch` and | |
| 516 | - | `send-email`, but you can instead use GitGitGadget to send in your | |
| 517 | - | patches (see link:MyFirstContribution.html[MyFirstContribution]). | |
| 673 | + | `send-email`, but you can instead use GitGitGadget or `b4` to send in | |
| 674 | + | your patches (see link:MyFirstContribution.html[MyFirstContribution]). | |
| 675 | + | Contributors are encouraged to use `b4`, which automates much of the | |
| 676 | + | bookkeeping that is otherwise done by hand. | |
| 518 | 677 | ||
| 519 | 678 | People on the Git mailing list need to be able to read and | |
| 520 | 679 | comment on the changes you are submitting. It is important for | |
| @@ -528,10 +687,13 @@ grouped into their own e-mail thread to help readers find all parts of the | |||
| 528 | 687 | series. To that end, send them as replies to either an additional "cover | |
| 529 | 688 | letter" message (see below), the first patch, or the respective preceding patch. | |
| 530 | 689 | Here is a link:MyFirstContribution.html#v2-git-send-email[step-by-step guide] on | |
| 531 | - | how to submit updated versions of a patch series. | |
| 690 | + | how to submit updated versions of a patch series. Before sending another | |
| 691 | + | version, make sure you have answered meaningful review comments in the existing | |
| 692 | + | discussion. Also give reviewers enough time to comment before sending another | |
| 693 | + | version. | |
| 532 | 694 | ||
| 533 | 695 | If your log message (including your name on the | |
| 534 | - | `Signed-off-by` trailer) is not writable in ASCII, make sure that | |
| 696 | + | `Signed-off-by:` trailer) is not writable in ASCII, make sure that | |
| 535 | 697 | you send off a message in the correct encoding. | |
| 536 | 698 | ||
| 537 | 699 | WARNING: Be wary of your MUAs word-wrap | |
| @@ -551,7 +713,7 @@ previously sent. | |||
| 551 | 713 | The `git format-patch` command follows the best current practice to | |
| 552 | 714 | format the body of an e-mail message. At the beginning of the | |
| 553 | 715 | patch should come your commit message, ending with the | |
| 554 | - | `Signed-off-by` trailers, and a line that consists of three dashes, | |
| 716 | + | `Signed-off-by:` trailers, and a line that consists of three dashes, | |
| 555 | 717 | followed by the diffstat information and the patch itself. If | |
| 556 | 718 | you are forwarding a patch from somebody else, optionally, at | |
| 557 | 719 | the beginning of the e-mail message just before the commit | |
| @@ -572,14 +734,27 @@ line via `git format-patch --notes`. | |||
| 572 | 734 | [[the-topic-summary]] | |
| 573 | 735 | *This is EXPERIMENTAL*. | |
| 574 | 736 | ||
| 575 | - | When sending a topic, you can propose a one-paragraph summary that | |
| 576 | - | should appear in the "What's cooking" report when it is picked up to | |
| 577 | - | explain the topic. If you choose to do so, please write a 2-5 line | |
| 578 | - | paragraph that will fit well in our release notes (see many bulleted | |
| 579 | - | entries in the Documentation/RelNotes/* files for examples), and make | |
| 580 | - | it the first paragraph of the cover letter. For a single-patch | |
| 581 | - | series, use the space between the three-dash line and the diffstat, as | |
| 582 | - | described earlier. | |
| 737 | + | When sending a topic, you can optionally propose a topic name and/or a | |
| 738 | + | one-paragraph summary that should appear in the "What's cooking" | |
| 739 | + | report when it is picked up to explain the topic. If you choose to do | |
| 740 | + | so, please write a 2-5 line paragraph that will fit well in our | |
| 741 | + | release notes (see many bulleted entries in the | |
| 742 | + | Documentation/RelNotes/* files for examples), and make it the first | |
| 743 | + | (or second, if including a suggested topic name) paragraph of the | |
| 744 | + | cover letter. If suggesting a topic name, use the format | |
| 745 | + | "XX/your-topic-name", where "XX" is a stand-in for the primary | |
| 746 | + | author's initials, and "your-topic-name" is a brief, dash-delimited | |
| 747 | + | description of what your topic does. For a single-patch series, use | |
| 748 | + | the space between the three-dash line and the diffstat, as described | |
| 749 | + | earlier. | |
| 750 | + | ||
| 751 | + | [[multi-series-efforts]] | |
| 752 | + | If your patch series is part of a larger effort spanning multiple | |
| 753 | + | patch series, briefly describe the broader goal, and state where the | |
| 754 | + | current series fits into that goal. If you are suggesting a topic | |
| 755 | + | name as in <<the-topic-summary, section above>>, consider | |
| 756 | + | "XX/the-broader-goal-part-one", "XX/the-broader-goal-part-two", and so | |
| 757 | + | on. | |
| 583 | 758 | ||
| 584 | 759 | [[attachment]] | |
| 585 | 760 | Do not attach the patch as a MIME attachment, compressed or not. | |
| @@ -744,6 +919,17 @@ relevant for debugging. | |||
| 744 | 919 | Then fix the problem and push your fix to your GitHub fork. This will | |
| 745 | 920 | trigger a new CI build to ensure all tests pass. | |
| 746 | 921 | ||
| 922 | + | Even if you do not use GitHub CI to test your changes, pay close | |
| 923 | + | attention to new failures on the branches when the maintainer pushes | |
| 924 | + | out after your topic gets merged to the 'seen' branch to make sure | |
| 925 | + | that your topic is not breaking the CI, and retract your breaking | |
| 926 | + | topic quickly while you fix the breakage you caused. | |
| 927 | + | ||
| 928 | + | To see maintainer's push, keep an eye on this page: | |
| 929 | + | ||
| 930 | + | `https://github.com/git/git/actions/workflows/main.yml?query=event%3Apush+actor%3Agitster` | |
| 931 | + | ||
| 932 | + | ||
| 747 | 933 | [[mua]] | |
| 748 | 934 | == MUA specific hints | |
| 749 | 935 | ||
modified Documentation/asciidoc.conf.in
| @@ -43,7 +43,7 @@ ifdef::doctype-book[] | |||
| 43 | 43 | endif::doctype-book[] | |
| 44 | 44 | ||
| 45 | 45 | [literal-inlinemacro] | |
| 46 | - | {eval:re.sub(r'(<[-a-zA-Z0-9.]+>)', r'<emphasis>\1</emphasis>', re.sub(r'([\[\s|()>]|^|\]|>)(\.?([-a-zA-Z0-9:+=~@\\\*\/_^\$]+\.?)+|,)',r'\1<literal>\2</literal>', re.sub(r'(\.\.\.?)([^\]$.])', r'<literal>\1</literal>\2', macros.passthroughs[int(attrs['passtext'][1:-1])] if attrs['passtext'][1:-1].isnumeric() else attrs['passtext'][1:-1])))} | |
| 46 | + | {eval:re.sub(r'(<[-a-zA-Z0-9.]+>)', r'<emphasis>\1</emphasis>', re.sub(r'([\[\s|()>]|^|\]|>)(\.?([-a-zA-Z0-9:+=~@\\\*\/_^\$%]+\.?)+|,)',r'\1<literal>\2</literal>', re.sub(r'(\.\.\.?)([^\]$.])', r'<literal>\1</literal>\2', macros.passthroughs[int(attrs['passtext'][1:-1])] if attrs['passtext'][1:-1].isnumeric() else attrs['passtext'][1:-1])))} | |
| 47 | 47 | ||
| 48 | 48 | endif::backend-docbook[] | |
| 49 | 49 | ||
| @@ -81,12 +81,24 @@ endif::backend-xhtml11[] | |||
| 81 | 81 | ||
| 82 | 82 | ifdef::backend-docbook[] | |
| 83 | 83 | ifdef::doctype-manpage[] | |
| 84 | + | [blockdef-open] | |
| 85 | + | synopsis-style=template="verseparagraph",filter="sed 's!…\\(\\]\\|$\\)!<phrase>\\0</phrase>!g;s!\\([\\[ |()]\\|^\\|\\]\\|>\\)\\([-=a-zA-Z0-9:+@,\\/_^\\$.\\\\\\*]\\+\\|…\\)!\\1<literal>\\2</literal>!g;s!<[-a-zA-Z0-9.]\\+>!<emphasis>\\0</emphasis>!g'" | |
| 86 | + | ||
| 87 | + | [blockdef-listing] | |
| 88 | + | synopsis-style=template="verseparagraph",filter="sed 's!…\\(\\]\\|$\\)!<phrase>\\0</phrase>!g;s!\\([\\[ |()]\\|^\\|\\]\\|>\\)\\([-=a-zA-Z0-9:+@,\\/_^\\$.\\\\\\*]\\+\\|…\\)!\\1<literal>\\2</literal>!g;s!<[-a-zA-Z0-9.]\\+>!<emphasis>\\0</emphasis>!g'" | |
| 89 | + | ||
| 84 | 90 | [paradef-default] | |
| 85 | 91 | synopsis-style=template="verseparagraph",filter="sed 's!…\\(\\]\\|$\\)!<phrase>\\0</phrase>!g;s!\\([\\[ |()]\\|^\\|\\]\\|>\\)\\([-=a-zA-Z0-9:+@,\\/_^\\$.\\\\\\*]\\+\\|…\\)!\\1<literal>\\2</literal>!g;s!<[-a-zA-Z0-9.]\\+>!<emphasis>\\0</emphasis>!g'" | |
| 86 | 92 | endif::doctype-manpage[] | |
| 87 | 93 | endif::backend-docbook[] | |
| 88 | 94 | ||
| 89 | 95 | ifdef::backend-xhtml11[] | |
| 96 | + | [blockdef-open] | |
| 97 | + | synopsis-style=template="verseparagraph",filter="sed 's!…\\(\\]\\|$\\)!<span>\\0</span>!g;s!\\([\\[ |()]\\|^\\|\\]\\|>\\)\\([-=a-zA-Z0-9:+@,\\/_^\\$.\\\\\\*]\\+\\|…\\)!\\1<code>\\2</code>!g;s!<[-a-zA-Z0-9.]\\+>!<em>\\0</em>!g'" | |
| 98 | + | ||
| 99 | + | [blockdef-listing] | |
| 100 | + | synopsis-style=template="verseparagraph",filter="sed 's!…\\(\\]\\|$\\)!<span>\\0</span>!g;s!\\([\\[ |()]\\|^\\|\\]\\|>\\)\\([-=a-zA-Z0-9:+@,\\/_^\\$.\\\\\\*]\\+\\|…\\)!\\1<code>\\2</code>!g;s!<[-a-zA-Z0-9.]\\+>!<em>\\0</em>!g'" | |
| 101 | + | ||
| 90 | 102 | [paradef-default] | |
| 91 | 103 | synopsis-style=template="verseparagraph",filter="sed 's!…\\(\\]\\|$\\)!<span>\\0</span>!g;s!\\([\\[ |()]\\|^\\|\\]\\|>\\)\\([-=a-zA-Z0-9:+@,\\/_^\\$.\\\\\\*]\\+\\|…\\)!\\1<code>\\2</code>!g;s!<[-a-zA-Z0-9.]\\+>!<em>\\0</em>!g'" | |
| 92 | 104 | endif::backend-xhtml11[] | |
modified Documentation/asciidoctor-extensions.rb.in
| @@ -73,7 +73,7 @@ module Git | |||
| 73 | 73 | elsif type == :monospaced | |
| 74 | 74 | node.text.gsub(/(\.\.\.?)([^\]$\.])/, '<literal>\1</literal>\2') | |
| 75 | 75 | .gsub(/^\.\.\.?$/, '<literal>\0</literal>') | |
| 76 | - | .gsub(%r{([\[\s|()>.]|^|\]|>)(\.?([-a-zA-Z0-9:+=~@/_^\$\\\*]+\.{0,2})+|,)}, '\1<literal>\2</literal>') | |
| 76 | + | .gsub(%r{([\[\s|()>.]|^|\]|>)(\.?([-a-zA-Z0-9:+=~@/_^\$\\\*%]+\.{0,2})+|,)}, '\1<literal>\2</literal>') | |
| 77 | 77 | .gsub(/(<[-a-zA-Z0-9.]+>)/, '<emphasis>\1</emphasis>') | |
| 78 | 78 | else | |
| 79 | 79 | open, close, supports_phrase = QUOTE_TAGS[type] | |
| @@ -102,7 +102,7 @@ module Git | |||
| 102 | 102 | if node.type == :monospaced | |
| 103 | 103 | node.text.gsub(/(\.\.\.?)([^\]$.])/, '<code>\1</code>\2') | |
| 104 | 104 | .gsub(/^\.\.\.?$/, '<code>\0</code>') | |
| 105 | - | .gsub(%r{([\[\s|()>.]|^|\]|>)(\.?([-a-zA-Z0-9:+=~@,/_^\$\\\*]+\.{0,2})+)}, '\1<code>\2</code>') | |
| 105 | + | .gsub(%r{([\[\s|()>.]|^|\]|>)(\.?([-a-zA-Z0-9:+=~@,/_^\$\\\*%]+\.{0,2})+)}, '\1<code>\2</code>') | |
| 106 | 106 | .gsub(/(<[-a-zA-Z0-9.]+>)/, '<em>\1</em>') | |
| 107 | 107 | ||
| 108 | 108 | else | |
modified Documentation/blame-options.adoc
| @@ -1,104 +1,105 @@ | |||
| 1 | - | -b:: | |
| 1 | + | `-b`:: | |
| 2 | 2 | Show blank SHA-1 for boundary commits. This can also | |
| 3 | 3 | be controlled via the `blame.blankBoundary` config option. | |
| 4 | 4 | ||
| 5 | - | --root:: | |
| 5 | + | `--root`:: | |
| 6 | 6 | Do not treat root commits as boundaries. This can also be | |
| 7 | 7 | controlled via the `blame.showRoot` config option. | |
| 8 | 8 | ||
| 9 | - | --show-stats:: | |
| 9 | + | `--show-stats`:: | |
| 10 | 10 | Include additional statistics at the end of blame output. | |
| 11 | 11 | ||
| 12 | - | -L <start>,<end>:: | |
| 13 | - | -L :<funcname>:: | |
| 14 | - | Annotate only the line range given by '<start>,<end>', | |
| 15 | - | or by the function name regex '<funcname>'. | |
| 12 | + | `-L <start>,<end>`:: | |
| 13 | + | `-L :<funcname>`:: | |
| 14 | + | Annotate only the line range given by `<start>,<end>`, | |
| 15 | + | or by the function name regex _<funcname>_. | |
| 16 | 16 | May be specified multiple times. Overlapping ranges are allowed. | |
| 17 | 17 | + | |
| 18 | - | '<start>' and '<end>' are optional. `-L <start>` or `-L <start>,` spans from | |
| 19 | - | '<start>' to end of file. `-L ,<end>` spans from start of file to '<end>'. | |
| 18 | + | _<start>_ and _<end>_ are optional. `-L <start>` or `-L <start>,` spans from | |
| 19 | + | _<start>_ to end of file. `-L ,<end>` spans from start of file to _<end>_. | |
| 20 | 20 | + | |
| 21 | 21 | include::line-range-format.adoc[] | |
| 22 | 22 | ||
| 23 | - | -l:: | |
| 23 | + | `-l`:: | |
| 24 | 24 | Show long rev (Default: off). | |
| 25 | 25 | ||
| 26 | - | -t:: | |
| 26 | + | `-t`:: | |
| 27 | 27 | Show raw timestamp (Default: off). | |
| 28 | 28 | ||
| 29 | - | -S <revs-file>:: | |
| 30 | - | Use revisions from revs-file instead of calling linkgit:git-rev-list[1]. | |
| 29 | + | `-S <revs-file>`:: | |
| 30 | + | Use revisions from _<revs-file>_ instead of calling | |
| 31 | + | linkgit:git-rev-list[1]. | |
| 31 | 32 | ||
| 32 | - | --reverse <rev>..<rev>:: | |
| 33 | + | `--reverse <start>..<end>`:: | |
| 33 | 34 | Walk history forward instead of backward. Instead of showing | |
| 34 | 35 | the revision in which a line appeared, this shows the last | |
| 35 | 36 | revision in which a line has existed. This requires a range of | |
| 36 | - | revision like START..END where the path to blame exists in | |
| 37 | - | START. `git blame --reverse START` is taken as `git blame | |
| 38 | - | --reverse START..HEAD` for convenience. | |
| 37 | + | revision like `<start>..<end>` where the path to blame exists in | |
| 38 | + | _<start>_. `git blame --reverse <start>` is taken as `git blame | |
| 39 | + | --reverse <start>..HEAD` for convenience. | |
| 39 | 40 | ||
| 40 | - | --first-parent:: | |
| 41 | + | `--first-parent`:: | |
| 41 | 42 | Follow only the first parent commit upon seeing a merge | |
| 42 | 43 | commit. This option can be used to determine when a line | |
| 43 | 44 | was introduced to a particular integration branch, rather | |
| 44 | 45 | than when it was introduced to the history overall. | |
| 45 | 46 | ||
| 46 | - | -p:: | |
| 47 | - | --porcelain:: | |
| 47 | + | `-p`:: | |
| 48 | + | `--porcelain`:: | |
| 48 | 49 | Show in a format designed for machine consumption. | |
| 49 | 50 | ||
| 50 | - | --line-porcelain:: | |
| 51 | + | `--line-porcelain`:: | |
| 51 | 52 | Show the porcelain format, but output commit information for | |
| 52 | 53 | each line, not just the first time a commit is referenced. | |
| 53 | - | Implies --porcelain. | |
| 54 | + | Implies `--porcelain`. | |
| 54 | 55 | ||
| 55 | - | --incremental:: | |
| 56 | + | `--incremental`:: | |
| 56 | 57 | Show the result incrementally in a format designed for | |
| 57 | 58 | machine consumption. | |
| 58 | 59 | ||
| 59 | - | --encoding=<encoding>:: | |
| 60 | - | Specifies the encoding used to output author names | |
| 60 | + | `--encoding=<encoding>`:: | |
| 61 | + | Specify the encoding used to output author names | |
| 61 | 62 | and commit summaries. Setting it to `none` makes blame | |
| 62 | 63 | output unconverted data. For more information see the | |
| 63 | 64 | discussion about encoding in the linkgit:git-log[1] | |
| 64 | 65 | manual page. | |
| 65 | 66 | ||
| 66 | - | --contents <file>:: | |
| 67 | - | Annotate using the contents from the named file, starting from <rev> | |
| 68 | - | if it is specified, and HEAD otherwise. You may specify '-' to make | |
| 67 | + | `--contents <file>`:: | |
| 68 | + | Annotate using the contents from _<file>_, starting from _<rev>_ | |
| 69 | + | if it is specified, and `HEAD` otherwise. You may specify `-` to make | |
| 69 | 70 | the command read from the standard input for the file contents. | |
| 70 | 71 | ||
| 71 | - | --date <format>:: | |
| 72 | - | Specifies the format used to output dates. If --date is not | |
| 73 | - | provided, the value of the blame.date config variable is | |
| 74 | - | used. If the blame.date config variable is also not set, the | |
| 72 | + | `--date <format>`:: | |
| 73 | + | Specify the format used to output dates. If `--date` is not | |
| 74 | + | provided, the value of the `blame.date` config variable is | |
| 75 | + | used. If the `blame.date` config variable is also not set, the | |
| 75 | 76 | iso format is used. For supported values, see the discussion | |
| 76 | - | of the --date option at linkgit:git-log[1]. | |
| 77 | + | of the `--date` option at linkgit:git-log[1]. | |
| 77 | 78 | ||
| 78 | - | --[no-]progress:: | |
| 79 | - | Progress status is reported on the standard error stream | |
| 80 | - | by default when it is attached to a terminal. This flag | |
| 81 | - | enables progress reporting even if not attached to a | |
| 82 | - | terminal. Can't use `--progress` together with `--porcelain` | |
| 83 | - | or `--incremental`. | |
| 79 | + | `--progress`:: | |
| 80 | + | `--no-progress`:: | |
| 81 | + | Enable progress reporting on the standard error stream even if | |
| 82 | + | not attached to a terminal. By default, progress status is | |
| 83 | + | reported only when it is attached. You can't use `--progress` | |
| 84 | + | together with `--porcelain` or `--incremental`. | |
| 84 | 85 | ||
| 85 | - | -M[<num>]:: | |
| 86 | + | `-M[<num>]`:: | |
| 86 | 87 | Detect moved or copied lines within a file. When a commit | |
| 87 | 88 | moves or copies a block of lines (e.g. the original file | |
| 88 | - | has A and then B, and the commit changes it to B and then | |
| 89 | - | A), the traditional 'blame' algorithm notices only half of | |
| 89 | + | has _A_ and then _B_, and the commit changes it to _B_ and then | |
| 90 | + | _A_), the traditional `blame` algorithm notices only half of | |
| 90 | 91 | the movement and typically blames the lines that were moved | |
| 91 | - | up (i.e. B) to the parent and assigns blame to the lines that | |
| 92 | - | were moved down (i.e. A) to the child commit. With this | |
| 92 | + | up (i.e. _B_) to the parent and assigns blame to the lines that | |
| 93 | + | were moved down (i.e. _A_) to the child commit. With this | |
| 93 | 94 | option, both groups of lines are blamed on the parent by | |
| 94 | 95 | running extra passes of inspection. | |
| 95 | 96 | + | |
| 96 | - | <num> is optional but it is the lower bound on the number of | |
| 97 | + | _<num>_ is optional, but it is the lower bound on the number of | |
| 97 | 98 | alphanumeric characters that Git must detect as moving/copying | |
| 98 | 99 | within a file for it to associate those lines with the parent | |
| 99 | 100 | commit. The default value is 20. | |
| 100 | 101 | ||
| 101 | - | -C[<num>]:: | |
| 102 | + | `-C[<num>]`:: | |
| 102 | 103 | In addition to `-M`, detect lines moved or copied from other | |
| 103 | 104 | files that were modified in the same commit. This is | |
| 104 | 105 | useful when you reorganize your program and move code | |
| @@ -108,14 +109,14 @@ commit. The default value is 20. | |||
| 108 | 109 | option is given three times, the command additionally | |
| 109 | 110 | looks for copies from other files in any commit. | |
| 110 | 111 | + | |
| 111 | - | <num> is optional but it is the lower bound on the number of | |
| 112 | + | _<num>_ is optional, but it is the lower bound on the number of | |
| 112 | 113 | alphanumeric characters that Git must detect as moving/copying | |
| 113 | 114 | between files for it to associate those lines with the parent | |
| 114 | 115 | commit. And the default value is 40. If there are more than one | |
| 115 | - | `-C` options given, the <num> argument of the last `-C` will | |
| 116 | + | `-C` options given, the _<num>_ argument of the last `-C` will | |
| 116 | 117 | take effect. | |
| 117 | 118 | ||
| 118 | - | --ignore-rev <rev>:: | |
| 119 | + | `--ignore-rev <rev>`:: | |
| 119 | 120 | Ignore changes made by the revision when assigning blame, as if the | |
| 120 | 121 | change never happened. Lines that were changed or added by an ignored | |
| 121 | 122 | commit will be blamed on the previous commit that changed that line or | |
| @@ -125,26 +126,26 @@ take effect. | |||
| 125 | 126 | another commit will be marked with a `?` in the blame output. If the | |
| 126 | 127 | `blame.markUnblamableLines` config option is set, then those lines touched | |
| 127 | 128 | by an ignored commit that we could not attribute to another revision are | |
| 128 | - | marked with a '*'. In the porcelain modes, we print 'ignored' and | |
| 129 | - | 'unblamable' on a newline respectively. | |
| 129 | + | marked with a `*`. In the porcelain modes, we print `ignored` and | |
| 130 | + | `unblamable` on a newline respectively. | |
| 130 | 131 | ||
| 131 | - | --ignore-revs-file <file>:: | |
| 132 | - | Ignore revisions listed in `file`, which must be in the same format as an | |
| 132 | + | `--ignore-revs-file <file>`:: | |
| 133 | + | Ignore revisions listed in _<file>_, which must be in the same format as an | |
| 133 | 134 | `fsck.skipList`. This option may be repeated, and these files will be | |
| 134 | 135 | processed after any files specified with the `blame.ignoreRevsFile` config | |
| 135 | 136 | option. An empty file name, `""`, will clear the list of revs from | |
| 136 | 137 | previously processed files. | |
| 137 | 138 | ||
| 138 | - | --color-lines:: | |
| 139 | + | `--color-lines`:: | |
| 139 | 140 | Color line annotations in the default format differently if they come from | |
| 140 | 141 | the same commit as the preceding line. This makes it easier to distinguish | |
| 141 | 142 | code blocks introduced by different commits. The color defaults to cyan and | |
| 142 | 143 | can be adjusted using the `color.blame.repeatedLines` config option. | |
| 143 | 144 | ||
| 144 | - | --color-by-age:: | |
| 145 | - | Color line annotations depending on the age of the line in the default format. | |
| 146 | - | The `color.blame.highlightRecent` config option controls what color is used for | |
| 147 | - | each range of age. | |
| 145 | + | `--color-by-age`:: | |
| 146 | + | Color line annotations depending on the age of the line in | |
| 147 | + | the default format. The `color.blame.highlightRecent` config | |
| 148 | + | option controls what color is used for each range of age. | |
| 148 | 149 | ||
| 149 | - | -h:: | |
| 150 | + | `-h`:: | |
| 150 | 151 | Show help message. | |
modified Documentation/config.adoc
| @@ -114,8 +114,7 @@ whose format and meaning depends on the keyword. Supported keywords | |||
| 114 | 114 | are: | |
| 115 | 115 | ||
| 116 | 116 | `gitdir`:: | |
| 117 | - | ||
| 118 | - | The data that follows the keyword `gitdir:` is used as a glob | |
| 117 | + | The data that follows the keyword `gitdir` and a colon is used as a glob | |
| 119 | 118 | pattern. If the location of the .git directory matches the | |
| 120 | 119 | pattern, the include condition is met. | |
| 121 | 120 | + | |
| @@ -147,8 +146,53 @@ refer to linkgit:gitignore[5] for details. For convenience: | |||
| 147 | 146 | This is the same as `gitdir` except that matching is done | |
| 148 | 147 | case-insensitively (e.g. on case-insensitive file systems) | |
| 149 | 148 | ||
| 149 | + | `worktree`:: | |
| 150 | + | The data that follows the keyword `worktree` and a colon is used as a | |
| 151 | + | glob pattern. If the working directory of the current worktree matches | |
| 152 | + | the pattern, the include condition is met. | |
| 153 | + | + | |
| 154 | + | The worktree location is the path where files are checked out (as returned | |
| 155 | + | by `git rev-parse --show-toplevel`). This is different from `gitdir`, which | |
| 156 | + | matches the `.git` directory path. In a linked worktree, the worktree path | |
| 157 | + | is the directory where that worktree's files are located, not the main | |
| 158 | + | repository's `.git` directory. | |
| 159 | + | + | |
| 160 | + | The pattern uses the same glob syntax as `gitdir` (including `~/`, `./`, | |
| 161 | + | `**/`, and trailing-`/` prefix matching). This condition will never match | |
| 162 | + | in a bare repository (which has no worktree). | |
| 163 | + | + | |
| 164 | + | Unlike `gitdir`, the `worktree` condition currently matches only the | |
| 165 | + | realpath-resolved worktree location. If the working tree was entered via a | |
| 166 | + | symbolic link, a pattern that uses the symbolic-link spelling may not match; | |
| 167 | + | use the real path instead. | |
| 168 | + | + | |
| 169 | + | This is useful when you want to apply configuration based on where the | |
| 170 | + | working tree is located on the filesystem. For example, a contributor who | |
| 171 | + | works on the same project both personally and as an employee can use | |
| 172 | + | different `user.name` and `user.email` values depending on which directory | |
| 173 | + | the worktree is checked out under: | |
| 174 | + | + | |
| 175 | + | ---- | |
| 176 | + | [includeIf "worktree:/home/user/work/"] | |
| 177 | + | path = ~/.config/git/work.inc | |
| 178 | + | [includeIf "worktree:/home/user/personal/"] | |
| 179 | + | path = ~/.config/git/personal.inc | |
| 180 | + | ---- | |
| 181 | + | + | |
| 182 | + | While `extensions.worktreeConfig` (see linkgit:git-worktree[1]) also supports | |
| 183 | + | per-worktree configuration, it stores the config inside each repository's | |
| 184 | + | `.git/config.worktree` file and requires running `git config --worktree` | |
| 185 | + | inside each worktree individually. In contrast, `includeIf "worktree:..."` | |
| 186 | + | can be set once in a global or system-level configuration file (e.g. | |
| 187 | + | `~/.config/git/config`) and applies to all repositories at once based on | |
| 188 | + | their worktree location. | |
| 189 | + | ||
| 190 | + | `worktree/i`:: | |
| 191 | + | This is the same as `worktree` except that matching is done | |
| 192 | + | case-insensitively (e.g. on case-insensitive file systems) | |
| 193 | + | ||
| 150 | 194 | `onbranch`:: | |
| 151 | - | The data that follows the keyword `onbranch:` is taken to be a | |
| 195 | + | The data that follows the keyword `onbranch` and a colon is taken to be a | |
| 152 | 196 | pattern with standard globbing wildcards and two additional | |
| 153 | 197 | ones, `**/` and `/**`, that can match multiple path components. | |
| 154 | 198 | If we are in a worktree where the name of the branch that is | |
| @@ -161,8 +205,8 @@ all branches that begin with `foo/`. This is useful if your branches are | |||
| 161 | 205 | organized hierarchically and you would like to apply a configuration to | |
| 162 | 206 | all the branches in that hierarchy. | |
| 163 | 207 | ||
| 164 | - | `hasconfig:remote.*.url:`:: | |
| 165 | - | The data that follows this keyword is taken to | |
| 208 | + | `hasconfig:remote.*.url`:: | |
| 209 | + | The data that follows this keyword and a colon is taken to | |
| 166 | 210 | be a pattern with standard globbing wildcards and two | |
| 167 | 211 | additional ones, `**/` and `/**`, that can match multiple | |
| 168 | 212 | components. The first time this keyword is seen, the rest of | |
| @@ -245,6 +289,14 @@ Example | |||
| 245 | 289 | [includeIf "gitdir:~/to/group/"] | |
| 246 | 290 | path = /path/to/foo.inc | |
| 247 | 291 | ||
| 292 | + | ; include if the worktree is at /path/to/project-build | |
| 293 | + | [includeIf "worktree:/path/to/project-build"] | |
| 294 | + | path = build-config.inc | |
| 295 | + | ||
| 296 | + | ; include for all worktrees inside /path/to/group | |
| 297 | + | [includeIf "worktree:/path/to/group/"] | |
| 298 | + | path = group-config.inc | |
| 299 | + | ||
| 248 | 300 | ; relative paths are always relative to the including | |
| 249 | 301 | ; file (if the condition is true); their location is not | |
| 250 | 302 | ; affected by the condition | |
| @@ -277,13 +329,15 @@ boolean:: | |||
| 277 | 329 | When a variable is said to take a boolean value, many | |
| 278 | 330 | synonyms are accepted for 'true' and 'false'; these are all | |
| 279 | 331 | case-insensitive. | |
| 280 | - | ||
| 332 | + | + | |
| 333 | + | -- | |
| 281 | 334 | true;; Boolean true literals are `yes`, `on`, `true`, | |
| 282 | 335 | and `1`. Also, a variable defined without `= <value>` | |
| 283 | 336 | is taken as true. | |
| 284 | 337 | ||
| 285 | 338 | false;; Boolean false literals are `no`, `off`, `false`, | |
| 286 | 339 | `0` and the empty string. | |
| 340 | + | -- | |
| 287 | 341 | + | |
| 288 | 342 | When converting a value to its canonical form using the `--type=bool` type | |
| 289 | 343 | specifier, 'git config' will ensure that the output is "true" or | |
| @@ -358,7 +412,9 @@ compiled without runtime prefix support, the compiled-in prefix will be | |||
| 358 | 412 | substituted instead. In the unlikely event that a literal path needs to | |
| 359 | 413 | be specified that should _not_ be expanded, it needs to be prefixed by | |
| 360 | 414 | `./`, like so: `./%(prefix)/bin`. | |
| 361 | - | ||
| 415 | + | + | |
| 416 | + | If prefixed with `:(optional)`, the configuration variable is treated | |
| 417 | + | as if it does not exist, if the named path does not exist. | |
| 362 | 418 | ||
| 363 | 419 | Variables | |
| 364 | 420 | ~~~~~~~~~ | |
| @@ -450,6 +506,8 @@ include::config/guitool.adoc[] | |||
| 450 | 506 | ||
| 451 | 507 | include::config/help.adoc[] | |
| 452 | 508 | ||
| 509 | + | include::config/hook.adoc[] | |
| 510 | + | ||
| 453 | 511 | include::config/http.adoc[] | |
| 454 | 512 | ||
| 455 | 513 | include::config/i18n.adoc[] | |
| @@ -510,6 +568,8 @@ include::config/remotes.adoc[] | |||
| 510 | 568 | ||
| 511 | 569 | include::config/repack.adoc[] | |
| 512 | 570 | ||
| 571 | + | include::config/replay.adoc[] | |
| 572 | + | ||
| 513 | 573 | include::config/rerere.adoc[] | |
| 514 | 574 | ||
| 515 | 575 | include::config/revert.adoc[] | |
| @@ -522,6 +582,8 @@ include::config/sequencer.adoc[] | |||
| 522 | 582 | ||
| 523 | 583 | include::config/showbranch.adoc[] | |
| 524 | 584 | ||
| 585 | + | include::config/sideband.adoc[] | |
| 586 | + | ||
| 525 | 587 | include::config/sparse.adoc[] | |
| 526 | 588 | ||
| 527 | 589 | include::config/splitindex.adoc[] | |
modified Documentation/config/advice.adoc
| @@ -48,6 +48,10 @@ all advice messages. | |||
| 48 | 48 | to create a local branch after the fact. | |
| 49 | 49 | diverging:: | |
| 50 | 50 | Shown when a fast-forward is not possible. | |
| 51 | + | fetchRemoteHEADWarn:: | |
| 52 | + | Shown when linkgit:git-fetch[1] reveals that a remote `HEAD` | |
| 53 | + | differs from what is set locally and the user has opted into | |
| 54 | + | receiving a warning in this situation. | |
| 51 | 55 | fetchShowForcedUpdates:: | |
| 52 | 56 | Shown when linkgit:git-fetch[1] takes a long time | |
| 53 | 57 | to calculate forced updates after ref updates, or to warn | |
| @@ -90,6 +94,11 @@ all advice messages. | |||
| 90 | 94 | Shown when linkgit:git-push[1] rejects a forced update of | |
| 91 | 95 | a branch when its remote-tracking ref has updates that we | |
| 92 | 96 | do not have locally. | |
| 97 | + | pushRepoLooksLikeRef:: | |
| 98 | + | Shown when the repository given to linkgit:git-push[1] is not | |
| 99 | + | a configured remote but looks like a `<remote>/<branch>` ref, | |
| 100 | + | suggesting that the remote and branch be given as separate | |
| 101 | + | arguments. | |
| 93 | 102 | pushUnqualifiedRefname:: | |
| 94 | 103 | Shown when linkgit:git-push[1] gives up trying to | |
| 95 | 104 | guess based on the source and destination refs what | |
modified Documentation/config/alias.adoc
| @@ -1,11 +1,47 @@ | |||
| 1 | 1 | alias.*:: | |
| 2 | - | Command aliases for the linkgit:git[1] command wrapper - e.g. | |
| 3 | - | after defining `alias.last = cat-file commit HEAD`, the invocation | |
| 4 | - | `git last` is equivalent to `git cat-file commit HEAD`. To avoid | |
| 5 | - | confusion and troubles with script usage, aliases that | |
| 6 | - | hide existing Git commands are ignored. Arguments are split by | |
| 7 | - | spaces, the usual shell quoting and escaping are supported. | |
| 8 | - | A quote pair or a backslash can be used to quote them. | |
| 2 | + | alias.*.command:: | |
| 3 | + | Command aliases for the linkgit:git[1] command wrapper. Aliases | |
| 4 | + | can be defined using two syntaxes: | |
| 5 | + | + | |
| 6 | + | -- | |
| 7 | + | 1. Without a subsection, e.g., `[alias] co = checkout`. The alias | |
| 8 | + | name ("co" in this example) is | |
| 9 | + | limited to ASCII alphanumeric characters and `-`, | |
| 10 | + | and is matched case-insensitively. | |
| 11 | + | 2. With a subsection, e.g., `[alias "co"] command = checkout`. The | |
| 12 | + | alias name can contain any characters (except for newlines and NUL bytes), | |
| 13 | + | including UTF-8, and is matched case-sensitively as raw bytes. | |
| 14 | + | You define the action of the alias in the `command`. | |
| 15 | + | -- | |
| 16 | + | + | |
| 17 | + | Examples: | |
| 18 | + | + | |
| 19 | + | ---- | |
| 20 | + | # Without subsection (ASCII alphanumeric and dash only) | |
| 21 | + | [alias] | |
| 22 | + | co = checkout | |
| 23 | + | st = status | |
| 24 | + | ||
| 25 | + | # With subsection (allows any characters, including UTF-8) | |
| 26 | + | [alias "hämta"] | |
| 27 | + | command = fetch | |
| 28 | + | [alias "rätta till"] | |
| 29 | + | command = commit --amend | |
| 30 | + | ---- | |
| 31 | + | + | |
| 32 | + | With a Git alias defined, e.g., | |
| 33 | + | + | |
| 34 | + | $ git config --global alias.last "cat-file commit HEAD" | |
| 35 | + | # Which is equivalent to | |
| 36 | + | $ git config --global alias.last.command "cat-file commit HEAD" | |
| 37 | + | + | |
| 38 | + | `git last` is equivalent to `git cat-file commit HEAD`. | |
| 39 | + | + | |
| 40 | + | To avoid confusion and troubles with script usage, aliases that | |
| 41 | + | hide existing Git commands are ignored except for deprecated | |
| 42 | + | commands. Arguments are split by | |
| 43 | + | spaces, the usual shell quoting and escaping are supported. | |
| 44 | + | A quote pair or a backslash can be used to quote them. | |
| 9 | 45 | + | |
| 10 | 46 | Note that the first word of an alias does not necessarily have to be a | |
| 11 | 47 | command. It can be a command-line option that will be passed into the | |
| @@ -38,6 +74,6 @@ it will be treated as a shell command. For example, defining | |||
| 38 | 74 | ** A convenient way to deal with this is to write your script | |
| 39 | 75 | operations in an inline function that is then called with any | |
| 40 | 76 | arguments from the command-line. For example `alias.cmd = "!c() { | |
| 41 | - | echo $1 | grep $2 ; }; c" will correctly execute the prior example. | |
| 77 | + | echo $1 | grep $2 ; }; c"` will correctly execute the prior example. | |
| 42 | 78 | ** Setting `GIT_TRACE=1` can help you debug the command being run for | |
| 43 | 79 | your alias. | |
modified Documentation/config/am.adoc
| @@ -1,14 +1,20 @@ | |||
| 1 | - | am.keepcr:: | |
| 2 | - | If true, git-am will call git-mailsplit for patches in mbox format | |
| 3 | - | with parameter `--keep-cr`. In this case git-mailsplit will | |
| 1 | + | `am.keepcr`:: | |
| 2 | + | If true, linkgit:git-am[1] will call linkgit:git-mailsplit[1] | |
| 3 | + | for patches in mbox format with parameter `--keep-cr`. In this | |
| 4 | + | case linkgit:git-mailsplit[1] will | |
| 4 | 5 | not remove `\r` from lines ending with `\r\n`. Can be overridden | |
| 5 | 6 | by giving `--no-keep-cr` from the command line. | |
| 6 | - | See linkgit:git-am[1], linkgit:git-mailsplit[1]. | |
| 7 | 7 | ||
| 8 | - | am.threeWay:: | |
| 9 | - | By default, `git am` will fail if the patch does not apply cleanly. When | |
| 10 | - | set to true, this setting tells `git am` to fall back on 3-way merge if | |
| 11 | - | the patch records the identity of blobs it is supposed to apply to and | |
| 12 | - | we have those blobs available locally (equivalent to giving the `--3way` | |
| 13 | - | option from the command line). Defaults to `false`. | |
| 14 | - | See linkgit:git-am[1]. | |
| 8 | + | `am.threeWay`:: | |
| 9 | + | By default, linkgit:git-am[1] will fail if the patch does not | |
| 10 | + | apply cleanly. When set to true, this setting tells | |
| 11 | + | linkgit:git-am[1] to fall back on 3-way merge if the patch | |
| 12 | + | records the identity of blobs it is supposed to apply to and we | |
| 13 | + | have those blobs available locally (equivalent to giving the | |
| 14 | + | `--3way` option from the command line). Defaults to `false`. | |
| 15 | + | ||
| 16 | + | `am.messageId`:: | |
| 17 | + | Add a `Message-ID` trailer based on the email header to the | |
| 18 | + | commit when using linkgit:git-am[1] (see | |
| 19 | + | linkgit:git-interpret-trailers[1]). See also the `--message-id` | |
| 20 | + | and `--no-message-id` options. | |
modified Documentation/config/apply.adoc
| @@ -1,11 +1,16 @@ | |||
| 1 | - | apply.ignoreWhitespace:: | |
| 2 | - | When set to 'change', tells 'git apply' to ignore changes in | |
| 1 | + | `apply.ignoreWhitespace`:: | |
| 2 | + | When set to `change`, tells `git apply` to ignore changes in | |
| 3 | 3 | whitespace, in the same way as the `--ignore-space-change` | |
| 4 | 4 | option. | |
| 5 | - | When set to one of: no, none, never, false, it tells 'git apply' to | |
| 5 | + | When set to one of: `no`, `none`, `never`, `false`, it tells `git apply` to | |
| 6 | 6 | respect all whitespace differences. | |
| 7 | + | ifndef::git-apply[] | |
| 7 | 8 | See linkgit:git-apply[1]. | |
| 9 | + | endif::git-apply[] | |
| 8 | 10 | ||
| 9 | - | apply.whitespace:: | |
| 10 | - | Tells 'git apply' how to handle whitespace, in the same way | |
| 11 | - | as the `--whitespace` option. See linkgit:git-apply[1]. | |
| 11 | + | `apply.whitespace`:: | |
| 12 | + | Tells `git apply` how to handle whitespace, in the same way | |
| 13 | + | as the `--whitespace` option. | |
| 14 | + | ifndef::git-apply[] | |
| 15 | + | See linkgit:git-apply[1]. | |
| 16 | + | endif::git-apply[] | |
modified Documentation/config/bitmap-pseudo-merge.adoc
| @@ -47,8 +47,8 @@ will be updated more often than a reference pointing at an old commit. | |||
| 47 | 47 | bitmapPseudoMerge.<name>.sampleRate:: | |
| 48 | 48 | Determines the proportion of non-bitmapped commits (among | |
| 49 | 49 | reference tips) which are selected for inclusion in an | |
| 50 | - | unstable pseudo-merge bitmap. Must be between `0` and `1` | |
| 51 | - | (inclusive). The default is `1`. | |
| 50 | + | unstable pseudo-merge bitmap. Must be greater than `0` and | |
| 51 | + | less than or equal to `1`. The default is `1`. | |
| 52 | 52 | ||
| 53 | 53 | bitmapPseudoMerge.<name>.threshold:: | |
| 54 | 54 | Determines the minimum age of non-bitmapped commits (among | |
modified Documentation/config/branch.adoc
| @@ -55,6 +55,7 @@ This option defaults to `never`. | |||
| 55 | 55 | repository), you would want to set `remote.pushDefault` to | |
| 56 | 56 | specify the remote to push to for all branches, and use this | |
| 57 | 57 | option to override it for a specific branch. | |
| 58 | + | The value may be the name of a configured remote or a repository URL. | |
| 58 | 59 | ||
| 59 | 60 | `branch.<name>.merge`:: | |
| 60 | 61 | Defines, together with `branch.<name>.remote`, the upstream branch | |
| @@ -69,9 +70,9 @@ This option defaults to `never`. | |||
| 69 | 70 | `git fetch`) to lookup the default branch for merging. Without | |
| 70 | 71 | this option, `git pull` defaults to merge the first refspec fetched. | |
| 71 | 72 | Specify multiple values to get an octopus merge. | |
| 72 | - | If you wish to setup `git pull` so that it merges into <name> from | |
| 73 | + | If you wish to setup `git pull` so that it merges into _<name>_ from | |
| 73 | 74 | another branch in the local repository, you can point | |
| 74 | - | branch.<name>.merge to the desired branch, and use the relative path | |
| 75 | + | `branch.<name>.merge` to the desired branch, and use the relative path | |
| 75 | 76 | setting `.` (a period) for `branch.<name>.remote`. | |
| 76 | 77 | ||
| 77 | 78 | `branch.<name>.mergeOptions`:: | |
| @@ -102,3 +103,10 @@ for details). | |||
| 102 | 103 | `git branch --edit-description`. Branch description is | |
| 103 | 104 | automatically added to the `format-patch` cover letter or | |
| 104 | 105 | `request-pull` summary. | |
| 106 | + | ||
| 107 | + | `branch.<name>.deleteMerged`:: | |
| 108 | + | If set to `false`, branch _<name>_ is exempt from | |
| 109 | + | `git branch --delete-merged`. Useful for a topic branch you | |
| 110 | + | intend to develop further after an initial round has been | |
| 111 | + | merged upstream. Defaults to true. Explicit deletion via | |
| 112 | + | `git branch -d` is unaffected. | |
modified Documentation/config/commitgraph.adoc
| @@ -8,6 +8,17 @@ commitGraph.maxNewFilters:: | |||
| 8 | 8 | Specifies the default value for the `--max-new-filters` option of `git | |
| 9 | 9 | commit-graph write` (c.f., linkgit:git-commit-graph[1]). | |
| 10 | 10 | ||
| 11 | + | commitGraph.changedPaths:: | |
| 12 | + | If true, then `git commit-graph write` will compute and write | |
| 13 | + | changed-path Bloom filters by default, equivalent to passing | |
| 14 | + | `--changed-paths`. If false or unset, changed-paths Bloom filters will | |
| 15 | + | be written during `git commit-graph write` only if the filters already | |
| 16 | + | exist in the current commit-graph file. This matches the default | |
| 17 | + | behavior of `git commit-graph write` without any `--[no-]changed-paths` | |
| 18 | + | option. To rewrite a commit-graph file without any filters, use the | |
| 19 | + | `--no-changed-paths` option. Command-line option `--[no-]changed-paths` | |
| 20 | + | always takes precedence over this configuration. Defaults to unset. | |
| 21 | + | ||
| 11 | 22 | commitGraph.readChangedPaths:: | |
| 12 | 23 | Deprecated. Equivalent to commitGraph.changedPathsVersion=-1 if true, and | |
| 13 | 24 | commitGraph.changedPathsVersion=0 if false. (If commitGraph.changedPathVersion | |
modified Documentation/config/core.adoc
| @@ -75,8 +75,8 @@ The built-in file system monitor is currently available only on a | |||
| 75 | 75 | limited set of supported platforms. Currently, this includes Windows | |
| 76 | 76 | and MacOS. | |
| 77 | 77 | + | |
| 78 | - | Otherwise, this variable contains the pathname of the "fsmonitor" | |
| 79 | - | hook command. | |
| 78 | + | Otherwise, this variable contains the pathname of the "fsmonitor" | |
| 79 | + | hook command. | |
| 80 | 80 | + | |
| 81 | 81 | This hook command is used to identify all files that may have changed | |
| 82 | 82 | since the requested date/time. This information is used to speed up | |
| @@ -290,6 +290,9 @@ core.preferSymlinkRefs:: | |||
| 290 | 290 | and other symbolic reference files, use symbolic links. | |
| 291 | 291 | This is sometimes needed to work with old scripts that | |
| 292 | 292 | expect HEAD to be a symbolic link. | |
| 293 | + | + | |
| 294 | + | This configuration is deprecated and will be removed in Git 3.0. Symbolic refs | |
| 295 | + | will always be written as textual symrefs. | |
| 293 | 296 | ||
| 294 | 297 | core.alternateRefsCommand:: | |
| 295 | 298 | When advertising tips of available history from an alternate, use the shell to | |
| @@ -345,6 +348,17 @@ confusion unless you know what you are doing (e.g. you are creating a | |||
| 345 | 348 | read-only snapshot of the same index to a location different from the | |
| 346 | 349 | repository's usual working tree). | |
| 347 | 350 | ||
| 351 | + | core.lockfilePid:: | |
| 352 | + | If true, Git will create a PID file alongside lock files. When a | |
| 353 | + | lock acquisition fails and a PID file exists, Git can provide | |
| 354 | + | additional diagnostic information about the process holding the | |
| 355 | + | lock, including whether it is still running. Defaults to `false`. | |
| 356 | + | + | |
| 357 | + | The PID file is named by inserting `~pid` before the `.lock` suffix. | |
| 358 | + | For example, if the lock file is `index.lock`, the PID file will be | |
| 359 | + | `index~pid.lock`. The file contains a single line in the format | |
| 360 | + | `pid <value>` followed by a newline. | |
| 361 | + | ||
| 348 | 362 | core.logAllRefUpdates:: | |
| 349 | 363 | Enable the reflog. Updates to a ref <ref> is logged to the file | |
| 350 | 364 | "`$GIT_DIR/logs/<ref>`", by appending the new and old | |
| @@ -489,10 +503,9 @@ core.askPass:: | |||
| 489 | 503 | command-line argument and write the password on its STDOUT. | |
| 490 | 504 | ||
| 491 | 505 | core.attributesFile:: | |
| 492 | - | In addition to `.gitattributes` (per-directory) and | |
| 493 | - | `.git/info/attributes`, Git looks into this file for attributes | |
| 494 | - | (see linkgit:gitattributes[5]). Path expansions are made the same | |
| 495 | - | way as for `core.excludesFile`. Its default value is | |
| 506 | + | Specifies the pathname to the file that contains attributes (see | |
| 507 | + | linkgit:gitattributes[5]), in addition to `.gitattributes` (per-directory) | |
| 508 | + | and `.git/info/attributes`. Its default value is | |
| 496 | 509 | `$XDG_CONFIG_HOME/git/attributes`. If `$XDG_CONFIG_HOME` is either not | |
| 497 | 510 | set or empty, `$HOME/.config/git/attributes` is used instead. | |
| 498 | 511 | ||
| @@ -531,9 +544,25 @@ core.commentString:: | |||
| 531 | 544 | commented, and removes them after the editor returns | |
| 532 | 545 | (default '#'). | |
| 533 | 546 | + | |
| 534 | - | If set to "auto", `git-commit` would select a character that is not | |
| 547 | + | ifndef::with-breaking-changes[] | |
| 548 | + | If set to "auto", `git-commit` will select a character that is not | |
| 535 | 549 | the beginning character of any line in existing commit messages. | |
| 536 | - | + | |
| 550 | + | Support for this value is deprecated and will be removed in Git 3.0 | |
| 551 | + | due to the following limitations: | |
| 552 | + | + | |
| 553 | + | -- | |
| 554 | + | * It is incompatible with adding comments in a commit message | |
| 555 | + | template. This includes the conflicts comments added to | |
| 556 | + | the commit message by `cherry-pick`, `merge`, `rebase` and | |
| 557 | + | `revert`. | |
| 558 | + | * It is incompatible with adding comments to the commit message | |
| 559 | + | in the `prepare-commit-msg` hook. | |
| 560 | + | * It is incompatible with the `fixup` and `squash` commands when | |
| 561 | + | rebasing, | |
| 562 | + | * It is not respected by `git notes` | |
| 563 | + | -- | |
| 564 | + | + | |
| 565 | + | endif::with-breaking-changes[] | |
| 537 | 566 | Note that these two variables are aliases of each other, and in modern | |
| 538 | 567 | versions of Git you are free to use a string (e.g., `//` or `⁑⁕⁑`) with | |
| 539 | 568 | `commentChar`. Versions of Git prior to v2.45.0 will ignore | |
| @@ -560,6 +589,14 @@ core.packedRefsTimeout:: | |||
| 560 | 589 | all; -1 means to try indefinitely. Default is 1000 (i.e., | |
| 561 | 590 | retry for 1 second). | |
| 562 | 591 | ||
| 592 | + | core.configLockTimeout:: | |
| 593 | + | The length of time, in milliseconds, to retry when trying to | |
| 594 | + | lock a configuration file for writing. Value 0 means not to | |
| 595 | + | retry at all; -1 means to try indefinitely. Default is 1000 | |
| 596 | + | (i.e., retry for 1 second). This is read from the configuration | |
| 597 | + | that is already on disk before the lock is taken, so it can be | |
| 598 | + | set persistently like any other option. | |
| 599 | + | ||
| 563 | 600 | core.pager:: | |
| 564 | 601 | Text viewer for use by Git commands (e.g., 'less'). The value | |
| 565 | 602 | is meant to be interpreted by the shell. The order of preference | |
| @@ -610,6 +647,8 @@ core.whitespace:: | |||
| 610 | 647 | part of the line terminator, i.e. with it, `trailing-space` | |
| 611 | 648 | does not trigger if the character before such a carriage-return | |
| 612 | 649 | is not a whitespace (not enabled by default). | |
| 650 | + | * `incomplete-line` treats the last line of a file that is missing the | |
| 651 | + | newline at the end as an error (not enabled by default). | |
| 613 | 652 | * `tabwidth=<n>` tells how many character positions a tab occupies; this | |
| 614 | 653 | is relevant for `indent-with-non-tab` and when Git fixes `tab-in-indent` | |
| 615 | 654 | errors. The default tab width is 8. Allowed values are 1 to 63. | |
| @@ -696,12 +735,6 @@ core.unsetenvvars:: | |||
| 696 | 735 | Defaults to `PERL5LIB` to account for the fact that Git for | |
| 697 | 736 | Windows insists on using its own Perl interpreter. | |
| 698 | 737 | ||
| 699 | - | core.restrictinheritedhandles:: | |
| 700 | - | Windows-only: override whether spawned processes inherit only standard | |
| 701 | - | file handles (`stdin`, `stdout` and `stderr`) or all handles. Can be | |
| 702 | - | `auto`, `true` or `false`. Defaults to `auto`, which means `true` on | |
| 703 | - | Windows 7 and later, and `false` on older Windows versions. | |
| 704 | - | ||
| 705 | 738 | core.createObject:: | |
| 706 | 739 | You can set this to 'link', in which case a hardlink followed by | |
| 707 | 740 | a delete of the source are used to make sure that object creation | |
modified Documentation/config/difftool.adoc
| @@ -1,43 +1,43 @@ | |||
| 1 | - | diff.tool:: | |
| 1 | + | `diff.tool`:: | |
| 2 | 2 | Controls which diff tool is used by linkgit:git-difftool[1]. | |
| 3 | 3 | This variable overrides the value configured in `merge.tool`. | |
| 4 | 4 | The list below shows the valid built-in values. | |
| 5 | 5 | Any other value is treated as a custom diff tool and requires | |
| 6 | - | that a corresponding difftool.<tool>.cmd variable is defined. | |
| 6 | + | that a corresponding `difftool.<tool>.cmd` variable is defined. | |
| 7 | 7 | ||
| 8 | - | diff.guitool:: | |
| 8 | + | `diff.guitool`:: | |
| 9 | 9 | Controls which diff tool is used by linkgit:git-difftool[1] when | |
| 10 | - | the -g/--gui flag is specified. This variable overrides the value | |
| 10 | + | the `-g`/`--gui` flag is specified. This variable overrides the value | |
| 11 | 11 | configured in `merge.guitool`. The list below shows the valid | |
| 12 | 12 | built-in values. Any other value is treated as a custom diff tool | |
| 13 | - | and requires that a corresponding difftool.<guitool>.cmd variable | |
| 13 | + | and requires that a corresponding `difftool.<guitool>.cmd` variable | |
| 14 | 14 | is defined. | |
| 15 | 15 | ||
| 16 | 16 | include::{build_dir}/mergetools-diff.adoc[] | |
| 17 | 17 | ||
| 18 | - | difftool.<tool>.cmd:: | |
| 18 | + | `difftool.<tool>.cmd`:: | |
| 19 | 19 | Specify the command to invoke the specified diff tool. | |
| 20 | 20 | The specified command is evaluated in shell with the following | |
| 21 | - | variables available: 'LOCAL' is set to the name of the temporary | |
| 22 | - | file containing the contents of the diff pre-image and 'REMOTE' | |
| 21 | + | variables available: `LOCAL` is set to the name of the temporary | |
| 22 | + | file containing the contents of the diff pre-image and `REMOTE` | |
| 23 | 23 | is set to the name of the temporary file containing the contents | |
| 24 | 24 | of the diff post-image. | |
| 25 | 25 | + | |
| 26 | 26 | See the `--tool=<tool>` option in linkgit:git-difftool[1] for more details. | |
| 27 | 27 | ||
| 28 | - | difftool.<tool>.path:: | |
| 28 | + | `difftool.<tool>.path`:: | |
| 29 | 29 | Override the path for the given tool. This is useful in case | |
| 30 | 30 | your tool is not in the PATH. | |
| 31 | 31 | ||
| 32 | - | difftool.trustExitCode:: | |
| 32 | + | `difftool.trustExitCode`:: | |
| 33 | 33 | Exit difftool if the invoked diff tool returns a non-zero exit status. | |
| 34 | 34 | + | |
| 35 | 35 | See the `--trust-exit-code` option in linkgit:git-difftool[1] for more details. | |
| 36 | 36 | ||
| 37 | - | difftool.prompt:: | |
| 37 | + | `difftool.prompt`:: | |
| 38 | 38 | Prompt before each invocation of the diff tool. | |
| 39 | 39 | ||
| 40 | - | difftool.guiDefault:: | |
| 40 | + | `difftool.guiDefault`:: | |
| 41 | 41 | Set `true` to use the `diff.guitool` by default (equivalent to specifying | |
| 42 | 42 | the `--gui` argument), or `auto` to select `diff.guitool` or `diff.tool` | |
| 43 | 43 | depending on the presence of a `DISPLAY` environment variable value. The | |
modified Documentation/config/extensions.adoc
| @@ -3,8 +3,7 @@ extensions.*:: | |||
| 3 | 3 | `core.repositoryFormatVersion` is not `1`. See | |
| 4 | 4 | linkgit:gitrepository-layout[5]. | |
| 5 | 5 | + | |
| 6 | - | -- | |
| 7 | - | compatObjectFormat:: | |
| 6 | + | compatObjectFormat::: | |
| 8 | 7 | Specify a compatibility hash algorithm to use. The acceptable values | |
| 9 | 8 | are `sha1` and `sha256`. The value specified must be different from the | |
| 10 | 9 | value of `extensions.objectFormat`. This allows client level | |
| @@ -14,19 +13,23 @@ compatObjectFormat:: | |||
| 14 | 13 | compatObjectFormat. As well as being able to use oids encoded in | |
| 15 | 14 | compatObjectFormat in addition to oids encoded with objectFormat to | |
| 16 | 15 | locally specify objects. | |
| 16 | + | + | |
| 17 | + | Note that the functionality enabled by this extension is incomplete and subject | |
| 18 | + | to change. It currently exists only to allow development and testing of | |
| 19 | + | the underlying feature and is not designed to be enabled by end users. | |
| 17 | 20 | ||
| 18 | - | noop:: | |
| 21 | + | noop::: | |
| 19 | 22 | This extension does not change git's behavior at all. It is useful only | |
| 20 | 23 | for testing format-1 compatibility. | |
| 21 | 24 | + | |
| 22 | 25 | For historical reasons, this extension is respected regardless of the | |
| 23 | 26 | `core.repositoryFormatVersion` setting. | |
| 24 | 27 | ||
| 25 | - | noop-v1:: | |
| 28 | + | noop-v1::: | |
| 26 | 29 | This extension does not change git's behavior at all. It is useful only | |
| 27 | 30 | for testing format-1 compatibility. | |
| 28 | 31 | ||
| 29 | - | objectFormat:: | |
| 32 | + | objectFormat::: | |
| 30 | 33 | Specify the hash algorithm to use. The acceptable values are `sha1` and | |
| 31 | 34 | `sha256`. If not specified, `sha1` is assumed. | |
| 32 | 35 | + | |
| @@ -34,7 +37,7 @@ Note that this setting should only be set by linkgit:git-init[1] or | |||
| 34 | 37 | linkgit:git-clone[1]. Trying to change it after initialization will not | |
| 35 | 38 | work and will produce hard-to-diagnose issues. | |
| 36 | 39 | ||
| 37 | - | partialClone:: | |
| 40 | + | partialClone::: | |
| 38 | 41 | When enabled, indicates that the repo was created with a partial clone | |
| 39 | 42 | (or later performed a partial fetch) and that the remote may have | |
| 40 | 43 | omitted sending certain unwanted objects. Such a remote is called a | |
| @@ -46,30 +49,74 @@ The value of this key is the name of the promisor remote. | |||
| 46 | 49 | For historical reasons, this extension is respected regardless of the | |
| 47 | 50 | `core.repositoryFormatVersion` setting. | |
| 48 | 51 | ||
| 49 | - | preciousObjects:: | |
| 52 | + | preciousObjects::: | |
| 50 | 53 | If enabled, indicates that objects in the repository MUST NOT be deleted | |
| 51 | 54 | (e.g., by `git-prune` or `git repack -d`). | |
| 52 | 55 | + | |
| 53 | 56 | For historical reasons, this extension is respected regardless of the | |
| 54 | 57 | `core.repositoryFormatVersion` setting. | |
| 55 | 58 | ||
| 56 | - | refStorage:: | |
| 57 | - | Specify the ref storage format to use. The acceptable values are: | |
| 59 | + | refStorage::: | |
| 60 | + | Specify the ref storage format and a corresponding payload. The value | |
| 61 | + | can be either a format name or a URI: | |
| 58 | 62 | + | |
| 63 | + | -- | |
| 64 | + | * A format name alone (e.g., `reftable` or `files`). | |
| 65 | + | ||
| 66 | + | * A URI format `<format>://<payload>` explicitly specifies both the | |
| 67 | + | format and payload (e.g., `reftable:///foo/bar`). | |
| 68 | + | ||
| 69 | + | Supported format names are: | |
| 70 | + | ||
| 59 | 71 | include::../ref-storage-format.adoc[] | |
| 60 | 72 | ||
| 73 | + | The payload is passed directly to the reference backend. For the files and | |
| 74 | + | reftable backends, this must be a filesystem path where the references will | |
| 75 | + | be stored. Defaulting to the commondir when no payload is provided. Relative | |
| 76 | + | paths are resolved relative to the `$GIT_DIR`. Future backends may support | |
| 77 | + | other payload schemes, e.g., postgres://127.0.0.1:5432?database=myrepo. | |
| 78 | + | -- | |
| 61 | 79 | + | |
| 62 | 80 | Note that this setting should only be set by linkgit:git-init[1] or | |
| 63 | 81 | linkgit:git-clone[1]. Trying to change it after initialization will not | |
| 64 | 82 | work and will produce hard-to-diagnose issues. | |
| 65 | 83 | ||
| 66 | - | relativeWorktrees:: | |
| 84 | + | relativeWorktrees::: | |
| 67 | 85 | If enabled, indicates at least one worktree has been linked with | |
| 68 | 86 | relative paths. Automatically set if a worktree has been created or | |
| 69 | 87 | repaired with either the `--relative-paths` option or with the | |
| 70 | 88 | `worktree.useRelativePaths` config set to `true`. | |
| 71 | 89 | ||
| 72 | - | worktreeConfig:: | |
| 90 | + | submodulePathConfig::: | |
| 91 | + | This extension is for the minority of users who: | |
| 92 | + | + | |
| 93 | + | -- | |
| 94 | + | * Encounter errors like `refusing to create ... in another submodule's git dir` | |
| 95 | + | due to a number of reasons, like case-insensitive filesystem conflicts when | |
| 96 | + | creating modules named `foo` and `Foo`. | |
| 97 | + | * Require more flexible submodule layouts, for example due to nested names like | |
| 98 | + | `foo`, `foo/bar` and `foo/baz` not supported by the default gitdir mechanism | |
| 99 | + | which uses `.git/modules/<plain-name>` locations, causing further conflicts. | |
| 100 | + | -- | |
| 101 | + | + | |
| 102 | + | When `extensions.submodulePathConfig` is enabled, the `submodule.<name>.gitdir` | |
| 103 | + | config becomes the single source of truth for all submodule gitdir paths and is | |
| 104 | + | automatically set for all new submodules both during clone and init operations. | |
| 105 | + | + | |
| 106 | + | Git will error out if a module does not have a corresponding | |
| 107 | + | `submodule.<name>.gitdir` set. | |
| 108 | + | + | |
| 109 | + | Existing (pre-extension) submodules need to be migrated by adding the missing | |
| 110 | + | config entries. This can be done manually, e.g. for each submodule: | |
| 111 | + | `git config submodule.<name>.gitdir .git/modules/<name>`, or via the | |
| 112 | + | `git submodule--helper migrate-gitdir-configs` command which iterates over all | |
| 113 | + | submodules and attempts to migrate them. | |
| 114 | + | + | |
| 115 | + | The extension can be enabled automatically for new repositories by setting | |
| 116 | + | `init.defaultSubmodulePathConfig` to `true`, for example by running | |
| 117 | + | `git config --global init.defaultSubmodulePathConfig true`. | |
| 118 | + | ||
| 119 | + | worktreeConfig::: | |
| 73 | 120 | If enabled, then worktrees will load config settings from the | |
| 74 | 121 | `$GIT_DIR/config.worktree` file in addition to the | |
| 75 | 122 | `$GIT_COMMON_DIR/config` file. Note that `$GIT_COMMON_DIR` and | |
| @@ -83,11 +130,12 @@ When enabling this extension, you must be careful to move | |||
| 83 | 130 | certain values from the common config file to the main working tree's | |
| 84 | 131 | `config.worktree` file, if present: | |
| 85 | 132 | + | |
| 133 | + | -- | |
| 86 | 134 | * `core.worktree` must be moved from `$GIT_COMMON_DIR/config` to | |
| 87 | 135 | `$GIT_COMMON_DIR/config.worktree`. | |
| 88 | 136 | * If `core.bare` is true, then it must be moved from `$GIT_COMMON_DIR/config` | |
| 89 | 137 | to `$GIT_COMMON_DIR/config.worktree`. | |
| 90 | - | ||
| 138 | + | -- | |
| 91 | 139 | + | |
| 92 | 140 | It may also be beneficial to adjust the locations of `core.sparseCheckout` | |
| 93 | 141 | and `core.sparseCheckoutCone` depending on your desire for customizable | |
| @@ -100,4 +148,3 @@ details. | |||
| 100 | 148 | + | |
| 101 | 149 | For historical reasons, this extension is respected regardless of the | |
| 102 | 150 | `core.repositoryFormatVersion` setting. | |
| 103 | - | -- | |
modified Documentation/config/feature.adoc
| @@ -20,6 +20,16 @@ walking fewer objects. | |||
| 20 | 20 | + | |
| 21 | 21 | * `pack.allowPackReuse=multi` may improve the time it takes to create a pack by | |
| 22 | 22 | reusing objects from multiple packs instead of just one. | |
| 23 | + | + | |
| 24 | + | * `pack.usePathWalk` may speed up packfile creation and make the packfiles be | |
| 25 | + | significantly smaller in the presence of certain filename collisions with Git's | |
| 26 | + | default name-hash. | |
| 27 | + | + | |
| 28 | + | * `init.defaultRefFormat=reftable` causes newly initialized repositories to use | |
| 29 | + | the reftable format for storing references. This new format solves issues with | |
| 30 | + | case-insensitive filesystems, compresses better and performs significantly | |
| 31 | + | better with many use cases. Refer to Documentation/technical/reftable.adoc for | |
| 32 | + | more information on this new storage format. | |
| 23 | 33 | ||
| 24 | 34 | feature.manyFiles:: | |
| 25 | 35 | Enable config options that optimize for repos with many files in the | |
modified Documentation/config/fetch.adoc
| @@ -1,32 +1,32 @@ | |||
| 1 | - | fetch.recurseSubmodules:: | |
| 1 | + | `fetch.recurseSubmodules`:: | |
| 2 | 2 | This option controls whether `git fetch` (and the underlying fetch | |
| 3 | 3 | in `git pull`) will recursively fetch into populated submodules. | |
| 4 | - | This option can be set either to a boolean value or to 'on-demand'. | |
| 4 | + | This option can be set either to a boolean value or to `on-demand`. | |
| 5 | 5 | Setting it to a boolean changes the behavior of fetch and pull to | |
| 6 | 6 | recurse unconditionally into submodules when set to true or to not | |
| 7 | - | recurse at all when set to false. When set to 'on-demand', fetch and | |
| 7 | + | recurse at all when set to false. When set to `on-demand`, fetch and | |
| 8 | 8 | pull will only recurse into a populated submodule when its | |
| 9 | 9 | superproject retrieves a commit that updates the submodule's | |
| 10 | 10 | reference. | |
| 11 | - | Defaults to 'on-demand', or to the value of 'submodule.recurse' if set. | |
| 11 | + | Defaults to `on-demand`, or to the value of `submodule.recurse` if set. | |
| 12 | 12 | ||
| 13 | - | fetch.fsckObjects:: | |
| 13 | + | `fetch.fsckObjects`:: | |
| 14 | 14 | If it is set to true, git-fetch-pack will check all fetched | |
| 15 | 15 | objects. See `transfer.fsckObjects` for what's | |
| 16 | - | checked. Defaults to false. If not set, the value of | |
| 16 | + | checked. Defaults to `false`. If not set, the value of | |
| 17 | 17 | `transfer.fsckObjects` is used instead. | |
| 18 | 18 | ||
| 19 | - | fetch.fsck.<msg-id>:: | |
| 19 | + | `fetch.fsck.<msg-id>`:: | |
| 20 | 20 | Acts like `fsck.<msg-id>`, but is used by | |
| 21 | 21 | linkgit:git-fetch-pack[1] instead of linkgit:git-fsck[1]. See | |
| 22 | 22 | the `fsck.<msg-id>` documentation for details. | |
| 23 | 23 | ||
| 24 | - | fetch.fsck.skipList:: | |
| 24 | + | `fetch.fsck.skipList`:: | |
| 25 | 25 | Acts like `fsck.skipList`, but is used by | |
| 26 | 26 | linkgit:git-fetch-pack[1] instead of linkgit:git-fsck[1]. See | |
| 27 | 27 | the `fsck.skipList` documentation for details. | |
| 28 | 28 | ||
| 29 | - | fetch.unpackLimit:: | |
| 29 | + | `fetch.unpackLimit`:: | |
| 30 | 30 | If the number of objects fetched over the Git native | |
| 31 | 31 | transfer is below this | |
| 32 | 32 | limit, then the objects will be unpacked into loose object | |
| @@ -37,12 +37,12 @@ fetch.unpackLimit:: | |||
| 37 | 37 | especially on slow filesystems. If not set, the value of | |
| 38 | 38 | `transfer.unpackLimit` is used instead. | |
| 39 | 39 | ||
| 40 | - | fetch.prune:: | |
| 40 | + | `fetch.prune`:: | |
| 41 | 41 | If true, fetch will automatically behave as if the `--prune` | |
| 42 | 42 | option was given on the command line. See also `remote.<name>.prune` | |
| 43 | 43 | and the PRUNING section of linkgit:git-fetch[1]. | |
| 44 | 44 | ||
| 45 | - | fetch.pruneTags:: | |
| 45 | + | `fetch.pruneTags`:: | |
| 46 | 46 | If true, fetch will automatically behave as if the | |
| 47 | 47 | `refs/tags/*:refs/tags/*` refspec was provided when pruning, | |
| 48 | 48 | if not set already. This allows for setting both this option | |
| @@ -50,41 +50,41 @@ fetch.pruneTags:: | |||
| 50 | 50 | refs. See also `remote.<name>.pruneTags` and the PRUNING | |
| 51 | 51 | section of linkgit:git-fetch[1]. | |
| 52 | 52 | ||
| 53 | - | fetch.all:: | |
| 53 | + | `fetch.all`:: | |
| 54 | 54 | If true, fetch will attempt to update all available remotes. | |
| 55 | 55 | This behavior can be overridden by passing `--no-all` or by | |
| 56 | 56 | explicitly specifying one or more remote(s) to fetch from. | |
| 57 | - | Defaults to false. | |
| 57 | + | Defaults to `false`. | |
| 58 | 58 | ||
| 59 | - | fetch.output:: | |
| 59 | + | `fetch.output`:: | |
| 60 | 60 | Control how ref update status is printed. Valid values are | |
| 61 | 61 | `full` and `compact`. Default value is `full`. See the | |
| 62 | 62 | OUTPUT section in linkgit:git-fetch[1] for details. | |
| 63 | 63 | ||
| 64 | - | fetch.negotiationAlgorithm:: | |
| 64 | + | `fetch.negotiationAlgorithm`:: | |
| 65 | 65 | Control how information about the commits in the local repository | |
| 66 | 66 | is sent when negotiating the contents of the packfile to be sent by | |
| 67 | - | the server. Set to "consecutive" to use an algorithm that walks | |
| 68 | - | over consecutive commits checking each one. Set to "skipping" to | |
| 67 | + | the server. Set to `consecutive` to use an algorithm that walks | |
| 68 | + | over consecutive commits checking each one. Set to `skipping` to | |
| 69 | 69 | use an algorithm that skips commits in an effort to converge | |
| 70 | 70 | faster, but may result in a larger-than-necessary packfile; or set | |
| 71 | - | to "noop" to not send any information at all, which will almost | |
| 71 | + | to `noop` to not send any information at all, which will almost | |
| 72 | 72 | certainly result in a larger-than-necessary packfile, but will skip | |
| 73 | - | the negotiation step. Set to "default" to override settings made | |
| 73 | + | the negotiation step. Set to `default` to override settings made | |
| 74 | 74 | previously and use the default behaviour. The default is normally | |
| 75 | - | "consecutive", but if `feature.experimental` is true, then the | |
| 76 | - | default is "skipping". Unknown values will cause 'git fetch' to | |
| 75 | + | `consecutive`, but if `feature.experimental` is `true`, then the | |
| 76 | + | default is `skipping`. Unknown values will cause `git fetch` to | |
| 77 | 77 | error out. | |
| 78 | 78 | + | |
| 79 | - | See also the `--negotiate-only` and `--negotiation-tip` options to | |
| 79 | + | See also the `--negotiate-only` and `--negotiation-restrict` options to | |
| 80 | 80 | linkgit:git-fetch[1]. | |
| 81 | 81 | ||
| 82 | - | fetch.showForcedUpdates:: | |
| 83 | - | Set to false to enable `--no-show-forced-updates` in | |
| 82 | + | `fetch.showForcedUpdates`:: | |
| 83 | + | Set to `false` to enable `--no-show-forced-updates` in | |
| 84 | 84 | linkgit:git-fetch[1] and linkgit:git-pull[1] commands. | |
| 85 | - | Defaults to true. | |
| 85 | + | Defaults to `true`. | |
| 86 | 86 | ||
| 87 | - | fetch.parallel:: | |
| 87 | + | `fetch.parallel`:: | |
| 88 | 88 | Specifies the maximal number of fetch operations to be run in parallel | |
| 89 | 89 | at a time (submodules, or remotes when the `--multiple` option of | |
| 90 | 90 | linkgit:git-fetch[1] is in effect). | |
| @@ -94,16 +94,16 @@ A value of 0 will give some reasonable default. If unset, it defaults to 1. | |||
| 94 | 94 | For submodules, this setting can be overridden using the `submodule.fetchJobs` | |
| 95 | 95 | config setting. | |
| 96 | 96 | ||
| 97 | - | fetch.writeCommitGraph:: | |
| 97 | + | `fetch.writeCommitGraph`:: | |
| 98 | 98 | Set to true to write a commit-graph after every `git fetch` command | |
| 99 | 99 | that downloads a pack-file from a remote. Using the `--split` option, | |
| 100 | 100 | most executions will create a very small commit-graph file on top of | |
| 101 | 101 | the existing commit-graph file(s). Occasionally, these files will | |
| 102 | 102 | merge and the write may take longer. Having an updated commit-graph | |
| 103 | 103 | file helps performance of many Git commands, including `git merge-base`, | |
| 104 | - | `git push -f`, and `git log --graph`. Defaults to false. | |
| 104 | + | `git push -f`, and `git log --graph`. Defaults to `false`. | |
| 105 | 105 | ||
| 106 | - | fetch.bundleURI:: | |
| 106 | + | `fetch.bundleURI`:: | |
| 107 | 107 | This value stores a URI for downloading Git object data from a bundle | |
| 108 | 108 | URI before performing an incremental fetch from the origin Git server. | |
| 109 | 109 | This is similar to how the `--bundle-uri` option behaves in | |
| @@ -115,9 +115,9 @@ If you modify this value and your repository has a `fetch.bundleCreationToken` | |||
| 115 | 115 | value, then remove that `fetch.bundleCreationToken` value before fetching from | |
| 116 | 116 | the new bundle URI. | |
| 117 | 117 | ||
| 118 | - | fetch.bundleCreationToken:: | |
| 118 | + | `fetch.bundleCreationToken`:: | |
| 119 | 119 | When using `fetch.bundleURI` to fetch incrementally from a bundle | |
| 120 | - | list that uses the "creationToken" heuristic, this config value | |
| 120 | + | list that uses the "`creationToken`" heuristic, this config value | |
| 121 | 121 | stores the maximum `creationToken` value of the downloaded bundles. | |
| 122 | 122 | This value is used to prevent downloading bundles in the future | |
| 123 | 123 | if the advertised `creationToken` is not strictly larger than this | |
| @@ -126,3 +126,22 @@ fetch.bundleCreationToken:: | |||
| 126 | 126 | The creation token values are chosen by the provider serving the specific | |
| 127 | 127 | bundle URI. If you modify the URI at `fetch.bundleURI`, then be sure to | |
| 128 | 128 | remove the value for the `fetch.bundleCreationToken` value before fetching. | |
| 129 | + | ||
| 130 | + | `fetch.followRemoteHEAD`:: | |
| 131 | + | When fetching using a default refspec, this setting determines how to handle | |
| 132 | + | differences between a fetched remote's `HEAD` and the local | |
| 133 | + | `remotes/<name>/HEAD` symbolic-ref. Its value is one of | |
| 134 | + | + | |
| 135 | + | -- | |
| 136 | + | `create`;; | |
| 137 | + | Create `remotes/<name>/HEAD` if a ref exists on the remote, but not locally. | |
| 138 | + | An existing symbolic-ref will not be touched. This is the default value. | |
| 139 | + | `warn`;; | |
| 140 | + | Display a warning if the remote advertises a different `HEAD` than what is | |
| 141 | + | set locally. Behaves like "create" if the local symbolic-ref doesn't exist. | |
| 142 | + | `always`;; | |
| 143 | + | Silently update `remotes/<name>/HEAD` whenever the remote advertises a new | |
| 144 | + | value. | |
| 145 | + | `never`;; | |
| 146 | + | Never create or modify the `remotes/<name>/HEAD` symbolic-ref. | |
| 147 | + | -- | |
modified Documentation/config/format.adoc
| @@ -68,9 +68,15 @@ format.encodeEmailHeaders:: | |||
| 68 | 68 | Defaults to true. | |
| 69 | 69 | ||
| 70 | 70 | format.pretty:: | |
| 71 | + | ifndef::with-breaking-changes[] | |
| 71 | 72 | The default pretty format for log/show/whatchanged command. | |
| 72 | 73 | See linkgit:git-log[1], linkgit:git-show[1], | |
| 73 | 74 | linkgit:git-whatchanged[1]. | |
| 75 | + | endif::with-breaking-changes[] | |
| 76 | + | ifdef::with-breaking-changes[] | |
| 77 | + | The default pretty format for log/show command. | |
| 78 | + | See linkgit:git-log[1], linkgit:git-show[1]. | |
| 79 | + | endif::with-breaking-changes[] | |
| 74 | 80 | ||
| 75 | 81 | format.thread:: | |
| 76 | 82 | The default threading style for 'git format-patch'. Can be | |
| @@ -95,6 +101,11 @@ format.coverLetter:: | |||
| 95 | 101 | generate a cover-letter only when there's more than one patch. | |
| 96 | 102 | Default is false. | |
| 97 | 103 | ||
| 104 | + | format.commitListFormat:: | |
| 105 | + | When the `--commit-list-format` option is not given, `format-patch` | |
| 106 | + | uses the value of this variable to decide how to format the entry of | |
| 107 | + | each commit. Defaults to `shortlog`. | |
| 108 | + | ||
| 98 | 109 | format.outputDirectory:: | |
| 99 | 110 | Set a custom directory to store the resulting files instead of the | |
| 100 | 111 | current working directory. All directory components will be created. | |
modified Documentation/config/fsmonitor--daemon.adoc
| @@ -4,8 +4,8 @@ fsmonitor.allowRemote:: | |||
| 4 | 4 | behavior. Only respected when `core.fsmonitor` is set to `true`. | |
| 5 | 5 | ||
| 6 | 6 | fsmonitor.socketDir:: | |
| 7 | - | This Mac OS-specific option, if set, specifies the directory in | |
| 7 | + | This Mac OS and Linux-specific option, if set, specifies the directory in | |
| 8 | 8 | which to create the Unix domain socket used for communication | |
| 9 | 9 | between the fsmonitor daemon and various Git commands. The directory must | |
| 10 | - | reside on a native Mac OS filesystem. Only respected when `core.fsmonitor` | |
| 10 | + | reside on a native filesystem. Only respected when `core.fsmonitor` | |
| 11 | 11 | is set to `true`. | |
modified Documentation/config/gpg.adoc
| @@ -1,5 +1,5 @@ | |||
| 1 | 1 | gpg.program:: | |
| 2 | - | Use this custom program instead of "`gpg`" found on `$PATH` when | |
| 2 | + | Pathname of the program to use instead of "`gpg`" when | |
| 3 | 3 | making or verifying a PGP signature. The program must support the | |
| 4 | 4 | same command-line interface as GPG, namely, to verify a detached | |
| 5 | 5 | signature, "`gpg --verify $signature - <$file`" is run, and the | |
modified Documentation/config/grep.adoc
| @@ -1,28 +1,28 @@ | |||
| 1 | - | grep.lineNumber:: | |
| 2 | - | If set to true, enable `-n` option by default. | |
| 1 | + | `grep.lineNumber`:: | |
| 2 | + | If set to `true`, enable `-n` option by default. | |
| 3 | 3 | ||
| 4 | - | grep.column:: | |
| 5 | - | If set to true, enable the `--column` option by default. | |
| 4 | + | `grep.column`:: | |
| 5 | + | If set to `true`, enable the `--column` option by default. | |
| 6 | 6 | ||
| 7 | - | grep.patternType:: | |
| 8 | - | Set the default matching behavior. Using a value of 'basic', 'extended', | |
| 9 | - | 'fixed', or 'perl' will enable the `--basic-regexp`, `--extended-regexp`, | |
| 7 | + | `grep.patternType`:: | |
| 8 | + | Set the default matching behavior. Using a value of `basic`, `extended`, | |
| 9 | + | `fixed`, or `perl` will enable the `--basic-regexp`, `--extended-regexp`, | |
| 10 | 10 | `--fixed-strings`, or `--perl-regexp` option accordingly, while the | |
| 11 | - | value 'default' will use the `grep.extendedRegexp` option to choose | |
| 12 | - | between 'basic' and 'extended'. | |
| 11 | + | value `default` will use the `grep.extendedRegexp` option to choose | |
| 12 | + | between `basic` and `extended`. | |
| 13 | 13 | ||
| 14 | - | grep.extendedRegexp:: | |
| 15 | - | If set to true, enable `--extended-regexp` option by default. This | |
| 14 | + | `grep.extendedRegexp`:: | |
| 15 | + | If set to `true`, enable `--extended-regexp` option by default. This | |
| 16 | 16 | option is ignored when the `grep.patternType` option is set to a value | |
| 17 | - | other than 'default'. | |
| 17 | + | other than `default`. | |
| 18 | 18 | ||
| 19 | - | grep.threads:: | |
| 19 | + | `grep.threads`:: | |
| 20 | 20 | Number of grep worker threads to use. If unset (or set to 0), Git will | |
| 21 | 21 | use as many threads as the number of logical cores available. | |
| 22 | 22 | ||
| 23 | - | grep.fullName:: | |
| 24 | - | If set to true, enable `--full-name` option by default. | |
| 23 | + | `grep.fullName`:: | |
| 24 | + | If set to `true`, enable `--full-name` option by default. | |
| 25 | 25 | ||
| 26 | - | grep.fallbackToNoIndex:: | |
| 27 | - | If set to true, fall back to `git grep --no-index` if `git grep` | |
| 28 | - | is executed outside of a git repository. Defaults to false. | |
| 26 | + | `grep.fallbackToNoIndex`:: | |
| 27 | + | If set to `true`, fall back to `git grep --no-index` if `git grep` | |
| 28 | + | is executed outside of a git repository. Defaults to `false`. | |
modified Documentation/config/gui.adoc
| @@ -55,3 +55,8 @@ gui.blamehistoryctx:: | |||
| 55 | 55 | linkgit:gitk[1] for the selected commit, when the `Show History | |
| 56 | 56 | Context` menu item is invoked from 'git gui blame'. If this | |
| 57 | 57 | variable is set to zero, the whole history is shown. | |
| 58 | + | ||
| 59 | + | gui.GCWarning:: | |
| 60 | + | Determines whether linkgit:git-gui[1] should prompt for garbage | |
| 61 | + | collection when git detects a large number of loose objects in | |
| 62 | + | the repository. The default value is "true". | |
added Documentation/config/hook.adoc mode 100644
| @@ -0,0 +1,107 @@ | |||
| 1 | + | ifdef::git-hook[] | |
| 2 | + | :see-git-hook: | |
| 3 | + | endif::git-hook[] | |
| 4 | + | ifndef::git-hook[] | |
| 5 | + | :see-git-hook: See linkgit:git-hook[1]. | |
| 6 | + | endif::git-hook[] | |
| 7 | + | ||
| 8 | + | hook.<friendly-name>.command:: | |
| 9 | + | The command to execute for `hook.<friendly-name>`. `<friendly-name>` | |
| 10 | + | is a unique name that identifies this hook. The hook events that | |
| 11 | + | trigger the command are configured with `hook.<friendly-name>.event`. | |
| 12 | + | The value can be an executable path or a shell oneliner. If more than | |
| 13 | + | one value is specified for the same `<friendly-name>`, only the last | |
| 14 | + | value parsed is used. {see-git-hook} | |
| 15 | + | ||
| 16 | + | hook.<friendly-name>.event:: | |
| 17 | + | The hook events that trigger `hook.<friendly-name>`. The value is the | |
| 18 | + | name of a hook event, like "pre-commit" or "update". (See | |
| 19 | + | linkgit:githooks[5] for a complete list of hook events.) On the | |
| 20 | + | specified event, the associated `hook.<friendly-name>.command` is executed. | |
| 21 | + | This is a multi-valued key. To run `hook.<friendly-name>` on multiple | |
| 22 | + | events, specify the key more than once. An empty value resets | |
| 23 | + | the list of events, clearing any previously defined events for | |
| 24 | + | `hook.<friendly-name>`. {see-git-hook} | |
| 25 | + | + | |
| 26 | + | The `<friendly-name>` must not be the same as a known hook event name | |
| 27 | + | (e.g. do not use `hook.pre-commit.event`). Using a known event name as | |
| 28 | + | a friendly-name is a fatal error because it creates an ambiguity with | |
| 29 | + | `hook.<event>.enabled` and `hook.<event>.jobs`. For unknown event names, | |
| 30 | + | a warning is issued when `<friendly-name>` matches the event value. | |
| 31 | + | ||
| 32 | + | hook.<friendly-name>.enabled:: | |
| 33 | + | Whether the hook `hook.<friendly-name>` is enabled. Defaults to `true`. | |
| 34 | + | Set to `false` to disable the hook without removing its | |
| 35 | + | configuration. This is particularly useful when a hook is defined | |
| 36 | + | in a system or global config file and needs to be disabled for a | |
| 37 | + | specific repository. {see-git-hook} | |
| 38 | + | ||
| 39 | + | hook.<friendly-name>.parallel:: | |
| 40 | + | Whether the hook `hook.<friendly-name>` may run in parallel with other hooks | |
| 41 | + | for the same event. Defaults to `false`. Set to `true` only when the | |
| 42 | + | hook script is safe to run concurrently with other hooks for the same | |
| 43 | + | event. If any hook for an event does not have this set to `true`, | |
| 44 | + | all hooks for that event run sequentially regardless of `hook.jobs`. | |
| 45 | + | Only configured (named) hooks need to declare this. Traditional hooks | |
| 46 | + | found in the hooks directory do not need to, and run in parallel when | |
| 47 | + | the effective job count is greater than 1. {see-git-hook} | |
| 48 | + | ||
| 49 | + | hook.<event>.enabled:: | |
| 50 | + | Switch to enable or disable all hooks for the `<event>` hook event. | |
| 51 | + | When set to `false`, no hooks fire for that event, regardless of any | |
| 52 | + | per-hook `hook.<friendly-name>.enabled` settings. Defaults to `true`. | |
| 53 | + | {see-git-hook} | |
| 54 | + | + | |
| 55 | + | Note on naming: `<event>` must be the event name (e.g. `pre-commit`), | |
| 56 | + | not a hook friendly-name. Since using a known event name as a | |
| 57 | + | friendly-name is disallowed (see `hook.<friendly-name>.event` above), | |
| 58 | + | there is no ambiguity between event-level and per-hook `.enabled` | |
| 59 | + | settings for known events. For unknown events, if a friendly-name | |
| 60 | + | matches the event name despite the warning, `.enabled` is treated | |
| 61 | + | as per-hook only. | |
| 62 | + | ||
| 63 | + | hook.<event>.jobs:: | |
| 64 | + | Specifies how many hooks can be run simultaneously for the `<event>` | |
| 65 | + | hook event (e.g. `hook.post-receive.jobs = 4`). Overrides `hook.jobs` | |
| 66 | + | for this specific event. The same parallelism restrictions apply: this | |
| 67 | + | setting has no effect unless all configured hooks for the event have | |
| 68 | + | `hook.<friendly-name>.parallel` set to `true`. Set to `-1` to use the | |
| 69 | + | number of available CPU cores. Must be a positive integer or `-1`; | |
| 70 | + | zero is rejected with a warning. {see-git-hook} | |
| 71 | + | + | |
| 72 | + | Note on naming: although this key resembles `hook.<friendly-name>.*` | |
| 73 | + | (a per-hook setting), `<event>` must be the event name, not a hook | |
| 74 | + | friendly name. The key component is stored literally and looked up by | |
| 75 | + | event name at runtime with no translation between the two namespaces. | |
| 76 | + | A key like `hook.my-hook.jobs` is stored under `"my-hook"` but the | |
| 77 | + | lookup at runtime uses the event name (e.g. `"post-receive"`), so | |
| 78 | + | `hook.my-hook.jobs` is silently ignored even when `my-hook` is | |
| 79 | + | registered for that event. Use `hook.post-receive.jobs` or any other | |
| 80 | + | valid event name when setting `hook.<event>.jobs`. | |
| 81 | + | ||
| 82 | + | hook.jobs:: | |
| 83 | + | Specifies how many hooks can be run simultaneously during parallelized | |
| 84 | + | hook execution. If unspecified, defaults to 1 (serial execution). | |
| 85 | + | Set to `-1` to use the number of available CPU cores. | |
| 86 | + | Can be overridden on a per-event basis with `hook.<event>.jobs`. | |
| 87 | + | Some hooks always run sequentially regardless of this setting because | |
| 88 | + | they operate on shared data and cannot safely be parallelized: | |
| 89 | + | + | |
| 90 | + | -- | |
| 91 | + | `applypatch-msg`;; | |
| 92 | + | `prepare-commit-msg`;; | |
| 93 | + | `commit-msg`;; | |
| 94 | + | Receive a commit message file and may rewrite it in place. | |
| 95 | + | `pre-commit`;; | |
| 96 | + | `post-checkout`;; | |
| 97 | + | `push-to-checkout`;; | |
| 98 | + | `post-commit`;; | |
| 99 | + | Access the working tree, index, or repository state. | |
| 100 | + | -- | |
| 101 | + | + | |
| 102 | + | This setting has no effect unless all configured hooks for the event have | |
| 103 | + | `hook.<friendly-name>.parallel` set to `true`. | |
| 104 | + | + | |
| 105 | + | For `pre-push` hooks, which normally keep stdout and stderr separate, | |
| 106 | + | setting this to a value greater than 1 (or passing `-j`) will merge stdout | |
| 107 | + | into stderr to allow correct de-interleaving of parallel output. | |
modified Documentation/config/http.adoc
| @@ -59,7 +59,18 @@ http.emptyAuth:: | |||
| 59 | 59 | Attempt authentication without seeking a username or password. This | |
| 60 | 60 | can be used to attempt GSS-Negotiate authentication without specifying | |
| 61 | 61 | a username in the URL, as libcurl normally requires a username for | |
| 62 | - | authentication. | |
| 62 | + | authentication. Possible values are: | |
| 63 | + | + | |
| 64 | + | -- | |
| 65 | + | * `auto` (default) - Send empty credentials only if the server's 401 response | |
| 66 | + | advertises an authentication mechanism that requires them (such as | |
| 67 | + | GSS-Negotiate); otherwise fall back to prompting via the credential helper. | |
| 68 | + | * `true` - Always send empty credentials on the very first request, before | |
| 69 | + | receiving any 401 response from the server. | |
| 70 | + | * `false` - Never send empty credentials. Mechanisms that require | |
| 71 | + | empty credentials or an explicit username, such as GSS-Negotiate, will not | |
| 72 | + | work. | |
| 73 | + | -- | |
| 63 | 74 | ||
| 64 | 75 | http.proactiveAuth:: | |
| 65 | 76 | Attempt authentication without first making an unauthenticated attempt and | |
| @@ -315,6 +326,32 @@ http.keepAliveCount:: | |||
| 315 | 326 | unset, curl's default value is used. Can be overridden by the | |
| 316 | 327 | `GIT_HTTP_KEEPALIVE_COUNT` environment variable. | |
| 317 | 328 | ||
| 329 | + | http.retryAfter:: | |
| 330 | + | Default wait time in seconds before retrying when a server returns | |
| 331 | + | HTTP 429 (Too Many Requests) without a Retry-After header. | |
| 332 | + | Defaults to 0 (retry immediately). When a Retry-After header is | |
| 333 | + | present, its value takes precedence over this setting; however, | |
| 334 | + | automatic use of the server-provided `Retry-After` header requires | |
| 335 | + | libcurl 7.66.0 or later. On older versions, configure this setting | |
| 336 | + | manually to control the retry delay. Can be overridden by the | |
| 337 | + | `GIT_HTTP_RETRY_AFTER` environment variable. | |
| 338 | + | See also `http.maxRetries` and `http.maxRetryTime`. | |
| 339 | + | ||
| 340 | + | http.maxRetries:: | |
| 341 | + | Maximum number of times to retry after receiving HTTP 429 (Too Many | |
| 342 | + | Requests) responses. Set to 0 (the default) to disable retries. | |
| 343 | + | Can be overridden by the `GIT_HTTP_MAX_RETRIES` environment variable. | |
| 344 | + | See also `http.retryAfter` and `http.maxRetryTime`. | |
| 345 | + | ||
| 346 | + | http.maxRetryTime:: | |
| 347 | + | Maximum time in seconds to wait for a single retry attempt when | |
| 348 | + | handling HTTP 429 (Too Many Requests) responses. If the server | |
| 349 | + | requests a delay (via Retry-After header) or if `http.retryAfter` | |
| 350 | + | is configured with a value that exceeds this maximum, Git will fail | |
| 351 | + | immediately rather than waiting. Default is 300 seconds (5 minutes). | |
| 352 | + | Can be overridden by the `GIT_HTTP_MAX_RETRY_TIME` environment | |
| 353 | + | variable. See also `http.retryAfter` and `http.maxRetries`. | |
| 354 | + | ||
| 318 | 355 | http.noEPSV:: | |
| 319 | 356 | A boolean which disables using of EPSV ftp command by curl. | |
| 320 | 357 | This can be helpful with some "poor" ftp servers which don't | |
modified Documentation/config/imap.adoc
| @@ -1,44 +1,47 @@ | |||
| 1 | - | imap.folder:: | |
| 1 | + | `imap.folder`:: | |
| 2 | 2 | The folder to drop the mails into, which is typically the Drafts | |
| 3 | - | folder. For example: "INBOX.Drafts", "INBOX/Drafts" or | |
| 4 | - | "[Gmail]/Drafts". Required. | |
| 3 | + | folder. For example: `INBOX.Drafts`, `INBOX/Drafts` or | |
| 4 | + | `[Gmail]/Drafts`. The IMAP folder to interact with MUST be specified; | |
| 5 | + | the value of this configuration variable is used as the fallback | |
| 6 | + | default value when the `--folder` option is not given. | |
| 5 | 7 | ||
| 6 | - | imap.tunnel:: | |
| 8 | + | `imap.tunnel`:: | |
| 7 | 9 | Command used to set up a tunnel to the IMAP server through which | |
| 8 | 10 | commands will be piped instead of using a direct network connection | |
| 9 | - | to the server. Required when imap.host is not set. | |
| 11 | + | to the server. Required when `imap.host` is not set. | |
| 10 | 12 | ||
| 11 | - | imap.host:: | |
| 13 | + | `imap.host`:: | |
| 12 | 14 | A URL identifying the server. Use an `imap://` prefix for non-secure | |
| 13 | 15 | connections and an `imaps://` prefix for secure connections. | |
| 14 | - | Ignored when imap.tunnel is set, but required otherwise. | |
| 16 | + | Ignored when `imap.tunnel` is set, but required otherwise. | |
| 15 | 17 | ||
| 16 | - | imap.user:: | |
| 18 | + | `imap.user`:: | |
| 17 | 19 | The username to use when logging in to the server. | |
| 18 | 20 | ||
| 19 | - | imap.pass:: | |
| 21 | + | `imap.pass`:: | |
| 20 | 22 | The password to use when logging in to the server. | |
| 21 | 23 | ||
| 22 | - | imap.port:: | |
| 24 | + | `imap.port`:: | |
| 23 | 25 | An integer port number to connect to on the server. | |
| 24 | - | Defaults to 143 for imap:// hosts and 993 for imaps:// hosts. | |
| 25 | - | Ignored when imap.tunnel is set. | |
| 26 | + | Defaults to 143 for `imap://` hosts and 993 for `imaps://` hosts. | |
| 27 | + | Ignored when `imap.tunnel` is set. | |
| 26 | 28 | ||
| 27 | - | imap.sslverify:: | |
| 29 | + | `imap.sslverify`:: | |
| 28 | 30 | A boolean to enable/disable verification of the server certificate | |
| 29 | 31 | used by the SSL/TLS connection. Default is `true`. Ignored when | |
| 30 | - | imap.tunnel is set. | |
| 32 | + | `imap.tunnel` is set. | |
| 31 | 33 | ||
| 32 | - | imap.preformattedHTML:: | |
| 34 | + | `imap.preformattedHTML`:: | |
| 33 | 35 | A boolean to enable/disable the use of html encoding when sending | |
| 34 | - | a patch. An html encoded patch will be bracketed with <pre> | |
| 36 | + | a patch. An html encoded patch will be bracketed with `<pre>` | |
| 35 | 37 | and have a content type of text/html. Ironically, enabling this | |
| 36 | 38 | option causes Thunderbird to send the patch as a plain/text, | |
| 37 | 39 | format=fixed email. Default is `false`. | |
| 38 | 40 | ||
| 39 | - | imap.authMethod:: | |
| 41 | + | `imap.authMethod`:: | |
| 40 | 42 | Specify the authentication method for authenticating with the IMAP server. | |
| 41 | 43 | If Git was built with the NO_CURL option, or if your curl version is older | |
| 42 | - | than 7.34.0, or if you're running git-imap-send with the `--no-curl` | |
| 43 | - | option, the only supported method is 'CRAM-MD5'. If this is not set | |
| 44 | - | then 'git imap-send' uses the basic IMAP plaintext LOGIN command. | |
| 44 | + | than 7.34.0, or if you're running `git-imap-send` with the `--no-curl` | |
| 45 | + | option, the only supported methods are `PLAIN`, `CRAM-MD5`, `OAUTHBEARER` | |
| 46 | + | and `XOAUTH2`. If this is not set then `git imap-send` uses the basic IMAP | |
| 47 | + | plaintext `LOGIN` command. | |
modified Documentation/config/init.adoc
| @@ -18,3 +18,9 @@ endif::[] | |||
| 18 | 18 | See `--ref-format=` in linkgit:git-init[1]. Both the command line | |
| 19 | 19 | option and the `GIT_DEFAULT_REF_FORMAT` environment variable take | |
| 20 | 20 | precedence over this config. | |
| 21 | + | ||
| 22 | + | init.defaultSubmodulePathConfig:: | |
| 23 | + | A boolean that specifies if `git init` and `git clone` should | |
| 24 | + | automatically set `extensions.submodulePathConfig` to `true`. This | |
| 25 | + | allows all new repositories to automatically use the submodule path | |
| 26 | + | extension. Defaults to `false` when unset. | |
modified Documentation/config/log.adoc
| @@ -1,64 +1,79 @@ | |||
| 1 | - | log.abbrevCommit:: | |
| 2 | - | If true, makes linkgit:git-log[1], linkgit:git-show[1], and | |
| 3 | - | linkgit:git-whatchanged[1] assume `--abbrev-commit`. You may | |
| 1 | + | `log.abbrevCommit`:: | |
| 2 | + | If `true`, make | |
| 3 | + | ifndef::with-breaking-changes[] | |
| 4 | + | linkgit:git-log[1], linkgit:git-show[1], and | |
| 5 | + | linkgit:git-whatchanged[1] | |
| 6 | + | endif::with-breaking-changes[] | |
| 7 | + | ifdef::with-breaking-changes[] | |
| 8 | + | linkgit:git-log[1] and linkgit:git-show[1] | |
| 9 | + | endif::with-breaking-changes[] | |
| 10 | + | assume `--abbrev-commit`. You may | |
| 4 | 11 | override this option with `--no-abbrev-commit`. | |
| 5 | 12 | ||
| 6 | - | log.date:: | |
| 7 | - | Set the default date-time mode for the 'log' command. | |
| 8 | - | Setting a value for log.date is similar to using 'git log''s | |
| 13 | + | `log.date`:: | |
| 14 | + | Set the default date-time mode for the `log` command. | |
| 15 | + | Setting a value for log.date is similar to using `git log`'s | |
| 9 | 16 | `--date` option. See linkgit:git-log[1] for details. | |
| 10 | 17 | + | |
| 11 | 18 | If the format is set to "auto:foo" and the pager is in use, format | |
| 12 | 19 | "foo" will be used for the date format. Otherwise, "default" will | |
| 13 | 20 | be used. | |
| 14 | 21 | ||
| 15 | - | log.decorate:: | |
| 22 | + | `log.decorate`:: | |
| 16 | 23 | Print out the ref names of any commits that are shown by the log | |
| 17 | - | command. If 'short' is specified, the ref name prefixes 'refs/heads/', | |
| 18 | - | 'refs/tags/' and 'refs/remotes/' will not be printed. If 'full' is | |
| 19 | - | specified, the full ref name (including prefix) will be printed. | |
| 20 | - | If 'auto' is specified, then if the output is going to a terminal, | |
| 21 | - | the ref names are shown as if 'short' were given, otherwise no ref | |
| 22 | - | names are shown. This is the same as the `--decorate` option | |
| 23 | - | of the `git log`. | |
| 24 | + | command. Possible values are: | |
| 25 | + | + | |
| 26 | + | -- | |
| 27 | + | `short`;; the ref name prefixes `refs/heads/`, `refs/tags/` and | |
| 28 | + | `refs/remotes/` are not printed. | |
| 29 | + | `full`;; the full ref name (including prefix) are printed. | |
| 30 | + | `auto`;; if the output is going to a terminal, | |
| 31 | + | the ref names are shown as if `short` were given, otherwise no ref | |
| 32 | + | names are shown. | |
| 33 | + | -- | |
| 34 | + | + | |
| 35 | + | This is the same as the `--decorate` option of the `git log`. | |
| 24 | 36 | ||
| 25 | - | log.initialDecorationSet:: | |
| 37 | + | `log.initialDecorationSet`:: | |
| 26 | 38 | By default, `git log` only shows decorations for certain known ref | |
| 27 | 39 | namespaces. If 'all' is specified, then show all refs as | |
| 28 | 40 | decorations. | |
| 29 | 41 | ||
| 30 | - | log.excludeDecoration:: | |
| 42 | + | `log.excludeDecoration`:: | |
| 31 | 43 | Exclude the specified patterns from the log decorations. This is | |
| 32 | 44 | similar to the `--decorate-refs-exclude` command-line option, but | |
| 33 | 45 | the config option can be overridden by the `--decorate-refs` | |
| 34 | 46 | option. | |
| 35 | 47 | ||
| 36 | - | log.diffMerges:: | |
| 48 | + | `log.diffMerges`:: | |
| 37 | 49 | Set diff format to be used when `--diff-merges=on` is | |
| 38 | 50 | specified, see `--diff-merges` in linkgit:git-log[1] for | |
| 39 | 51 | details. Defaults to `separate`. | |
| 40 | 52 | ||
| 41 | - | log.follow:: | |
| 53 | + | `log.follow`:: | |
| 42 | 54 | If `true`, `git log` will act as if the `--follow` option was used when | |
| 43 | 55 | a single <path> is given. This has the same limitations as `--follow`, | |
| 44 | - | i.e. it cannot be used to follow multiple files and does not work well | |
| 45 | - | on non-linear history. | |
| 56 | + | i.e. it cannot be used to follow multiple files. | |
| 46 | 57 | ||
| 47 | - | log.graphColors:: | |
| 58 | + | `log.graphColors`:: | |
| 48 | 59 | A list of colors, separated by commas, that can be used to draw | |
| 49 | 60 | history lines in `git log --graph`. | |
| 50 | 61 | ||
| 51 | - | log.showRoot:: | |
| 62 | + | `log.graphIndent`:: | |
| 63 | + | If `true`, indent visual roots when rendering the graphs with `--graph`. | |
| 64 | + | Set true by default. It can be overriden with `--[no-]graph-indent`. | |
| 65 | + | ||
| 66 | + | `log.showRoot`:: | |
| 52 | 67 | If true, the initial commit will be shown as a big creation event. | |
| 53 | 68 | This is equivalent to a diff against an empty tree. | |
| 54 | 69 | Tools like linkgit:git-log[1] or linkgit:git-whatchanged[1], which | |
| 55 | 70 | normally hide the root commit will now show it. True by default. | |
| 56 | 71 | ||
| 57 | - | log.showSignature:: | |
| 72 | + | `log.showSignature`:: | |
| 58 | 73 | If true, makes linkgit:git-log[1], linkgit:git-show[1], and | |
| 59 | 74 | linkgit:git-whatchanged[1] assume `--show-signature`. | |
| 60 | 75 | ||
| 61 | - | log.mailmap:: | |
| 76 | + | `log.mailmap`:: | |
| 62 | 77 | If true, makes linkgit:git-log[1], linkgit:git-show[1], and | |
| 63 | 78 | linkgit:git-whatchanged[1] assume `--use-mailmap`, otherwise | |
| 64 | 79 | assume `--no-use-mailmap`. True by default. | |
modified Documentation/config/maintenance.adoc
| @@ -16,19 +16,36 @@ detach. | |||
| 16 | 16 | ||
| 17 | 17 | maintenance.strategy:: | |
| 18 | 18 | This string config option provides a way to specify one of a few | |
| 19 | - | recommended schedules for background maintenance. This only affects | |
| 20 | - | which tasks are run during `git maintenance run --schedule=X` | |
| 21 | - | commands, provided no `--task=<task>` arguments are provided. | |
| 22 | - | Further, if a `maintenance.<task>.schedule` config value is set, | |
| 23 | - | then that value is used instead of the one provided by | |
| 24 | - | `maintenance.strategy`. The possible strategy strings are: | |
| 19 | + | recommended strategies for repository maintenance. This affects | |
| 20 | + | which tasks are run during `git maintenance run`, provided no | |
| 21 | + | `--task=<task>` arguments are provided. This setting impacts manual | |
| 22 | + | maintenance, auto-maintenance as well as scheduled maintenance. The | |
| 23 | + | tasks that run may be different depending on the maintenance type. | |
| 25 | 24 | + | |
| 26 | - | * `none`: This default setting implies no tasks are run at any schedule. | |
| 25 | + | The maintenance strategy can be further tweaked by setting | |
| 26 | + | `maintenance.<task>.enabled` and `maintenance.<task>.schedule`. If set, these | |
| 27 | + | values are used instead of the defaults provided by `maintenance.strategy`. | |
| 28 | + | + | |
| 29 | + | The possible strategies are: | |
| 30 | + | + | |
| 31 | + | * `none`: This strategy implies no tasks are run at all. This is the default | |
| 32 | + | strategy for scheduled maintenance. | |
| 33 | + | * `gc`: This strategy runs the `gc` task. | |
| 34 | + | * `geometric`: This strategy performs geometric repacking of packfiles and | |
| 35 | + | keeps auxiliary data structures up-to-date. The strategy expires data in the | |
| 36 | + | reflog and removes worktrees that cannot be located anymore. When the | |
| 37 | + | geometric repacking strategy would decide to do an all-into-one repack, then | |
| 38 | + | the strategy generates a cruft pack for all unreachable objects. Objects that | |
| 39 | + | are already part of a cruft pack will be expired. | |
| 40 | + | + | |
| 41 | + | This repacking strategy is a full replacement for the `gc` strategy and is | |
| 42 | + | recommended for large repositories. This is the default strategy for manual | |
| 43 | + | maintenance. | |
| 27 | 44 | * `incremental`: This setting optimizes for performing small maintenance | |
| 28 | 45 | activities that do not delete any data. This does not schedule the `gc` | |
| 29 | 46 | task, but runs the `prefetch` and `commit-graph` tasks hourly, the | |
| 30 | 47 | `loose-objects` and `incremental-repack` tasks daily, and the `pack-refs` | |
| 31 | - | task weekly. | |
| 48 | + | task weekly. Manual repository maintenance uses the `gc` task. | |
| 32 | 49 | ||
| 33 | 50 | maintenance.<task>.enabled:: | |
| 34 | 51 | This boolean config option controls whether the maintenance task | |
| @@ -75,6 +92,22 @@ maintenance.incremental-repack.auto:: | |||
| 75 | 92 | number of pack-files not in the multi-pack-index is at least the value | |
| 76 | 93 | of `maintenance.incremental-repack.auto`. The default value is 10. | |
| 77 | 94 | ||
| 95 | + | maintenance.geometric-repack.auto:: | |
| 96 | + | This integer config option controls how often the `geometric-repack` | |
| 97 | + | task should be run as part of `git maintenance run --auto`. If zero, | |
| 98 | + | then the `geometric-repack` task will not run with the `--auto` | |
| 99 | + | option. A negative value will force the task to run every time. | |
| 100 | + | Otherwise, a positive value implies the command should run either when | |
| 101 | + | there are packfiles that need to be merged together to retain the | |
| 102 | + | geometric progression, or when there are at least this many loose | |
| 103 | + | objects that would be written into a new packfile. The default value is | |
| 104 | + | 100. | |
| 105 | + | ||
| 106 | + | maintenance.geometric-repack.splitFactor:: | |
| 107 | + | This integer config option controls the factor used for the geometric | |
| 108 | + | sequence. See the `--geometric=` option in linkgit:git-repack[1] for | |
| 109 | + | more details. Defaults to `2`. | |
| 110 | + | ||
| 78 | 111 | maintenance.reflog-expire.auto:: | |
| 79 | 112 | This integer config option controls how often the `reflog-expire` task | |
| 80 | 113 | should be run as part of `git maintenance run --auto`. If zero, then | |
modified Documentation/config/merge.adoc
| @@ -81,8 +81,18 @@ as `false`. Defaults to `conflict`. | |||
| 81 | 81 | attributes" in linkgit:gitattributes[5]. | |
| 82 | 82 | ||
| 83 | 83 | `merge.stat`:: | |
| 84 | - | Whether to print the diffstat between `ORIG_HEAD` and the merge result | |
| 85 | - | at the end of the merge. True by default. | |
| 84 | + | What, if anything, to print between `ORIG_HEAD` and the merge result | |
| 85 | + | at the end of the merge. Possible values are: | |
| 86 | + | + | |
| 87 | + | -- | |
| 88 | + | `false`;; Show nothing. | |
| 89 | + | `true`;; Show `git diff --diffstat --summary ORIG_HEAD`. | |
| 90 | + | `compact`;; Show `git diff --compact-summary ORIG_HEAD`. | |
| 91 | + | -- | |
| 92 | + | + | |
| 93 | + | but any unrecognised value (e.g., a value added by a future version of | |
| 94 | + | Git) is taken as `true` instead of triggering an error. Defaults to | |
| 95 | + | `true`. | |
| 86 | 96 | ||
| 87 | 97 | `merge.autoStash`:: | |
| 88 | 98 | When set to `true`, automatically create a temporary stash entry | |
modified Documentation/config/mergetool.adoc
| @@ -52,20 +52,20 @@ | |||
| 52 | 52 | if `merge.tool` is configured as _<variant>_), Git will consult | |
| 53 | 53 | `mergetool.<variant>.layout` to determine the tool's layout. If the | |
| 54 | 54 | variant-specific configuration is not available, `vimdiff` ' s is used as | |
| 55 | - | fallback. If that too is not available, a default layout with 4 windows | |
| 56 | - | will be used. To configure the layout, see the 'BACKEND SPECIFIC HINTS' | |
| 55 | + | fallback. If that too is not available, a default layout with 4 windows | |
| 56 | + | will be used. | |
| 57 | 57 | ifdef::git-mergetool[] | |
| 58 | - | section. | |
| 58 | + | To configure the layout, see the 'BACKEND SPECIFIC HINTS' section. | |
| 59 | 59 | endif::[] | |
| 60 | 60 | ifndef::git-mergetool[] | |
| 61 | - | section in linkgit:git-mergetool[1]. | |
| 61 | + | To configure the layout, see the 'BACKEND SPECIFIC HINTS' section in linkgit:git-mergetool[1]. | |
| 62 | 62 | endif::[] | |
| 63 | 63 | ||
| 64 | 64 | `mergetool.hideResolved`:: | |
| 65 | 65 | During a merge, Git will automatically resolve as many conflicts as | |
| 66 | 66 | possible and write the `$MERGED` file containing conflict markers around | |
| 67 | 67 | any conflicts that it cannot resolve; `$LOCAL` and `$REMOTE` normally | |
| 68 | - | are the versions of the file from before Git`s conflict | |
| 68 | + | are the versions of the file from before Git's conflict | |
| 69 | 69 | resolution. This flag causes `$LOCAL` and `$REMOTE` to be overwritten so | |
| 70 | 70 | that only the unresolved conflicts are presented to the merge tool. Can | |
| 71 | 71 | be configured per-tool via the `mergetool.<tool>.hideResolved` | |
modified Documentation/config/pack.adoc
| @@ -155,13 +155,18 @@ pack.useSparse:: | |||
| 155 | 155 | commits contain certain types of direct renames. Default is | |
| 156 | 156 | `true`. | |
| 157 | 157 | ||
| 158 | + | pack.usePathWalk:: | |
| 159 | + | Enable the `--path-walk` option by default for `git pack-objects` | |
| 160 | + | processes. See linkgit:git-pack-objects[1] for full details. | |
| 161 | + | ||
| 158 | 162 | pack.preferBitmapTips:: | |
| 163 | + | Specifies a ref hierarchy (e.g., "refs/heads/"); can be | |
| 164 | + | given multiple times to specify more than one hierarchy. | |
| 159 | 165 | When selecting which commits will receive bitmaps, prefer a | |
| 160 | - | commit at the tip of any reference that is a suffix of any value | |
| 161 | - | of this configuration over any other commits in the "selection | |
| 162 | - | window". | |
| 166 | + | commit at the tip of a reference that is contained in any of | |
| 167 | + | the configured hierarchies. | |
| 163 | 168 | + | |
| 164 | - | Note that setting this configuration to `refs/foo` does not mean that | |
| 169 | + | Note that setting this configuration to `refs/foo/` does not mean that | |
| 165 | 170 | the commits at the tips of `refs/foo/bar` and `refs/foo/baz` will | |
| 166 | 171 | necessarily be selected. This is because commits are selected for | |
| 167 | 172 | bitmaps from within a series of windows of variable length. | |
modified Documentation/config/promisor.adoc
| @@ -9,22 +9,230 @@ promisor.advertise:: | |||
| 9 | 9 | "false", which means the "promisor-remote" capability is not | |
| 10 | 10 | advertised. | |
| 11 | 11 | ||
| 12 | + | promisor.sendFields:: | |
| 13 | + | A comma or space separated list of additional remote related | |
| 14 | + | field names. A server sends these field names and the | |
| 15 | + | associated field values from its configuration when | |
| 16 | + | advertising its promisor remotes using the "promisor-remote" | |
| 17 | + | capability, see linkgit:gitprotocol-v2[5]. Currently, only the | |
| 18 | + | "partialCloneFilter" and "token" field names are supported. | |
| 19 | + | + | |
| 20 | + | `partialCloneFilter`:: contains the partial clone filter | |
| 21 | + | used for the remote. | |
| 22 | + | + | |
| 23 | + | `token`:: contains an authentication token for the remote. | |
| 24 | + | + | |
| 25 | + | When a field name is part of this list and a corresponding | |
| 26 | + | "remote.foo.<field-name>" config variable is set on the server to a | |
| 27 | + | non-empty value, then the field name and value are sent when | |
| 28 | + | advertising the promisor remote "foo". | |
| 29 | + | + | |
| 30 | + | This list has no effect unless the "promisor.advertise" config | |
| 31 | + | variable is set to "true", and the "name" and "url" fields are always | |
| 32 | + | advertised regardless of this setting. | |
| 33 | + | ||
| 12 | 34 | promisor.acceptFromServer:: | |
| 13 | - | If set to "all", a client will accept all the promisor remotes | |
| 14 | - | a server might advertise using the "promisor-remote" | |
| 15 | - | capability. If set to "knownName" the client will accept | |
| 16 | - | promisor remotes which are already configured on the client | |
| 17 | - | and have the same name as those advertised by the client. This | |
| 18 | - | is not very secure, but could be used in a corporate setup | |
| 19 | - | where servers and clients are trusted to not switch name and | |
| 20 | - | URLs. If set to "knownUrl", the client will accept promisor | |
| 21 | - | remotes which have both the same name and the same URL | |
| 22 | - | configured on the client as the name and URL advertised by the | |
| 23 | - | server. This is more secure than "all" or "knownName", so it | |
| 24 | - | should be used if possible instead of those options. Default | |
| 25 | - | is "none", which means no promisor remote advertised by a | |
| 26 | - | server will be accepted. By accepting a promisor remote, the | |
| 27 | - | client agrees that the server might omit objects that are | |
| 28 | - | lazily fetchable from this promisor remote from its responses | |
| 29 | - | to "fetch" and "clone" requests from the client. Name and URL | |
| 30 | - | comparisons are case sensitive. See linkgit:gitprotocol-v2[5]. | |
| 35 | + | Controls which promisor remotes advertised by a server (using the | |
| 36 | + | "promisor-remote" protocol capability) a client will accept. By | |
| 37 | + | accepting a promisor remote, the client agrees that the server | |
| 38 | + | might omit objects that are lazily fetchable from this promisor | |
| 39 | + | remote from its responses to "fetch" and "clone" requests. | |
| 40 | + | + | |
| 41 | + | Note that this option does not cause new remotes to be automatically | |
| 42 | + | created in the client's configuration. It only allows remotes which | |
| 43 | + | are somehow already configured to be trusted for the current | |
| 44 | + | operation, or their fields to be updated (if `promisor.storeFields` is | |
| 45 | + | set and the remote already exists locally). To allow Git to | |
| 46 | + | automatically create and persist new remotes from server | |
| 47 | + | advertisements, use `promisor.acceptFromServerUrl`. | |
| 48 | + | + | |
| 49 | + | The available options are: | |
| 50 | + | + | |
| 51 | + | * `none` (default): No promisor remote advertised by a server will be | |
| 52 | + | accepted. | |
| 53 | + | + | |
| 54 | + | * `knownUrl`: The client will accept promisor remotes that are already | |
| 55 | + | configured on the client and have both the same name and the same URL | |
| 56 | + | as advertised by the server. This is more secure than `all` or | |
| 57 | + | `knownName`, and should be used if possible instead of those options. | |
| 58 | + | + | |
| 59 | + | * `knownName`: The client will accept promisor remotes that are already | |
| 60 | + | configured on the client and have the same name as those advertised | |
| 61 | + | by the server. This is not very secure, but could be used in a corporate | |
| 62 | + | setup where servers and clients are trusted to not switch names and URLs. | |
| 63 | + | + | |
| 64 | + | * `all`: The client will accept all the promisor remotes a server might | |
| 65 | + | advertise. This is the least secure option and should only be used in | |
| 66 | + | fully trusted environments. | |
| 67 | + | + | |
| 68 | + | Name and URL comparisons are case-sensitive. See linkgit:gitprotocol-v2[5] | |
| 69 | + | for protocol details. | |
| 70 | + | ||
| 71 | + | promisor.acceptFromServerUrl:: | |
| 72 | + | A glob pattern to specify which server-advertised URLs a | |
| 73 | + | client is allowed to act on. When a URL matches, the client | |
| 74 | + | will accept the advertised remote as a promisor remote, may | |
| 75 | + | automatically create a new remote configuration for it and may | |
| 76 | + | automatically accept field updates (such as authentication | |
| 77 | + | tokens) from the server, even if `promisor.acceptFromServer` | |
| 78 | + | is set to `none` (the default). | |
| 79 | + | + | |
| 80 | + | This option can appear multiple times in config files. An advertised | |
| 81 | + | URL will be accepted if it matches _ANY_ glob pattern specified by | |
| 82 | + | this option in _ANY_ config file read by Git. | |
| 83 | + | + | |
| 84 | + | When both `promisor.acceptFromServer` and `promisor.acceptFromServerUrl` | |
| 85 | + | are set, `promisor.acceptFromServerUrl` is consulted first and takes | |
| 86 | + | precedence: if a matching pattern leads to acceptance (either by | |
| 87 | + | auto-configuring an unknown remote or by accepting field updates for | |
| 88 | + | a known remote whose URL matches both the local configuration and the | |
| 89 | + | allowlist), the advertised remote is accepted regardless of the | |
| 90 | + | `promisor.acceptFromServer` setting. If no pattern in | |
| 91 | + | `promisor.acceptFromServerUrl` triggers acceptance, the decision is | |
| 92 | + | left to `promisor.acceptFromServer`. | |
| 93 | + | + | |
| 94 | + | Note however that, even when an advertised URL matches a pattern in | |
| 95 | + | `promisor.acceptFromServerUrl`, an already-existing remote on the | |
| 96 | + | client whose name matches the advertised name but whose configured URL | |
| 97 | + | differs from the advertised one will _NOT_ be accepted through | |
| 98 | + | `promisor.acceptFromServerUrl`. This prevents a server from silently | |
| 99 | + | re-pointing an existing client-side remote at a different URL. (Such a | |
| 100 | + | remote may still be accepted through `promisor.acceptFromServer=all` | |
| 101 | + | or `=knownName`, which have their own, looser semantics; see the | |
| 102 | + | documentation of that option.) | |
| 103 | + | + | |
| 104 | + | Be _VERY_ careful with these patterns: `*` matches any sequence of | |
| 105 | + | characters within the 'host' and 'path' parts of a URL (but cannot | |
| 106 | + | cross part boundaries). An overly broad pattern is a major security | |
| 107 | + | risk, as a matching URL allows a server to auto-configure new remotes | |
| 108 | + | and to update fields (such as authentication tokens) on known remotes | |
| 109 | + | without further confirmation. To minimize security risks, follow these | |
| 110 | + | guidelines: | |
| 111 | + | + | |
| 112 | + | -- | |
| 113 | + | 1. Start with a secure protocol scheme, like `https://` or `ssh://`. | |
| 114 | + | + | |
| 115 | + | 2. Only allow domain names or paths where you control and trust _ALL_ | |
| 116 | + | the content. Be especially careful with shared hosting platforms | |
| 117 | + | like `github.com` or `gitlab.com`. A broad pattern like | |
| 118 | + | `https://gitlab.com/*` is dangerous because it trusts every | |
| 119 | + | repository on the entire platform. Always restrict such patterns to | |
| 120 | + | your specific organization or namespace (e.g., | |
| 121 | + | `https://gitlab.com/your-org/*`). | |
| 122 | + | + | |
| 123 | + | 3. Never use globs at the end of domain names. For example, | |
| 124 | + | `https://cdn.your-org.com/*` might be safe, but | |
| 125 | + | `https://cdn.your-org.com*/*` is a major security risk because | |
| 126 | + | the latter matches `https://cdn.your-org.com.hacker.net/repo`. | |
| 127 | + | + | |
| 128 | + | 4. Be careful using globs at the beginning of domain names. While the | |
| 129 | + | code ensures a `*` in the host cannot cross into the path, a | |
| 130 | + | pattern like `https://*.example.com/*` will still match any | |
| 131 | + | subdomain. This is extremely dangerous on shared hosting platforms | |
| 132 | + | (e.g., `https://*.github.io/*` trusts every user's site on the | |
| 133 | + | entire platform). | |
| 134 | + | -- | |
| 135 | + | + | |
| 136 | + | Before matching, both the advertised URL and the pattern are | |
| 137 | + | normalized: the scheme and host are lowercased, percent-encoded | |
| 138 | + | characters are decoded where possible, and path segments like `..` | |
| 139 | + | are resolved. The port must also match exactly (e.g., | |
| 140 | + | `https://example.com:8080/*` will not match a URL advertised on | |
| 141 | + | port 9999). The username and password components of the URL are | |
| 142 | + | ignored during matching. Note that embedding credentials in URLs is | |
| 143 | + | discouraged. Passing authentication tokens via the `token` field of | |
| 144 | + | the `promisor-remote` capability is strongly preferred. | |
| 145 | + | + | |
| 146 | + | The glob pattern can optionally be prefixed with a remote name and an | |
| 147 | + | equals sign (e.g., `cdn=https://cdn.example.com/*`). If such a prefix | |
| 148 | + | is provided, accepted remotes will be saved under that name. If no | |
| 149 | + | such prefix is provided, a safe remote name will be automatically | |
| 150 | + | generated by sanitizing the URL and prefixing it with | |
| 151 | + | `promisor-auto-`. | |
| 152 | + | + | |
| 153 | + | If a remote with the chosen name already exists but points to a | |
| 154 | + | different URL, Git will append a numeric suffix (e.g., `-1`, `-2`) to | |
| 155 | + | the name to prevent overwriting existing configurations. You should | |
| 156 | + | make sure that this doesn't happen often though, as remotes will be | |
| 157 | + | rejected if the numeric suffix increases too much. In all cases, the | |
| 158 | + | original name advertised by the server is recorded in the | |
| 159 | + | `remote.<name>.advertisedAs` configuration variable for tracing and | |
| 160 | + | debugging purposes. | |
| 161 | + | + | |
| 162 | + | For the security implications of accepting a promisor remote, see the | |
| 163 | + | documentation of `promisor.acceptFromServer`. For details on the | |
| 164 | + | protocol, see linkgit:gitprotocol-v2[5]. | |
| 165 | + | ||
| 166 | + | promisor.checkFields:: | |
| 167 | + | A comma or space separated list of additional remote related | |
| 168 | + | field names. A client checks if the values of these fields | |
| 169 | + | transmitted by a server correspond to the values of these | |
| 170 | + | fields in its own configuration before accepting a promisor | |
| 171 | + | remote. Currently, "partialCloneFilter" and "token" are the | |
| 172 | + | only supported field names. | |
| 173 | + | + | |
| 174 | + | If one of these field names (e.g., "token") is being checked for an | |
| 175 | + | advertised promisor remote (e.g., "foo"), three conditions must be met | |
| 176 | + | for the check of this specific field to pass: | |
| 177 | + | + | |
| 178 | + | -- | |
| 179 | + | 1. The corresponding local configuration (e.g., `remote.foo.token`) | |
| 180 | + | must be set. | |
| 181 | + | 2. The server must advertise the "token" field for remote "foo". | |
| 182 | + | 3. The value of the locally configured `remote.foo.token` must exactly | |
| 183 | + | match the value advertised by the server for the "token" field. | |
| 184 | + | -- | |
| 185 | + | + | |
| 186 | + | If any of these conditions is not met for any field name listed in | |
| 187 | + | `promisor.checkFields`, the advertised remote "foo" is rejected. | |
| 188 | + | + | |
| 189 | + | For the "partialCloneFilter" field, this allows the client to ensure | |
| 190 | + | that the server's filter matches what it expects locally, preventing | |
| 191 | + | inconsistencies in filtering behavior. For the "token" field, this can | |
| 192 | + | be used to verify that authentication credentials match expected | |
| 193 | + | values. | |
| 194 | + | + | |
| 195 | + | Field values are compared case-sensitively. | |
| 196 | + | + | |
| 197 | + | The "name" and "url" fields are always checked according to the | |
| 198 | + | `promisor.acceptFromServer` policy, independently of this setting. | |
| 199 | + | + | |
| 200 | + | The field names and values should be passed by the server through the | |
| 201 | + | "promisor-remote" capability by using the `promisor.sendFields` config | |
| 202 | + | variable. The fields are checked only if the | |
| 203 | + | `promisor.acceptFromServer` config variable is not set to "None". If | |
| 204 | + | set to "None", this config variable has no effect. See | |
| 205 | + | linkgit:gitprotocol-v2[5]. | |
| 206 | + | ||
| 207 | + | promisor.storeFields:: | |
| 208 | + | A comma or space separated list of additional remote related | |
| 209 | + | field names. If a client accepts an advertised remote, the | |
| 210 | + | client will store the values associated with these field names | |
| 211 | + | taken from the remote advertisement into its configuration, | |
| 212 | + | and then reload its remote configuration. Currently, | |
| 213 | + | "partialCloneFilter" and "token" are the only supported field | |
| 214 | + | names. | |
| 215 | + | + | |
| 216 | + | For example if a server advertises "partialCloneFilter=blob:limit=20k" | |
| 217 | + | for remote "foo", and that remote is accepted, then "blob:limit=20k" | |
| 218 | + | will be stored for the "remote.foo.partialCloneFilter" configuration | |
| 219 | + | variable. | |
| 220 | + | + | |
| 221 | + | If the new field value from an advertised remote is the same as the | |
| 222 | + | existing field value for that remote on the client side, then no | |
| 223 | + | change is made to the client configuration though. | |
| 224 | + | + | |
| 225 | + | When a new value is stored, a message is printed to standard error to | |
| 226 | + | let users know about this. | |
| 227 | + | + | |
| 228 | + | Note that for security reasons, if the remote is not already | |
| 229 | + | configured on the client side, nothing will be stored for that | |
| 230 | + | remote. In any case, no new remote will be created and no URL will be | |
| 231 | + | stored. | |
| 232 | + | + | |
| 233 | + | Before storing a partial clone filter, it's parsed to check it's | |
| 234 | + | valid. If it's not, a warning is emitted and it's not stored. | |
| 235 | + | + | |
| 236 | + | Before storing a token, a check is performed to ensure it contains no | |
| 237 | + | control character. If the check fails, a warning is emitted and it's | |
| 238 | + | not stored. | |
modified Documentation/config/pull.adoc
| @@ -29,5 +29,21 @@ pull.octopus:: | |||
| 29 | 29 | The default merge strategy to use when pulling multiple branches | |
| 30 | 30 | at once. | |
| 31 | 31 | ||
| 32 | + | pull.autoStash:: | |
| 33 | + | When set to true, automatically create a temporary stash entry | |
| 34 | + | to record the local changes before the operation begins, and | |
| 35 | + | restore them after the operation completes. When your "git | |
| 36 | + | pull" rebases (instead of merges), this may be convenient, since | |
| 37 | + | unlike merging pull that tolerates local changes that do not | |
| 38 | + | interfere with the merge, rebasing pull refuses to work with any | |
| 39 | + | local changes. | |
| 40 | + | + | |
| 41 | + | If `pull.autostash` is set (either to true or false), | |
| 42 | + | `merge.autostash` and `rebase.autostash` are ignored. If | |
| 43 | + | `pull.autostash` is not set at all, depending on the value of | |
| 44 | + | `pull.rebase`, `merge.autostash` or `rebase.autostash` is used | |
| 45 | + | instead. Can be overridden by the `--[no-]autostash` command line | |
| 46 | + | option. | |
| 47 | + | ||
| 32 | 48 | pull.twohead:: | |
| 33 | 49 | The default merge strategy to use when pulling a single branch. | |
modified Documentation/config/push.adoc
| @@ -1,15 +1,15 @@ | |||
| 1 | - | push.autoSetupRemote:: | |
| 2 | - | If set to "true" assume `--set-upstream` on default push when no | |
| 1 | + | `push.autoSetupRemote`:: | |
| 2 | + | If set to `true` assume `--set-upstream` on default push when no | |
| 3 | 3 | upstream tracking exists for the current branch; this option | |
| 4 | - | takes effect with push.default options 'simple', 'upstream', | |
| 5 | - | and 'current'. It is useful if by default you want new branches | |
| 4 | + | takes effect with `push.default` options `simple`, `upstream`, | |
| 5 | + | and `current`. It is useful if by default you want new branches | |
| 6 | 6 | to be pushed to the default remote (like the behavior of | |
| 7 | - | 'push.default=current') and you also want the upstream tracking | |
| 7 | + | `push.default=current`) and you also want the upstream tracking | |
| 8 | 8 | to be set. Workflows most likely to benefit from this option are | |
| 9 | - | 'simple' central workflows where all branches are expected to | |
| 9 | + | `simple` central workflows where all branches are expected to | |
| 10 | 10 | have the same name on the remote. | |
| 11 | 11 | ||
| 12 | - | push.default:: | |
| 12 | + | `push.default`:: | |
| 13 | 13 | Defines the action `git push` should take if no refspec is | |
| 14 | 14 | given (whether from the command-line, config, or elsewhere). | |
| 15 | 15 | Different values are well-suited for | |
| @@ -18,42 +18,48 @@ push.default:: | |||
| 18 | 18 | `upstream` is probably what you want. Possible values are: | |
| 19 | 19 | + | |
| 20 | 20 | -- | |
| 21 | - | ||
| 22 | - | * `nothing` - do not push anything (error out) unless a refspec is | |
| 23 | - | given. This is primarily meant for people who want to | |
| 24 | - | avoid mistakes by always being explicit. | |
| 25 | - | ||
| 26 | - | * `current` - push the current branch to update a branch with the same | |
| 27 | - | name on the receiving end. Works in both central and non-central | |
| 28 | - | workflows. | |
| 29 | - | ||
| 30 | - | * `upstream` - push the current branch back to the branch whose | |
| 31 | - | changes are usually integrated into the current branch (which is | |
| 32 | - | called `@{upstream}`). This mode only makes sense if you are | |
| 33 | - | pushing to the same repository you would normally pull from | |
| 34 | - | (i.e. central workflow). | |
| 35 | - | ||
| 36 | - | * `tracking` - This is a deprecated synonym for `upstream`. | |
| 37 | - | ||
| 38 | - | * `simple` - push the current branch with the same name on the remote. | |
| 21 | + | `nothing`;; | |
| 22 | + | do not push anything (error out) unless a refspec is | |
| 23 | + | given. This is primarily meant for people who want to | |
| 24 | + | avoid mistakes by always being explicit. | |
| 25 | + | ||
| 26 | + | `current`;; | |
| 27 | + | push the current branch to update a branch with the same | |
| 28 | + | name on the receiving end. Works in both central and non-central | |
| 29 | + | workflows. | |
| 30 | + | ||
| 31 | + | `upstream`;; | |
| 32 | + | push the current branch back to the branch whose | |
| 33 | + | changes are usually integrated into the current branch (which is | |
| 34 | + | called `@{upstream}`). This mode only makes sense if you are | |
| 35 | + | pushing to the same repository you would normally pull from | |
| 36 | + | (i.e. central workflow). | |
| 37 | + | ||
| 38 | + | `tracking`;; | |
| 39 | + | this is a deprecated synonym for `upstream`. | |
| 40 | + | ||
| 41 | + | `simple`;; | |
| 42 | + | push the current branch with the same name on the remote. | |
| 39 | 43 | + | |
| 40 | - | If you are working on a centralized workflow (pushing to the same repository you | |
| 41 | - | pull from, which is typically `origin`), then you need to configure an upstream | |
| 42 | - | branch with the same name. | |
| 44 | + | This mode requires that the remote repository to be pushed to is | |
| 45 | + | known. When pushing back to the same remote you pull from, the | |
| 46 | + | current branch must also have an upstream tracking branch with the | |
| 47 | + | same name. | |
| 43 | 48 | + | |
| 44 | 49 | This mode is the default since Git 2.0, and is the safest option suited for | |
| 45 | 50 | beginners. | |
| 46 | 51 | ||
| 47 | - | * `matching` - push all branches having the same name on both ends. | |
| 48 | - | This makes the repository you are pushing to remember the set of | |
| 49 | - | branches that will be pushed out (e.g. if you always push 'maint' | |
| 50 | - | and 'master' there and no other branches, the repository you push | |
| 51 | - | to will have these two branches, and your local 'maint' and | |
| 52 | - | 'master' will be pushed there). | |
| 52 | + | `matching`;; | |
| 53 | + | push all branches having the same name on both ends. | |
| 54 | + | This makes the repository you are pushing to remember the set of | |
| 55 | + | branches that will be pushed out (e.g. if you always push `maint` | |
| 56 | + | and `master` there and no other branches, the repository you push | |
| 57 | + | to will have these two branches, and your local `maint` and | |
| 58 | + | `master` will be pushed there). | |
| 53 | 59 | + | |
| 54 | 60 | To use this mode effectively, you have to make sure _all_ the | |
| 55 | 61 | branches you would push out are ready to be pushed out before | |
| 56 | - | running 'git push', as the whole point of this mode is to allow you | |
| 62 | + | running `git push`, as the whole point of this mode is to allow you | |
| 57 | 63 | to push all of the branches in one go. If you usually finish work | |
| 58 | 64 | on only one branch and push out the result, while other branches are | |
| 59 | 65 | unfinished, this mode is not for you. Also this mode is not | |
| @@ -66,24 +72,24 @@ new default). | |||
| 66 | 72 | ||
| 67 | 73 | -- | |
| 68 | 74 | ||
| 69 | - | push.followTags:: | |
| 75 | + | `push.followTags`:: | |
| 70 | 76 | If set to true, enable `--follow-tags` option by default. You | |
| 71 | 77 | may override this configuration at time of push by specifying | |
| 72 | 78 | `--no-follow-tags`. | |
| 73 | 79 | ||
| 74 | - | push.gpgSign:: | |
| 75 | - | May be set to a boolean value, or the string 'if-asked'. A true | |
| 80 | + | `push.gpgSign`:: | |
| 81 | + | May be set to a boolean value, or the string `if-asked`. A true | |
| 76 | 82 | value causes all pushes to be GPG signed, as if `--signed` is | |
| 77 | - | passed to linkgit:git-push[1]. The string 'if-asked' causes | |
| 83 | + | passed to linkgit:git-push[1]. The string `if-asked` causes | |
| 78 | 84 | pushes to be signed if the server supports it, as if | |
| 79 | - | `--signed=if-asked` is passed to 'git push'. A false value may | |
| 85 | + | `--signed=if-asked` is passed to `git push`. A false value may | |
| 80 | 86 | override a value from a lower-priority config file. An explicit | |
| 81 | 87 | command-line flag always overrides this config option. | |
| 82 | 88 | ||
| 83 | - | push.pushOption:: | |
| 89 | + | `push.pushOption`:: | |
| 84 | 90 | When no `--push-option=<option>` argument is given from the | |
| 85 | - | command line, `git push` behaves as if each <value> of | |
| 86 | - | this variable is given as `--push-option=<value>`. | |
| 91 | + | command line, `git push` behaves as if each _<option>_ of | |
| 92 | + | this variable is given as `--push-option=<option>`. | |
| 87 | 93 | + | |
| 88 | 94 | This is a multi-valued variable, and an empty value can be used in a | |
| 89 | 95 | higher priority configuration file (e.g. `.git/config` in a | |
| @@ -109,26 +115,26 @@ This will result in only b (a and c are cleared). | |||
| 109 | 115 | ||
| 110 | 116 | ---- | |
| 111 | 117 | ||
| 112 | - | push.recurseSubmodules:: | |
| 113 | - | May be "check", "on-demand", "only", or "no", with the same behavior | |
| 114 | - | as that of "push --recurse-submodules". | |
| 115 | - | If not set, 'no' is used by default, unless 'submodule.recurse' is | |
| 116 | - | set (in which case a 'true' value means 'on-demand'). | |
| 118 | + | `push.recurseSubmodules`:: | |
| 119 | + | May be `check`, `on-demand`, `only`, or `no`, with the same behavior | |
| 120 | + | as that of `push --recurse-submodules`. | |
| 121 | + | If not set, `no` is used by default, unless `submodule.recurse` is | |
| 122 | + | set (in which case a `true` value means `on-demand`). | |
| 117 | 123 | ||
| 118 | - | push.useForceIfIncludes:: | |
| 119 | - | If set to "true", it is equivalent to specifying | |
| 124 | + | `push.useForceIfIncludes`:: | |
| 125 | + | If set to `true`, it is equivalent to specifying | |
| 120 | 126 | `--force-if-includes` as an option to linkgit:git-push[1] | |
| 121 | 127 | in the command line. Adding `--no-force-if-includes` at the | |
| 122 | 128 | time of push overrides this configuration setting. | |
| 123 | 129 | ||
| 124 | - | push.negotiate:: | |
| 125 | - | If set to "true", attempt to reduce the size of the packfile | |
| 130 | + | `push.negotiate`:: | |
| 131 | + | If set to `true`, attempt to reduce the size of the packfile | |
| 126 | 132 | sent by rounds of negotiation in which the client and the | |
| 127 | - | server attempt to find commits in common. If "false", Git will | |
| 133 | + | server attempt to find commits in common. If `false`, Git will | |
| 128 | 134 | rely solely on the server's ref advertisement to find commits | |
| 129 | 135 | in common. | |
| 130 | 136 | ||
| 131 | - | push.useBitmaps:: | |
| 132 | - | If set to "false", disable use of bitmaps for "git push" even if | |
| 133 | - | `pack.useBitmaps` is "true", without preventing other git operations | |
| 134 | - | from using bitmaps. Default is true. | |
| 137 | + | `push.useBitmaps`:: | |
| 138 | + | If set to `false`, disable use of bitmaps for `git push` even if | |
| 139 | + | `pack.useBitmaps` is `true`, without preventing other git operations | |
| 140 | + | from using bitmaps. Default is `true`. | |
modified Documentation/config/remote.adoc
| @@ -91,6 +91,15 @@ remote.<name>.promisor:: | |||
| 91 | 91 | When set to true, this remote will be used to fetch promisor | |
| 92 | 92 | objects. | |
| 93 | 93 | ||
| 94 | + | remote.<name>.advertisedAs:: | |
| 95 | + | When a promisor remote is automatically configured using | |
| 96 | + | information advertised by a server through the | |
| 97 | + | `promisor-remote` protocol capability (see | |
| 98 | + | `promisor.acceptFromServerUrl`), the server's originally | |
| 99 | + | advertised name is saved in this variable. This is for | |
| 100 | + | information, tracing and debugging purposes. Users should not | |
| 101 | + | typically modify or create such configuration entries. | |
| 102 | + | ||
| 94 | 103 | remote.<name>.partialclonefilter:: | |
| 95 | 104 | The filter that will be applied when fetching from this promisor remote. | |
| 96 | 105 | Changing or clearing this value will only affect fetches for new commits. | |
| @@ -107,16 +116,62 @@ priority configuration file (e.g. `.git/config` in a repository) to clear | |||
| 107 | 116 | the values inherited from a lower priority configuration files (e.g. | |
| 108 | 117 | `$HOME/.gitconfig`). | |
| 109 | 118 | ||
| 119 | + | remote.<name>.negotiationRestrict:: | |
| 120 | + | When negotiating with this remote during `git fetch`, restrict the | |
| 121 | + | commits advertised as "have" lines to only those reachable from refs | |
| 122 | + | matching the given patterns. This multi-valued config option behaves | |
| 123 | + | like `--negotiation-restrict` on the command line. | |
| 124 | + | + | |
| 125 | + | Each value is either an exact ref name (e.g. `refs/heads/release`) or a | |
| 126 | + | glob pattern (e.g. `refs/heads/release/*`). The pattern syntax is the | |
| 127 | + | same as for `--negotiation-restrict`. | |
| 128 | + | + | |
| 129 | + | These config values are used as defaults for the `--negotiation-restrict` | |
| 130 | + | command-line option. If `--negotiation-restrict` (or its synonym | |
| 131 | + | `--negotiation-tip`) is specified on the command line, then the config | |
| 132 | + | values are not used. | |
| 133 | + | + | |
| 134 | + | These values also influence negotiation during `git push` if | |
| 135 | + | `push.negotiate` is enabled. | |
| 136 | + | + | |
| 137 | + | Blank values signal to ignore all previous values, allowing a reset of | |
| 138 | + | the list from broader config scenarios. | |
| 139 | + | ||
| 140 | + | remote.<name>.negotiationInclude:: | |
| 141 | + | When negotiating with this remote during `git fetch`, the client | |
| 142 | + | advertises a list of commits that exist locally. In repos with | |
| 143 | + | many references, this list of "haves" can be truncated. Depending | |
| 144 | + | on data shape, dropping certain references may be expensive. This | |
| 145 | + | multi-valued config option specifies references, commit hashes, | |
| 146 | + | or ref pattern globs whose tips should always be sent as "have" | |
| 147 | + | commits during fetch negotiation with this remote. | |
| 148 | + | + | |
| 149 | + | Each value is either an exact ref name (e.g. `refs/heads/release`), a | |
| 150 | + | commit hash, or a glob pattern (e.g. `refs/heads/release/*`). The | |
| 151 | + | pattern syntax is the same as for `--negotiation-include`. | |
| 152 | + | + | |
| 153 | + | These config values are used as defaults for the `--negotiation-include` | |
| 154 | + | command-line option. If `--negotiation-include` is specified on the | |
| 155 | + | command line, then the config values are not used. | |
| 156 | + | + | |
| 157 | + | This option is additive with the normal negotiation process: the | |
| 158 | + | negotiation algorithm still runs and advertises its own selected commits, | |
| 159 | + | but the refs matching `remote.<name>.negotiationInclude` are sent | |
| 160 | + | unconditionally on top of those heuristically selected commits. | |
| 161 | + | + | |
| 162 | + | These values also influence negotiation during `git push` if | |
| 163 | + | `push.negotiate` is enabled. | |
| 164 | + | + | |
| 165 | + | Blank values signal to ignore all previous values, allowing a reset of | |
| 166 | + | the list from broader config scenarios. | |
| 167 | + | ||
| 110 | 168 | remote.<name>.followRemoteHEAD:: | |
| 111 | - | How linkgit:git-fetch[1] should handle updates to `remotes/<name>/HEAD` | |
| 112 | - | when fetching using the configured refspecs of a remote. | |
| 113 | - | The default value is "create", which will create `remotes/<name>/HEAD` | |
| 114 | - | if it exists on the remote, but not locally; this will not touch an | |
| 115 | - | already existing local reference. Setting it to "warn" will print | |
| 116 | - | a message if the remote has a different value than the local one; | |
| 117 | - | in case there is no local reference, it behaves like "create". | |
| 118 | - | A variant on "warn" is "warn-if-not-$branch", which behaves like | |
| 119 | - | "warn", but if `HEAD` on the remote is `$branch` it will be silent. | |
| 120 | - | Setting it to "always" will silently update `remotes/<name>/HEAD` to | |
| 121 | - | the value on the remote. Finally, setting it to "never" will never | |
| 122 | - | change or create the local reference. | |
| 169 | + | When fetching this remote using its default refspec, this setting determines | |
| 170 | + | how to handle differences between the remote's `HEAD` and the local | |
| 171 | + | `remotes/<name>/HEAD` symbolic-ref. Overrides the value of | |
| 172 | + | `fetch.followRemoteHEAD`. See `fetch.followRemoteHEAD` for a description of | |
| 173 | + | accepted values. | |
| 174 | + | + | |
| 175 | + | In addition to the values supported by `fetch.followRemoteHEAD`, this setting | |
| 176 | + | may also take on the value "warn-if-not-`$branch`", which behaves like "warn", | |
| 177 | + | but ignores the warning if the remote's `HEAD` is `remotes/<name>/$branch`. | |
modified Documentation/config/repack.adoc
| @@ -39,3 +39,28 @@ repack.cruftThreads:: | |||
| 39 | 39 | a cruft pack and the respective parameters are not given over | |
| 40 | 40 | the command line. See similarly named `pack.*` configuration | |
| 41 | 41 | variables for defaults and meaning. | |
| 42 | + | ||
| 43 | + | repack.midxMustContainCruft:: | |
| 44 | + | When set to true, linkgit:git-repack[1] will unconditionally include | |
| 45 | + | cruft pack(s), if any, in the multi-pack index when invoked with | |
| 46 | + | `--write-midx`. When false, cruft packs are only included in the MIDX | |
| 47 | + | when necessary (e.g., because they might be required to form a | |
| 48 | + | reachability closure with MIDX bitmaps). Defaults to true. | |
| 49 | + | ||
| 50 | + | repack.midxSplitFactor:: | |
| 51 | + | The factor used in the geometric merging condition when | |
| 52 | + | compacting incremental MIDX layers during `git repack` when | |
| 53 | + | invoked with the `--write-midx=incremental` option. | |
| 54 | + | + | |
| 55 | + | Adjacent layers are merged when the accumulated object count of the | |
| 56 | + | newer layer exceeds `1/<N>` of the object count of the next deeper | |
| 57 | + | layer. Must be at least 2. Defaults to 2. | |
| 58 | + | ||
| 59 | + | repack.midxNewLayerThreshold:: | |
| 60 | + | The minimum number of packs in the tip MIDX layer before those | |
| 61 | + | packs are considered as candidates for geometric repacking | |
| 62 | + | during `git repack --write-midx=incremental`. | |
| 63 | + | + | |
| 64 | + | When the tip layer has fewer packs than this threshold, those packs are | |
| 65 | + | excluded from the geometric repack entirely, and are thus left | |
| 66 | + | unmodified. Must be at least 1. Defaults to 8. | |
added Documentation/config/replay.adoc mode 100644
| @@ -0,0 +1,18 @@ | |||
| 1 | + | replay.refAction:: | |
| 2 | + | Specifies the default mode for handling reference updates. | |
| 3 | + | The value can be: | |
| 4 | + | + | |
| 5 | + | -- | |
| 6 | + | //// | |
| 7 | + | These use the first sentences from the description list in git-replay(1). | |
| 8 | + | //// | |
| 9 | + | `update`;; (default) Update refs directly using an atomic transaction. | |
| 10 | + | `print`;; Output update-ref commands for pipeline use. | |
| 11 | + | -- | |
| 12 | + | + | |
| 13 | + | ifdef::git-replay[] | |
| 14 | + | See `--ref-action`. | |
| 15 | + | endif::git-replay[] | |
| 16 | + | ifndef::git-replay[] | |
| 17 | + | See `--ref-action` in linkgit:git-replay[1] for details. | |
| 18 | + | endif::git-replay[] | |
modified Documentation/config/safe.adoc
| @@ -2,10 +2,14 @@ safe.bareRepository:: | |||
| 2 | 2 | Specifies which bare repositories Git will work with. The currently | |
| 3 | 3 | supported values are: | |
| 4 | 4 | + | |
| 5 | - | * `all`: Git works with all bare repositories. This is the default. | |
| 5 | + | -- | |
| 6 | + | * `all`: Git works with all bare repositories. This is the default in | |
| 7 | + | Git 2.x. | |
| 6 | 8 | * `explicit`: Git only works with bare repositories specified via | |
| 7 | 9 | the top-level `--git-dir` command-line option, or the `GIT_DIR` | |
| 8 | - | environment variable (see linkgit:git[1]). | |
| 10 | + | environment variable (see linkgit:git[1]). This will be the default | |
| 11 | + | in Git 3.0. | |
| 12 | + | -- | |
| 9 | 13 | + | |
| 10 | 14 | If you do not use bare repositories in your workflow, then it may be | |
| 11 | 15 | beneficial to set `safe.bareRepository` to `explicit` in your global | |
| @@ -13,6 +17,10 @@ config. This will protect you from attacks that involve cloning a | |||
| 13 | 17 | repository that contains a bare repository and running a Git command | |
| 14 | 18 | within that directory. | |
| 15 | 19 | + | |
| 20 | + | If you use bare repositories regularly and want to preserve the current | |
| 21 | + | behavior after upgrading to Git 3.0, set `safe.bareRepository` to `all` | |
| 22 | + | in your global or system config. | |
| 23 | + | + | |
| 16 | 24 | This config setting is only respected in protected configuration (see | |
| 17 | 25 | <<SCOPES>>). This prevents untrusted repositories from tampering with | |
| 18 | 26 | this value. | |
modified Documentation/config/sendemail.adoc
| @@ -1,57 +1,73 @@ | |||
| 1 | - | sendemail.identity:: | |
| 1 | + | `sendemail.identity`:: | |
| 2 | 2 | A configuration identity. When given, causes values in the | |
| 3 | - | 'sendemail.<identity>' subsection to take precedence over | |
| 4 | - | values in the 'sendemail' section. The default identity is | |
| 3 | + | `sendemail.<identity>` subsection to take precedence over | |
| 4 | + | values in the `sendemail` section. The default identity is | |
| 5 | 5 | the value of `sendemail.identity`. | |
| 6 | 6 | ||
| 7 | - | sendemail.smtpEncryption:: | |
| 7 | + | `sendemail.smtpEncryption`:: | |
| 8 | 8 | See linkgit:git-send-email[1] for description. Note that this | |
| 9 | - | setting is not subject to the 'identity' mechanism. | |
| 9 | + | setting is not subject to the `identity` mechanism. | |
| 10 | 10 | ||
| 11 | - | sendemail.smtpSSLCertPath:: | |
| 11 | + | `sendemail.smtpSSLCertPath`:: | |
| 12 | 12 | Path to ca-certificates (either a directory or a single file). | |
| 13 | 13 | Set it to an empty string to disable certificate verification. | |
| 14 | 14 | ||
| 15 | - | sendemail.<identity>.*:: | |
| 16 | - | Identity-specific versions of the 'sendemail.*' parameters | |
| 15 | + | `sendemail.smtpSSLClientCert`:: | |
| 16 | + | Path to the client certificate file to present if requested by the | |
| 17 | + | server. This is required when the server is set up to verify client | |
| 18 | + | certificates. If the corresponding private key is not included in the | |
| 19 | + | file, it must be supplied using `sendemail.smtpSSLClientKey` or the | |
| 20 | + | `--smtp-ssl-client-key` option. | |
| 21 | + | ||
| 22 | + | `sendemail.smtpSSLClientKey`:: | |
| 23 | + | Path to the client private key file that corresponds to the client | |
| 24 | + | certificate. To avoid misconfiguration, this configuration must be used | |
| 25 | + | in conjunction with `sendemail.smtpSSLClientCert` or the | |
| 26 | + | `--smtp-ssl-client-cert` option. If the client key is included in the | |
| 27 | + | client certificate, the choice of private key depends on the format of | |
| 28 | + | the certificate. Visit https://metacpan.org/pod/IO::Socket::SSL for more | |
| 29 | + | details. | |
| 30 | + | ||
| 31 | + | `sendemail.<identity>.<config>`:: | |
| 32 | + | Identity-specific versions of the `sendemail.<config>` parameters | |
| 17 | 33 | found below, taking precedence over those when this | |
| 18 | 34 | identity is selected, through either the command-line or | |
| 19 | 35 | `sendemail.identity`. | |
| 20 | 36 | ||
| 21 | - | sendemail.multiEdit:: | |
| 22 | - | If true (default), a single editor instance will be spawned to edit | |
| 37 | + | `sendemail.multiEdit`:: | |
| 38 | + | If `true` (default), a single editor instance will be spawned to edit | |
| 23 | 39 | files you have to edit (patches when `--annotate` is used, and the | |
| 24 | - | summary when `--compose` is used). If false, files will be edited one | |
| 40 | + | summary when `--compose` is used). If `false`, files will be edited one | |
| 25 | 41 | after the other, spawning a new editor each time. | |
| 26 | 42 | ||
| 27 | - | sendemail.confirm:: | |
| 43 | + | `sendemail.confirm`:: | |
| 28 | 44 | Sets the default for whether to confirm before sending. Must be | |
| 29 | - | one of 'always', 'never', 'cc', 'compose', or 'auto'. See `--confirm` | |
| 45 | + | one of `always`, `never`, `cc`, `compose`, or `auto`. See `--confirm` | |
| 30 | 46 | in the linkgit:git-send-email[1] documentation for the meaning of these | |
| 31 | 47 | values. | |
| 32 | 48 | ||
| 33 | - | sendemail.mailmap:: | |
| 34 | - | If true, makes linkgit:git-send-email[1] assume `--mailmap`, | |
| 35 | - | otherwise assume `--no-mailmap`. False by default. | |
| 49 | + | `sendemail.mailmap`:: | |
| 50 | + | If `true`, makes linkgit:git-send-email[1] assume `--mailmap`, | |
| 51 | + | otherwise assume `--no-mailmap`. `False` by default. | |
| 36 | 52 | ||
| 37 | - | sendemail.mailmap.file:: | |
| 53 | + | `sendemail.mailmap.file`:: | |
| 38 | 54 | The location of a linkgit:git-send-email[1] specific augmenting | |
| 39 | 55 | mailmap file. The default mailmap and `mailmap.file` are loaded | |
| 40 | 56 | first. Thus, entries in this file take precedence over entries in | |
| 41 | 57 | the default mailmap locations. See linkgit:gitmailmap[5]. | |
| 42 | 58 | ||
| 43 | - | sendemail.mailmap.blob:: | |
| 59 | + | `sendemail.mailmap.blob`:: | |
| 44 | 60 | Like `sendemail.mailmap.file`, but consider the value as a reference | |
| 45 | 61 | to a blob in the repository. Entries in `sendemail.mailmap.file` | |
| 46 | 62 | take precedence over entries here. See linkgit:gitmailmap[5]. | |
| 47 | 63 | ||
| 48 | - | sendemail.aliasesFile:: | |
| 64 | + | `sendemail.aliasesFile`:: | |
| 49 | 65 | To avoid typing long email addresses, point this to one or more | |
| 50 | 66 | email aliases files. You must also supply `sendemail.aliasFileType`. | |
| 51 | 67 | ||
| 52 | - | sendemail.aliasFileType:: | |
| 53 | - | Format of the file(s) specified in sendemail.aliasesFile. Must be | |
| 54 | - | one of 'mutt', 'mailrc', 'pine', 'elm', 'gnus', or 'sendmail'. | |
| 68 | + | `sendemail.aliasFileType`:: | |
| 69 | + | Format of the file(s) specified in `sendemail.aliasesFile`. Must be | |
| 70 | + | one of `mutt`, `mailrc`, `pine`, `elm`, `gnus`, or `sendmail`. | |
| 55 | 71 | + | |
| 56 | 72 | What an alias file in each format looks like can be found in | |
| 57 | 73 | the documentation of the email program of the same name. The | |
| @@ -59,7 +75,7 @@ differences and limitations from the standard formats are | |||
| 59 | 75 | described below: | |
| 60 | 76 | + | |
| 61 | 77 | -- | |
| 62 | - | sendmail;; | |
| 78 | + | `sendmail`;; | |
| 63 | 79 | * Quoted aliases and quoted addresses are not supported: lines that | |
| 64 | 80 | contain a `"` symbol are ignored. | |
| 65 | 81 | * Redirection to a file (`/path/name`) or pipe (`|command`) is not | |
| @@ -69,47 +85,54 @@ sendmail;; | |||
| 69 | 85 | explicitly unsupported constructs, and any other lines that are not | |
| 70 | 86 | recognized by the parser. | |
| 71 | 87 | -- | |
| 72 | - | sendemail.annotate:: | |
| 73 | - | sendemail.bcc:: | |
| 74 | - | sendemail.cc:: | |
| 75 | - | sendemail.ccCmd:: | |
| 76 | - | sendemail.chainReplyTo:: | |
| 77 | - | sendemail.envelopeSender:: | |
| 78 | - | sendemail.from:: | |
| 79 | - | sendemail.headerCmd:: | |
| 80 | - | sendemail.signedOffByCc:: | |
| 81 | - | sendemail.smtpPass:: | |
| 82 | - | sendemail.suppressCc:: | |
| 83 | - | sendemail.suppressFrom:: | |
| 84 | - | sendemail.to:: | |
| 85 | - | sendemail.toCmd:: | |
| 86 | - | sendemail.smtpDomain:: | |
| 87 | - | sendemail.smtpServer:: | |
| 88 | - | sendemail.smtpServerPort:: | |
| 89 | - | sendemail.smtpServerOption:: | |
| 90 | - | sendemail.smtpUser:: | |
| 91 | - | sendemail.thread:: | |
| 92 | - | sendemail.transferEncoding:: | |
| 93 | - | sendemail.validate:: | |
| 94 | - | sendemail.xmailer:: | |
| 88 | + | `sendemail.annotate`:: | |
| 89 | + | `sendemail.bcc`:: | |
| 90 | + | `sendemail.cc`:: | |
| 91 | + | `sendemail.ccCmd`:: | |
| 92 | + | `sendemail.chainReplyTo`:: | |
| 93 | + | `sendemail.envelopeSender`:: | |
| 94 | + | `sendemail.from`:: | |
| 95 | + | `sendemail.headerCmd`:: | |
| 96 | + | `sendemail.signedOffByCc`:: | |
| 97 | + | `sendemail.smtpPass`:: | |
| 98 | + | `sendemail.suppressCc`:: | |
| 99 | + | `sendemail.suppressFrom`:: | |
| 100 | + | `sendemail.to`:: | |
| 101 | + | `sendemail.toCmd`:: | |
| 102 | + | `sendemail.smtpDomain`:: | |
| 103 | + | `sendemail.smtpServer`:: | |
| 104 | + | `sendemail.smtpServerPort`:: | |
| 105 | + | `sendemail.smtpServerOption`:: | |
| 106 | + | `sendemail.smtpUser`:: | |
| 107 | + | `sendemail.imapSentFolder`:: | |
| 108 | + | `sendemail.useImapOnly`:: | |
| 109 | + | `sendemail.thread`:: | |
| 110 | + | `sendemail.transferEncoding`:: | |
| 111 | + | `sendemail.validate`:: | |
| 112 | + | `sendemail.xmailer`:: | |
| 95 | 113 | These configuration variables all provide a default for | |
| 96 | 114 | linkgit:git-send-email[1] command-line options. See its | |
| 97 | 115 | documentation for details. | |
| 98 | 116 | ||
| 99 | - | sendemail.signedOffCc (deprecated):: | |
| 117 | + | `sendemail.outlookidfix`:: | |
| 118 | + | If `true`, makes linkgit:git-send-email[1] assume `--outlook-id-fix`, | |
| 119 | + | and if `false` assume `--no-outlook-id-fix`. If not specified, it will | |
| 120 | + | behave the same way as if `--outlook-id-fix` is not specified. | |
| 121 | + | ||
| 122 | + | `sendemail.signedOffCc` (deprecated):: | |
| 100 | 123 | Deprecated alias for `sendemail.signedOffByCc`. | |
| 101 | 124 | ||
| 102 | - | sendemail.smtpBatchSize:: | |
| 125 | + | `sendemail.smtpBatchSize`:: | |
| 103 | 126 | Number of messages to be sent per connection, after that a relogin | |
| 104 | - | will happen. If the value is 0 or undefined, send all messages in | |
| 127 | + | will happen. If the value is `0` or undefined, send all messages in | |
| 105 | 128 | one connection. | |
| 106 | 129 | See also the `--batch-size` option of linkgit:git-send-email[1]. | |
| 107 | 130 | ||
| 108 | - | sendemail.smtpReloginDelay:: | |
| 131 | + | `sendemail.smtpReloginDelay`:: | |
| 109 | 132 | Seconds to wait before reconnecting to the smtp server. | |
| 110 | 133 | See also the `--relogin-delay` option of linkgit:git-send-email[1]. | |
| 111 | 134 | ||
| 112 | - | sendemail.forbidSendmailVariables:: | |
| 135 | + | `sendemail.forbidSendmailVariables`:: | |
| 113 | 136 | To avoid common misconfiguration mistakes, linkgit:git-send-email[1] | |
| 114 | - | will abort with a warning if any configuration options for "sendmail" | |
| 137 | + | will abort with a warning if any configuration options for `sendmail` | |
| 115 | 138 | exist. Set this variable to bypass the check. | |
added Documentation/config/sideband.adoc mode 100644
| @@ -0,0 +1,27 @@ | |||
| 1 | + | sideband.allowControlCharacters:: | |
| 2 | + | By default, control characters that are delivered via the sideband | |
| 3 | + | are masked, except ANSI color sequences. This prevents potentially | |
| 4 | + | unwanted ANSI escape sequences from being sent to the terminal. Use | |
| 5 | + | this config setting to override this behavior (the value can be | |
| 6 | + | a comma-separated list of the following keywords): | |
| 7 | + | + | |
| 8 | + | -- | |
| 9 | + | `color`:: | |
| 10 | + | Allow ANSI color sequences, line feeds and horizontal tabs, | |
| 11 | + | but mask all other control characters. This is the default. | |
| 12 | + | `cursor`:: | |
| 13 | + | Allow control sequences that move the cursor. This is | |
| 14 | + | disabled by default. | |
| 15 | + | `erase`:: | |
| 16 | + | Allow control sequences that erase characters. This is | |
| 17 | + | disabled by default. | |
| 18 | + | `false`:: | |
| 19 | + | Mask all control characters other than line feeds and | |
| 20 | + | horizontal tabs. | |
| 21 | + | `true`:: | |
| 22 | + | Allow all control characters to be sent to the terminal. | |
| 23 | + | -- | |
| 24 | + | ||
| 25 | + | sideband.<url>.*:: | |
| 26 | + | Apply the `sideband.*` option selectively to specific URLs. The | |
| 27 | + | same URL matching logic applies as for `http.<url>.*` settings. | |
modified Documentation/config/stash.adoc
| @@ -1,14 +1,32 @@ | |||
| 1 | - | stash.showIncludeUntracked:: | |
| 1 | + | ifndef::git-stash[] | |
| 2 | + | :see-show: See the description of the 'show' command in linkgit:git-stash[1]. | |
| 3 | + | endif::git-stash[] | |
| 4 | + | ||
| 5 | + | ifdef::git-stash[] | |
| 6 | + | :see-show: | |
| 7 | + | endif::git-stash[] | |
| 8 | + | ||
| 9 | + | `stash.index`:: | |
| 10 | + | If this is set to true, `git stash apply` and `git stash pop` will | |
| 11 | + | behave as if `--index` was supplied. Defaults to false. | |
| 12 | + | ifndef::git-stash[] | |
| 13 | + | See the descriptions in linkgit:git-stash[1]. | |
| 14 | + | + | |
| 15 | + | This also affects invocations of linkgit:git-stash[1] via `--autostash` from | |
| 16 | + | commands like linkgit:git-merge[1], linkgit:git-rebase[1], and | |
| 17 | + | linkgit:git-pull[1]. | |
| 18 | + | endif::git-stash[] | |
| 19 | + | ||
| 20 | + | `stash.showIncludeUntracked`:: | |
| 2 | 21 | If this is set to true, the `git stash show` command will show | |
| 3 | - | the untracked files of a stash entry. Defaults to false. See | |
| 4 | - | the description of the 'show' command in linkgit:git-stash[1]. | |
| 22 | + | the untracked files of a stash entry. Defaults to false. {see-show} | |
| 5 | 23 | ||
| 6 | - | stash.showPatch:: | |
| 24 | + | `stash.showPatch`:: | |
| 7 | 25 | If this is set to true, the `git stash show` command without an | |
| 8 | 26 | option will show the stash entry in patch form. Defaults to false. | |
| 9 | - | See the description of the 'show' command in linkgit:git-stash[1]. | |
| 27 | + | {see-show} | |
| 10 | 28 | ||
| 11 | - | stash.showStat:: | |
| 29 | + | `stash.showStat`:: | |
| 12 | 30 | If this is set to true, the `git stash show` command without an | |
| 13 | 31 | option will show a diffstat of the stash entry. Defaults to true. | |
| 14 | - | See the description of the 'show' command in linkgit:git-stash[1]. | |
| 32 | + | {see-show} | |
modified Documentation/config/status.adoc
| @@ -17,6 +17,31 @@ status.aheadBehind:: | |||
| 17 | 17 | `--no-ahead-behind` by default in linkgit:git-status[1] for | |
| 18 | 18 | non-porcelain status formats. Defaults to true. | |
| 19 | 19 | ||
| 20 | + | status.compareBranches:: | |
| 21 | + | A space-separated list of branch comparison specifiers to use in | |
| 22 | + | linkgit:git-status[1]. Currently, only `@{upstream}` and `@{push}` | |
| 23 | + | are supported. They are interpreted as `branch@{upstream}` and | |
| 24 | + | `branch@{push}` for the current branch. | |
| 25 | + | + | |
| 26 | + | If not set, the default behavior is equivalent to `@{upstream}`, which | |
| 27 | + | compares against the configured upstream tracking branch. | |
| 28 | + | + | |
| 29 | + | The entries are shown in the order they appear in the configuration. | |
| 30 | + | Duplicate entries that resolve to the same ref are suppressed after | |
| 31 | + | their first occurrence, so `@{push} @{upstream} @{push}` shows at | |
| 32 | + | most two comparisons. When `@{upstream}` and `@{push}` resolve to | |
| 33 | + | the same remote-tracking branch, only one comparison is shown. | |
| 34 | + | + | |
| 35 | + | Example: | |
| 36 | + | + | |
| 37 | + | ---- | |
| 38 | + | [status] | |
| 39 | + | compareBranches = @{upstream} @{push} | |
| 40 | + | ---- | |
| 41 | + | + | |
| 42 | + | This would show comparisons against both the configured upstream and push | |
| 43 | + | tracking branches for the current branch. | |
| 44 | + | ||
| 20 | 45 | status.displayCommentPrefix:: | |
| 21 | 46 | If set to true, linkgit:git-status[1] will insert a comment | |
| 22 | 47 | prefix before each output line (starting with | |
modified Documentation/config/submodule.adoc
| @@ -32,15 +32,16 @@ submodule.<name>.fetchRecurseSubmodules:: | |||
| 32 | 32 | ||
| 33 | 33 | submodule.<name>.ignore:: | |
| 34 | 34 | Defines under what circumstances "git status" and the diff family show | |
| 35 | - | a submodule as modified. When set to "all", it will never be considered | |
| 36 | - | modified (but it will nonetheless show up in the output of status and | |
| 37 | - | commit when it has been staged), "dirty" will ignore all changes | |
| 38 | - | to the submodule's work tree and | |
| 35 | + | a submodule as modified. | |
| 36 | + | When set to "all" will never consider the submodule modified. It can | |
| 37 | + | nevertheless be staged using the option --force and it will then show up | |
| 38 | + | in the output of status. | |
| 39 | + | When set to "dirty" will ignore all changes to the submodule's work tree and | |
| 39 | 40 | takes only differences between the HEAD of the submodule and the commit | |
| 40 | 41 | recorded in the superproject into account. "untracked" will additionally | |
| 41 | 42 | let submodules with modified tracked files in their work tree show up. | |
| 42 | - | Using "none" (the default when this option is not set) also shows | |
| 43 | - | submodules that have untracked files in their work tree as changed. | |
| 43 | + | When set to "none" (default) it also shows submodules as changed if they have | |
| 44 | + | untracked files in their work tree. | |
| 44 | 45 | This setting overrides any setting made in .gitmodules for this submodule, | |
| 45 | 46 | both settings can be overridden on the command line by using the | |
| 46 | 47 | "--ignore-submodules" option. The 'git submodule' commands are not | |
| @@ -52,6 +53,13 @@ submodule.<name>.active:: | |||
| 52 | 53 | submodule.active config option. See linkgit:gitsubmodules[7] for | |
| 53 | 54 | details. | |
| 54 | 55 | ||
| 56 | + | submodule.<name>.gitdir:: | |
| 57 | + | This sets the gitdir path for submodule <name>. This configuration is | |
| 58 | + | respected when `extensions.submodulePathConfig` is enabled, otherwise it | |
| 59 | + | has no effect. When enabled, this config becomes the single source of | |
| 60 | + | truth for submodule gitdir paths and Git will error if it is missing. | |
| 61 | + | See linkgit:git-config[1] for details. | |
| 62 | + | ||
| 55 | 63 | submodule.active:: | |
| 56 | 64 | A repeated field which contains a pathspec used to match against a | |
| 57 | 65 | submodule's path to determine if the submodule is of interest to git | |
modified Documentation/config/tag.adoc
| @@ -1,17 +1,23 @@ | |||
| 1 | - | tag.forceSignAnnotated:: | |
| 1 | + | `tag.forceSignAnnotated`:: | |
| 2 | 2 | A boolean to specify whether annotated tags created should be GPG signed. | |
| 3 | 3 | If `--annotate` is specified on the command line, it takes | |
| 4 | 4 | precedence over this option. | |
| 5 | 5 | ||
| 6 | - | tag.sort:: | |
| 7 | - | This variable controls the sort ordering of tags when displayed by | |
| 8 | - | linkgit:git-tag[1]. Without the "--sort=<value>" option provided, the | |
| 9 | - | value of this variable will be used as the default. | |
| 6 | + | `tag.sort`:: | |
| 7 | + | ifdef::git-tag[] | |
| 8 | + | This variable controls the sort ordering of tags when displayed by `git-tag`. | |
| 9 | + | endif::git-tag[] | |
| 10 | + | ifndef::git-tag[] | |
| 11 | + | This variable controls the sort ordering of tags when displayed by | |
| 12 | + | linkgit:git-tag[1]. | |
| 13 | + | endif::git-tag[] | |
| 14 | + | Without the `--sort=<value>` option provided, the value of this variable will | |
| 15 | + | be used as the default. | |
| 10 | 16 | ||
| 11 | - | tag.gpgSign:: | |
| 17 | + | `tag.gpgSign`:: | |
| 12 | 18 | A boolean to specify whether all tags should be GPG signed. | |
| 13 | 19 | Use of this option when running in an automated script can | |
| 14 | 20 | result in a large number of tags being signed. It is therefore | |
| 15 | - | convenient to use an agent to avoid typing your gpg passphrase | |
| 21 | + | convenient to use an agent to avoid typing your GPG passphrase | |
| 16 | 22 | several times. Note that this option doesn't affect tag signing | |
| 17 | - | behavior enabled by "-u <keyid>" or "--local-user=<keyid>" options. | |
| 23 | + | behavior enabled by `-u <keyid>` or `--local-user=<keyid>` options. | |
modified Documentation/config/trailer.adoc
| @@ -1,21 +1,21 @@ | |||
| 1 | - | trailer.separators:: | |
| 1 | + | `trailer.separators`:: | |
| 2 | 2 | This option tells which characters are recognized as trailer | |
| 3 | - | separators. By default only ':' is recognized as a trailer | |
| 4 | - | separator, except that '=' is always accepted on the command | |
| 3 | + | separators. By default only `:` is recognized as a trailer | |
| 4 | + | separator, except that `=` is always accepted on the command | |
| 5 | 5 | line for compatibility with other git commands. | |
| 6 | 6 | + | |
| 7 | 7 | The first character given by this option will be the default character | |
| 8 | 8 | used when another separator is not specified in the config for this | |
| 9 | 9 | trailer. | |
| 10 | 10 | + | |
| 11 | - | For example, if the value for this option is "%=$", then only lines | |
| 12 | - | using the format '<key><sep><value>' with <sep> containing '%', '=' | |
| 13 | - | or '$' and then spaces will be considered trailers. And '%' will be | |
| 11 | + | For example, if the value for this option is `%=$`, then only lines | |
| 12 | + | using the format _<key><sep><value>_ with _<sep>_ containing `%`, `=` | |
| 13 | + | or `$` and then spaces will be considered trailers. And `%` will be | |
| 14 | 14 | the default separator used, so by default trailers will appear like: | |
| 15 | - | '<key>% <value>' (one percent sign and one space will appear between | |
| 15 | + | `<key>% <value>` (one percent sign and one space will appear between | |
| 16 | 16 | the key and the value). | |
| 17 | 17 | ||
| 18 | - | trailer.where:: | |
| 18 | + | `trailer.where`:: | |
| 19 | 19 | This option tells where a new trailer will be added. | |
| 20 | 20 | + | |
| 21 | 21 | This can be `end`, which is the default, `start`, `after` or `before`. | |
| @@ -27,41 +27,41 @@ If it is `start`, then each new trailer will appear at the start, | |||
| 27 | 27 | instead of the end, of the existing trailers. | |
| 28 | 28 | + | |
| 29 | 29 | If it is `after`, then each new trailer will appear just after the | |
| 30 | - | last trailer with the same <key>. | |
| 30 | + | last trailer with the same _<key>_. | |
| 31 | 31 | + | |
| 32 | 32 | If it is `before`, then each new trailer will appear just before the | |
| 33 | - | first trailer with the same <key>. | |
| 33 | + | first trailer with the same _<key>_. | |
| 34 | 34 | ||
| 35 | - | trailer.ifexists:: | |
| 35 | + | `trailer.ifexists`:: | |
| 36 | 36 | This option makes it possible to choose what action will be | |
| 37 | 37 | performed when there is already at least one trailer with the | |
| 38 | - | same <key> in the input. | |
| 38 | + | same _<key>_ in the input. | |
| 39 | 39 | + | |
| 40 | 40 | The valid values for this option are: `addIfDifferentNeighbor` (this | |
| 41 | 41 | is the default), `addIfDifferent`, `add`, `replace` or `doNothing`. | |
| 42 | 42 | + | |
| 43 | 43 | With `addIfDifferentNeighbor`, a new trailer will be added only if no | |
| 44 | - | trailer with the same (<key>, <value>) pair is above or below the line | |
| 44 | + | trailer with the same (_<key>_, _<value>_) pair is above or below the line | |
| 45 | 45 | where the new trailer will be added. | |
| 46 | 46 | + | |
| 47 | 47 | With `addIfDifferent`, a new trailer will be added only if no trailer | |
| 48 | - | with the same (<key>, <value>) pair is already in the input. | |
| 48 | + | with the same (_<key>_, _<value>_) pair is already in the input. | |
| 49 | 49 | + | |
| 50 | 50 | With `add`, a new trailer will be added, even if some trailers with | |
| 51 | - | the same (<key>, <value>) pair are already in the input. | |
| 51 | + | the same (_<key>_, _<value>_) pair are already in the input. | |
| 52 | 52 | + | |
| 53 | - | With `replace`, an existing trailer with the same <key> will be | |
| 53 | + | With `replace`, an existing trailer with the same _<key>_ will be | |
| 54 | 54 | deleted and the new trailer will be added. The deleted trailer will be | |
| 55 | - | the closest one (with the same <key>) to the place where the new one | |
| 55 | + | the closest one (with the same _<key>_) to the place where the new one | |
| 56 | 56 | will be added. | |
| 57 | 57 | + | |
| 58 | 58 | With `doNothing`, nothing will be done; that is no new trailer will be | |
| 59 | - | added if there is already one with the same <key> in the input. | |
| 59 | + | added if there is already one with the same _<key>_ in the input. | |
| 60 | 60 | ||
| 61 | - | trailer.ifmissing:: | |
| 61 | + | `trailer.ifmissing`:: | |
| 62 | 62 | This option makes it possible to choose what action will be | |
| 63 | 63 | performed when there is not yet any trailer with the same | |
| 64 | - | <key> in the input. | |
| 64 | + | _<key>_ in the input. | |
| 65 | 65 | + | |
| 66 | 66 | The valid values for this option are: `add` (this is the default) and | |
| 67 | 67 | `doNothing`. | |
| @@ -70,67 +70,68 @@ With `add`, a new trailer will be added. | |||
| 70 | 70 | + | |
| 71 | 71 | With `doNothing`, nothing will be done. | |
| 72 | 72 | ||
| 73 | - | trailer.<keyAlias>.key:: | |
| 74 | - | Defines a <keyAlias> for the <key>. The <keyAlias> must be a | |
| 75 | - | prefix (case does not matter) of the <key>. For example, in `git | |
| 76 | - | config trailer.ack.key "Acked-by"` the "Acked-by" is the <key> and | |
| 77 | - | the "ack" is the <keyAlias>. This configuration allows the shorter | |
| 73 | + | `trailer.<key-alias>.key`:: | |
| 74 | + | Defines a _<key-alias>_ for the _<key>_. The _<key-alias>_ must be a | |
| 75 | + | prefix (case does not matter) of the _<key>_. For example, in `git | |
| 76 | + | config trailer.ack.key "Acked-by"` the `Acked-by` is the _<key>_ and | |
| 77 | + | the `ack` is the _<key-alias>_. This configuration allows the shorter | |
| 78 | 78 | `--trailer "ack:..."` invocation on the command line using the "ack" | |
| 79 | - | <keyAlias> instead of the longer `--trailer "Acked-by:..."`. | |
| 79 | + | `<key-alias>` instead of the longer `--trailer "Acked-by:..."`. | |
| 80 | 80 | + | |
| 81 | - | At the end of the <key>, a separator can appear and then some | |
| 82 | - | space characters. By default the only valid separator is ':', | |
| 81 | + | At the end of the _<key>_, a separator can appear and then some | |
| 82 | + | space characters. By default the only valid separator is `:`, | |
| 83 | 83 | but this can be changed using the `trailer.separators` config | |
| 84 | 84 | variable. | |
| 85 | 85 | + | |
| 86 | 86 | If there is a separator in the key, then it overrides the default | |
| 87 | 87 | separator when adding the trailer. | |
| 88 | 88 | ||
| 89 | - | trailer.<keyAlias>.where:: | |
| 90 | - | This option takes the same values as the 'trailer.where' | |
| 89 | + | `trailer.<key-alias>.where`:: | |
| 90 | + | This option takes the same values as the `trailer.where` | |
| 91 | 91 | configuration variable and it overrides what is specified by | |
| 92 | - | that option for trailers with the specified <keyAlias>. | |
| 92 | + | that option for trailers with the specified _<key-alias>_. | |
| 93 | 93 | ||
| 94 | - | trailer.<keyAlias>.ifexists:: | |
| 95 | - | This option takes the same values as the 'trailer.ifexists' | |
| 94 | + | `trailer.<key-alias>.ifexists`:: | |
| 95 | + | This option takes the same values as the `trailer.ifexists` | |
| 96 | 96 | configuration variable and it overrides what is specified by | |
| 97 | - | that option for trailers with the specified <keyAlias>. | |
| 97 | + | that option for trailers with the specified _<key-alias>_. | |
| 98 | 98 | ||
| 99 | - | trailer.<keyAlias>.ifmissing:: | |
| 100 | - | This option takes the same values as the 'trailer.ifmissing' | |
| 99 | + | `trailer.<key-alias>.ifmissing`:: | |
| 100 | + | This option takes the same values as the `trailer.ifmissing` | |
| 101 | 101 | configuration variable and it overrides what is specified by | |
| 102 | - | that option for trailers with the specified <keyAlias>. | |
| 102 | + | that option for trailers with the specified _<key-alias>_. | |
| 103 | 103 | ||
| 104 | - | trailer.<keyAlias>.command:: | |
| 105 | - | Deprecated in favor of 'trailer.<keyAlias>.cmd'. | |
| 106 | - | This option behaves in the same way as 'trailer.<keyAlias>.cmd', except | |
| 104 | + | `trailer.<key-alias>.command`:: | |
| 105 | + | Deprecated in favor of `trailer.<key-alias>.cmd`. | |
| 106 | + | This option behaves in the same way as `trailer.<key-alias>.cmd`, except | |
| 107 | 107 | that it doesn't pass anything as argument to the specified command. | |
| 108 | - | Instead the first occurrence of substring $ARG is replaced by the | |
| 109 | - | <value> that would be passed as argument. | |
| 108 | + | Instead the first occurrence of substring `$ARG` is replaced by the | |
| 109 | + | _<value>_ that would be passed as argument. | |
| 110 | 110 | + | |
| 111 | - | Note that $ARG in the user's command is | |
| 112 | - | only replaced once and that the original way of replacing $ARG is not safe. | |
| 111 | + | Note that `$ARG` in the user's command is | |
| 112 | + | only replaced once and that the original way of replacing `$ARG` is not safe. | |
| 113 | 113 | + | |
| 114 | - | When both 'trailer.<keyAlias>.cmd' and 'trailer.<keyAlias>.command' are given | |
| 115 | - | for the same <keyAlias>, 'trailer.<keyAlias>.cmd' is used and | |
| 116 | - | 'trailer.<keyAlias>.command' is ignored. | |
| 114 | + | When both `trailer.<key-alias>.cmd` and `trailer.<key-alias>.command` are given | |
| 115 | + | for the same _<key-alias>_, `trailer.<key-alias>.cmd` is used and | |
| 116 | + | `trailer.<key-alias>.command` is ignored. | |
| 117 | 117 | ||
| 118 | - | trailer.<keyAlias>.cmd:: | |
| 118 | + | `trailer.<key-alias>.cmd`:: | |
| 119 | 119 | This option can be used to specify a shell command that will be called | |
| 120 | - | once to automatically add a trailer with the specified <keyAlias>, and then | |
| 121 | - | called each time a '--trailer <keyAlias>=<value>' argument is specified to | |
| 122 | - | modify the <value> of the trailer that this option would produce. | |
| 120 | + | once to automatically add a trailer with the specified _<key-alias>_, and then | |
| 121 | + | called each time a `--trailer <key-alias>=<value>` argument is specified to | |
| 122 | + | modify the _<value>_ of the trailer that this option would produce. | |
| 123 | 123 | + | |
| 124 | 124 | When the specified command is first called to add a trailer | |
| 125 | - | with the specified <keyAlias>, the behavior is as if a special | |
| 126 | - | '--trailer <keyAlias>=<value>' argument was added at the beginning | |
| 127 | - | of the "git interpret-trailers" command, where <value> | |
| 128 | - | is taken to be the standard output of the command with any | |
| 129 | - | leading and trailing whitespace trimmed off. | |
| 125 | + | with the specified _<key-alias>_, the behavior is as if a special | |
| 126 | + | `--trailer <key-alias>=<value>` argument was added at the beginning | |
| 127 | + | of linkgit:git-interpret-trailers[1], where _<value>_ is taken to be the | |
| 128 | + | standard output of the command with any leading and trailing whitespace | |
| 129 | + | trimmed off. | |
| 130 | 130 | + | |
| 131 | - | If some '--trailer <keyAlias>=<value>' arguments are also passed | |
| 131 | + | If some `--trailer <key-alias>=<value>` arguments are also passed | |
| 132 | 132 | on the command line, the command is called again once for each | |
| 133 | - | of these arguments with the same <keyAlias>. And the <value> part | |
| 133 | + | of these arguments with the same _<key-alias>_. And the _<value>_ part | |
| 134 | 134 | of these arguments, if any, will be passed to the command as its | |
| 135 | - | first argument. This way the command can produce a <value> computed | |
| 136 | - | from the <value> passed in the '--trailer <keyAlias>=<value>' argument. | |
| 135 | + | first argument. This way the command can produce a _<value>_ computed | |
| 136 | + | from the _<value>_ passed in the `--trailer <key-alias>=<value>` | |
| 137 | + | argument. | |
modified Documentation/config/worktree.adoc
| @@ -1,4 +1,4 @@ | |||
| 1 | - | worktree.guessRemote:: | |
| 1 | + | `worktree.guessRemote`:: | |
| 2 | 2 | If no branch is specified and neither `-b` nor `-B` nor | |
| 3 | 3 | `--detach` is used, then `git worktree add` defaults to | |
| 4 | 4 | creating a new branch from HEAD. If `worktree.guessRemote` is | |
| @@ -6,14 +6,14 @@ worktree.guessRemote:: | |||
| 6 | 6 | branch whose name uniquely matches the new branch name. If | |
| 7 | 7 | such a branch exists, it is checked out and set as "upstream" | |
| 8 | 8 | for the new branch. If no such match can be found, it falls | |
| 9 | - | back to creating a new branch from the current HEAD. | |
| 9 | + | back to creating a new branch from the current `HEAD`. | |
| 10 | 10 | ||
| 11 | - | worktree.useRelativePaths:: | |
| 12 | - | Link worktrees using relative paths (when "true") or absolute | |
| 13 | - | paths (when "false"). This is particularly useful for setups | |
| 11 | + | `worktree.useRelativePaths`:: | |
| 12 | + | Link worktrees using relative paths (when "`true`") or absolute | |
| 13 | + | paths (when "`false`"). This is particularly useful for setups | |
| 14 | 14 | where the repository and worktrees may be moved between | |
| 15 | - | different locations or environments. Defaults to "false". | |
| 15 | + | different locations or environments. Defaults to "`false`". | |
| 16 | 16 | + | |
| 17 | - | Note that setting `worktree.useRelativePaths` to "true" implies enabling the | |
| 18 | - | `extension.relativeWorktrees` config (see linkgit:git-config[1]), | |
| 17 | + | Note that setting `worktree.useRelativePaths` to "`true`" implies enabling the | |
| 18 | + | `extensions.relativeWorktrees` config (see linkgit:git-config[1]), | |
| 19 | 19 | thus making it incompatible with older versions of Git. | |
modified Documentation/date-formats.adoc
| @@ -9,6 +9,11 @@ Git internal format:: | |||
| 9 | 9 | `<unix-timestamp>` is the number of seconds since the UNIX epoch. | |
| 10 | 10 | `<time-zone-offset>` is a positive or negative offset from UTC. | |
| 11 | 11 | For example CET (which is 1 hour ahead of UTC) is `+0100`. | |
| 12 | + | + | |
| 13 | + | It is safer to prepend the `<unix-timestamp>` with `@` (e.g., | |
| 14 | + | `@0 +0000`), which forces Git to interpret it as a raw timestamp. This | |
| 15 | + | is required for values less than 100,000,000 (which have fewer than 9 | |
| 16 | + | digits) to avoid confusion with other date formats like `YYYYMMDD`. | |
| 12 | 17 | ||
| 13 | 18 | RFC 2822:: | |
| 14 | 19 | The standard date format as described by RFC 2822, for example | |
added Documentation/diff-algorithm-option.adoc mode 100644
| @@ -0,0 +1,20 @@ | |||
| 1 | + | `--diff-algorithm=(patience|minimal|histogram|myers)`:: | |
| 2 | + | Choose a diff algorithm. The variants are as follows: | |
| 3 | + | + | |
| 4 | + | -- | |
| 5 | + | `default`;; | |
| 6 | + | `myers`;; | |
| 7 | + | The basic greedy diff algorithm. Currently, this is the default. | |
| 8 | + | `minimal`;; | |
| 9 | + | Spend extra time to make sure the smallest possible diff is | |
| 10 | + | produced. | |
| 11 | + | `patience`;; | |
| 12 | + | Use "patience diff" algorithm when generating patches. | |
| 13 | + | `histogram`;; | |
| 14 | + | This algorithm extends the patience algorithm to "support | |
| 15 | + | low-occurrence common elements". | |
| 16 | + | -- | |
| 17 | + | + | |
| 18 | + | For instance, if you configured the `diff.algorithm` variable to a | |
| 19 | + | non-default value and want to use the default one, then you | |
| 20 | + | have to use `--diff-algorithm=default` option. | |
added Documentation/diff-context-options.adoc mode 100644
| @@ -0,0 +1,12 @@ | |||
| 1 | + | `-U<n>`:: | |
| 2 | + | `--unified=<n>`:: | |
| 3 | + | Generate diffs with _<n>_ lines of context. The number of context | |
| 4 | + | lines defaults to `diff.context` or 3 if the configuration variable | |
| 5 | + | is unset. (`-U` without `<n>` is silently accepted as a synonym for | |
| 6 | + | `-p` due to a historical accident). | |
| 7 | + | ||
| 8 | + | `--inter-hunk-context=<n>`:: | |
| 9 | + | Show the context between diff hunks, up to the specified _<number>_ | |
| 10 | + | of lines, thereby fusing hunks that are close to each other. | |
| 11 | + | Defaults to `diff.interHunkContext` or 0 if the config option | |
| 12 | + | is unset. | |
modified Documentation/diff-format.adoc
| @@ -19,9 +19,9 @@ compared differs: | |||
| 19 | 19 | `git-diff-files [<pattern>...]`:: | |
| 20 | 20 | compares the index and the files on the filesystem. | |
| 21 | 21 | ||
| 22 | - | The `git-diff-tree` command begins its output by printing the hash of | |
| 23 | - | what is being compared. After that, all the commands print one output | |
| 24 | - | line per changed file. | |
| 22 | + | All the commands print one output line per changed file, | |
| 23 | + | except `git diff-files` in the case of an unmerged file, which prints | |
| 24 | + | both an "unmerged" and an "in-place edit" line. | |
| 25 | 25 | ||
| 26 | 26 | An output line is formatted this way: | |
| 27 | 27 | ||
| @@ -37,13 +37,13 @@ unmerged :000000 000000 0000000 0000000 U file6 | |||
| 37 | 37 | That is, from the left to the right: | |
| 38 | 38 | ||
| 39 | 39 | . a colon. | |
| 40 | - | . mode for "src"; 000000 if creation or unmerged. | |
| 40 | + | . mode for "src"; 000000 if creation, or if "src" is from the index and is unmerged. | |
| 41 | 41 | . a space. | |
| 42 | - | . mode for "dst"; 000000 if deletion or unmerged. | |
| 42 | + | . mode for "dst"; 000000 if deletion, or if "dst" is from the index and is unmerged. | |
| 43 | 43 | . a space. | |
| 44 | - | . sha1 for "src"; 0\{40\} if creation or unmerged. | |
| 44 | + | . sha1 for "src"; 0\{40\} if creation, or if "src" is from the index and is unmerged. | |
| 45 | 45 | . a space. | |
| 46 | - | . sha1 for "dst"; 0\{40\} if deletion, unmerged or "work tree out of sync with the index". | |
| 46 | + | . sha1 for "dst"; 0\{40\} if deletion, if "dst" is from the index and is unmerged, or if "dst" is from the work tree and is out of sync with the index. | |
| 47 | 47 | . a space. | |
| 48 | 48 | . status, followed by optional "score" number. | |
| 49 | 49 | . a tab or a NUL when `-z` option is used. | |
| @@ -103,6 +103,7 @@ if the file was renamed on any side of history. With | |||
| 103 | 103 | followed by the name of the path in the merge commit. | |
| 104 | 104 | ||
| 105 | 105 | Examples for `-c` and `--cc` without `--combined-all-paths`: | |
| 106 | + | ||
| 106 | 107 | ------------------------------------------------ | |
| 107 | 108 | ::100644 100644 100644 fabadb8 cc95eb0 4866510 MM desc.c | |
| 108 | 109 | ::100755 100755 100755 52b7a2d 6d1ac04 d2ac7d7 RM bar.sh | |
modified Documentation/diff-generate-patch.adoc
| @@ -138,7 +138,7 @@ or like this (when the `--cc` option is used): | |||
| 138 | 138 | + | |
| 139 | 139 | [synopsis] | |
| 140 | 140 | index <hash>,<hash>..<hash> | |
| 141 | - | mode <mode>,<mode>`..`<mode> | |
| 141 | + | mode <mode>,<mode>..<mode> | |
| 142 | 142 | new file mode <mode> | |
| 143 | 143 | deleted file mode <mode>,<mode> | |
| 144 | 144 | + | |
modified Documentation/diff-options.adoc
| @@ -13,8 +13,8 @@ endif::git-diff[] | |||
| 13 | 13 | endif::git-format-patch[] | |
| 14 | 14 | ||
| 15 | 15 | ifdef::git-format-patch[] | |
| 16 | - | -p:: | |
| 17 | - | --no-stat:: | |
| 16 | + | `-p`:: | |
| 17 | + | `--no-stat`:: | |
| 18 | 18 | Generate plain patches without any diffstats. | |
| 19 | 19 | endif::git-format-patch[] | |
| 20 | 20 | ||
| @@ -37,32 +37,32 @@ endif::git-diff[] | |||
| 37 | 37 | endif::git-format-patch[] | |
| 38 | 38 | ||
| 39 | 39 | ifdef::git-log[] | |
| 40 | - | -m:: | |
| 40 | + | `-m`:: | |
| 41 | 41 | Show diffs for merge commits in the default format. This is | |
| 42 | 42 | similar to `--diff-merges=on`, except `-m` will | |
| 43 | 43 | produce no output unless `-p` is given as well. | |
| 44 | 44 | ||
| 45 | - | -c:: | |
| 45 | + | `-c`:: | |
| 46 | 46 | Produce combined diff output for merge commits. | |
| 47 | 47 | Shortcut for `--diff-merges=combined -p`. | |
| 48 | 48 | ||
| 49 | - | --cc:: | |
| 49 | + | `--cc`:: | |
| 50 | 50 | Produce dense combined diff output for merge commits. | |
| 51 | 51 | Shortcut for `--diff-merges=dense-combined -p`. | |
| 52 | 52 | ||
| 53 | - | --dd:: | |
| 53 | + | `--dd`:: | |
| 54 | 54 | Produce diff with respect to first parent for both merge and | |
| 55 | 55 | regular commits. | |
| 56 | 56 | Shortcut for `--diff-merges=first-parent -p`. | |
| 57 | 57 | ||
| 58 | - | --remerge-diff:: | |
| 58 | + | `--remerge-diff`:: | |
| 59 | 59 | Produce remerge-diff output for merge commits. | |
| 60 | 60 | Shortcut for `--diff-merges=remerge -p`. | |
| 61 | 61 | ||
| 62 | - | --no-diff-merges:: | |
| 62 | + | `--no-diff-merges`:: | |
| 63 | 63 | Synonym for `--diff-merges=off`. | |
| 64 | 64 | ||
| 65 | - | --diff-merges=<format>:: | |
| 65 | + | `--diff-merges=<format>`:: | |
| 66 | 66 | Specify diff format to be used for merge commits. Default is | |
| 67 | 67 | {diff-merges-default} unless `--first-parent` is in use, in | |
| 68 | 68 | which case `first-parent` is the default. | |
| @@ -70,48 +70,54 @@ ifdef::git-log[] | |||
| 70 | 70 | The following formats are supported: | |
| 71 | 71 | + | |
| 72 | 72 | -- | |
| 73 | - | off, none:: | |
| 73 | + | `off`:: | |
| 74 | + | `none`:: | |
| 74 | 75 | Disable output of diffs for merge commits. Useful to override | |
| 75 | 76 | implied value. | |
| 76 | 77 | ||
| 77 | - | on, m:: | |
| 78 | + | `on`:: | |
| 79 | + | `m`:: | |
| 78 | 80 | Make diff output for merge commits to be shown in the default | |
| 79 | 81 | format. The default format can be changed using | |
| 80 | 82 | `log.diffMerges` configuration variable, whose default value | |
| 81 | 83 | is `separate`. | |
| 82 | 84 | ||
| 83 | - | first-parent, 1:: | |
| 85 | + | `first-parent`:: | |
| 86 | + | `1`:: | |
| 84 | 87 | Show full diff with respect to first parent. This is the same | |
| 85 | 88 | format as `--patch` produces for non-merge commits. | |
| 86 | 89 | ||
| 87 | - | separate:: | |
| 90 | + | `separate`:: | |
| 88 | 91 | Show full diff with respect to each of parents. | |
| 89 | 92 | Separate log entry and diff is generated for each parent. | |
| 90 | 93 | ||
| 91 | - | combined, c:: | |
| 94 | + | `combined`:: | |
| 95 | + | `c`:: | |
| 92 | 96 | Show differences from each of the parents to the merge | |
| 93 | 97 | result simultaneously instead of showing pairwise diff between | |
| 94 | 98 | a parent and the result one at a time. Furthermore, it lists | |
| 95 | 99 | only files which were modified from all parents. | |
| 96 | 100 | ||
| 97 | - | dense-combined, cc:: | |
| 101 | + | `dense-combined`:: | |
| 102 | + | `cc`:: | |
| 98 | 103 | Further compress output produced by `--diff-merges=combined` | |
| 99 | 104 | by omitting uninteresting hunks whose contents in the parents | |
| 100 | 105 | have only two variants and the merge result picks one of them | |
| 101 | 106 | without modification. | |
| 102 | 107 | ||
| 103 | - | remerge, r:: | |
| 104 | - | Remerge two-parent merge commits to create a temporary tree | |
| 108 | + | `remerge`:: | |
| 109 | + | `r`:: Remerge two-parent merge commits to create a temporary tree | |
| 105 | 110 | object--potentially containing files with conflict markers | |
| 106 | 111 | and such. A diff is then shown between that temporary tree | |
| 107 | 112 | and the actual merge commit. | |
| 113 | + | -- | |
| 108 | 114 | + | |
| 109 | 115 | The output emitted when this option is used is subject to change, and | |
| 110 | 116 | so is its interaction with other options (unless explicitly | |
| 111 | 117 | documented). | |
| 112 | - | -- | |
| 113 | 118 | ||
| 114 | - | --combined-all-paths:: | |
| 119 | + | ||
| 120 | + | `--combined-all-paths`:: | |
| 115 | 121 | Cause combined diffs (used for merge commits) to | |
| 116 | 122 | list the name of the file from all parents. It thus only has | |
| 117 | 123 | effect when `--diff-merges=[dense-]combined` is in use, and | |
| @@ -121,8 +127,10 @@ endif::git-log[] | |||
| 121 | 127 | ||
| 122 | 128 | `-U<n>`:: | |
| 123 | 129 | `--unified=<n>`:: | |
| 124 | - | Generate diffs with _<n>_ lines of context instead of | |
| 125 | - | the usual three. | |
| 130 | + | Generate diffs with _<n>_ lines of context. The number of context | |
| 131 | + | lines defaults to `diff.context` or 3 if the configuration variable | |
| 132 | + | is unset. (`-U` without `<n>` is silently accepted as a synonym for | |
| 133 | + | `-p` due to a historical accident). | |
| 126 | 134 | ifndef::git-format-patch[] | |
| 127 | 135 | Implies `--patch`. | |
| 128 | 136 | endif::git-format-patch[] | |
| @@ -191,26 +199,7 @@ and starts with _<text>_, this algorithm attempts to prevent it from | |||
| 191 | 199 | appearing as a deletion or addition in the output. It uses the "patience | |
| 192 | 200 | diff" algorithm internally. | |
| 193 | 201 | ||
| 194 | - | `--diff-algorithm=(patience|minimal|histogram|myers)`:: | |
| 195 | - | Choose a diff algorithm. The variants are as follows: | |
| 196 | - | + | |
| 197 | - | -- | |
| 198 | - | `default`;; | |
| 199 | - | `myers`;; | |
| 200 | - | The basic greedy diff algorithm. Currently, this is the default. | |
| 201 | - | `minimal`;; | |
| 202 | - | Spend extra time to make sure the smallest possible diff is | |
| 203 | - | produced. | |
| 204 | - | `patience`;; | |
| 205 | - | Use "patience diff" algorithm when generating patches. | |
| 206 | - | `histogram`;; | |
| 207 | - | This algorithm extends the patience algorithm to "support | |
| 208 | - | low-occurrence common elements". | |
| 209 | - | -- | |
| 210 | - | + | |
| 211 | - | For instance, if you configured the `diff.algorithm` variable to a | |
| 212 | - | non-default value and want to use the default one, then you | |
| 213 | - | have to use `--diff-algorithm=default` option. | |
| 202 | + | include::diff-algorithm-option.adoc[] | |
| 214 | 203 | ||
| 215 | 204 | `--stat[=<width>[,<name-width>[,<count>]]]`:: | |
| 216 | 205 | Generate a diffstat. By default, as much space as necessary | |
| @@ -468,6 +457,14 @@ endif::git-diff[] | |||
| 468 | 457 | + | |
| 469 | 458 | Note that despite the name of the first mode, color is used to | |
| 470 | 459 | highlight the changed parts in all modes if enabled. | |
| 460 | + | + | |
| 461 | + | The `--word-diff` option operates by taking the same line-by-line | |
| 462 | + | diff that is produced without the option and computing | |
| 463 | + | word-by-word changes within each hunk. This may produce a | |
| 464 | + | larger diff than a dedicated word-diff tool would. If Git | |
| 465 | + | acquires a different implementation in the future, the output | |
| 466 | + | may change. Note that this is similar to the `--diff-algorithm` | |
| 467 | + | option, which may also change the output. | |
| 471 | 468 | ||
| 472 | 469 | `--word-diff-regex=<regex>`:: | |
| 473 | 470 | Use _<regex>_ to decide what a word is, instead of considering | |
| @@ -499,7 +496,8 @@ endif::git-format-patch[] | |||
| 499 | 496 | Turn off rename detection, even when the configuration | |
| 500 | 497 | file gives the default to do so. | |
| 501 | 498 | ||
| 502 | - | `--[no-]rename-empty`:: | |
| 499 | + | `--rename-empty`:: | |
| 500 | + | `--no-rename-empty`:: | |
| 503 | 501 | Whether to use empty blobs as rename source. | |
| 504 | 502 | ||
| 505 | 503 | ifndef::git-format-patch[] | |
| @@ -871,10 +869,18 @@ endif::git-format-patch[] | |||
| 871 | 869 | Do not show any source or destination prefix. | |
| 872 | 870 | ||
| 873 | 871 | `--default-prefix`:: | |
| 872 | + | ifdef::git-format-patch[] | |
| 873 | + | Use the default source and destination prefixes ("a/" and "b/"). | |
| 874 | + | This overrides configuration variables such as `format.noprefix`, | |
| 875 | + | `diff.srcPrefix`, `diff.dstPrefix`, and `diff.mnemonicPrefix` | |
| 876 | + | (see linkgit:git-config[1]). | |
| 877 | + | endif::git-format-patch[] | |
| 878 | + | ifndef::git-format-patch[] | |
| 874 | 879 | Use the default source and destination prefixes ("a/" and "b/"). | |
| 875 | 880 | This overrides configuration variables such as `diff.noprefix`, | |
| 876 | 881 | `diff.srcPrefix`, `diff.dstPrefix`, and `diff.mnemonicPrefix` | |
| 877 | 882 | (see linkgit:git-config[1]). | |
| 883 | + | endif::git-format-patch[] | |
| 878 | 884 | ||
| 879 | 885 | `--line-prefix=<prefix>`:: | |
| 880 | 886 | Prepend an additional _<prefix>_ to every line of output. | |
| @@ -887,5 +893,33 @@ endif::git-format-patch[] | |||
| 887 | 893 | reverted with `--ita-visible-in-index`. Both options are | |
| 888 | 894 | experimental and could be removed in future. | |
| 889 | 895 | ||
| 896 | + | `--max-depth=<depth>`:: | |
| 897 | + | For each pathspec given on command line, descend at most _<depth>_ | |
| 898 | + | levels of directories. A value of `-1` means no limit. | |
| 899 | + | Cannot be combined with wildcards in the pathspec. | |
| 900 | + | Given a tree containing `foo/bar/baz`, the following list shows the | |
| 901 | + | matches generated by each set of options: | |
| 902 | + | + | |
| 903 | + | -- | |
| 904 | + | - `--max-depth=0 -- foo`: `foo` | |
| 905 | + | ||
| 906 | + | - `--max-depth=1 -- foo`: `foo/bar` | |
| 907 | + | ||
| 908 | + | - `--max-depth=1 -- foo/bar`: `foo/bar/baz` | |
| 909 | + | ||
| 910 | + | - `--max-depth=1 -- foo foo/bar`: `foo/bar/baz` | |
| 911 | + | ||
| 912 | + | - `--max-depth=2 -- foo`: `foo/bar/baz` | |
| 913 | + | -- | |
| 914 | + | + | |
| 915 | + | If no pathspec is given, the depth is measured as if all | |
| 916 | + | top-level entries were specified. Note that this is different | |
| 917 | + | than measuring from the root, in that `--max-depth=0` would | |
| 918 | + | still return `foo`. This allows you to still limit depth while | |
| 919 | + | asking for a subset of the top-level entries. | |
| 920 | + | + | |
| 921 | + | Note that this option is only supported for diffs between tree objects, | |
| 922 | + | not against the index or working tree. | |
| 923 | + | ||
| 890 | 924 | For more detailed explanation on these common options, see also | |
| 891 | 925 | linkgit:gitdiffcore[7]. | |
modified Documentation/fetch-options.adoc
| @@ -1,40 +1,41 @@ | |||
| 1 | - | --[no-]all:: | |
| 2 | - | Fetch all remotes, except for the ones that has the | |
| 1 | + | `--all`:: | |
| 2 | + | `--no-all`:: | |
| 3 | + | Fetch all remotes, except for the ones that have the | |
| 3 | 4 | `remote.<name>.skipFetchAll` configuration variable set. | |
| 4 | - | This overrides the configuration variable fetch.all`. | |
| 5 | + | This overrides the configuration variable `fetch.all`. | |
| 5 | 6 | ||
| 6 | - | -a:: | |
| 7 | - | --append:: | |
| 7 | + | `-a`:: | |
| 8 | + | `--append`:: | |
| 8 | 9 | Append ref names and object names of fetched refs to the | |
| 9 | 10 | existing contents of `.git/FETCH_HEAD`. Without this | |
| 10 | 11 | option old data in `.git/FETCH_HEAD` will be overwritten. | |
| 11 | 12 | ||
| 12 | - | --atomic:: | |
| 13 | + | `--atomic`:: | |
| 13 | 14 | Use an atomic transaction to update local refs. Either all refs are | |
| 14 | 15 | updated, or on error, no refs are updated. | |
| 15 | 16 | ||
| 16 | - | --depth=<depth>:: | |
| 17 | + | `--depth=<depth>`:: | |
| 17 | 18 | Limit fetching to the specified number of commits from the tip of | |
| 18 | 19 | each remote branch history. If fetching to a 'shallow' repository | |
| 19 | 20 | created by `git clone` with `--depth=<depth>` option (see | |
| 20 | 21 | linkgit:git-clone[1]), deepen or shorten the history to the specified | |
| 21 | 22 | number of commits. Tags for the deepened commits are not fetched. | |
| 22 | 23 | ||
| 23 | - | --deepen=<depth>:: | |
| 24 | - | Similar to --depth, except it specifies the number of commits | |
| 24 | + | `--deepen=<depth>`:: | |
| 25 | + | Similar to `--depth`, except it specifies the number of commits | |
| 25 | 26 | from the current shallow boundary instead of from the tip of | |
| 26 | 27 | each remote branch history. | |
| 27 | 28 | ||
| 28 | - | --shallow-since=<date>:: | |
| 29 | + | `--shallow-since=<date>`:: | |
| 29 | 30 | Deepen or shorten the history of a shallow repository to | |
| 30 | - | include all reachable commits after <date>. | |
| 31 | + | include all reachable commits after _<date>_. | |
| 31 | 32 | ||
| 32 | - | --shallow-exclude=<ref>:: | |
| 33 | + | `--shallow-exclude=<ref>`:: | |
| 33 | 34 | Deepen or shorten the history of a shallow repository to | |
| 34 | 35 | exclude commits reachable from a specified remote branch or tag. | |
| 35 | 36 | This option can be specified multiple times. | |
| 36 | 37 | ||
| 37 | - | --unshallow:: | |
| 38 | + | `--unshallow`:: | |
| 38 | 39 | If the source repository is complete, convert a shallow | |
| 39 | 40 | repository to a complete one, removing all the limitations | |
| 40 | 41 | imposed by shallow repositories. | |
| @@ -42,13 +43,14 @@ | |||
| 42 | 43 | If the source repository is shallow, fetch as much as possible so that | |
| 43 | 44 | the current repository has the same history as the source repository. | |
| 44 | 45 | ||
| 45 | - | --update-shallow:: | |
| 46 | + | `--update-shallow`:: | |
| 46 | 47 | By default when fetching from a shallow repository, | |
| 47 | 48 | `git fetch` refuses refs that require updating | |
| 48 | - | .git/shallow. This option updates .git/shallow and accepts such | |
| 49 | + | `.git/shallow`. This option updates `.git/shallow` and accepts such | |
| 49 | 50 | refs. | |
| 50 | 51 | ||
| 51 | - | --negotiation-tip=<commit|glob>:: | |
| 52 | + | `--negotiation-restrict=(<commit>|<glob>)`:: | |
| 53 | + | `--negotiation-tip=(<commit>|<glob>)`:: | |
| 52 | 54 | By default, Git will report, to the server, commits reachable | |
| 53 | 55 | from all local refs to find common commits in an attempt to | |
| 54 | 56 | reduce the size of the to-be-received packfile. If specified, | |
| @@ -57,6 +59,9 @@ the current repository has the same history as the source repository. | |||
| 57 | 59 | local ref is likely to have commits in common with the | |
| 58 | 60 | upstream ref being fetched. | |
| 59 | 61 | + | |
| 62 | + | `--negotiation-restrict` is the preferred name for this option; | |
| 63 | + | `--negotiation-tip` is accepted as a synonym. | |
| 64 | + | + | |
| 60 | 65 | This option may be specified more than once; if so, Git will report | |
| 61 | 66 | commits reachable from any of the given commits. | |
| 62 | 67 | + | |
| @@ -68,27 +73,70 @@ See also the `fetch.negotiationAlgorithm` and `push.negotiate` | |||
| 68 | 73 | configuration variables documented in linkgit:git-config[1], and the | |
| 69 | 74 | `--negotiate-only` option below. | |
| 70 | 75 | ||
| 71 | - | --negotiate-only:: | |
| 76 | + | `--negotiation-include=(<commit>|<glob>)`:: | |
| 77 | + | Ensure that the commits at the given tips are always sent as "have" | |
| 78 | + | lines during fetch negotiation, regardless of what the negotiation | |
| 79 | + | algorithm selects. This is useful to guarantee that common | |
| 80 | + | history reachable from specific refs is always considered, even | |
| 81 | + | when `--negotiation-restrict` restricts the set of tips or when | |
| 82 | + | the negotiation algorithm would otherwise skip them. | |
| 83 | + | + | |
| 84 | + | This option may be specified more than once; if so, each commit is sent | |
| 85 | + | unconditionally. | |
| 86 | + | + | |
| 87 | + | The argument may be an exact ref name (e.g. `refs/heads/release`), an | |
| 88 | + | object hash, or a glob pattern (e.g. `refs/heads/release/{asterisk}`). | |
| 89 | + | The pattern syntax is the same as for `--negotiation-restrict`. | |
| 90 | + | + | |
| 91 | + | If `--negotiation-restrict` is used, the have set is first restricted by | |
| 92 | + | that option and then increased to include the tips specified by | |
| 93 | + | `--negotiation-include`. | |
| 94 | + | + | |
| 95 | + | If this option is not specified on the command line, then any | |
| 96 | + | `remote.<name>.negotiationInclude` config values for the current remote | |
| 97 | + | are used instead. | |
| 98 | + | ||
| 99 | + | `--negotiate-only`:: | |
| 72 | 100 | Do not fetch anything from the server, and instead print the | |
| 73 | - | ancestors of the provided `--negotiation-tip=*` arguments, | |
| 101 | + | ancestors of the provided `--negotiation-restrict=` arguments, | |
| 74 | 102 | which we have in common with the server. | |
| 75 | 103 | + | |
| 76 | - | This is incompatible with `--recurse-submodules=[yes|on-demand]`. | |
| 104 | + | This is incompatible with `--recurse-submodules=(yes|on-demand)`. | |
| 77 | 105 | Internally this is used to implement the `push.negotiate` option, see | |
| 78 | 106 | linkgit:git-config[1]. | |
| 79 | 107 | ||
| 80 | - | --dry-run:: | |
| 108 | + | `--dry-run`:: | |
| 81 | 109 | Show what would be done, without making any changes. | |
| 82 | 110 | ||
| 83 | - | --porcelain:: | |
| 111 | + | `--porcelain`:: | |
| 84 | 112 | Print the output to standard output in an easy-to-parse format for | |
| 85 | 113 | scripts. See section OUTPUT in linkgit:git-fetch[1] for details. | |
| 86 | 114 | + | |
| 87 | - | This is incompatible with `--recurse-submodules=[yes|on-demand]` and takes | |
| 115 | + | This is incompatible with `--recurse-submodules=(yes|on-demand)` and takes | |
| 88 | 116 | precedence over the `fetch.output` config option. | |
| 89 | 117 | ||
| 118 | + | `--filter=<filter-spec>`:: | |
| 119 | + | Use the partial clone feature and request that the server sends | |
| 120 | + | a subset of reachable objects according to a given object filter. | |
| 121 | + | When using `--filter`, the supplied _<filter-spec>_ is used for | |
| 122 | + | the partial fetch. | |
| 123 | + | + | |
| 124 | + | If `--filter=auto` is used, the filter specification is determined | |
| 125 | + | automatically by combining the filter specifications advertised by | |
| 126 | + | the server for the promisor remotes that the client accepts (see | |
| 127 | + | linkgit:gitprotocol-v2[5] and the `promisor.acceptFromServer` | |
| 128 | + | configuration option in linkgit:git-config[1]). | |
| 129 | + | + | |
| 130 | + | For details on all other available filter specifications, see the | |
| 131 | + | `--filter=<filter-spec>` option in linkgit:git-rev-list[1]. | |
| 132 | + | + | |
| 133 | + | For example, `--filter=blob:none` will filter out all blobs (file | |
| 134 | + | contents) until needed by Git. Also, `--filter=blob:limit=<size>` will | |
| 135 | + | filter out all blobs of size at least _<size>_. | |
| 136 | + | ||
| 90 | 137 | ifndef::git-pull[] | |
| 91 | - | --[no-]write-fetch-head:: | |
| 138 | + | `--write-fetch-head`:: | |
| 139 | + | `--no-write-fetch-head`:: | |
| 92 | 140 | Write the list of remote refs fetched in the `FETCH_HEAD` | |
| 93 | 141 | file directly under `$GIT_DIR`. This is the default. | |
| 94 | 142 | Passing `--no-write-fetch-head` from the command line tells | |
| @@ -96,61 +144,65 @@ ifndef::git-pull[] | |||
| 96 | 144 | file is never written. | |
| 97 | 145 | endif::git-pull[] | |
| 98 | 146 | ||
| 99 | - | -f:: | |
| 100 | - | --force:: | |
| 101 | - | When 'git fetch' is used with `<src>:<dst>` refspec, it may | |
| 102 | - | refuse to update the local branch as discussed | |
| 147 | + | `-f`:: | |
| 148 | + | `--force`:: | |
| 103 | 149 | ifdef::git-pull[] | |
| 104 | - | in the `<refspec>` part of the linkgit:git-fetch[1] | |
| 105 | - | documentation. | |
| 150 | + | When `git fetch` is used with `<src>:<dst>` refspec, it may | |
| 151 | + | refuse to update the local branch as discussed | |
| 152 | + | in the _<refspec>_ part of the linkgit:git-fetch[1] | |
| 153 | + | documentation. | |
| 106 | 154 | endif::git-pull[] | |
| 107 | 155 | ifndef::git-pull[] | |
| 108 | - | in the `<refspec>` part below. | |
| 156 | + | When `git fetch` is used with `<src>:<dst>` refspec, it may | |
| 157 | + | refuse to update the local branch as discussed in the _<refspec>_ part below. | |
| 109 | 158 | endif::git-pull[] | |
| 110 | - | This option overrides that check. | |
| 159 | + | This option overrides that check. | |
| 111 | 160 | ||
| 112 | - | -k:: | |
| 113 | - | --keep:: | |
| 161 | + | `-k`:: | |
| 162 | + | `--keep`:: | |
| 114 | 163 | Keep downloaded pack. | |
| 115 | 164 | ||
| 116 | 165 | ifndef::git-pull[] | |
| 117 | - | --multiple:: | |
| 118 | - | Allow several <repository> and <group> arguments to be | |
| 119 | - | specified. No <refspec>s may be specified. | |
| 120 | - | ||
| 121 | - | --[no-]auto-maintenance:: | |
| 122 | - | --[no-]auto-gc:: | |
| 166 | + | `--multiple`:: | |
| 167 | + | Allow several _<repository>_ and _<group>_ arguments to be | |
| 168 | + | specified. No __<refspec>__s may be specified. | |
| 169 | + | ||
| 170 | + | `--auto-maintenance`:: | |
| 171 | + | `--no-auto-maintenance`:: | |
| 172 | + | `--auto-gc`:: | |
| 173 | + | `--no-auto-gc`:: | |
| 123 | 174 | Run `git maintenance run --auto` at the end to perform automatic | |
| 124 | - | repository maintenance if needed. (`--[no-]auto-gc` is a synonym.) | |
| 175 | + | repository maintenance if needed. | |
| 125 | 176 | This is enabled by default. | |
| 126 | 177 | ||
| 127 | - | --[no-]write-commit-graph:: | |
| 178 | + | `--write-commit-graph`:: | |
| 179 | + | `--no-write-commit-graph`:: | |
| 128 | 180 | Write a commit-graph after fetching. This overrides the config | |
| 129 | 181 | setting `fetch.writeCommitGraph`. | |
| 130 | 182 | endif::git-pull[] | |
| 131 | 183 | ||
| 132 | - | --prefetch:: | |
| 184 | + | `--prefetch`:: | |
| 133 | 185 | Modify the configured refspec to place all refs into the | |
| 134 | 186 | `refs/prefetch/` namespace. See the `prefetch` task in | |
| 135 | 187 | linkgit:git-maintenance[1]. | |
| 136 | 188 | ||
| 137 | - | -p:: | |
| 138 | - | --prune:: | |
| 189 | + | `-p`:: | |
| 190 | + | `--prune`:: | |
| 139 | 191 | Before fetching, remove any remote-tracking references that no | |
| 140 | 192 | longer exist on the remote. Tags are not subject to pruning | |
| 141 | 193 | if they are fetched only because of the default tag | |
| 142 | - | auto-following or due to a --tags option. However, if tags | |
| 194 | + | auto-following or due to a `--tags` option. However, if tags | |
| 143 | 195 | are fetched due to an explicit refspec (either on the command | |
| 144 | 196 | line or in the remote configuration, for example if the remote | |
| 145 | - | was cloned with the --mirror option), then they are also | |
| 197 | + | was cloned with the `--mirror` option), then they are also | |
| 146 | 198 | subject to pruning. Supplying `--prune-tags` is a shorthand for | |
| 147 | 199 | providing the tag refspec. | |
| 148 | 200 | ifndef::git-pull[] | |
| 149 | 201 | + | |
| 150 | 202 | See the PRUNING section below for more details. | |
| 151 | 203 | ||
| 152 | - | -P:: | |
| 153 | - | --prune-tags:: | |
| 204 | + | `-P`:: | |
| 205 | + | `--prune-tags`:: | |
| 154 | 206 | Before fetching, remove any local tags that no longer exist on | |
| 155 | 207 | the remote if `--prune` is enabled. This option should be used | |
| 156 | 208 | more carefully, unlike `--prune` it will remove any local | |
| @@ -163,17 +215,17 @@ See the PRUNING section below for more details. | |||
| 163 | 215 | endif::git-pull[] | |
| 164 | 216 | ||
| 165 | 217 | ifndef::git-pull[] | |
| 166 | - | -n:: | |
| 218 | + | `-n`:: | |
| 167 | 219 | endif::git-pull[] | |
| 168 | - | --no-tags:: | |
| 220 | + | `--no-tags`:: | |
| 169 | 221 | By default, tags that point at objects that are downloaded | |
| 170 | 222 | from the remote repository are fetched and stored locally. | |
| 171 | 223 | This option disables this automatic tag following. The default | |
| 172 | - | behavior for a remote may be specified with the remote.<name>.tagOpt | |
| 224 | + | behavior for a remote may be specified with the `remote.<name>.tagOpt` | |
| 173 | 225 | setting. See linkgit:git-config[1]. | |
| 174 | 226 | ||
| 175 | 227 | ifndef::git-pull[] | |
| 176 | - | --refetch:: | |
| 228 | + | `--refetch`:: | |
| 177 | 229 | Instead of negotiating with the server to avoid transferring commits and | |
| 178 | 230 | associated objects that are already present locally, this option fetches | |
| 179 | 231 | all objects as a fresh clone would. Use this to reapply a partial clone | |
| @@ -182,29 +234,29 @@ ifndef::git-pull[] | |||
| 182 | 234 | object database pack consolidation to remove any duplicate objects. | |
| 183 | 235 | endif::git-pull[] | |
| 184 | 236 | ||
| 185 | - | --refmap=<refspec>:: | |
| 237 | + | `--refmap=<refspec>`:: | |
| 186 | 238 | When fetching refs listed on the command line, use the | |
| 187 | 239 | specified refspec (can be given more than once) to map the | |
| 188 | 240 | refs to remote-tracking branches, instead of the values of | |
| 189 | - | `remote.*.fetch` configuration variables for the remote | |
| 190 | - | repository. Providing an empty `<refspec>` to the | |
| 241 | + | `remote.<name>.fetch` configuration variables for the remote | |
| 242 | + | repository. Providing an empty _<refspec>_ to the | |
| 191 | 243 | `--refmap` option causes Git to ignore the configured | |
| 192 | 244 | refspecs and rely entirely on the refspecs supplied as | |
| 193 | 245 | command-line arguments. See section on "Configured Remote-tracking | |
| 194 | 246 | Branches" for details. | |
| 195 | 247 | ||
| 196 | - | -t:: | |
| 197 | - | --tags:: | |
| 248 | + | `-t`:: | |
| 249 | + | `--tags`:: | |
| 198 | 250 | Fetch all tags from the remote (i.e., fetch remote tags | |
| 199 | 251 | `refs/tags/*` into local tags with the same name), in addition | |
| 200 | 252 | to whatever else would otherwise be fetched. Using this | |
| 201 | - | option alone does not subject tags to pruning, even if --prune | |
| 253 | + | option alone does not subject tags to pruning, even if `--prune` | |
| 202 | 254 | is used (though tags may be pruned anyway if they are also the | |
| 203 | 255 | destination of an explicit refspec; see `--prune`). | |
| 204 | 256 | ||
| 205 | 257 | ifndef::git-pull[] | |
| 206 | - | --recurse-submodules[=(yes|on-demand|no)]:: | |
| 207 | - | This option controls if and under what conditions new commits of | |
| 258 | + | `--recurse-submodules[=(yes|on-demand|no)]`:: | |
| 259 | + | Control if and under what conditions new commits of | |
| 208 | 260 | submodules should be fetched too. When recursing through submodules, | |
| 209 | 261 | `git fetch` always attempts to fetch "changed" submodules, that is, a | |
| 210 | 262 | submodule that has commits that are referenced by a newly fetched | |
| @@ -214,19 +266,21 @@ ifndef::git-pull[] | |||
| 214 | 266 | adds a new submodule, that submodule cannot be fetched until it is | |
| 215 | 267 | cloned e.g. by `git submodule update`. | |
| 216 | 268 | + | |
| 217 | - | When set to 'on-demand', only changed submodules are fetched. When set | |
| 218 | - | to 'yes', all populated submodules are fetched and submodules that are | |
| 219 | - | both unpopulated and changed are fetched. When set to 'no', submodules | |
| 269 | + | When set to `on-demand`, only changed submodules are fetched. When set | |
| 270 | + | to `yes`, all populated submodules are fetched and submodules that are | |
| 271 | + | both unpopulated and changed are fetched. When set to `no`, submodules | |
| 220 | 272 | are never fetched. | |
| 221 | 273 | + | |
| 222 | 274 | When unspecified, this uses the value of `fetch.recurseSubmodules` if it | |
| 223 | - | is set (see linkgit:git-config[1]), defaulting to 'on-demand' if unset. | |
| 224 | - | When this option is used without any value, it defaults to 'yes'. | |
| 275 | + | is set (see linkgit:git-config[1]), defaulting to `on-demand` if unset. | |
| 276 | + | When this option is used without any value, it defaults to `yes`. | |
| 225 | 277 | endif::git-pull[] | |
| 226 | 278 | ||
| 227 | - | -j:: | |
| 228 | - | --jobs=<n>:: | |
| 229 | - | Number of parallel children to be used for all forms of fetching. | |
| 279 | + | `-j <n>`:: | |
| 280 | + | `--jobs=<n>`:: | |
| 281 | + | Parallelize all forms of fetching up to _<n>_ jobs at a time. | |
| 282 | + | + | |
| 283 | + | A value of 0 will use some reasonable default. | |
| 230 | 284 | + | |
| 231 | 285 | If the `--multiple` option was specified, the different remotes will be fetched | |
| 232 | 286 | in parallel. If multiple submodules are fetched, they will be fetched in | |
| @@ -237,12 +291,12 @@ Typically, parallel recursive and multi-remote fetches will be faster. By | |||
| 237 | 291 | default fetches are performed sequentially, not in parallel. | |
| 238 | 292 | ||
| 239 | 293 | ifndef::git-pull[] | |
| 240 | - | --no-recurse-submodules:: | |
| 294 | + | `--no-recurse-submodules`:: | |
| 241 | 295 | Disable recursive fetching of submodules (this has the same effect as | |
| 242 | 296 | using the `--recurse-submodules=no` option). | |
| 243 | 297 | endif::git-pull[] | |
| 244 | 298 | ||
| 245 | - | --set-upstream:: | |
| 299 | + | `--set-upstream`:: | |
| 246 | 300 | If the remote is fetched successfully, add upstream | |
| 247 | 301 | (tracking) reference, used by argument-less | |
| 248 | 302 | linkgit:git-pull[1] and other commands. For more information, | |
| @@ -250,57 +304,57 @@ endif::git-pull[] | |||
| 250 | 304 | linkgit:git-config[1]. | |
| 251 | 305 | ||
| 252 | 306 | ifndef::git-pull[] | |
| 253 | - | --submodule-prefix=<path>:: | |
| 254 | - | Prepend <path> to paths printed in informative messages | |
| 307 | + | `--submodule-prefix=<path>`:: | |
| 308 | + | Prepend _<path>_ to paths printed in informative messages | |
| 255 | 309 | such as "Fetching submodule foo". This option is used | |
| 256 | 310 | internally when recursing over submodules. | |
| 257 | 311 | ||
| 258 | - | --recurse-submodules-default=[yes|on-demand]:: | |
| 312 | + | `--recurse-submodules-default=(yes|on-demand)`:: | |
| 259 | 313 | This option is used internally to temporarily provide a | |
| 260 | - | non-negative default value for the --recurse-submodules | |
| 314 | + | non-negative default value for the `--recurse-submodules` | |
| 261 | 315 | option. All other methods of configuring fetch's submodule | |
| 262 | 316 | recursion (such as settings in linkgit:gitmodules[5] and | |
| 263 | 317 | linkgit:git-config[1]) override this option, as does | |
| 264 | - | specifying --[no-]recurse-submodules directly. | |
| 318 | + | specifying `--[no-]recurse-submodules` directly. | |
| 265 | 319 | ||
| 266 | - | -u:: | |
| 267 | - | --update-head-ok:: | |
| 268 | - | By default 'git fetch' refuses to update the head which | |
| 320 | + | `-u`:: | |
| 321 | + | `--update-head-ok`:: | |
| 322 | + | By default `git fetch` refuses to update the head which | |
| 269 | 323 | corresponds to the current branch. This flag disables the | |
| 270 | - | check. This is purely for the internal use for 'git pull' | |
| 271 | - | to communicate with 'git fetch', and unless you are | |
| 324 | + | check. This is purely for the internal use for `git pull` | |
| 325 | + | to communicate with `git fetch`, and unless you are | |
| 272 | 326 | implementing your own Porcelain you are not supposed to | |
| 273 | 327 | use it. | |
| 274 | 328 | endif::git-pull[] | |
| 275 | 329 | ||
| 276 | - | --upload-pack <upload-pack>:: | |
| 330 | + | `--upload-pack <upload-pack>`:: | |
| 277 | 331 | When given, and the repository to fetch from is handled | |
| 278 | - | by 'git fetch-pack', `--exec=<upload-pack>` is passed to | |
| 332 | + | by `git fetch-pack`, `--exec=<upload-pack>` is passed to | |
| 279 | 333 | the command to specify non-default path for the command | |
| 280 | 334 | run on the other end. | |
| 281 | 335 | ||
| 282 | 336 | ifndef::git-pull[] | |
| 283 | - | -q:: | |
| 284 | - | --quiet:: | |
| 285 | - | Pass --quiet to git-fetch-pack and silence any other internally | |
| 337 | + | `-q`:: | |
| 338 | + | `--quiet`:: | |
| 339 | + | Pass `--quiet` to `git-fetch-pack` and silence any other internally | |
| 286 | 340 | used git commands. Progress is not reported to the standard error | |
| 287 | 341 | stream. | |
| 288 | 342 | ||
| 289 | - | -v:: | |
| 290 | - | --verbose:: | |
| 343 | + | `-v`:: | |
| 344 | + | `--verbose`:: | |
| 291 | 345 | Be verbose. | |
| 292 | 346 | endif::git-pull[] | |
| 293 | 347 | ||
| 294 | - | --progress:: | |
| 348 | + | `--progress`:: | |
| 295 | 349 | Progress status is reported on the standard error stream | |
| 296 | - | by default when it is attached to a terminal, unless -q | |
| 350 | + | by default when it is attached to a terminal, unless `-q` | |
| 297 | 351 | is specified. This flag forces progress status even if the | |
| 298 | 352 | standard error stream is not directed to a terminal. | |
| 299 | 353 | ||
| 300 | - | -o <option>:: | |
| 301 | - | --server-option=<option>:: | |
| 354 | + | `-o <option>`:: | |
| 355 | + | `--server-option=<option>`:: | |
| 302 | 356 | Transmit the given string to the server when communicating using | |
| 303 | - | protocol version 2. The given string must not contain a NUL or LF | |
| 357 | + | protocol version 2. The given string must not contain a _NUL_ or _LF_ | |
| 304 | 358 | character. The server's handling of server options, including | |
| 305 | 359 | unknown ones, is server-specific. | |
| 306 | 360 | When multiple `--server-option=<option>` are given, they are all | |
| @@ -309,23 +363,23 @@ endif::git-pull[] | |||
| 309 | 363 | the values of configuration variable `remote.<name>.serverOption` | |
| 310 | 364 | are used instead. | |
| 311 | 365 | ||
| 312 | - | --show-forced-updates:: | |
| 366 | + | `--show-forced-updates`:: | |
| 313 | 367 | By default, git checks if a branch is force-updated during | |
| 314 | - | fetch. This can be disabled through fetch.showForcedUpdates, but | |
| 315 | - | the --show-forced-updates option guarantees this check occurs. | |
| 368 | + | fetch. This can be disabled through `fetch.showForcedUpdates`, but | |
| 369 | + | the `--show-forced-updates` option guarantees this check occurs. | |
| 316 | 370 | See linkgit:git-config[1]. | |
| 317 | 371 | ||
| 318 | - | --no-show-forced-updates:: | |
| 372 | + | `--no-show-forced-updates`:: | |
| 319 | 373 | By default, git checks if a branch is force-updated during | |
| 320 | - | fetch. Pass --no-show-forced-updates or set fetch.showForcedUpdates | |
| 374 | + | fetch. Pass `--no-show-forced-updates` or set `fetch.showForcedUpdates` | |
| 321 | 375 | to false to skip this check for performance reasons. If used during | |
| 322 | - | 'git-pull' the --ff-only option will still check for forced updates | |
| 376 | + | `git-pull` the `--ff-only` option will still check for forced updates | |
| 323 | 377 | before attempting a fast-forward update. See linkgit:git-config[1]. | |
| 324 | 378 | ||
| 325 | - | -4:: | |
| 326 | - | --ipv4:: | |
| 379 | + | `-4`:: | |
| 380 | + | `--ipv4`:: | |
| 327 | 381 | Use IPv4 addresses only, ignoring IPv6 addresses. | |
| 328 | 382 | ||
| 329 | - | -6:: | |
| 330 | - | --ipv6:: | |
| 383 | + | `-6`:: | |
| 384 | + | `--ipv6`:: | |
| 331 | 385 | Use IPv6 addresses only, ignoring IPv4 addresses. | |
added Documentation/for-each-ref-options.adoc mode 100644
| @@ -0,0 +1,85 @@ | |||
| 1 | + | `<pattern>...`:: | |
| 2 | + | If one or more _<pattern>_ parameters are given, only refs are shown that | |
| 3 | + | match against at least one pattern, either using `fnmatch`(3) or | |
| 4 | + | literally, in the latter case matching completely or from the | |
| 5 | + | beginning up to a slash. | |
| 6 | + | ||
| 7 | + | `--stdin`:: | |
| 8 | + | The list of patterns is read from standard input instead of from | |
| 9 | + | the argument list. | |
| 10 | + | ||
| 11 | + | `--count=<count>`:: | |
| 12 | + | Stop after showing _<count>_ refs. | |
| 13 | + | ||
| 14 | + | `--sort=<key>`:: | |
| 15 | + | Sort on the field name _<key>_. Prefix `-` to sort in | |
| 16 | + | descending order of the value. When unspecified, | |
| 17 | + | `refname` is used. You may use the `--sort=<key>` option | |
| 18 | + | multiple times, in which case the last key becomes the primary | |
| 19 | + | key. | |
| 20 | + | ||
| 21 | + | `--format[=<format>]`:: | |
| 22 | + | A string that interpolates `%(fieldname)` from a ref being shown and | |
| 23 | + | the object it points at. In addition, the string literal `%%` | |
| 24 | + | renders as `%` and `%xx` - where `xx` are hex digits - renders as | |
| 25 | + | the character with hex code `xx`. For example, `%00` interpolates to | |
| 26 | + | `\0` (_NUL_), `%09` to `\t` (_TAB_), and `%0a` to `\n` (_LF_). | |
| 27 | + | ||
| 28 | + | When unspecified, _<format>_ defaults to `%(objectname) SPC %(objecttype) | |
| 29 | + | TAB %(refname)`. | |
| 30 | + | ||
| 31 | + | `--color[=<when>]`:: | |
| 32 | + | Respect any colors specified in the `--format` option. The | |
| 33 | + | _<when>_ field must be one of `always`, `never`, or `auto` (if | |
| 34 | + | _<when>_ is absent, behave as if `always` was given). | |
| 35 | + | ||
| 36 | + | `--shell`:: | |
| 37 | + | `--perl`:: | |
| 38 | + | `--python`:: | |
| 39 | + | `--tcl`:: | |
| 40 | + | If given, strings that substitute `%(fieldname)` | |
| 41 | + | placeholders are quoted as string literals suitable for | |
| 42 | + | the specified host language. This is meant to produce | |
| 43 | + | a scriptlet that can directly be "eval"ed. | |
| 44 | + | ||
| 45 | + | `--points-at=<object>`:: | |
| 46 | + | Only list refs which points at the given object. | |
| 47 | + | ||
| 48 | + | `--merged[=<object>]`:: | |
| 49 | + | Only list refs whose tips are reachable from the | |
| 50 | + | specified commit (`HEAD` if not specified). | |
| 51 | + | ||
| 52 | + | `--no-merged[=<object>]`:: | |
| 53 | + | Only list refs whose tips are not reachable from _<object>_(`HEAD` if not | |
| 54 | + | specified). | |
| 55 | + | ||
| 56 | + | `--contains[=<object>]`:: | |
| 57 | + | Only list refs which contain _<object>_(`HEAD` if not specified). | |
| 58 | + | ||
| 59 | + | `--no-contains[=<object>]`:: | |
| 60 | + | Only list refs which don't contain _<object>_ (`HEAD` | |
| 61 | + | if not specified). | |
| 62 | + | ||
| 63 | + | `--ignore-case`:: | |
| 64 | + | Sorting and filtering refs are case insensitive. | |
| 65 | + | ||
| 66 | + | `--omit-empty`:: | |
| 67 | + | Do not print a newline after formatted refs where the format expands | |
| 68 | + | to the empty string. | |
| 69 | + | ||
| 70 | + | `--exclude=<excluded-pattern>`:: | |
| 71 | + | If one or more `--exclude` options are given, only refs which do not | |
| 72 | + | match any _<excluded-pattern>_ parameters are shown. Matching is done | |
| 73 | + | using the same rules as _<pattern>_ above. | |
| 74 | + | ||
| 75 | + | `--include-root-refs`:: | |
| 76 | + | List root refs (`HEAD` and pseudorefs) apart from regular refs. | |
| 77 | + | ||
| 78 | + | `--start-after=<marker>`:: | |
| 79 | + | Allows paginating the output by skipping references up to and including the | |
| 80 | + | specified marker. When paging, it should be noted that references may be | |
| 81 | + | deleted, modified or added between invocations. Output will only yield those | |
| 82 | + | references which follow the marker lexicographically. Output begins from the | |
| 83 | + | first reference that would come after the marker alphabetically. Cannot be | |
| 84 | + | used with `--sort=<key>` or `--stdin` options, or the _<pattern>_ argument(s) | |
| 85 | + | to limit the refs. | |
added Documentation/format-patch-caveats.adoc mode 100644
| @@ -0,0 +1,33 @@ | |||
| 1 | + | The output from linkgit:git-format-patch[1] can lead to a different | |
| 2 | + | commit message when applied with linkgit:git-am[1]. The patch that is | |
| 3 | + | applied may also be different from the one that was generated, or patch | |
| 4 | + | application may fail outright. | |
| 5 | + | ifdef::git-am[] | |
| 6 | + | See the <<discussion,DISCUSSION>> section above for the syntactic rules. | |
| 7 | + | endif::git-am[] | |
| 8 | + | ||
| 9 | + | ifndef::git-am[] | |
| 10 | + | include::format-patch-end-of-commit-message.adoc[] | |
| 11 | + | endif::git-am[] | |
| 12 | + | ||
| 13 | + | Note that this is especially problematic for unindented diffs that occur | |
| 14 | + | in the commit message; the diff in the commit message might get applied | |
| 15 | + | along with the patch section, or the patch application machinery might | |
| 16 | + | trip up because the patch target doesn't apply. This could for example | |
| 17 | + | be caused by a diff in a Markdown code block. | |
| 18 | + | ||
| 19 | + | The solution for this is to indent the diff or other text that could | |
| 20 | + | cause problems. | |
| 21 | + | ||
| 22 | + | This loss of fidelity might be simple to notice if you are applying | |
| 23 | + | patches directly from a mailbox. However, changes originating from Git | |
| 24 | + | could be applied in bulk, in which case this would be much harder to | |
| 25 | + | notice. This could for example be a Linux distribution which uses patch | |
| 26 | + | files to apply changes on top of the commits from the upstream | |
| 27 | + | repositories. This goes to show that this behavior does not only impact | |
| 28 | + | email workflows. | |
| 29 | + | ||
| 30 | + | Given these limitations, one might be tempted to use a general-purpose | |
| 31 | + | utility like `patch`(1) instead. However, `patch`(1) will not only look for | |
| 32 | + | unindented diffs (like linkgit:git-am[1]) but will try to apply indented | |
| 33 | + | diffs as well. | |
added Documentation/format-patch-end-of-commit-message.adoc mode 100644
| @@ -0,0 +1,8 @@ | |||
| 1 | + | Any line that is of the form: | |
| 2 | + | ||
| 3 | + | * three-dashes and end-of-line, or | |
| 4 | + | * a line that begins with `diff -`, or | |
| 5 | + | * a line that begins with `Index: ` | |
| 6 | + | ||
| 7 | + | is taken as the beginning of a patch, and the commit log message | |
| 8 | + | is terminated before the first occurrence of such a line. | |
modified Documentation/fsck-msgids.adoc
| @@ -10,6 +10,15 @@ | |||
| 10 | 10 | `badFilemode`:: | |
| 11 | 11 | (INFO) A tree contains a bad filemode entry. | |
| 12 | 12 | ||
| 13 | + | `badGpgsig`:: | |
| 14 | + | (ERROR) A tag contains a bad (truncated) signature (e.g., `gpgsig`) header. | |
| 15 | + | ||
| 16 | + | `badHeadTarget`:: | |
| 17 | + | (ERROR) The `HEAD` ref is a symref that does not refer to a branch. | |
| 18 | + | ||
| 19 | + | `badHeaderContinuation`:: | |
| 20 | + | (ERROR) A continuation header (such as for `gpgsig`) is unexpectedly truncated. | |
| 21 | + | ||
| 13 | 22 | `badName`:: | |
| 14 | 23 | (ERROR) An author/committer name is empty. | |
| 15 | 24 | ||
| @@ -35,9 +44,15 @@ | |||
| 35 | 44 | `badRefName`:: | |
| 36 | 45 | (ERROR) A ref has an invalid format. | |
| 37 | 46 | ||
| 47 | + | `badRefOid`:: | |
| 48 | + | (ERROR) A ref points to an invalid object ID. | |
| 49 | + | ||
| 38 | 50 | `badReferentName`:: | |
| 39 | 51 | (ERROR) The referent name of a symref is invalid. | |
| 40 | 52 | ||
| 53 | + | `badReftableTableName`:: | |
| 54 | + | (WARN) A reftable table has an invalid name. | |
| 55 | + | ||
| 41 | 56 | `badTagName`:: | |
| 42 | 57 | (INFO) A tag has an invalid format. | |
| 43 | 58 | ||
| @@ -104,9 +119,6 @@ | |||
| 104 | 119 | `gitmodulesParse`:: | |
| 105 | 120 | (INFO) Could not parse `.gitmodules` blob. | |
| 106 | 121 | ||
| 107 | - | `gitmodulesLarge`; | |
| 108 | - | (ERROR) `.gitmodules` blob is too large to parse. | |
| 109 | - | ||
| 110 | 122 | `gitmodulesPath`:: | |
| 111 | 123 | (ERROR) `.gitmodules` path is invalid. | |
| 112 | 124 | ||
modified Documentation/git-add.adoc
| @@ -11,23 +11,23 @@ SYNOPSIS | |||
| 11 | 11 | git add [--verbose | -v] [--dry-run | -n] [--force | -f] [--interactive | -i] [--patch | -p] | |
| 12 | 12 | [--edit | -e] [--[no-]all | -A | --[no-]ignore-removal | [--update | -u]] [--sparse] | |
| 13 | 13 | [--intent-to-add | -N] [--refresh] [--ignore-errors] [--ignore-missing] [--renormalize] | |
| 14 | - | [--chmod=(+|-)x] [--pathspec-from-file=<file> [--pathspec-file-nul]] | |
| 14 | + | [--resolved] [--chmod=(+|-)x] [--pathspec-from-file=<file> [--pathspec-file-nul]] | |
| 15 | 15 | [--] [<pathspec>...] | |
| 16 | 16 | ||
| 17 | 17 | DESCRIPTION | |
| 18 | 18 | ----------- | |
| 19 | - | This command updates the index using the current content found in | |
| 20 | - | the working tree, to prepare the content staged for the next commit. | |
| 21 | - | It typically adds the current content of existing paths as a whole, | |
| 22 | - | but with some options it can also be used to add content with | |
| 23 | - | only part of the changes made to the working tree files applied, or | |
| 24 | - | remove paths that do not exist in the working tree anymore. | |
| 25 | - | ||
| 26 | - | The "index" holds a snapshot of the content of the working tree, and it | |
| 27 | - | is this snapshot that is taken as the contents of the next commit. Thus | |
| 28 | - | after making any changes to the working tree, and before running | |
| 29 | - | the commit command, you must use the `add` command to add any new or | |
| 30 | - | modified files to the index. | |
| 19 | + | Add contents of new or changed files to the index. The "index" (also | |
| 20 | + | known as the "staging area") is what you use to prepare the contents of | |
| 21 | + | the next commit. | |
| 22 | + | ||
| 23 | + | When you run `git commit` without any other arguments, it will only | |
| 24 | + | commit staged changes. For example, if you've edited `file.c` and want | |
| 25 | + | to commit your changes to that file, you can run: | |
| 26 | + | ||
| 27 | + | git add file.c | |
| 28 | + | git commit | |
| 29 | + | ||
| 30 | + | You can also add only part of your changes to a file with `git add -p`. | |
| 31 | 31 | ||
| 32 | 32 | This command can be performed multiple times before a commit. It only | |
| 33 | 33 | adds the content of the specified file(s) at the time the add command is | |
| @@ -37,12 +37,10 @@ you must run `git add` again to add the new content to the index. | |||
| 37 | 37 | The `git status` command can be used to obtain a summary of which | |
| 38 | 38 | files have changes that are staged for the next commit. | |
| 39 | 39 | ||
| 40 | - | The `git add` command will not add ignored files by default. If any | |
| 41 | - | ignored files were explicitly specified on the command line, `git add` | |
| 42 | - | will fail with a list of ignored files. Ignored files reached by | |
| 43 | - | directory recursion or filename globbing performed by Git (quote your | |
| 44 | - | globs before the shell) will be silently ignored. The `git add` command can | |
| 45 | - | be used to add ignored files with the `-f` (force) option. | |
| 40 | + | The `git add` command will not add ignored files by default. You can | |
| 41 | + | use the `--force` option to add ignored files. If you specify the exact | |
| 42 | + | filename of an ignored file, `git add` will fail with a list of ignored | |
| 43 | + | files. Otherwise it will silently ignore the file. | |
| 46 | 44 | ||
| 47 | 45 | Please see linkgit:git-commit[1] for alternative ways to add content to a | |
| 48 | 46 | commit. | |
| @@ -77,7 +75,10 @@ in linkgit:gitglossary[7]. | |||
| 77 | 75 | ||
| 78 | 76 | `-f`:: | |
| 79 | 77 | `--force`:: | |
| 80 | - | Allow adding otherwise ignored files. | |
| 78 | + | Allow adding otherwise ignored files. The option is also used when | |
| 79 | + | `submodule.<name>.ignore=all` is set, but you want to stage an | |
| 80 | + | update of the submodule. The `path` to the submodule must be explicitly | |
| 81 | + | specified. | |
| 81 | 82 | ||
| 82 | 83 | `--sparse`:: | |
| 83 | 84 | Allow updating index entries outside of the sparse-checkout cone. | |
| @@ -104,6 +105,8 @@ This effectively runs `add --interactive`, but bypasses the | |||
| 104 | 105 | initial command menu and directly jumps to the `patch` subcommand. | |
| 105 | 106 | See ``Interactive mode'' for details. | |
| 106 | 107 | ||
| 108 | + | include::diff-context-options.adoc[] | |
| 109 | + | ||
| 107 | 110 | `-e`:: | |
| 108 | 111 | `--edit`:: | |
| 109 | 112 | Open the diff vs. the index in an editor and let the user | |
| @@ -192,6 +195,14 @@ for `git add --no-all <pathspec>...`, i.e. ignored removed files. | |||
| 192 | 195 | while a _CRLF_ cleans to _LF_, a _CRCRLF_ sequence is only partially | |
| 193 | 196 | cleaned to _CRLF_. | |
| 194 | 197 | ||
| 198 | + | `--resolved`:: | |
| 199 | + | Update the index for unmerged paths matching _<pathspec>_ where | |
| 200 | + | no conflict markers remain in the working tree. Unmerged paths | |
| 201 | + | without conflict markers (including binary files and file | |
| 202 | + | deletions) are staged as resolved, while any path with leftover | |
| 203 | + | conflict markers causes the command to refuse to stage any files. | |
| 204 | + | Cannot be combined with `-u` or `-A`. | |
| 205 | + | ||
| 195 | 206 | `--chmod=(+|-)x`:: | |
| 196 | 207 | Override the executable bit of the added files. The executable | |
| 197 | 208 | bit is only changed in the index, the files on disk are left | |
| @@ -342,13 +353,14 @@ patch:: | |||
| 342 | 353 | d - do not stage this hunk or any of the later hunks in the file | |
| 343 | 354 | g - select a hunk to go to | |
| 344 | 355 | / - search for a hunk matching the given regex | |
| 345 | - | j - leave this hunk undecided, see next undecided hunk | |
| 346 | - | J - leave this hunk undecided, see next hunk | |
| 347 | - | k - leave this hunk undecided, see previous undecided hunk | |
| 348 | - | K - leave this hunk undecided, see previous hunk | |
| 356 | + | j - go to the next undecided hunk, roll over at the bottom | |
| 357 | + | J - go to the next hunk, roll over at the bottom | |
| 358 | + | k - go to the previous undecided hunk, roll over at the top | |
| 359 | + | K - go to the previous hunk, roll over at the top | |
| 349 | 360 | s - split the current hunk into smaller hunks | |
| 350 | 361 | e - manually edit the current hunk | |
| 351 | 362 | p - print the current hunk | |
| 363 | + | P - print the current hunk using the pager | |
| 352 | 364 | ? - print help | |
| 353 | 365 | + | |
| 354 | 366 | After deciding the fate for all hunks, if there is any hunk | |
modified Documentation/git-am.adoc
| @@ -8,17 +8,17 @@ git-am - Apply a series of patches from a mailbox | |||
| 8 | 8 | ||
| 9 | 9 | SYNOPSIS | |
| 10 | 10 | -------- | |
| 11 | - | [verse] | |
| 12 | - | 'git am' [--signoff] [--keep] [--[no-]keep-cr] [--[no-]utf8] [--no-verify] | |
| 11 | + | [synopsis] | |
| 12 | + | git am [--signoff] [--keep] [--[no-]keep-cr] [--[no-]utf8] [--[no-]verify] | |
| 13 | 13 | [--[no-]3way] [--interactive] [--committer-date-is-author-date] | |
| 14 | 14 | [--ignore-date] [--ignore-space-change | --ignore-whitespace] | |
| 15 | 15 | [--whitespace=<action>] [-C<n>] [-p<n>] [--directory=<dir>] | |
| 16 | 16 | [--exclude=<path>] [--include=<path>] [--reject] [-q | --quiet] | |
| 17 | - | [--[no-]scissors] [-S[<keyid>]] [--patch-format=<format>] | |
| 17 | + | [--[no-]scissors] [-S[<key-id>]] [--patch-format=<format>] | |
| 18 | 18 | [--quoted-cr=<action>] | |
| 19 | 19 | [--empty=(stop|drop|keep)] | |
| 20 | 20 | [(<mbox> | <Maildir>)...] | |
| 21 | - | 'git am' (--continue | --skip | --abort | --quit | --retry | --show-current-patch[=(diff|raw)] | --allow-empty) | |
| 21 | + | git am (--continue | --skip | --abort | --quit | --retry | --show-current-patch[=(diff|raw)] | --allow-empty) | |
| 22 | 22 | ||
| 23 | 23 | DESCRIPTION | |
| 24 | 24 | ----------- | |
| @@ -30,43 +30,45 @@ history without merges. | |||
| 30 | 30 | ||
| 31 | 31 | OPTIONS | |
| 32 | 32 | ------- | |
| 33 | - | (<mbox>|<Maildir>)...:: | |
| 33 | + | `(<mbox>|<Maildir>)...`:: | |
| 34 | 34 | The list of mailbox files to read patches from. If you do not | |
| 35 | 35 | supply this argument, the command reads from the standard input. | |
| 36 | 36 | If you supply directories, they will be treated as Maildirs. | |
| 37 | 37 | ||
| 38 | - | -s:: | |
| 39 | - | --signoff:: | |
| 40 | - | Add a `Signed-off-by` trailer to the commit message, using | |
| 41 | - | the committer identity of yourself. | |
| 42 | - | See the signoff option in linkgit:git-commit[1] for more information. | |
| 38 | + | `-s`:: | |
| 39 | + | `--signoff`:: | |
| 40 | + | Add a `Signed-off-by` trailer to the commit message (see | |
| 41 | + | linkgit:git-interpret-trailers[1]), using the committer identity | |
| 42 | + | of yourself. See the signoff option in linkgit:git-commit[1] | |
| 43 | + | for more information. | |
| 43 | 44 | ||
| 44 | - | -k:: | |
| 45 | - | --keep:: | |
| 46 | - | Pass `-k` flag to 'git mailinfo' (see linkgit:git-mailinfo[1]). | |
| 45 | + | `-k`:: | |
| 46 | + | `--keep`:: | |
| 47 | + | Pass `-k` flag to linkgit:git-mailinfo[1]. | |
| 47 | 48 | ||
| 48 | - | --keep-non-patch:: | |
| 49 | - | Pass `-b` flag to 'git mailinfo' (see linkgit:git-mailinfo[1]). | |
| 49 | + | `--keep-non-patch`:: | |
| 50 | + | Pass `-b` flag to linkgit:git-mailinfo[1]. | |
| 50 | 51 | ||
| 51 | - | --[no-]keep-cr:: | |
| 52 | - | With `--keep-cr`, call 'git mailsplit' (see linkgit:git-mailsplit[1]) | |
| 52 | + | `--keep-cr`:: | |
| 53 | + | `--no-keep-cr`:: | |
| 54 | + | With `--keep-cr`, call linkgit:git-mailsplit[1] | |
| 53 | 55 | with the same option, to prevent it from stripping CR at the end of | |
| 54 | 56 | lines. `am.keepcr` configuration variable can be used to specify the | |
| 55 | 57 | default behaviour. `--no-keep-cr` is useful to override `am.keepcr`. | |
| 56 | 58 | ||
| 57 | - | -c:: | |
| 58 | - | --scissors:: | |
| 59 | + | `-c`:: | |
| 60 | + | `--scissors`:: | |
| 59 | 61 | Remove everything in body before a scissors line (see | |
| 60 | 62 | linkgit:git-mailinfo[1]). Can be activated by default using | |
| 61 | 63 | the `mailinfo.scissors` configuration variable. | |
| 62 | 64 | ||
| 63 | - | --no-scissors:: | |
| 65 | + | `--no-scissors`:: | |
| 64 | 66 | Ignore scissors lines (see linkgit:git-mailinfo[1]). | |
| 65 | 67 | ||
| 66 | - | --quoted-cr=<action>:: | |
| 67 | - | This flag will be passed down to 'git mailinfo' (see linkgit:git-mailinfo[1]). | |
| 68 | + | `--quoted-cr=<action>`:: | |
| 69 | + | This flag will be passed down to linkgit:git-mailinfo[1]. | |
| 68 | 70 | ||
| 69 | - | --empty=(drop|keep|stop):: | |
| 71 | + | `--empty=(drop|keep|stop)`:: | |
| 70 | 72 | How to handle an e-mail message lacking a patch: | |
| 71 | 73 | + | |
| 72 | 74 | -- | |
| @@ -80,24 +82,24 @@ OPTIONS | |||
| 80 | 82 | session. This is the default behavior. | |
| 81 | 83 | -- | |
| 82 | 84 | ||
| 83 | - | -m:: | |
| 84 | - | --message-id:: | |
| 85 | - | Pass the `-m` flag to 'git mailinfo' (see linkgit:git-mailinfo[1]), | |
| 86 | - | so that the Message-ID header is added to the commit message. | |
| 85 | + | `-m`:: | |
| 86 | + | `--message-id`:: | |
| 87 | + | Pass the `-m` flag to linkgit:git-mailinfo[1], | |
| 88 | + | so that the `Message-ID` header is added to the commit message. | |
| 87 | 89 | The `am.messageid` configuration variable can be used to specify | |
| 88 | 90 | the default behaviour. | |
| 89 | 91 | ||
| 90 | - | --no-message-id:: | |
| 92 | + | `--no-message-id`:: | |
| 91 | 93 | Do not add the Message-ID header to the commit message. | |
| 92 | - | `no-message-id` is useful to override `am.messageid`. | |
| 94 | + | `--no-message-id` is useful to override `am.messageid`. | |
| 93 | 95 | ||
| 94 | - | -q:: | |
| 95 | - | --quiet:: | |
| 96 | + | `-q`:: | |
| 97 | + | `--quiet`:: | |
| 96 | 98 | Be quiet. Only print error messages. | |
| 97 | 99 | ||
| 98 | - | -u:: | |
| 99 | - | --utf8:: | |
| 100 | - | Pass `-u` flag to 'git mailinfo' (see linkgit:git-mailinfo[1]). | |
| 100 | + | `-u`:: | |
| 101 | + | `--utf8`:: | |
| 102 | + | Pass `-u` flag to linkgit:git-mailinfo[1]. | |
| 101 | 103 | The proposed commit log message taken from the e-mail | |
| 102 | 104 | is re-coded into UTF-8 encoding (configuration variable | |
| 103 | 105 | `i18n.commitEncoding` can be used to specify the project's | |
| @@ -106,85 +108,93 @@ OPTIONS | |||
| 106 | 108 | This was optional in prior versions of git, but now it is the | |
| 107 | 109 | default. You can use `--no-utf8` to override this. | |
| 108 | 110 | ||
| 109 | - | --no-utf8:: | |
| 110 | - | Pass `-n` flag to 'git mailinfo' (see | |
| 111 | - | linkgit:git-mailinfo[1]). | |
| 111 | + | `--no-utf8`:: | |
| 112 | + | Pass `-n` flag to linkgit:git-mailinfo[1]. | |
| 112 | 113 | ||
| 113 | - | -3:: | |
| 114 | - | --3way:: | |
| 115 | - | --no-3way:: | |
| 114 | + | `-3`:: | |
| 115 | + | `--3way`:: | |
| 116 | + | `--no-3way`:: | |
| 116 | 117 | When the patch does not apply cleanly, fall back on | |
| 117 | 118 | 3-way merge if the patch records the identity of blobs | |
| 118 | 119 | it is supposed to apply to and we have those blobs | |
| 119 | 120 | available locally. `--no-3way` can be used to override | |
| 120 | - | am.threeWay configuration variable. For more information, | |
| 121 | - | see am.threeWay in linkgit:git-config[1]. | |
| 121 | + | `am.threeWay` configuration variable. For more information, | |
| 122 | + | see `am.threeWay` in linkgit:git-config[1]. | |
| 122 | 123 | ||
| 123 | 124 | include::rerere-options.adoc[] | |
| 124 | 125 | ||
| 125 | - | --ignore-space-change:: | |
| 126 | - | --ignore-whitespace:: | |
| 127 | - | --whitespace=<action>:: | |
| 128 | - | -C<n>:: | |
| 129 | - | -p<n>:: | |
| 130 | - | --directory=<dir>:: | |
| 131 | - | --exclude=<path>:: | |
| 132 | - | --include=<path>:: | |
| 133 | - | --reject:: | |
| 134 | - | These flags are passed to the 'git apply' (see linkgit:git-apply[1]) | |
| 135 | - | program that applies | |
| 136 | - | the patch. | |
| 126 | + | `--ignore-space-change`:: | |
| 127 | + | `--ignore-whitespace`:: | |
| 128 | + | `--whitespace=<action>`:: | |
| 129 | + | `-C<n>`:: | |
| 130 | + | `-p<n>`:: | |
| 131 | + | `--directory=<dir>`:: | |
| 132 | + | `--exclude=<path>`:: | |
| 133 | + | `--include=<path>`:: | |
| 134 | + | `--reject`:: | |
| 135 | + | These flags are passed to the linkgit:git-apply[1] program that | |
| 136 | + | applies the patch. | |
| 137 | 137 | + | |
| 138 | - | Valid <action> for the `--whitespace` option are: | |
| 138 | + | Valid _<action>_ for the `--whitespace` option are: | |
| 139 | 139 | `nowarn`, `warn`, `fix`, `error`, and `error-all`. | |
| 140 | 140 | ||
| 141 | - | --patch-format:: | |
| 141 | + | `--patch-format`:: | |
| 142 | 142 | By default the command will try to detect the patch format | |
| 143 | 143 | automatically. This option allows the user to bypass the automatic | |
| 144 | 144 | detection and specify the patch format that the patch(es) should be | |
| 145 | 145 | interpreted as. Valid formats are mbox, mboxrd, | |
| 146 | 146 | stgit, stgit-series, and hg. | |
| 147 | 147 | ||
| 148 | - | -i:: | |
| 149 | - | --interactive:: | |
| 148 | + | `-i`:: | |
| 149 | + | `--interactive`:: | |
| 150 | 150 | Run interactively. | |
| 151 | 151 | ||
| 152 | - | -n:: | |
| 153 | - | --no-verify:: | |
| 154 | - | By default, the pre-applypatch and applypatch-msg hooks are run. | |
| 155 | - | When any of `--no-verify` or `-n` is given, these are bypassed. | |
| 156 | - | See also linkgit:githooks[5]. | |
| 152 | + | `--verify`:: | |
| 153 | + | `-n`:: | |
| 154 | + | `--no-verify`:: | |
| 155 | + | Run the `pre-applypatch` and `applypatch-msg` hooks. This is the | |
| 156 | + | default. Skip these hooks with `-n` or `--no-verify`. See also | |
| 157 | + | linkgit:githooks[5]. | |
| 158 | + | + | |
| 159 | + | Note that `post-applypatch` cannot be skipped. | |
| 157 | 160 | ||
| 158 | - | --committer-date-is-author-date:: | |
| 161 | + | `--committer-date-is-author-date`:: | |
| 159 | 162 | By default the command records the date from the e-mail | |
| 160 | 163 | message as the commit author date, and uses the time of | |
| 161 | 164 | commit creation as the committer date. This allows the | |
| 162 | 165 | user to lie about the committer date by using the same | |
| 163 | 166 | value as the author date. | |
| 164 | - | ||
| 165 | - | --ignore-date:: | |
| 167 | + | + | |
| 168 | + | WARNING: The history walking machinery assumes that commits have | |
| 169 | + | non-decreasing commit timestamps. You should consider if you really need | |
| 170 | + | to use this option. Then you should only use this option to override the | |
| 171 | + | committer date when applying commits on top of a base which commit is | |
| 172 | + | older (in terms of the commit date) than the oldest patch you are | |
| 173 | + | applying. | |
| 174 | + | ||
| 175 | + | `--ignore-date`:: | |
| 166 | 176 | By default the command records the date from the e-mail | |
| 167 | 177 | message as the commit author date, and uses the time of | |
| 168 | 178 | commit creation as the committer date. This allows the | |
| 169 | 179 | user to lie about the author date by using the same | |
| 170 | 180 | value as the committer date. | |
| 171 | 181 | ||
| 172 | - | --skip:: | |
| 182 | + | `--skip`:: | |
| 173 | 183 | Skip the current patch. This is only meaningful when | |
| 174 | 184 | restarting an aborted patch. | |
| 175 | 185 | ||
| 176 | - | -S[<keyid>]:: | |
| 177 | - | --gpg-sign[=<keyid>]:: | |
| 178 | - | --no-gpg-sign:: | |
| 179 | - | GPG-sign commits. The `keyid` argument is optional and | |
| 186 | + | `-S[<key-id>]`:: | |
| 187 | + | `--gpg-sign[=<key-id>]`:: | |
| 188 | + | `--no-gpg-sign`:: | |
| 189 | + | GPG-sign commits. The _<key-id>_ is optional and | |
| 180 | 190 | defaults to the committer identity; if specified, it must be | |
| 181 | 191 | stuck to the option without a space. `--no-gpg-sign` is useful to | |
| 182 | 192 | countermand both `commit.gpgSign` configuration variable, and | |
| 183 | 193 | earlier `--gpg-sign`. | |
| 184 | 194 | ||
| 185 | - | --continue:: | |
| 186 | - | -r:: | |
| 187 | - | --resolved:: | |
| 195 | + | `--continue`:: | |
| 196 | + | `-r`:: | |
| 197 | + | `--resolved`:: | |
| 188 | 198 | After a patch failure (e.g. attempting to apply | |
| 189 | 199 | conflicting patch), the user has applied it by hand and | |
| 190 | 200 | the index file stores the result of the application. | |
| @@ -192,39 +202,41 @@ Valid <action> for the `--whitespace` option are: | |||
| 192 | 202 | extracted from the e-mail message and the current index | |
| 193 | 203 | file, and continue. | |
| 194 | 204 | ||
| 195 | - | --resolvemsg=<msg>:: | |
| 196 | - | When a patch failure occurs, <msg> will be printed | |
| 205 | + | `--resolvemsg=<msg>`:: | |
| 206 | + | When a patch failure occurs, _<msg>_ will be printed | |
| 197 | 207 | to the screen before exiting. This overrides the | |
| 198 | 208 | standard message informing you to use `--continue` | |
| 199 | 209 | or `--skip` to handle the failure. This is solely | |
| 200 | - | for internal use between 'git rebase' and 'git am'. | |
| 210 | + | for internal use between linkgit:git-rebase[1] and | |
| 211 | + | linkgit:git-am[1]. | |
| 201 | 212 | ||
| 202 | - | --abort:: | |
| 213 | + | `--abort`:: | |
| 203 | 214 | Restore the original branch and abort the patching operation. | |
| 204 | 215 | Revert the contents of files involved in the am operation to their | |
| 205 | 216 | pre-am state. | |
| 206 | 217 | ||
| 207 | - | --quit:: | |
| 208 | - | Abort the patching operation but keep HEAD and the index | |
| 218 | + | `--quit`:: | |
| 219 | + | Abort the patching operation but keep `HEAD` and the index | |
| 209 | 220 | untouched. | |
| 210 | 221 | ||
| 211 | - | --retry:: | |
| 222 | + | `--retry`:: | |
| 212 | 223 | Try to apply the last conflicting patch again. This is generally | |
| 213 | 224 | only useful for passing extra options to the retry attempt | |
| 214 | 225 | (e.g., `--3way`), since otherwise you'll just see the same | |
| 215 | 226 | failure again. | |
| 216 | 227 | ||
| 217 | - | --show-current-patch[=(diff|raw)]:: | |
| 218 | - | Show the message at which `git am` has stopped due to | |
| 228 | + | `--show-current-patch[=(diff|raw)]`:: | |
| 229 | + | Show the message at which linkgit:git-am[1] has stopped due to | |
| 219 | 230 | conflicts. If `raw` is specified, show the raw contents of | |
| 220 | 231 | the e-mail message; if `diff`, show the diff portion only. | |
| 221 | 232 | Defaults to `raw`. | |
| 222 | 233 | ||
| 223 | - | --allow-empty:: | |
| 234 | + | `--allow-empty`:: | |
| 224 | 235 | After a patch failure on an input e-mail message lacking a patch, | |
| 225 | 236 | create an empty commit with the contents of the e-mail message | |
| 226 | 237 | as its log message. | |
| 227 | 238 | ||
| 239 | + | [[discussion]] | |
| 228 | 240 | DISCUSSION | |
| 229 | 241 | ---------- | |
| 230 | 242 | ||
| @@ -244,16 +256,13 @@ where the patch begins. Excess whitespace at the end of each | |||
| 244 | 256 | line is automatically stripped. | |
| 245 | 257 | ||
| 246 | 258 | The patch is expected to be inline, directly following the | |
| 247 | - | message. Any line that is of the form: | |
| 248 | - | ||
| 249 | - | * three-dashes and end-of-line, or | |
| 250 | - | * a line that begins with "diff -", or | |
| 251 | - | * a line that begins with "Index: " | |
| 259 | + | message. | |
| 260 | + | include::format-patch-end-of-commit-message.adoc[] | |
| 252 | 261 | ||
| 253 | - | is taken as the beginning of a patch, and the commit log message | |
| 254 | - | is terminated before the first occurrence of such a line. | |
| 262 | + | This means that the contents of the commit message can inadvertently | |
| 263 | + | interrupt the processing (see the <<caveats,CAVEATS>> section below). | |
| 255 | 264 | ||
| 256 | - | When initially invoking `git am`, you give it the names of the mailboxes | |
| 265 | + | When initially invoking linkgit:git-am[1], you give it the names of the mailboxes | |
| 257 | 266 | to process. Upon seeing the first patch that does not apply, it | |
| 258 | 267 | aborts in the middle. You can recover from this in one of two ways: | |
| 259 | 268 | ||
| @@ -269,11 +278,18 @@ operation is finished, so if you decide to start over from scratch, | |||
| 269 | 278 | run `git am --abort` before running the command with mailbox | |
| 270 | 279 | names. | |
| 271 | 280 | ||
| 272 | - | Before any patches are applied, ORIG_HEAD is set to the tip of the | |
| 281 | + | Before any patches are applied, `ORIG_HEAD` is set to the tip of the | |
| 273 | 282 | current branch. This is useful if you have problems with multiple | |
| 274 | - | commits, like running 'git am' on the wrong branch or an error in the | |
| 275 | - | commits that is more easily fixed by changing the mailbox (e.g. | |
| 276 | - | errors in the "From:" lines). | |
| 283 | + | commits, like running linkgit:git-am[1] on the wrong branch or an error | |
| 284 | + | in the commits that is more easily fixed by changing the mailbox (e.g. | |
| 285 | + | errors in the `From:` lines). | |
| 286 | + | ||
| 287 | + | [[caveats]] | |
| 288 | + | CAVEATS | |
| 289 | + | ------- | |
| 290 | + | ||
| 291 | + | :git-am: 1 | |
| 292 | + | include::format-patch-caveats.adoc[] | |
| 277 | 293 | ||
| 278 | 294 | HOOKS | |
| 279 | 295 | ----- | |
| @@ -281,6 +297,8 @@ This command can run `applypatch-msg`, `pre-applypatch`, | |||
| 281 | 297 | and `post-applypatch` hooks. See linkgit:githooks[5] for more | |
| 282 | 298 | information. | |
| 283 | 299 | ||
| 300 | + | See the `--verify`/`-n`/`--no-verify` options. | |
| 301 | + | ||
| 284 | 302 | CONFIGURATION | |
| 285 | 303 | ------------- | |
| 286 | 304 | ||
modified Documentation/git-apply.adoc
| @@ -8,8 +8,8 @@ git-apply - Apply a patch to files and/or to the index | |||
| 8 | 8 | ||
| 9 | 9 | SYNOPSIS | |
| 10 | 10 | -------- | |
| 11 | - | [verse] | |
| 12 | - | 'git apply' [--stat] [--numstat] [--summary] [--check] | |
| 11 | + | [synopsis] | |
| 12 | + | git apply [--stat] [--numstat] [--summary] [--check] | |
| 13 | 13 | [--index | --intent-to-add] [--3way] [--ours | --theirs | --union] | |
| 14 | 14 | [--apply] [--no-add] [--build-fake-ancestor=<file>] [-R | --reverse] | |
| 15 | 15 | [--allow-binary-replacement | --binary] [--reject] [-z] | |
| @@ -35,33 +35,33 @@ linkgit:git-format-patch[1] and/or received by email. | |||
| 35 | 35 | ||
| 36 | 36 | OPTIONS | |
| 37 | 37 | ------- | |
| 38 | - | <patch>...:: | |
| 39 | - | The files to read the patch from. '-' can be used to read | |
| 38 | + | `<patch>...`:: | |
| 39 | + | The files to read the patch from. `-` can be used to read | |
| 40 | 40 | from the standard input. | |
| 41 | 41 | ||
| 42 | - | --stat:: | |
| 42 | + | `--stat`:: | |
| 43 | 43 | Instead of applying the patch, output diffstat for the | |
| 44 | 44 | input. Turns off "apply". | |
| 45 | 45 | ||
| 46 | - | --numstat:: | |
| 46 | + | `--numstat`:: | |
| 47 | 47 | Similar to `--stat`, but shows the number of added and | |
| 48 | 48 | deleted lines in decimal notation and the pathname without | |
| 49 | 49 | abbreviation, to make it more machine friendly. For | |
| 50 | 50 | binary files, outputs two `-` instead of saying | |
| 51 | 51 | `0 0`. Turns off "apply". | |
| 52 | 52 | ||
| 53 | - | --summary:: | |
| 53 | + | `--summary`:: | |
| 54 | 54 | Instead of applying the patch, output a condensed | |
| 55 | 55 | summary of information obtained from git diff extended | |
| 56 | 56 | headers, such as creations, renames, and mode changes. | |
| 57 | 57 | Turns off "apply". | |
| 58 | 58 | ||
| 59 | - | --check:: | |
| 59 | + | `--check`:: | |
| 60 | 60 | Instead of applying the patch, see if the patch is | |
| 61 | 61 | applicable to the current working tree and/or the index | |
| 62 | 62 | file and detects errors. Turns off "apply". | |
| 63 | 63 | ||
| 64 | - | --index:: | |
| 64 | + | `--index`:: | |
| 65 | 65 | Apply the patch to both the index and the working tree (or | |
| 66 | 66 | merely check that it would apply cleanly to both if `--check` is | |
| 67 | 67 | in effect). Note that `--index` expects index entries and | |
| @@ -70,21 +70,22 @@ OPTIONS | |||
| 70 | 70 | raise an error if they are not, even if the patch would apply | |
| 71 | 71 | cleanly to both the index and the working tree in isolation. | |
| 72 | 72 | ||
| 73 | - | --cached:: | |
| 73 | + | `--cached`:: | |
| 74 | 74 | Apply the patch to just the index, without touching the working | |
| 75 | 75 | tree. If `--check` is in effect, merely check that it would | |
| 76 | 76 | apply cleanly to the index entry. | |
| 77 | 77 | ||
| 78 | - | --intent-to-add:: | |
| 78 | + | `-N`:: | |
| 79 | + | `--intent-to-add`:: | |
| 79 | 80 | When applying the patch only to the working tree, mark new | |
| 80 | 81 | files to be added to the index later (see `--intent-to-add` | |
| 81 | - | option in linkgit:git-add[1]). This option is ignored unless | |
| 82 | - | running in a Git repository and `--index` is not specified. | |
| 83 | - | Note that `--index` could be implied by other options such | |
| 84 | - | as `--cached` or `--3way`. | |
| 82 | + | option in linkgit:git-add[1]). This option is ignored if | |
| 83 | + | `--index` or `--cached` are used, and has no effect outside a Git | |
| 84 | + | repository. Note that `--index` could be implied by other options | |
| 85 | + | such as `--3way`. | |
| 85 | 86 | ||
| 86 | - | -3:: | |
| 87 | - | --3way:: | |
| 87 | + | `-3`:: | |
| 88 | + | `--3way`:: | |
| 88 | 89 | Attempt 3-way merge if the patch records the identity of blobs it is supposed | |
| 89 | 90 | to apply to and we have those blobs available locally, possibly leaving the | |
| 90 | 91 | conflict markers in the files in the working tree for the user to | |
| @@ -93,14 +94,14 @@ OPTIONS | |||
| 93 | 94 | When used with the `--cached` option, any conflicts are left at higher stages | |
| 94 | 95 | in the cache. | |
| 95 | 96 | ||
| 96 | - | --ours:: | |
| 97 | - | --theirs:: | |
| 98 | - | --union:: | |
| 97 | + | `--ours`:: | |
| 98 | + | `--theirs`:: | |
| 99 | + | `--union`:: | |
| 99 | 100 | Instead of leaving conflicts in the file, resolve conflicts favouring | |
| 100 | - | our (or their or both) side of the lines. Requires --3way. | |
| 101 | + | our (or their or both) side of the lines. Requires `--3way`. | |
| 101 | 102 | ||
| 102 | - | --build-fake-ancestor=<file>:: | |
| 103 | - | Newer 'git diff' output has embedded 'index information' | |
| 103 | + | `--build-fake-ancestor=<file>`:: | |
| 104 | + | Newer `git diff` output has embedded 'index information' | |
| 104 | 105 | for each blob to help identify the original version that | |
| 105 | 106 | the patch applies to. When this flag is given, and if | |
| 106 | 107 | the original versions of the blobs are available locally, | |
| @@ -109,18 +110,18 @@ OPTIONS | |||
| 109 | 110 | When a pure mode change is encountered (which has no index information), | |
| 110 | 111 | the information is read from the current index instead. | |
| 111 | 112 | ||
| 112 | - | -R:: | |
| 113 | - | --reverse:: | |
| 113 | + | `-R`:: | |
| 114 | + | `--reverse`:: | |
| 114 | 115 | Apply the patch in reverse. | |
| 115 | 116 | ||
| 116 | - | --reject:: | |
| 117 | - | For atomicity, 'git apply' by default fails the whole patch and | |
| 117 | + | `--reject`:: | |
| 118 | + | For atomicity, `git apply` by default fails the whole patch and | |
| 118 | 119 | does not touch the working tree when some of the hunks | |
| 119 | 120 | do not apply. This option makes it apply | |
| 120 | 121 | the parts of the patch that are applicable, and leave the | |
| 121 | - | rejected hunks in corresponding *.rej files. | |
| 122 | + | rejected hunks in corresponding `*.rej` files. | |
| 122 | 123 | ||
| 123 | - | -z:: | |
| 124 | + | `-z`:: | |
| 124 | 125 | When `--numstat` has been given, do not munge pathnames, | |
| 125 | 126 | but use a NUL-terminated machine-readable format. | |
| 126 | 127 | + | |
| @@ -128,20 +129,20 @@ Without this option, pathnames with "unusual" characters are quoted as | |||
| 128 | 129 | explained for the configuration variable `core.quotePath` (see | |
| 129 | 130 | linkgit:git-config[1]). | |
| 130 | 131 | ||
| 131 | - | -p<n>:: | |
| 132 | - | Remove <n> leading path components (separated by slashes) from | |
| 132 | + | `-p<n>`:: | |
| 133 | + | Remove _<n>_ leading path components (separated by slashes) from | |
| 133 | 134 | traditional diff paths. E.g., with `-p2`, a patch against | |
| 134 | 135 | `a/dir/file` will be applied directly to `file`. The default is | |
| 135 | 136 | 1. | |
| 136 | 137 | ||
| 137 | - | -C<n>:: | |
| 138 | - | Ensure at least <n> lines of surrounding context match before | |
| 138 | + | `-C<n>`:: | |
| 139 | + | Ensure at least _<n>_ lines of surrounding context match before | |
| 139 | 140 | and after each change. When fewer lines of surrounding | |
| 140 | 141 | context exist they all must match. By default no context is | |
| 141 | 142 | ever ignored. | |
| 142 | 143 | ||
| 143 | - | --unidiff-zero:: | |
| 144 | - | By default, 'git apply' expects that the patch being | |
| 144 | + | `--unidiff-zero`:: | |
| 145 | + | By default, `git apply` expects that the patch being | |
| 145 | 146 | applied is a unified diff with at least one line of context. | |
| 146 | 147 | This provides good safety measures, but breaks down when | |
| 147 | 148 | applying a diff generated with `--unified=0`. To bypass these | |
| @@ -150,34 +151,34 @@ linkgit:git-config[1]). | |||
| 150 | 151 | Note, for the reasons stated above, the usage of context-free patches is | |
| 151 | 152 | discouraged. | |
| 152 | 153 | ||
| 153 | - | --apply:: | |
| 154 | + | `--apply`:: | |
| 154 | 155 | If you use any of the options marked "Turns off | |
| 155 | - | 'apply'" above, 'git apply' reads and outputs the | |
| 156 | + | 'apply'" above, `git apply` reads and outputs the | |
| 156 | 157 | requested information without actually applying the | |
| 157 | 158 | patch. Give this flag after those flags to also apply | |
| 158 | 159 | the patch. | |
| 159 | 160 | ||
| 160 | - | --no-add:: | |
| 161 | + | `--no-add`:: | |
| 161 | 162 | When applying a patch, ignore additions made by the | |
| 162 | 163 | patch. This can be used to extract the common part between | |
| 163 | - | two files by first running 'diff' on them and applying | |
| 164 | + | two files by first running `diff` on them and applying | |
| 164 | 165 | the result with this option, which would apply the | |
| 165 | 166 | deletion part but not the addition part. | |
| 166 | 167 | ||
| 167 | - | --allow-binary-replacement:: | |
| 168 | - | --binary:: | |
| 168 | + | `--allow-binary-replacement`:: | |
| 169 | + | `--binary`:: | |
| 169 | 170 | Historically we did not allow binary patch application | |
| 170 | 171 | without an explicit permission from the user, and this | |
| 171 | 172 | flag was the way to do so. Currently, we always allow binary | |
| 172 | 173 | patch application, so this is a no-op. | |
| 173 | 174 | ||
| 174 | - | --exclude=<path-pattern>:: | |
| 175 | - | Don't apply changes to files matching the given path pattern. This can | |
| 175 | + | `--exclude=<path-pattern>`:: | |
| 176 | + | Don't apply changes to files matching _<path-pattern>_. This can | |
| 176 | 177 | be useful when importing patchsets, where you want to exclude certain | |
| 177 | 178 | files or directories. | |
| 178 | 179 | ||
| 179 | - | --include=<path-pattern>:: | |
| 180 | - | Apply changes to files matching the given path pattern. This can | |
| 180 | + | `--include=<path-pattern>`:: | |
| 181 | + | Apply changes to files matching the _<path-pattern>_. This can | |
| 181 | 182 | be useful when importing patchsets, where you want to include certain | |
| 182 | 183 | files or directories. | |
| 183 | 184 | + | |
| @@ -187,15 +188,15 @@ patch to each path is used. A patch to a path that does not match any | |||
| 187 | 188 | include/exclude pattern is used by default if there is no include pattern | |
| 188 | 189 | on the command line, and ignored if there is any include pattern. | |
| 189 | 190 | ||
| 190 | - | --ignore-space-change:: | |
| 191 | - | --ignore-whitespace:: | |
| 191 | + | `--ignore-space-change`:: | |
| 192 | + | `--ignore-whitespace`:: | |
| 192 | 193 | When applying a patch, ignore changes in whitespace in context | |
| 193 | 194 | lines if necessary. | |
| 194 | 195 | Context lines will preserve their whitespace, and they will not | |
| 195 | 196 | undergo whitespace fixing regardless of the value of the | |
| 196 | 197 | `--whitespace` option. New lines will still be fixed, though. | |
| 197 | 198 | ||
| 198 | - | --whitespace=<action>:: | |
| 199 | + | `--whitespace=<action>`:: | |
| 199 | 200 | When applying a patch, detect a new or modified line that has | |
| 200 | 201 | whitespace errors. What are considered whitespace errors is | |
| 201 | 202 | controlled by `core.whitespace` configuration. By default, | |
| @@ -208,7 +209,7 @@ By default, the command outputs warning messages but applies the patch. | |||
| 208 | 209 | When `git-apply` is used for statistics and not applying a | |
| 209 | 210 | patch, it defaults to `nowarn`. | |
| 210 | 211 | + | |
| 211 | - | You can use different `<action>` values to control this | |
| 212 | + | You can use different _<action>_ values to control this | |
| 212 | 213 | behavior: | |
| 213 | 214 | + | |
| 214 | 215 | * `nowarn` turns off the trailing whitespace warning. | |
| @@ -222,48 +223,48 @@ behavior: | |||
| 222 | 223 | to apply the patch. | |
| 223 | 224 | * `error-all` is similar to `error` but shows all errors. | |
| 224 | 225 | ||
| 225 | - | --inaccurate-eof:: | |
| 226 | - | Under certain circumstances, some versions of 'diff' do not correctly | |
| 226 | + | `--inaccurate-eof`:: | |
| 227 | + | Under certain circumstances, some versions of `diff` do not correctly | |
| 227 | 228 | detect a missing new-line at the end of the file. As a result, patches | |
| 228 | - | created by such 'diff' programs do not record incomplete lines | |
| 229 | + | created by such `diff` programs do not record incomplete lines | |
| 229 | 230 | correctly. This option adds support for applying such patches by | |
| 230 | 231 | working around this bug. | |
| 231 | 232 | ||
| 232 | - | -v:: | |
| 233 | - | --verbose:: | |
| 233 | + | `-v`:: | |
| 234 | + | `--verbose`:: | |
| 234 | 235 | Report progress to stderr. By default, only a message about the | |
| 235 | 236 | current patch being applied will be printed. This option will cause | |
| 236 | 237 | additional information to be reported. | |
| 237 | 238 | ||
| 238 | - | -q:: | |
| 239 | - | --quiet:: | |
| 239 | + | `-q`:: | |
| 240 | + | `--quiet`:: | |
| 240 | 241 | Suppress stderr output. Messages about patch status and progress | |
| 241 | 242 | will not be printed. | |
| 242 | 243 | ||
| 243 | - | --recount:: | |
| 244 | + | `--recount`:: | |
| 244 | 245 | Do not trust the line counts in the hunk headers, but infer them | |
| 245 | 246 | by inspecting the patch (e.g. after editing the patch without | |
| 246 | 247 | adjusting the hunk headers appropriately). | |
| 247 | 248 | ||
| 248 | - | --directory=<root>:: | |
| 249 | - | Prepend <root> to all filenames. If a "-p" argument was also passed, | |
| 249 | + | `--directory=<root>`:: | |
| 250 | + | Prepend _<root>_ to all filenames. If a `-p` argument was also passed, | |
| 250 | 251 | it is applied before prepending the new root. | |
| 251 | 252 | + | |
| 252 | 253 | For example, a patch that talks about updating `a/git-gui.sh` to `b/git-gui.sh` | |
| 253 | 254 | can be applied to the file in the working tree `modules/git-gui/git-gui.sh` by | |
| 254 | 255 | running `git apply --directory=modules/git-gui`. | |
| 255 | 256 | ||
| 256 | - | --unsafe-paths:: | |
| 257 | + | `--unsafe-paths`:: | |
| 257 | 258 | By default, a patch that affects outside the working area | |
| 258 | 259 | (either a Git controlled working tree, or the current working | |
| 259 | - | directory when "git apply" is used as a replacement of GNU | |
| 260 | - | patch) is rejected as a mistake (or a mischief). | |
| 260 | + | directory when `git apply` is used as a replacement of GNU | |
| 261 | + | `patch`) is rejected as a mistake (or a mischief). | |
| 261 | 262 | + | |
| 262 | - | When `git apply` is used as a "better GNU patch", the user can pass | |
| 263 | + | When `git apply` is used as a "better GNU `patch`", the user can pass | |
| 263 | 264 | the `--unsafe-paths` option to override this safety check. This option | |
| 264 | 265 | has no effect when `--index` or `--cached` is in use. | |
| 265 | 266 | ||
| 266 | - | --allow-empty:: | |
| 267 | + | `--allow-empty`:: | |
| 267 | 268 | Don't return an error for patches containing no diff. This includes | |
| 268 | 269 | empty patches and patches with commit text only. | |
| 269 | 270 | ||
| @@ -272,11 +273,12 @@ CONFIGURATION | |||
| 272 | 273 | ||
| 273 | 274 | include::includes/cmd-config-section-all.adoc[] | |
| 274 | 275 | ||
| 276 | + | :git-apply: 1 | |
| 275 | 277 | include::config/apply.adoc[] | |
| 276 | 278 | ||
| 277 | 279 | SUBMODULES | |
| 278 | 280 | ---------- | |
| 279 | - | If the patch contains any changes to submodules then 'git apply' | |
| 281 | + | If the patch contains any changes to submodules then `git apply` | |
| 280 | 282 | treats these changes as follows. | |
| 281 | 283 | ||
| 282 | 284 | If `--index` is specified (explicitly or implicitly), then the submodule | |
modified Documentation/git-archive.adoc
| @@ -54,6 +54,11 @@ OPTIONS | |||
| 54 | 54 | Prepend <prefix>/ to paths in the archive. Can be repeated; its | |
| 55 | 55 | rightmost value is used for all tracked files. See below which | |
| 56 | 56 | value gets used by `--add-file`. | |
| 57 | + | + | |
| 58 | + | The <prefix> is used as given and is not normalized. It may | |
| 59 | + | include leading slashes or parent directory components (e.g., | |
| 60 | + | `../`). Some archive consumers may treat such paths as | |
| 61 | + | potentially unsafe and adjust or warn during extraction. | |
| 57 | 62 | ||
| 58 | 63 | -o <file>:: | |
| 59 | 64 | --output=<file>:: | |
modified Documentation/git-backfill.adoc
| @@ -9,7 +9,7 @@ git-backfill - Download missing objects in a partial clone | |||
| 9 | 9 | SYNOPSIS | |
| 10 | 10 | -------- | |
| 11 | 11 | [synopsis] | |
| 12 | - | git backfill [--min-batch-size=<n>] [--[no-]sparse] | |
| 12 | + | git backfill [--min-batch-size=<n>] [--[no-]sparse] [--[no-]include-edges] [<revision-range>] | |
| 13 | 13 | ||
| 14 | 14 | DESCRIPTION | |
| 15 | 15 | ----------- | |
| @@ -43,7 +43,7 @@ smaller network calls than downloading the entire repository at clone | |||
| 43 | 43 | time. | |
| 44 | 44 | ||
| 45 | 45 | By default, `git backfill` downloads all blobs reachable from the `HEAD` | |
| 46 | - | commit. This set can be restricted or expanded using various options. | |
| 46 | + | commit. This set can be restricted or expanded using various options below. | |
| 47 | 47 | ||
| 48 | 48 | THIS COMMAND IS EXPERIMENTAL. ITS BEHAVIOR MAY CHANGE IN THE FUTURE. | |
| 49 | 49 | ||
| @@ -57,14 +57,38 @@ OPTIONS | |||
| 57 | 57 | blobs seen at a given path. The default minimum batch size is | |
| 58 | 58 | 50,000. | |
| 59 | 59 | ||
| 60 | - | `--[no-]sparse`:: | |
| 60 | + | `--sparse`:: | |
| 61 | + | `--no-sparse`:: | |
| 61 | 62 | Only download objects if they appear at a path that matches the | |
| 62 | 63 | current sparse-checkout. If the sparse-checkout feature is enabled, | |
| 63 | 64 | then `--sparse` is assumed and can be disabled with `--no-sparse`. | |
| 64 | 65 | ||
| 66 | + | `--include-edges`:: | |
| 67 | + | `--no-include-edges`:: | |
| 68 | + | Include blobs from boundary commits in the backfill. Useful in | |
| 69 | + | preparation for commands like `git log -p A..B` or `git replay | |
| 70 | + | --onto TARGET A..B`, where A..B normally excludes A but you need | |
| 71 | + | the blobs from A as well. `--include-edges` is the default. | |
| 72 | + | ||
| 73 | + | `<revision-range>`:: | |
| 74 | + | Backfill only blobs reachable from commits in the specified | |
| 75 | + | revision range. When no _<revision-range>_ is specified, it | |
| 76 | + | defaults to `HEAD` (i.e. the whole history leading to the | |
| 77 | + | current commit). For a complete list of ways to spell | |
| 78 | + | _<revision-range>_, see the "Specifying Ranges" section of | |
| 79 | + | linkgit:gitrevisions[7]. | |
| 80 | + | + | |
| 81 | + | You may also use commit-limiting options understood by | |
| 82 | + | linkgit:git-rev-list[1] such as `--first-parent`, `--since`, or pathspecs. | |
| 83 | + | + | |
| 84 | + | Most `--filter=<spec>` options don't work with the purpose of | |
| 85 | + | `git backfill`, but the `sparse:<oid>` filter is integrated to provide a | |
| 86 | + | focused set of paths to download, distinct from the `--sparse` option. | |
| 87 | + | ||
| 65 | 88 | SEE ALSO | |
| 66 | 89 | -------- | |
| 67 | - | linkgit:git-clone[1]. | |
| 90 | + | linkgit:git-clone[1], | |
| 91 | + | linkgit:git-rev-list[1] | |
| 68 | 92 | ||
| 69 | 93 | GIT | |
| 70 | 94 | --- | |
modified Documentation/git-bisect.adoc
| @@ -8,27 +8,23 @@ git-bisect - Use binary search to find the commit that introduced a bug | |||
| 8 | 8 | ||
| 9 | 9 | SYNOPSIS | |
| 10 | 10 | -------- | |
| 11 | - | [verse] | |
| 12 | - | 'git bisect' <subcommand> <options> | |
| 11 | + | [synopsis] | |
| 12 | + | git bisect start [--term-(bad|new)=<term-new> --term-(good|old)=<term-old>] | |
| 13 | + | [--no-checkout] [--first-parent] [--reset-when-found[=<where>]] [<bad> [<good>...]] [--] [<pathspec>...] | |
| 14 | + | git bisect (bad|new|<term-new>) [<rev>] | |
| 15 | + | git bisect (good|old|<term-old>) [<rev>...] | |
| 16 | + | git bisect terms [--term-(good|old) | --term-(bad|new)] | |
| 17 | + | git bisect skip [(<rev>|<range>)...] | |
| 18 | + | git bisect next | |
| 19 | + | git bisect reset [<commit>] | |
| 20 | + | git bisect (visualize|view) | |
| 21 | + | git bisect replay <logfile> | |
| 22 | + | git bisect log | |
| 23 | + | git bisect run [--reset-when-found[=<where>]] <cmd> [<arg>...] | |
| 24 | + | git bisect help | |
| 13 | 25 | ||
| 14 | 26 | DESCRIPTION | |
| 15 | 27 | ----------- | |
| 16 | - | The command takes various subcommands, and different options depending | |
| 17 | - | on the subcommand: | |
| 18 | - | ||
| 19 | - | git bisect start [--term-(bad|new)=<term-new> --term-(good|old)=<term-old>] | |
| 20 | - | [--no-checkout] [--first-parent] [<bad> [<good>...]] [--] [<pathspec>...] | |
| 21 | - | git bisect (bad|new|<term-new>) [<rev>] | |
| 22 | - | git bisect (good|old|<term-old>) [<rev>...] | |
| 23 | - | git bisect terms [--term-(good|old) | --term-(bad|new)] | |
| 24 | - | git bisect skip [(<rev>|<range>)...] | |
| 25 | - | git bisect reset [<commit>] | |
| 26 | - | git bisect (visualize|view) | |
| 27 | - | git bisect replay <logfile> | |
| 28 | - | git bisect log | |
| 29 | - | git bisect run <cmd> [<arg>...] | |
| 30 | - | git bisect help | |
| 31 | - | ||
| 32 | 28 | This command uses a binary search algorithm to find which commit in | |
| 33 | 29 | your project's history introduced a bug. You use it by first telling | |
| 34 | 30 | it a "bad" commit that is known to contain the bug, and a "good" | |
| @@ -98,11 +94,10 @@ Bisect reset | |||
| 98 | 94 | ~~~~~~~~~~~~ | |
| 99 | 95 | ||
| 100 | 96 | After a bisect session, to clean up the bisection state and return to | |
| 101 | - | the original HEAD, issue the following command: | |
| 97 | + | the original `HEAD`, issue the following command: | |
| 102 | 98 | ||
| 103 | - | ------------------------------------------------ | |
| 104 | - | $ git bisect reset | |
| 105 | - | ------------------------------------------------ | |
| 99 | + | [synopsis] | |
| 100 | + | git bisect reset | |
| 106 | 101 | ||
| 107 | 102 | By default, this will return your tree to the commit that was checked | |
| 108 | 103 | out before `git bisect start`. (A new `git bisect start` will also do | |
| @@ -111,9 +106,9 @@ that, as it cleans up the old bisection state.) | |||
| 111 | 106 | With an optional argument, you can return to a different commit | |
| 112 | 107 | instead: | |
| 113 | 108 | ||
| 114 | - | ------------------------------------------------ | |
| 115 | - | $ git bisect reset <commit> | |
| 116 | - | ------------------------------------------------ | |
| 109 | + | [synopsis] | |
| 110 | + | git bisect reset <commit> | |
| 111 | + | ||
| 117 | 112 | ||
| 118 | 113 | For example, `git bisect reset bisect/bad` will check out the first | |
| 119 | 114 | bad revision, while `git bisect reset HEAD` will leave you on the | |
| @@ -147,23 +142,20 @@ To use "old" and "new" instead of "good" and bad, you must run `git | |||
| 147 | 142 | bisect start` without commits as argument and then run the following | |
| 148 | 143 | commands to add the commits: | |
| 149 | 144 | ||
| 150 | - | ------------------------------------------------ | |
| 145 | + | [synopsis] | |
| 151 | 146 | git bisect old [<rev>] | |
| 152 | - | ------------------------------------------------ | |
| 153 | 147 | ||
| 154 | 148 | to indicate that a commit was before the sought change, or | |
| 155 | 149 | ||
| 156 | - | ------------------------------------------------ | |
| 150 | + | [synopsis] | |
| 157 | 151 | git bisect new [<rev>...] | |
| 158 | - | ------------------------------------------------ | |
| 159 | 152 | ||
| 160 | 153 | to indicate that it was after. | |
| 161 | 154 | ||
| 162 | 155 | To get a reminder of the currently used terms, use | |
| 163 | 156 | ||
| 164 | - | ------------------------------------------------ | |
| 157 | + | [synopsis] | |
| 165 | 158 | git bisect terms | |
| 166 | - | ------------------------------------------------ | |
| 167 | 159 | ||
| 168 | 160 | You can get just the old term with `git bisect terms --term-old` | |
| 169 | 161 | or `git bisect terms --term-good`; `git bisect terms --term-new` | |
| @@ -175,21 +167,20 @@ If you would like to use your own terms instead of "bad"/"good" or | |||
| 175 | 167 | subcommands like `reset`, `start`, ...) by starting the | |
| 176 | 168 | bisection using | |
| 177 | 169 | ||
| 178 | - | ------------------------------------------------ | |
| 170 | + | [synopsis] | |
| 179 | 171 | git bisect start --term-old <term-old> --term-new <term-new> | |
| 180 | - | ------------------------------------------------ | |
| 181 | 172 | ||
| 182 | 173 | For example, if you are looking for a commit that introduced a | |
| 183 | 174 | performance regression, you might use | |
| 184 | 175 | ||
| 185 | 176 | ------------------------------------------------ | |
| 186 | - | git bisect start --term-old fast --term-new slow | |
| 177 | + | $ git bisect start --term-old fast --term-new slow | |
| 187 | 178 | ------------------------------------------------ | |
| 188 | 179 | ||
| 189 | 180 | Or if you are looking for the commit that fixed a bug, you might use | |
| 190 | 181 | ||
| 191 | 182 | ------------------------------------------------ | |
| 192 | - | git bisect start --term-new fixed --term-old broken | |
| 183 | + | $ git bisect start --term-new fixed --term-old broken | |
| 193 | 184 | ------------------------------------------------ | |
| 194 | 185 | ||
| 195 | 186 | Then, use `git bisect <term-old>` and `git bisect <term-new>` instead | |
| @@ -198,7 +189,7 @@ of `git bisect good` and `git bisect bad` to mark commits. | |||
| 198 | 189 | Bisect visualize/view | |
| 199 | 190 | ~~~~~~~~~~~~~~~~~~~~~ | |
| 200 | 191 | ||
| 201 | - | To see the currently remaining suspects in 'gitk', issue the following | |
| 192 | + | To see the currently remaining suspects in `gitk`, issue the following | |
| 202 | 193 | command during the bisection process (the subcommand `view` can be used | |
| 203 | 194 | as an alternative to `visualize`): | |
| 204 | 195 | ||
| @@ -207,12 +198,13 @@ $ git bisect visualize | |||
| 207 | 198 | ------------ | |
| 208 | 199 | ||
| 209 | 200 | Git detects a graphical environment through various environment variables: | |
| 210 | - | `DISPLAY`, which is set in X Window System environments on Unix systems. | |
| 211 | - | `SESSIONNAME`, which is set under Cygwin in interactive desktop sessions. | |
| 212 | - | `MSYSTEM`, which is set under Msys2 and Git for Windows. | |
| 213 | - | `SECURITYSESSIONID`, which may be set on macOS in interactive desktop sessions. | |
| 214 | 201 | ||
| 215 | - | If none of these environment variables is set, 'git log' is used instead. | |
| 202 | + | `DISPLAY`:: which is set in X Window System environments on Unix systems. | |
| 203 | + | `SESSIONNAME`:: which is set under Cygwin in interactive desktop sessions. | |
| 204 | + | `MSYSTEM`:: which is set under Msys2 and Git for Windows. | |
| 205 | + | `SECURITYSESSIONID`:: which may be set on macOS in interactive desktop sessions. | |
| 206 | + | ||
| 207 | + | If none of these environment variables is set, `git log` is used instead. | |
| 216 | 208 | You can also give command-line options such as `-p` and `--stat`. | |
| 217 | 209 | ||
| 218 | 210 | ------------ | |
| @@ -295,6 +287,19 @@ $ git bisect skip v2.5 v2.5..v2.6 | |||
| 295 | 287 | This tells the bisect process that the commits between `v2.5` and | |
| 296 | 288 | `v2.6` (inclusive) should be skipped. | |
| 297 | 289 | ||
| 290 | + | Bisect next | |
| 291 | + | ~~~~~~~~~~~ | |
| 292 | + | ||
| 293 | + | Normally, after marking a revision as good or bad, Git automatically | |
| 294 | + | computes and checks out the next revision to test. However, if you need to | |
| 295 | + | explicitly request the next bisection step, you can use: | |
| 296 | + | ||
| 297 | + | ------------ | |
| 298 | + | $ git bisect next | |
| 299 | + | ------------ | |
| 300 | + | ||
| 301 | + | You might use this to resume the bisection process after interrupting it | |
| 302 | + | by checking out a different revision. | |
| 298 | 303 | ||
| 299 | 304 | Cutting down bisection by giving more parameters to bisect start | |
| 300 | 305 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
| @@ -323,18 +328,17 @@ Bisect run | |||
| 323 | 328 | If you have a script that can tell if the current source code is good | |
| 324 | 329 | or bad, you can bisect by issuing the command: | |
| 325 | 330 | ||
| 326 | - | ------------ | |
| 327 | - | $ git bisect run my_script arguments | |
| 328 | - | ------------ | |
| 331 | + | [synopsis] | |
| 332 | + | git bisect run <cmd> [<arg>...] | |
| 329 | 333 | ||
| 330 | - | Note that the script (`my_script` in the above example) should exit | |
| 334 | + | Note that _<cmd>_ run with _<arg>_ should exit | |
| 331 | 335 | with code 0 if the current source code is good/old, and exit with a | |
| 332 | 336 | code between 1 and 127 (inclusive), except 125, if the current source | |
| 333 | 337 | code is bad/new. | |
| 334 | 338 | ||
| 335 | 339 | Any other exit code will abort the bisect process. It should be noted | |
| 336 | - | that a program that terminates via `exit(-1)` leaves $? = 255, (see the | |
| 337 | - | exit(3) manual page), as the value is chopped with `& 0377`. | |
| 340 | + | that a program that terminates via `exit(-1)` leaves `$?` = 255, (see the | |
| 341 | + | `exit`(3) manual page), as the value is chopped with `& 0377`. | |
| 338 | 342 | ||
| 339 | 343 | The special exit code 125 should be used when the current source code | |
| 340 | 344 | cannot be tested. If the script exits with this code, the current | |
| @@ -346,12 +350,12 @@ details do not matter, as they are normal errors in the script, as far as | |||
| 346 | 350 | `bisect run` is concerned). | |
| 347 | 351 | ||
| 348 | 352 | You may often find that during a bisect session you want to have | |
| 349 | - | temporary modifications (e.g. s/#define DEBUG 0/#define DEBUG 1/ in a | |
| 353 | + | temporary modifications (e.g. `s/#define DEBUG 0/#define DEBUG 1/` in a | |
| 350 | 354 | header file, or "revision that does not have this commit needs this | |
| 351 | 355 | patch applied to work around another problem this bisection is not | |
| 352 | 356 | interested in") applied to the revision being tested. | |
| 353 | 357 | ||
| 354 | - | To cope with such a situation, after the inner 'git bisect' finds the | |
| 358 | + | To cope with such a situation, after the inner `git bisect` finds the | |
| 355 | 359 | next revision to test, the script can apply the patch | |
| 356 | 360 | before compiling, run the real test, and afterwards decide if the | |
| 357 | 361 | revision (possibly with the needed patch) passed the test and then | |
| @@ -361,20 +365,18 @@ determine the eventual outcome of the bisect session. | |||
| 361 | 365 | ||
| 362 | 366 | OPTIONS | |
| 363 | 367 | ------- | |
| 364 | - | --no-checkout:: | |
| 365 | - | + | |
| 366 | - | Do not checkout the new working tree at each iteration of the bisection | |
| 367 | - | process. Instead just update the reference named `BISECT_HEAD` to make | |
| 368 | - | it point to the commit that should be tested. | |
| 368 | + | `--no-checkout`:: | |
| 369 | + | Do not checkout the new working tree at each iteration of the bisection | |
| 370 | + | process. Instead just update the reference named `BISECT_HEAD` to make | |
| 371 | + | it point to the commit that should be tested. | |
| 369 | 372 | + | |
| 370 | 373 | This option may be useful when the test you would perform in each step | |
| 371 | 374 | does not require a checked out tree. | |
| 372 | 375 | + | |
| 373 | 376 | If the repository is bare, `--no-checkout` is assumed. | |
| 374 | 377 | ||
| 375 | - | --first-parent:: | |
| 376 | - | + | |
| 377 | - | Follow only the first parent commit upon seeing a merge commit. | |
| 378 | + | `--first-parent`:: | |
| 379 | + | Follow only the first parent commit upon seeing a merge commit. | |
| 378 | 380 | + | |
| 379 | 381 | In detecting regressions introduced through the merging of a branch, the merge | |
| 380 | 382 | commit will be identified as introduction of the bug and its ancestors will be | |
| @@ -383,10 +385,20 @@ ignored. | |||
| 383 | 385 | This option is particularly useful in avoiding false positives when a merged | |
| 384 | 386 | branch contained broken or non-buildable commits, but the merge itself was OK. | |
| 385 | 387 | ||
| 388 | + | `--reset-when-found[=<where>]`:: | |
| 389 | + | Once the first bad commit is found, report it and clean up the | |
| 390 | + | bisection state. `<where>` may be `original` to return to the commit | |
| 391 | + | checked out before `git bisect start`, or `found` to leave the first | |
| 392 | + | bad commit checked out. If `<where>` is omitted, it defaults to | |
| 393 | + | `original`. | |
| 394 | + | + | |
| 395 | + | This option may be given to `git bisect start` or to `git bisect run`. It | |
| 396 | + | cannot be used for a bisection started with `--no-checkout`. | |
| 397 | + | ||
| 386 | 398 | EXAMPLES | |
| 387 | 399 | -------- | |
| 388 | 400 | ||
| 389 | - | * Automatically bisect a broken build between v1.2 and HEAD: | |
| 401 | + | * Automatically bisect a broken build between v1.2 and `HEAD`: | |
| 390 | 402 | + | |
| 391 | 403 | ------------ | |
| 392 | 404 | $ git bisect start HEAD v1.2 -- # HEAD is bad, v1.2 is good | |
| @@ -394,7 +406,7 @@ $ git bisect run make # "make" builds the app | |||
| 394 | 406 | $ git bisect reset # quit the bisect session | |
| 395 | 407 | ------------ | |
| 396 | 408 | ||
| 397 | - | * Automatically bisect a test failure between origin and HEAD: | |
| 409 | + | * Automatically bisect a test failure between origin and `HEAD`: | |
| 398 | 410 | + | |
| 399 | 411 | ------------ | |
| 400 | 412 | $ git bisect start HEAD origin -- # HEAD is bad, origin is good | |
| @@ -421,7 +433,7 @@ and `exit 1` otherwise. | |||
| 421 | 433 | + | |
| 422 | 434 | It is safer if both `test.sh` and `check_test_case.sh` are | |
| 423 | 435 | outside the repository to prevent interactions between the bisect, | |
| 424 | - | make and test processes and the scripts. | |
| 436 | + | `make` and test processes and the scripts. | |
| 425 | 437 | ||
| 426 | 438 | * Automatically bisect with temporary modifications (hot-fix): | |
| 427 | 439 | + | |
| @@ -482,9 +494,9 @@ $ git bisect run sh -c ' | |||
| 482 | 494 | $ git bisect reset # quit the bisect session | |
| 483 | 495 | ------------ | |
| 484 | 496 | + | |
| 485 | - | In this case, when 'git bisect run' finishes, bisect/bad will refer to a commit that | |
| 497 | + | In this case, when `git bisect run` finishes, `bisect/bad` will refer to a commit that | |
| 486 | 498 | has at least one parent whose reachable graph is fully traversable in the sense | |
| 487 | - | required by 'git pack objects'. | |
| 499 | + | required by `git pack-objects`. | |
| 488 | 500 | ||
| 489 | 501 | * Look for a fix instead of a regression in the code | |
| 490 | 502 | + | |
modified Documentation/git-blame.adoc
| @@ -7,12 +7,12 @@ git-blame - Show what revision and author last modified each line of a file | |||
| 7 | 7 | ||
| 8 | 8 | SYNOPSIS | |
| 9 | 9 | -------- | |
| 10 | - | [verse] | |
| 11 | - | 'git blame' [-c] [-b] [-l] [--root] [-t] [-f] [-n] [-s] [-e] [-p] [-w] [--incremental] | |
| 12 | - | [-L <range>] [-S <revs-file>] [-M] [-C] [-C] [-C] [--since=<date>] | |
| 13 | - | [--ignore-rev <rev>] [--ignore-revs-file <file>] | |
| 14 | - | [--color-lines] [--color-by-age] [--progress] [--abbrev=<n>] | |
| 15 | - | [ --contents <file> ] [<rev> | --reverse <rev>..<rev>] [--] <file> | |
| 10 | + | [synopsis] | |
| 11 | + | git blame [-c] [-b] [-l] [--root] [-t] [-f] [-n] [-s] [-e] [-p] [-w] [--incremental] | |
| 12 | + | [-L <range>] [-S <revs-file>] [-M] [-C] [-C] [-C] [--since=<date>] | |
| 13 | + | [--ignore-rev <rev>] [--ignore-revs-file <file>] | |
| 14 | + | [--color-lines] [--color-by-age] [--progress] [--abbrev=<n>] | |
| 15 | + | [ --contents <file> ] [<rev> | --reverse <rev>..<rev>] [--] <file> | |
| 16 | 16 | ||
| 17 | 17 | DESCRIPTION | |
| 18 | 18 | ----------- | |
| @@ -30,7 +30,7 @@ lines that were copied and pasted from another file, etc., see the | |||
| 30 | 30 | `-C` and `-M` options. | |
| 31 | 31 | ||
| 32 | 32 | The report does not tell you anything about lines which have been deleted or | |
| 33 | - | replaced; you need to use a tool such as 'git diff' or the "pickaxe" | |
| 33 | + | replaced; you need to use a tool such as `git diff` or the "pickaxe" | |
| 34 | 34 | interface briefly mentioned in the following paragraph. | |
| 35 | 35 | ||
| 36 | 36 | Apart from supporting file annotation, Git also supports searching the | |
| @@ -50,47 +50,50 @@ OPTIONS | |||
| 50 | 50 | ------- | |
| 51 | 51 | include::blame-options.adoc[] | |
| 52 | 52 | ||
| 53 | - | -c:: | |
| 53 | + | `-c`:: | |
| 54 | 54 | Use the same output mode as linkgit:git-annotate[1] (Default: off). | |
| 55 | 55 | ||
| 56 | - | --score-debug:: | |
| 56 | + | `--score-debug`:: | |
| 57 | 57 | Include debugging information related to the movement of | |
| 58 | 58 | lines between files (see `-C`) and lines moved within a | |
| 59 | 59 | file (see `-M`). The first number listed is the score. | |
| 60 | 60 | This is the number of alphanumeric characters detected | |
| 61 | 61 | as having been moved between or within files. This must be above | |
| 62 | - | a certain threshold for 'git blame' to consider those lines | |
| 62 | + | a certain threshold for `git blame` to consider those lines | |
| 63 | 63 | of code to have been moved. | |
| 64 | 64 | ||
| 65 | - | -f:: | |
| 66 | - | --show-name:: | |
| 65 | + | `-f`:: | |
| 66 | + | `--show-name`:: | |
| 67 | 67 | Show the filename in the original commit. By default | |
| 68 | 68 | the filename is shown if there is any line that came from a | |
| 69 | 69 | file with a different name, due to rename detection. | |
| 70 | 70 | ||
| 71 | - | -n:: | |
| 72 | - | --show-number:: | |
| 71 | + | `-n`:: | |
| 72 | + | `--show-number`:: | |
| 73 | 73 | Show the line number in the original commit (Default: off). | |
| 74 | 74 | ||
| 75 | - | -s:: | |
| 75 | + | `-s`:: | |
| 76 | 76 | Suppress the author name and timestamp from the output. | |
| 77 | 77 | ||
| 78 | - | -e:: | |
| 79 | - | --show-email:: | |
| 78 | + | `-e`:: | |
| 79 | + | `--show-email`:: | |
| 80 | 80 | Show the author email instead of the author name (Default: off). | |
| 81 | 81 | This can also be controlled via the `blame.showEmail` config | |
| 82 | 82 | option. | |
| 83 | 83 | ||
| 84 | - | -w:: | |
| 84 | + | `-w`:: | |
| 85 | 85 | Ignore whitespace when comparing the parent's version and | |
| 86 | 86 | the child's to find where the lines came from. | |
| 87 | 87 | ||
| 88 | - | --abbrev=<n>:: | |
| 89 | - | Instead of using the default 7+1 hexadecimal digits as the | |
| 90 | - | abbreviated object name, use <m>+1 digits, where <m> is at | |
| 91 | - | least <n> but ensures the commit object names are unique. | |
| 92 | - | Note that 1 column | |
| 93 | - | is used for a caret to mark the boundary commit. | |
| 88 | + | include::diff-algorithm-option.adoc[] | |
| 89 | + | ||
| 90 | + | `--abbrev=<n>`:: | |
| 91 | + | Instead of using the default _7_ hexadecimal digits as the | |
| 92 | + | abbreviated object name, use at least _<n>_ digits, but ensure | |
| 93 | + | the commit object names are unique. | |
| 94 | + | If commits marked with caret (boundary), question mark (ignored) | |
| 95 | + | or asterisk (unblamable) are shown, extend unmarked object names | |
| 96 | + | to align them. | |
| 94 | 97 | ||
| 95 | 98 | ||
| 96 | 99 | THE DEFAULT FORMAT | |
| @@ -122,21 +125,21 @@ header at the minimum has the first line which has: | |||
| 122 | 125 | This header line is followed by the following information | |
| 123 | 126 | at least once for each commit: | |
| 124 | 127 | ||
| 125 | - | - the author name ("author"), email ("author-mail"), time | |
| 126 | - | ("author-time"), and time zone ("author-tz"); similarly | |
| 128 | + | - the author name (`author`), email (`author-mail`), time | |
| 129 | + | (`author-time`), and time zone (`author-tz`); similarly | |
| 127 | 130 | for committer. | |
| 128 | 131 | - the filename in the commit that the line is attributed to. | |
| 129 | - | - the first line of the commit log message ("summary"). | |
| 132 | + | - the first line of the commit log message (`summary`). | |
| 130 | 133 | ||
| 131 | 134 | The contents of the actual line are output after the above | |
| 132 | - | header, prefixed by a TAB. This is to allow adding more | |
| 135 | + | header, prefixed by a _TAB_. This is to allow adding more | |
| 133 | 136 | header elements later. | |
| 134 | 137 | ||
| 135 | 138 | The porcelain format generally suppresses commit information that has | |
| 136 | 139 | already been seen. For example, two lines that are blamed to the same | |
| 137 | 140 | commit will both be shown, but the details for that commit will be shown | |
| 138 | 141 | only once. Information which is specific to individual lines will not be | |
| 139 | - | grouped together, like revs to be marked 'ignored' or 'unblamable'. This | |
| 142 | + | grouped together, like revs to be marked `ignored` or `unblamable`. This | |
| 140 | 143 | is more efficient, but may require more state be kept by the reader. The | |
| 141 | 144 | `--line-porcelain` option can be used to output full commit information | |
| 142 | 145 | for each line, allowing simpler (but less efficient) usage like: | |
| @@ -150,7 +153,7 @@ for each line, allowing simpler (but less efficient) usage like: | |||
| 150 | 153 | SPECIFYING RANGES | |
| 151 | 154 | ----------------- | |
| 152 | 155 | ||
| 153 | - | Unlike 'git blame' and 'git annotate' in older versions of git, the extent | |
| 156 | + | Unlike `git blame` and `git annotate` in older versions of git, the extent | |
| 154 | 157 | of the annotation can be limited to both line ranges and revision | |
| 155 | 158 | ranges. The `-L` option, which limits annotation to a range of lines, may be | |
| 156 | 159 | specified multiple times. | |
| @@ -171,7 +174,7 @@ which limits the annotation to the body of the `hello` subroutine. | |||
| 171 | 174 | ||
| 172 | 175 | When you are not interested in changes older than version | |
| 173 | 176 | v2.6.18, or changes older than 3 weeks, you can use revision | |
| 174 | - | range specifiers similar to 'git rev-list': | |
| 177 | + | range specifiers similar to `git rev-list`: | |
| 175 | 178 | ||
| 176 | 179 | git blame v2.6.18.. -- foo | |
| 177 | 180 | git blame --since=3.weeks -- foo | |
| @@ -210,8 +213,9 @@ does not contain the actual lines from the file that is being | |||
| 210 | 213 | annotated. | |
| 211 | 214 | ||
| 212 | 215 | . Each blame entry always starts with a line of: | |
| 213 | - | ||
| 214 | - | <40-byte-hex-sha1> <sourceline> <resultline> <num-lines> | |
| 216 | + | + | |
| 217 | + | [synopsis] | |
| 218 | + | <40-byte-hex-sha1> <sourceline> <resultline> <num-lines> | |
| 215 | 219 | + | |
| 216 | 220 | Line numbers count from 1. | |
| 217 | 221 | ||
| @@ -222,16 +226,17 @@ Line numbers count from 1. | |||
| 222 | 226 | ||
| 223 | 227 | . Unlike the Porcelain format, the filename information is always | |
| 224 | 228 | given and terminates the entry: | |
| 225 | - | ||
| 226 | - | "filename" <whitespace-quoted-filename-goes-here> | |
| 229 | + | + | |
| 230 | + | [synopsis] | |
| 231 | + | filename <whitespace-quoted-filename-goes-here> | |
| 227 | 232 | + | |
| 228 | 233 | and thus it is really quite easy to parse for some line- and word-oriented | |
| 229 | 234 | parser (which should be quite natural for most scripting languages). | |
| 230 | 235 | + | |
| 231 | 236 | [NOTE] | |
| 232 | 237 | For people who do parsing: to make it more robust, just ignore any | |
| 233 | - | lines between the first and last one ("<sha1>" and "filename" lines) | |
| 234 | - | where you do not recognize the tag words (or care about that particular | |
| 238 | + | lines between the first and last one (_<40-byte-hex-sha1>_ and `filename` | |
| 239 | + | lines) where you do not recognize the tag words (or care about that particular | |
| 235 | 240 | one) at the beginning of the "extended information" lines. That way, if | |
| 236 | 241 | there is ever added information (like the commit encoding or extended | |
| 237 | 242 | commit commentary), a blame viewer will not care. | |
modified Documentation/git-branch.adoc
| @@ -13,6 +13,7 @@ git branch [--color[=<when>] | --no-color] [--show-current] | |||
| 13 | 13 | [--column[=<options>] | --no-column] [--sort=<key>] | |
| 14 | 14 | [--merged [<commit>]] [--no-merged [<commit>]] | |
| 15 | 15 | [--contains [<commit>]] [--no-contains [<commit>]] | |
| 16 | + | [(--forked <branch>)...] | |
| 16 | 17 | [--points-at <object>] [--format=<format>] | |
| 17 | 18 | [(-r|--remotes) | (-a|--all)] | |
| 18 | 19 | [--list] [<pattern>...] | |
| @@ -24,6 +25,7 @@ git branch (-m|-M) [<old-branch>] <new-branch> | |||
| 24 | 25 | git branch (-c|-C) [<old-branch>] <new-branch> | |
| 25 | 26 | git branch (-d|-D) [-r] <branch-name>... | |
| 26 | 27 | git branch --edit-description [<branch-name>] | |
| 28 | + | git branch [--dry-run] (--delete-merged <pattern>)... [<branch-pattern>...] | |
| 27 | 29 | ||
| 28 | 30 | DESCRIPTION | |
| 29 | 31 | ----------- | |
| @@ -51,7 +53,8 @@ merged into the named commit (i.e. the branches whose tip commits are | |||
| 51 | 53 | reachable from the named commit) will be listed. With `--no-merged` only | |
| 52 | 54 | branches not merged into the named commit will be listed. If the _<commit>_ | |
| 53 | 55 | argument is missing it defaults to `HEAD` (i.e. the tip of the current | |
| 54 | - | branch). | |
| 56 | + | branch). With `--forked`, only branches whose configured upstream matches | |
| 57 | + | the given branch or pattern will be listed. | |
| 55 | 58 | ||
| 56 | 59 | The command's second form creates a new branch head named _<branch-name>_ | |
| 57 | 60 | which points to the current `HEAD`, or _<start-point>_ if given. As a | |
| @@ -199,6 +202,45 @@ This option is only applicable in non-verbose mode. | |||
| 199 | 202 | Print the name of the current branch. In detached `HEAD` state, | |
| 200 | 203 | nothing is printed. | |
| 201 | 204 | ||
| 205 | + | `--delete-merged <pattern>`:: | |
| 206 | + | Delete local branches whose configured upstream matches | |
| 207 | + | _<pattern>_, but only when their tip is reachable from that | |
| 208 | + | upstream. In other words, the work on the branch has already | |
| 209 | + | landed on the upstream it tracks, so the local copy is no longer | |
| 210 | + | needed. _<pattern>_ may name a ref, a remote (using the branch its | |
| 211 | + | `HEAD` points at), or a shell-style glob. The option can be | |
| 212 | + | repeated to widen the upstream match. | |
| 213 | + | Optional _<branch-pattern>_ arguments limit which local branches | |
| 214 | + | are considered, e.g. `git branch --delete-merged 'origin/*' | |
| 215 | + | 'topic-*'`. | |
| 216 | + | + | |
| 217 | + | A branch is not deleted when: | |
| 218 | + | + | |
| 219 | + | -- | |
| 220 | + | * its configured upstream ref no longer exists, | |
| 221 | + | * it is checked out in any worktree, | |
| 222 | + | * pushing it to the remote configured by | |
| 223 | + | `branch.<name>.remote` would update its upstream, so it cannot be | |
| 224 | + | distinguished from a branch that just looks fully merged right | |
| 225 | + | after a pull; this is determined by the remote's configured push and | |
| 226 | + | fetch refspecs, | |
| 227 | + | * it is the local upstream of a branch that is not being deleted, or | |
| 228 | + | * `branch.<name>.deleteMerged` is set to `false`. | |
| 229 | + | -- | |
| 230 | + | + | |
| 231 | + | When such a local upstream branch has its own upstream deleted by the | |
| 232 | + | same operation, its upstream configuration is cleared. | |
| 233 | + | + | |
| 234 | + | A branch whose work has not yet been merged into its upstream is | |
| 235 | + | silently skipped. Delete it with `git branch -D` if you want to | |
| 236 | + | remove it anyway. | |
| 237 | + | ||
| 238 | + | `--dry-run`:: | |
| 239 | + | With `--delete-merged`, print which branches would be | |
| 240 | + | deleted and exit without touching any ref. Useful for | |
| 241 | + | sanity-checking a wide pattern like `'origin/*'` before | |
| 242 | + | committing to the deletion. | |
| 243 | + | ||
| 202 | 244 | `-v`:: | |
| 203 | 245 | `-vv`:: | |
| 204 | 246 | `--verbose`:: | |
| @@ -311,6 +353,14 @@ superproject's "origin/main", but tracks the submodule's "origin/main". | |||
| 311 | 353 | Only list branches whose tips are not reachable from | |
| 312 | 354 | _<commit>_ (`HEAD` if not specified). Implies `--list`. | |
| 313 | 355 | ||
| 356 | + | `--forked <branch>`:: | |
| 357 | + | Only list branches whose configured upstream matches | |
| 358 | + | _<branch>_. The argument can be a ref (e.g. `origin/main`, | |
| 359 | + | `master`), a remote name like `origin` for the branch its | |
| 360 | + | `origin/HEAD` points at, or a shell-style glob (e.g. | |
| 361 | + | `'origin/*'`). The option can be repeated to widen the | |
| 362 | + | filter. Implies `--list`. | |
| 363 | + | ||
| 314 | 364 | `--points-at <object>`:: | |
| 315 | 365 | Only list branches of _<object>_. | |
| 316 | 366 | ||
modified Documentation/git-cat-file.adoc
| @@ -62,8 +62,10 @@ OPTIONS | |||
| 62 | 62 | or to ask for a "blob" with `<object>` being a tag object that | |
| 63 | 63 | points at it. | |
| 64 | 64 | ||
| 65 | - | --[no-]mailmap:: | |
| 66 | - | --[no-]use-mailmap:: | |
| 65 | + | --mailmap:: | |
| 66 | + | --no-mailmap:: | |
| 67 | + | --use-mailmap:: | |
| 68 | + | --no-use-mailmap:: | |
| 67 | 69 | Use mailmap file to map author, committer and tagger names | |
| 68 | 70 | and email addresses to canonical real names and email addresses. | |
| 69 | 71 | See linkgit:git-shortlog[1]. | |
| @@ -167,11 +169,23 @@ info <object>:: | |||
| 167 | 169 | Print object info for object reference `<object>`. This corresponds to the | |
| 168 | 170 | output of `--batch-check`. | |
| 169 | 171 | ||
| 172 | + | remote-object-info <remote> <object>...:: | |
| 173 | + | Print object info for object references `<object>` at specified | |
| 174 | + | `<remote>` without downloading objects from the remote. | |
| 175 | + | Raise an error when the `object-info` capability is not supported by the remote. | |
| 176 | + | Raise an error when no object references are provided. | |
| 177 | + | This command may be combined with `--buffer`. | |
| 178 | + | ||
| 170 | 179 | flush:: | |
| 171 | 180 | Used with `--buffer` to execute all preceding commands that were issued | |
| 172 | 181 | since the beginning or since the last flush was issued. When `--buffer` | |
| 173 | 182 | is used, no output will come until a `flush` is issued. When `--buffer` | |
| 174 | 183 | is not used, commands are flushed each time without issuing `flush`. | |
| 184 | + | ||
| 185 | + | `mailmap (<bool>)`:: | |
| 186 | + | Enable or disable mailmap for subsequent commands. The `<bool>` | |
| 187 | + | argument accepts the same boolean values as linkgit:git-config[1]. | |
| 188 | + | The mailmap data is read upon the first use and only once. | |
| 175 | 189 | -- | |
| 176 | 190 | + | |
| 177 | 191 | ||
| @@ -294,7 +308,8 @@ one per line, and print information based on the command given. With | |||
| 294 | 308 | `--batch-command`, the `info` command followed by an object will print | |
| 295 | 309 | information about the object the same way `--batch-check` would, and the | |
| 296 | 310 | `contents` command followed by an object prints contents in the same way | |
| 297 | - | `--batch` would. | |
| 311 | + | `--batch` would. The `remote-object-info` command followed by a remote and | |
| 312 | + | object IDs prints object info from the remote without downloading the objects. | |
| 298 | 313 | ||
| 299 | 314 | You can specify the information shown for each object by using a custom | |
| 300 | 315 | `<format>`. The `<format>` is copied literally to stdout for each | |
| @@ -307,6 +322,11 @@ newline. The available atoms are: | |||
| 307 | 322 | `objecttype`:: | |
| 308 | 323 | The type of the object (the same as `cat-file -t` reports). | |
| 309 | 324 | ||
| 325 | + | `objectmode`:: | |
| 326 | + | If the specified object has mode information (such as a tree or | |
| 327 | + | index entry), the mode expressed as an octal integer. Otherwise, | |
| 328 | + | empty string. | |
| 329 | + | ||
| 310 | 330 | `objectsize`:: | |
| 311 | 331 | The size, in bytes, of the object (the same as `cat-file -s` | |
| 312 | 332 | reports). | |
| @@ -328,6 +348,10 @@ newline. The available atoms are: | |||
| 328 | 348 | after that first run of whitespace (i.e., the "rest" of the | |
| 329 | 349 | line) are output in place of the `%(rest)` atom. | |
| 330 | 350 | ||
| 351 | + | The command `remote-object-info` only supports the `%(objectname)`, | |
| 352 | + | `%(objectsize)` and `%(objecttype)` placeholders. See `CAVEATS` below for more | |
| 353 | + | information. | |
| 354 | + | ||
| 331 | 355 | If no format is specified, the default format is `%(objectname) | |
| 332 | 356 | %(objecttype) %(objectsize)`. | |
| 333 | 357 | ||
| @@ -368,6 +392,14 @@ If a name is specified that might refer to more than one object (an ambiguous sh | |||
| 368 | 392 | <object> SP ambiguous LF | |
| 369 | 393 | ------------ | |
| 370 | 394 | ||
| 395 | + | If a name is specified that refers to a submodule entry in a tree and the | |
| 396 | + | target object does not exist in the repository, then `cat-file` will ignore | |
| 397 | + | any custom format and print (with the object ID of the submodule): | |
| 398 | + | ||
| 399 | + | ------------ | |
| 400 | + | <oid> SP submodule LF | |
| 401 | + | ------------ | |
| 402 | + | ||
| 371 | 403 | If `--follow-symlinks` is used, and a symlink in the repository points | |
| 372 | 404 | outside the repository, then `cat-file` will ignore any custom format | |
| 373 | 405 | and print: | |
| @@ -418,6 +450,10 @@ scripting purposes. | |||
| 418 | 450 | CAVEATS | |
| 419 | 451 | ------- | |
| 420 | 452 | ||
| 453 | + | Note that only `%(objectname)`, `%(objectsize)` and `%(objecttype)` are | |
| 454 | + | currently supported by the `remote-object-info` command. Using any other | |
| 455 | + | placeholder in the format string will return an empty string in its position. | |
| 456 | + | ||
| 421 | 457 | Note that the sizes of objects on disk are reported accurately, but care | |
| 422 | 458 | should be taken in drawing conclusions about which refs or objects are | |
| 423 | 459 | responsible for disk usage. The size of a packed non-delta object may be | |
modified Documentation/git-check-attr.adoc
| @@ -19,7 +19,8 @@ For every pathname, this command will list if each attribute is 'unspecified', | |||
| 19 | 19 | ||
| 20 | 20 | OPTIONS | |
| 21 | 21 | ------- | |
| 22 | - | -a, --all:: | |
| 22 | + | -a:: | |
| 23 | + | --all:: | |
| 23 | 24 | List all attributes that are associated with the specified | |
| 24 | 25 | paths. If this option is used, then 'unspecified' attributes | |
| 25 | 26 | will not be included in the output. | |
modified Documentation/git-check-ignore.adoc
| @@ -25,11 +25,13 @@ subject to exclude rules; but see `--no-index'. | |||
| 25 | 25 | ||
| 26 | 26 | OPTIONS | |
| 27 | 27 | ------- | |
| 28 | - | -q, --quiet:: | |
| 28 | + | -q:: | |
| 29 | + | --quiet:: | |
| 29 | 30 | Don't output anything, just set exit status. This is only | |
| 30 | 31 | valid with a single pathname. | |
| 31 | 32 | ||
| 32 | - | -v, --verbose:: | |
| 33 | + | -v:: | |
| 34 | + | --verbose:: | |
| 33 | 35 | Instead of printing the paths that are excluded, for each path | |
| 34 | 36 | that matches an exclude pattern, print the exclude pattern | |
| 35 | 37 | together with the path. (Matching an exclude pattern usually | |
| @@ -49,7 +51,8 @@ linkgit:gitignore[5]. | |||
| 49 | 51 | below). If `--stdin` is also given, input paths are separated | |
| 50 | 52 | with a NUL character instead of a linefeed character. | |
| 51 | 53 | ||
| 52 | - | -n, --non-matching:: | |
| 54 | + | -n:: | |
| 55 | + | --non-matching:: | |
| 53 | 56 | Show given paths which don't match any pattern. This only | |
| 54 | 57 | makes sense when `--verbose` is enabled, otherwise it would | |
| 55 | 58 | not be possible to distinguish between paths which match a | |
modified Documentation/git-check-ref-format.adoc
| @@ -98,7 +98,8 @@ a branch. | |||
| 98 | 98 | ||
| 99 | 99 | OPTIONS | |
| 100 | 100 | ------- | |
| 101 | - | --[no-]allow-onelevel:: | |
| 101 | + | --allow-onelevel:: | |
| 102 | + | --no-allow-onelevel:: | |
| 102 | 103 | Controls whether one-level refnames are accepted (i.e., | |
| 103 | 104 | refnames that do not contain multiple `/`-separated | |
| 104 | 105 | components). The default is `--no-allow-onelevel`. | |
modified Documentation/git-checkout.adoc
| @@ -12,25 +12,29 @@ git checkout [-q] [-f] [-m] [<branch>] | |||
| 12 | 12 | git checkout [-q] [-f] [-m] --detach [<branch>] | |
| 13 | 13 | git checkout [-q] [-f] [-m] [--detach] <commit> | |
| 14 | 14 | git checkout [-q] [-f] [-m] [[-b|-B|--orphan] <new-branch>] [<start-point>] | |
| 15 | - | git checkout [-f] <tree-ish> [--] <pathspec>... | |
| 16 | - | git checkout [-f] <tree-ish> --pathspec-from-file=<file> [--pathspec-file-nul] | |
| 15 | + | git checkout <tree-ish> [--] <pathspec>... | |
| 16 | + | git checkout <tree-ish> --pathspec-from-file=<file> [--pathspec-file-nul] | |
| 17 | 17 | git checkout [-f|--ours|--theirs|-m|--conflict=<style>] [--] <pathspec>... | |
| 18 | 18 | git checkout [-f|--ours|--theirs|-m|--conflict=<style>] --pathspec-from-file=<file> [--pathspec-file-nul] | |
| 19 | 19 | git checkout (-p|--patch) [<tree-ish>] [--] [<pathspec>...] | |
| 20 | 20 | ||
| 21 | 21 | DESCRIPTION | |
| 22 | 22 | ----------- | |
| 23 | - | Updates files in the working tree to match the version in the index | |
| 24 | - | or the specified tree. If no pathspec was given, `git checkout` will | |
| 25 | - | also update `HEAD` to set the specified branch as the current | |
| 26 | - | branch. | |
| 23 | + | ||
| 24 | + | `git checkout` has two main modes: | |
| 25 | + | ||
| 26 | + | 1. **Switch branches**, with `git checkout <branch>` | |
| 27 | + | 2. **Restore a different version of a file**, for example with | |
| 28 | + | `git checkout <commit> <filename>` or `git checkout <filename>` | |
| 29 | + | ||
| 30 | + | See ARGUMENT DISAMBIGUATION below for how Git decides which one to do. | |
| 27 | 31 | ||
| 28 | 32 | `git checkout [<branch>]`:: | |
| 29 | - | To prepare for working on _<branch>_, switch to it by updating | |
| 30 | - | the index and the files in the working tree, and by pointing | |
| 31 | - | `HEAD` at the branch. Local modifications to the files in the | |
| 32 | - | working tree are kept, so that they can be committed to the | |
| 33 | - | _<branch>_. | |
| 33 | + | Switch to _<branch>_. This sets the current branch to _<branch>_ and | |
| 34 | + | updates the files in your working directory. The checkout will fail | |
| 35 | + | if there are uncommitted changes to any files where _<branch>_ and | |
| 36 | + | your current commit have different content. Uncommitted changes will | |
| 37 | + | otherwise be kept. | |
| 34 | 38 | + | |
| 35 | 39 | If _<branch>_ is not found but there does exist a tracking branch in | |
| 36 | 40 | exactly one remote (call it _<remote>_) with a matching name and | |
| @@ -40,68 +44,63 @@ exactly one remote (call it _<remote>_) with a matching name and | |||
| 40 | 44 | $ git checkout -b <branch> --track <remote>/<branch> | |
| 41 | 45 | ------------ | |
| 42 | 46 | + | |
| 43 | - | You could omit _<branch>_, in which case the command degenerates to | |
| 44 | - | "check out the current branch", which is a glorified no-op with | |
| 45 | - | rather expensive side-effects to show only the tracking information, | |
| 46 | - | if it exists, for the current branch. | |
| 47 | - | ||
| 48 | - | `git checkout (-b|-B) <new-branch> [<start-point>]`:: | |
| 49 | - | ||
| 50 | - | Specifying `-b` causes a new branch to be created as if | |
| 51 | - | linkgit:git-branch[1] were called and then checked out. In | |
| 52 | - | this case you can use the `--track` or `--no-track` options, | |
| 53 | - | which will be passed to `git branch`. As a convenience, | |
| 54 | - | `--track` without `-b` implies branch creation; see the | |
| 55 | - | description of `--track` below. | |
| 56 | - | + | |
| 57 | - | If `-B` is given, _<new-branch>_ is created if it doesn't exist; otherwise, it | |
| 58 | - | is reset. This is the transactional equivalent of | |
| 59 | - | + | |
| 60 | - | ------------ | |
| 61 | - | $ git branch -f <branch> [<start-point>] | |
| 62 | - | $ git checkout <branch> | |
| 63 | - | ------------ | |
| 47 | + | Running `git checkout` without specifying a branch has no effect except | |
| 48 | + | to print out the tracking information for the current branch. | |
| 49 | + | ||
| 50 | + | `git checkout -b <new-branch> [<start-point>]`:: | |
| 51 | + | ||
| 52 | + | Create a new branch named _<new-branch>_, start it at _<start-point>_ | |
| 53 | + | (defaults to the current commit), and check out the new branch. | |
| 54 | + | You can use the `--track` or `--no-track` options to set the branch's | |
| 55 | + | upstream tracking information. | |
| 64 | 56 | + | |
| 65 | - | that is to say, the branch is not reset/created unless "git checkout" is | |
| 66 | - | successful (e.g., when the branch is in use in another worktree, not | |
| 67 | - | just the current branch stays the same, but the branch is not reset to | |
| 68 | - | the start-point, either). | |
| 57 | + | This will fail if there's an error checking out _<new-branch>_, for | |
| 58 | + | example if checking out the `<start-point>` commit would overwrite your | |
| 59 | + | uncommitted changes. | |
| 60 | + | ||
| 61 | + | `git checkout -B <branch> [<start-point>]`:: | |
| 62 | + | ||
| 63 | + | The same as `-b`, except that if the branch already exists it | |
| 64 | + | resets _<branch>_ to the start point instead of failing. | |
| 69 | 65 | ||
| 70 | 66 | `git checkout --detach [<branch>]`:: | |
| 71 | 67 | `git checkout [--detach] <commit>`:: | |
| 72 | 68 | ||
| 73 | - | Prepare to work on top of _<commit>_, by detaching `HEAD` at it | |
| 74 | - | (see "DETACHED HEAD" section), and updating the index and the | |
| 75 | - | files in the working tree. Local modifications to the files | |
| 76 | - | in the working tree are kept, so that the resulting working | |
| 77 | - | tree will be the state recorded in the commit plus the local | |
| 78 | - | modifications. | |
| 79 | - | + | |
| 80 | - | When the _<commit>_ argument is a branch name, the `--detach` option can | |
| 81 | - | be used to detach `HEAD` at the tip of the branch (`git checkout | |
| 82 | - | <branch>` would check out that branch without detaching `HEAD`). | |
| 69 | + | The same as `git checkout <branch>`, except that instead of pointing | |
| 70 | + | `HEAD` at the branch, it points `HEAD` at the commit ID. | |
| 71 | + | See the "DETACHED HEAD" section below for more. | |
| 83 | 72 | + | |
| 84 | 73 | Omitting _<branch>_ detaches `HEAD` at the tip of the current branch. | |
| 85 | 74 | ||
| 86 | - | `git checkout [-f|--ours|--theirs|-m|--conflict=<style>] [<tree-ish>] [--] <pathspec>...`:: | |
| 87 | - | `git checkout [-f|--ours|--theirs|-m|--conflict=<style>] [<tree-ish>] --pathspec-from-file=<file> [--pathspec-file-nul]`:: | |
| 75 | + | `git checkout <tree-ish> [--] <pathspec>...`:: | |
| 76 | + | `git checkout <tree-ish> --pathspec-from-file=<file> [--pathspec-file-nul]`:: | |
| 77 | + | ||
| 78 | + | Replace the specified files and/or directories with the version from | |
| 79 | + | the given commit or tree and add them to the index | |
| 80 | + | (also known as "staging area"). | |
| 81 | + | + | |
| 82 | + | For example, `git checkout main file.txt` will replace `file.txt` | |
| 83 | + | with the version from `main`. | |
| 84 | + | ||
| 85 | + | `git checkout [-f|--ours|--theirs|-m|--conflict=<style>] [--] <pathspec>...`:: | |
| 86 | + | `git checkout [-f|--ours|--theirs|-m|--conflict=<style>] --pathspec-from-file=<file> [--pathspec-file-nul]`:: | |
| 88 | 87 | ||
| 89 | - | Overwrite the contents of the files that match the pathspec. | |
| 90 | - | When the _<tree-ish>_ (most often a commit) is not given, | |
| 91 | - | overwrite working tree with the contents in the index. | |
| 92 | - | When the _<tree-ish>_ is given, overwrite both the index and | |
| 93 | - | the working tree with the contents at the _<tree-ish>_. | |
| 88 | + | Replace the specified files and/or directories with the version from | |
| 89 | + | the index. | |
| 94 | 90 | + | |
| 95 | - | The index may contain unmerged entries because of a previous failed merge. | |
| 96 | - | By default, if you try to check out such an entry from the index, the | |
| 97 | - | checkout operation will fail and nothing will be checked out. | |
| 98 | - | Using `-f` will ignore these unmerged entries. The contents from a | |
| 99 | - | specific side of the merge can be checked out of the index by | |
| 100 | - | using `--ours` or `--theirs`. With `-m`, changes made to the working tree | |
| 101 | - | file can be discarded to re-create the original conflicted merge result. | |
| 91 | + | For example, if you check out a commit, edit `file.txt`, and then | |
| 92 | + | decide those changes were a mistake, `git checkout file.txt` will | |
| 93 | + | discard any unstaged changes to `file.txt`. | |
| 94 | + | + | |
| 95 | + | This will fail if the file has a merge conflict and you haven't yet run | |
| 96 | + | `git add file.txt` (or something equivalent) to mark it as resolved. | |
| 97 | + | You can use `-f` to ignore the unmerged files instead of failing, use | |
| 98 | + | `--ours` or `--theirs` to replace them with the version from a specific | |
| 99 | + | side of the merge, or use `-m` to replace them with the original | |
| 100 | + | conflicted merge result. | |
| 102 | 101 | ||
| 103 | 102 | `git checkout (-p|--patch) [<tree-ish>] [--] [<pathspec>...]`:: | |
| 104 | - | This is similar to the previous mode, but lets you use the | |
| 103 | + | This is similar to the previous two modes, but lets you use the | |
| 105 | 104 | interactive interface to show the "diff" output and choose which | |
| 106 | 105 | hunks to use in the result. See below for the description of | |
| 107 | 106 | `--patch` option. | |
| @@ -155,16 +154,14 @@ of it"). | |||
| 155 | 154 | see linkgit:git-branch[1] for details. | |
| 156 | 155 | ||
| 157 | 156 | `-B <new-branch>`:: | |
| 158 | - | Creates the branch _<new-branch>_, start it at _<start-point>_; | |
| 159 | - | if it already exists, then reset it to _<start-point>_. And then | |
| 160 | - | check the resulting branch out. This is equivalent to running | |
| 161 | - | `git branch` with `-f` followed by `git checkout` of that branch; | |
| 162 | - | see linkgit:git-branch[1] for details. | |
| 157 | + | The same as `-b`, except that if the branch already exists it | |
| 158 | + | resets _<branch>_ to the start point instead of failing. | |
| 163 | 159 | ||
| 164 | 160 | `-t`:: | |
| 165 | 161 | `--track[=(direct|inherit)]`:: | |
| 166 | 162 | When creating a new branch, set up "upstream" configuration. See | |
| 167 | - | `--track` in linkgit:git-branch[1] for details. | |
| 163 | + | `--track` in linkgit:git-branch[1] for details. As a convenience, | |
| 164 | + | --track without -b implies branch creation. | |
| 168 | 165 | + | |
| 169 | 166 | If no `-b` option is given, the name of the new branch will be | |
| 170 | 167 | derived from the remote-tracking branch, by looking at the local part of | |
| @@ -254,20 +251,19 @@ working tree, by copying them from elsewhere, extracting a tarball, etc. | |||
| 254 | 251 | are different between the current branch and the branch to | |
| 255 | 252 | which you are switching, the command refuses to switch | |
| 256 | 253 | branches in order to preserve your modifications in context. | |
| 257 | - | However, with this option, a three-way merge between the current | |
| 258 | - | branch, your working tree contents, and the new branch | |
| 259 | - | is done, and you will be on the new branch. | |
| 260 | - | + | |
| 261 | - | When a merge conflict happens, the index entries for conflicting | |
| 262 | - | paths are left unmerged, and you need to resolve the conflicts | |
| 263 | - | and mark the resolved paths with `git add` (or `git rm` if the merge | |
| 264 | - | should result in deletion of the path). | |
| 254 | + | With this option, the conflicting local changes are | |
| 255 | + | automatically stashed before the switch and reapplied | |
| 256 | + | afterwards. If the local changes do not overlap with the | |
| 257 | + | differences between branches, the switch proceeds without | |
| 258 | + | stashing. If reapplying the stash results in conflicts, the | |
| 259 | + | entry is saved to the stash list. Resolve the conflicts | |
| 260 | + | and run `git stash drop` when done, or clear the working | |
| 261 | + | tree (e.g. with `git reset --hard`) before running `git stash | |
| 262 | + | pop` later to re-apply your changes. | |
| 265 | 263 | + | |
| 266 | 264 | When checking out paths from the index, this option lets you recreate | |
| 267 | 265 | the conflicted merge in the specified paths. This option cannot be | |
| 268 | 266 | used when checking out paths from a tree-ish. | |
| 269 | - | + | |
| 270 | - | When switching branches with `--merge`, staged changes may be lost. | |
| 271 | 267 | ||
| 272 | 268 | `--conflict=<style>`:: | |
| 273 | 269 | The same as `--merge` option above, but changes the way the | |
| @@ -289,6 +285,8 @@ section of linkgit:git-add[1] to learn how to operate the `--patch` mode. | |||
| 289 | 285 | Note that this option uses the no overlay mode by default (see also | |
| 290 | 286 | `--overlay`), and currently doesn't support overlay mode. | |
| 291 | 287 | ||
| 288 | + | include::diff-context-options.adoc[] | |
| 289 | + | ||
| 292 | 290 | `--ignore-other-worktrees`:: | |
| 293 | 291 | `git checkout` refuses when the wanted branch is already checked | |
| 294 | 292 | out or otherwise in use by another worktree. This option makes | |
| @@ -332,7 +330,7 @@ Note that this option uses the no overlay mode by default (see also | |||
| 332 | 330 | separated with _NUL_ character and all other characters are taken | |
| 333 | 331 | literally (including newlines and quotes). | |
| 334 | 332 | ||
| 335 | - | <branch>:: | |
| 333 | + | `<branch>`:: | |
| 336 | 334 | Branch to checkout; if it refers to a branch (i.e., a name that, | |
| 337 | 335 | when prepended with "refs/heads/", is a valid ref), then that | |
| 338 | 336 | branch is checked out. Otherwise, if it refers to a valid | |
| @@ -509,14 +507,18 @@ $ git log -g -2 HEAD | |||
| 509 | 507 | ARGUMENT DISAMBIGUATION | |
| 510 | 508 | ----------------------- | |
| 511 | 509 | ||
| 512 | - | When there is only one argument given and it is not `--` (e.g. `git | |
| 513 | - | checkout abc`), and when the argument is both a valid _<tree-ish>_ | |
| 514 | - | (e.g. a branch `abc` exists) and a valid _<pathspec>_ (e.g. a file | |
| 515 | - | or a directory whose name is "abc" exists), Git would usually ask | |
| 516 | - | you to disambiguate. Because checking out a branch is so common an | |
| 517 | - | operation, however, `git checkout abc` takes "abc" as a _<tree-ish>_ | |
| 518 | - | in such a situation. Use `git checkout -- <pathspec>` if you want | |
| 519 | - | to checkout these paths out of the index. | |
| 510 | + | When you run `git checkout <something>`, Git tries to guess whether | |
| 511 | + | _<something>_ is intended to be a branch, a commit, or a set of file(s), | |
| 512 | + | and then either switches to that branch or commit, or restores the | |
| 513 | + | specified files. | |
| 514 | + | ||
| 515 | + | If there's any ambiguity, Git will treat `<something>` as a branch or | |
| 516 | + | commit, but you can use the double dash `--` to force Git to treat the | |
| 517 | + | parameter as a list of files and/or directories, like this: | |
| 518 | + | ||
| 519 | + | ---------- | |
| 520 | + | git checkout -- file.txt | |
| 521 | + | ---------- | |
| 520 | 522 | ||
| 521 | 523 | EXAMPLES | |
| 522 | 524 | -------- | |
| @@ -575,38 +577,36 @@ $ git checkout mytopic | |||
| 575 | 577 | error: You have local changes to 'frotz'; not switching branches. | |
| 576 | 578 | ------------ | |
| 577 | 579 | ||
| 578 | - | You can give the `-m` flag to the command, which would try a | |
| 579 | - | three-way merge: | |
| 580 | + | You can give the `-m` flag to the command, which will carry your local | |
| 581 | + | changes to the new branch: | |
| 580 | 582 | ||
| 581 | 583 | ------------ | |
| 582 | 584 | $ git checkout -m mytopic | |
| 583 | - | Auto-merging frotz | |
| 585 | + | Applied autostash. | |
| 586 | + | Switched to branch 'mytopic' | |
| 587 | + | The following paths have local changes: | |
| 588 | + | M frotz | |
| 584 | 589 | ------------ | |
| 585 | 590 | ||
| 586 | - | After this three-way merge, the local modifications are _not_ | |
| 591 | + | After the switch, the local modifications are reapplied and are _not_ | |
| 587 | 592 | registered in your index file, so `git diff` would show you what | |
| 588 | 593 | changes you made since the tip of the new branch. | |
| 589 | 594 | ||
| 590 | 595 | === 3. Merge conflict | |
| 591 | 596 | ||
| 592 | - | When a merge conflict happens during switching branches with | |
| 593 | - | the `-m` option, you would see something like this: | |
| 597 | + | When the `--merge` (`-m`) option is given and the local changes | |
| 598 | + | overlap with the changes in the branch we're switching to, the | |
| 599 | + | changes are stashed and reapplied after the switch. If this | |
| 600 | + | process results in conflicts, the stash entry is saved and a | |
| 601 | + | message is printed: | |
| 594 | 602 | ||
| 595 | 603 | ------------ | |
| 596 | 604 | $ git checkout -m mytopic | |
| 597 | - | Auto-merging frotz | |
| 598 | - | ERROR: Merge conflict in frotz | |
| 599 | - | fatal: merge program failed | |
| 600 | - | ------------ | |
| 601 | - | ||
| 602 | - | At this point, `git diff` shows the changes cleanly merged as in | |
| 603 | - | the previous example, as well as the changes in the conflicted | |
| 604 | - | files. Edit and resolve the conflict and mark it resolved with | |
| 605 | - | `git add` as usual: | |
| 606 | - | ||
| 607 | - | ------------ | |
| 608 | - | $ edit frotz | |
| 609 | - | $ git add frotz | |
| 605 | + | Your local changes are stashed, however applying them | |
| 606 | + | resulted in conflicts. You can either resolve the conflicts | |
| 607 | + | and then discard the stash with "git stash drop", or, if you | |
| 608 | + | do not want to resolve them now, run "git reset --hard" and | |
| 609 | + | apply the local changes later by running "git stash pop". | |
| 610 | 610 | ------------ | |
| 611 | 611 | ||
| 612 | 612 | CONFIGURATION | |
modified Documentation/git-clone.adoc
| @@ -16,7 +16,7 @@ git clone [--template=<template-directory>] | |||
| 16 | 16 | [--depth <depth>] [--[no-]single-branch] [--[no-]tags] | |
| 17 | 17 | [--recurse-submodules[=<pathspec>]] [--[no-]shallow-submodules] | |
| 18 | 18 | [--[no-]remote-submodules] [--jobs <n>] [--sparse] [--[no-]reject-shallow] | |
| 19 | - | [--filter=<filter-spec>] [--also-filter-submodules]] [--] <repository> | |
| 19 | + | [--filter=<filter-spec> [--also-filter-submodules]] [--] <repository> | |
| 20 | 20 | [<directory>] | |
| 21 | 21 | ||
| 22 | 22 | DESCRIPTION | |
| @@ -84,7 +84,7 @@ _<src>_. | |||
| 84 | 84 | with the source repository. The resulting repository | |
| 85 | 85 | starts out without any object of its own. | |
| 86 | 86 | + | |
| 87 | - | *NOTE*: this is a possibly dangerous operation; do *not* use | |
| 87 | + | NOTE: this is a possibly dangerous operation; do *not* use | |
| 88 | 88 | it unless you understand what it does. If you clone your | |
| 89 | 89 | repository using this option and then delete branches (or use any | |
| 90 | 90 | other Git command that makes any existing commit unreferenced) in the | |
| @@ -104,7 +104,8 @@ If you want to break the dependency of a repository cloned with `--shared` on | |||
| 104 | 104 | its source repository, you can simply run `git repack -a` to copy all | |
| 105 | 105 | objects from the source repository into a pack in the cloned repository. | |
| 106 | 106 | ||
| 107 | - | `--reference[-if-able] <repository>`:: | |
| 107 | + | `--reference=<repository>`:: | |
| 108 | + | `--reference-if-able=<repository>`:: | |
| 108 | 109 | If the reference _<repository>_ is on the local machine, | |
| 109 | 110 | automatically setup `.git/objects/info/alternates` to | |
| 110 | 111 | obtain objects from the reference _<repository>_. Using | |
| @@ -115,7 +116,7 @@ objects from the source repository into a pack in the cloned repository. | |||
| 115 | 116 | directory is skipped with a warning instead of aborting | |
| 116 | 117 | the clone. | |
| 117 | 118 | + | |
| 118 | - | *NOTE*: see the NOTE for the `--shared` option, and also the | |
| 119 | + | NOTE: see the NOTE for the `--shared` option, and also the | |
| 119 | 120 | `--dissociate` option. | |
| 120 | 121 | ||
| 121 | 122 | `--dissociate`:: | |
| @@ -140,27 +141,28 @@ objects from the source repository into a pack in the cloned repository. | |||
| 140 | 141 | to the standard error stream. | |
| 141 | 142 | ||
| 142 | 143 | `--progress`:: | |
| 143 | - | Progress status is reported on the standard error stream | |
| 144 | - | by default when it is attached to a terminal, unless `--quiet` | |
| 144 | + | Report progress status on the standard error stream | |
| 145 | + | by default when attached to a terminal, unless `--quiet` | |
| 145 | 146 | is specified. This flag forces progress status even if the | |
| 146 | 147 | standard error stream is not directed to a terminal. | |
| 147 | 148 | ||
| 148 | 149 | `--server-option=<option>`:: | |
| 149 | 150 | Transmit the given string to the server when communicating using | |
| 150 | - | protocol version 2. The given string must not contain a NUL or LF | |
| 151 | + | protocol version 2. The given string must not contain a _NUL_ or _LF_ | |
| 151 | 152 | character. The server's handling of server options, including | |
| 152 | 153 | unknown ones, is server-specific. | |
| 153 | 154 | When multiple `--server-option=<option>` are given, they are all | |
| 154 | 155 | sent to the other side in the order listed on the command line. | |
| 155 | - | When no ++--server-option=++__<option>__ is given from the command | |
| 156 | + | When no `--server-option=<option>` is given from the command | |
| 156 | 157 | line, the values of configuration variable `remote.<name>.serverOption` | |
| 157 | 158 | are used instead. | |
| 158 | 159 | ||
| 159 | 160 | `-n`:: | |
| 160 | 161 | `--no-checkout`:: | |
| 161 | - | No checkout of `HEAD` is performed after the clone is complete. | |
| 162 | + | Do not checkout `HEAD` after the clone is complete. | |
| 162 | 163 | ||
| 163 | - | `--`[`no-`]`reject-shallow`:: | |
| 164 | + | `--no-reject-shallow`:: | |
| 165 | + | `--reject-shallow`:: | |
| 164 | 166 | Fail if the source repository is a shallow repository. | |
| 165 | 167 | The `clone.rejectShallow` configuration variable can be used to | |
| 166 | 168 | specify the default. | |
| @@ -187,11 +189,26 @@ objects from the source repository into a pack in the cloned repository. | |||
| 187 | 189 | Use the partial clone feature and request that the server sends | |
| 188 | 190 | a subset of reachable objects according to a given object filter. | |
| 189 | 191 | When using `--filter`, the supplied _<filter-spec>_ is used for | |
| 190 | - | the partial clone filter. For example, `--filter=blob:none` will | |
| 191 | - | filter out all blobs (file contents) until needed by Git. Also, | |
| 192 | - | `--filter=blob:limit=<size>` will filter out all blobs of size | |
| 193 | - | at least _<size>_. For more details on filter specifications, see | |
| 194 | - | the `--filter` option in linkgit:git-rev-list[1]. | |
| 192 | + | the partial clone filter. | |
| 193 | + | + | |
| 194 | + | If `--filter=auto` is used the filter specification is determined | |
| 195 | + | automatically through the 'promisor-remote' protocol (see | |
| 196 | + | linkgit:gitprotocol-v2[5]) by combining the filter specifications | |
| 197 | + | advertised by the server for the promisor remotes that the client | |
| 198 | + | accepts (see the `promisor.acceptFromServer` configuration option in | |
| 199 | + | linkgit:git-config[1]). This allows the server to suggest the optimal | |
| 200 | + | filter for the available promisor remotes. | |
| 201 | + | + | |
| 202 | + | As with other filter specifications, the "auto" value is persisted in | |
| 203 | + | the configuration. This ensures that future fetches will continue to | |
| 204 | + | adapt to the server's current recommendation. | |
| 205 | + | + | |
| 206 | + | For details on all other available filter specifications, see the | |
| 207 | + | `--filter=<filter-spec>` option in linkgit:git-rev-list[1]. | |
| 208 | + | + | |
| 209 | + | For example, `--filter=blob:none` will filter out all blobs (file | |
| 210 | + | contents) until needed by Git. Also, `--filter=blob:limit=<size>` will | |
| 211 | + | filter out all blobs of size at least _<size>_. | |
| 195 | 212 | ||
| 196 | 213 | `--also-filter-submodules`:: | |
| 197 | 214 | Also apply the partial clone filter to any submodules in the repository. | |
| @@ -206,18 +223,17 @@ objects from the source repository into a pack in the cloned repository. | |||
| 206 | 223 | that all these refs are overwritten by a `git remote update` in the | |
| 207 | 224 | target repository. | |
| 208 | 225 | ||
| 209 | - | `-o` _<name>_:: | |
| 210 | - | `--origin` _<name>_:: | |
| 226 | + | `-o<name>`:: | |
| 227 | + | `--origin=<name>`:: | |
| 211 | 228 | Instead of using the remote name `origin` to keep track of the upstream | |
| 212 | 229 | repository, use _<name>_. Overrides `clone.defaultRemoteName` from the | |
| 213 | 230 | config. | |
| 214 | 231 | ||
| 215 | - | `-b` _<name>_:: | |
| 216 | - | `--branch` _<name>_:: | |
| 217 | - | Instead of pointing the newly created `HEAD` to the branch pointed | |
| 218 | - | to by the cloned repository's `HEAD`, point to _<name>_ branch | |
| 219 | - | instead. In a non-bare repository, this is the branch that will | |
| 220 | - | be checked out. | |
| 232 | + | `-b<name>`:: | |
| 233 | + | `--branch=<name>`:: | |
| 234 | + | Point the newly created `HEAD` to _<name>_ branch instead of the branch | |
| 235 | + | pointed to by the cloned repository's `HEAD`. In a non-bare repository, | |
| 236 | + | this is the branch that will be checked out. | |
| 221 | 237 | `--branch` can also take tags and detaches the `HEAD` at that commit | |
| 222 | 238 | in the resulting repository. | |
| 223 | 239 | ||
| @@ -230,18 +246,17 @@ objects from the source repository into a pack in the cloned repository. | |||
| 230 | 246 | name. | |
| 231 | 247 | This option is incompatible with `--branch` and `--mirror`. | |
| 232 | 248 | ||
| 233 | - | `-u` _<upload-pack>_:: | |
| 234 | - | `--upload-pack` _<upload-pack>_:: | |
| 235 | - | When given, and the repository to clone from is accessed | |
| 236 | - | via ssh, this specifies a non-default path for the command | |
| 237 | - | run on the other end. | |
| 249 | + | `-u<upload-pack>`:: | |
| 250 | + | `--upload-pack=<upload-pack>`:: | |
| 251 | + | Specify a non-default path for the command run on the other end when the | |
| 252 | + | repository to clone from is accessed via ssh. | |
| 238 | 253 | ||
| 239 | 254 | `--template=<template-directory>`:: | |
| 240 | 255 | Specify the directory from which templates will be used; | |
| 241 | 256 | (See the "TEMPLATE DIRECTORY" section of linkgit:git-init[1].) | |
| 242 | 257 | ||
| 243 | - | `-c` `<key>=<value>`:: | |
| 244 | - | `--config` `<key>=<value>`:: | |
| 258 | + | `-c<key>=<value>`:: | |
| 259 | + | `--config=<key>=<value>`:: | |
| 245 | 260 | Set a configuration variable in the newly-created repository; | |
| 246 | 261 | this takes effect immediately after the repository is | |
| 247 | 262 | initialized, but before the remote history is fetched or any | |
| @@ -257,7 +272,7 @@ Configuration variables known to not take effect are: | |||
| 257 | 272 | `remote.<name>.mirror` and `remote.<name>.tagOpt`. Use the | |
| 258 | 273 | corresponding `--mirror` and `--no-tags` options instead. | |
| 259 | 274 | ||
| 260 | - | `--depth <depth>`:: | |
| 275 | + | `--depth=<depth>`:: | |
| 261 | 276 | Create a 'shallow' clone with a history truncated to the | |
| 262 | 277 | specified number of commits. Implies `--single-branch` unless | |
| 263 | 278 | `--no-single-branch` is given to fetch the histories near the | |
| @@ -272,7 +287,8 @@ corresponding `--mirror` and `--no-tags` options instead. | |||
| 272 | 287 | reachable from a specified remote branch or tag. This option | |
| 273 | 288 | can be specified multiple times. | |
| 274 | 289 | ||
| 275 | - | `--[no-]single-branch`:: | |
| 290 | + | `--single-branch`:: | |
| 291 | + | `--no-single-branch`:: | |
| 276 | 292 | Clone only the history leading to the tip of a single branch, | |
| 277 | 293 | either specified by the `--branch` option or the primary | |
| 278 | 294 | branch remote's `HEAD` points at. | |
| @@ -282,7 +298,8 @@ corresponding `--mirror` and `--no-tags` options instead. | |||
| 282 | 298 | branch when `--single-branch` clone was made, no remote-tracking | |
| 283 | 299 | branch is created. | |
| 284 | 300 | ||
| 285 | - | `--[no-]tags`:: | |
| 301 | + | `--tags`:: | |
| 302 | + | `--no-tags`:: | |
| 286 | 303 | Control whether or not tags will be cloned. When `--no-tags` is | |
| 287 | 304 | given, the option will be become permanent by setting the | |
| 288 | 305 | `remote.<remote>.tagOpt=--no-tags` configuration. This ensures that | |
| @@ -313,10 +330,12 @@ the clone is finished. This option is ignored if the cloned repository does | |||
| 313 | 330 | not have a worktree/checkout (i.e. if any of `--no-checkout`/`-n`, `--bare`, | |
| 314 | 331 | or `--mirror` is given) | |
| 315 | 332 | ||
| 316 | - | `--[no-]shallow-submodules`:: | |
| 333 | + | `--shallow-submodules`:: | |
| 334 | + | `--no-shallow-submodules`:: | |
| 317 | 335 | All submodules which are cloned will be shallow with a depth of 1. | |
| 318 | 336 | ||
| 319 | - | `--[no-]remote-submodules`:: | |
| 337 | + | `--remote-submodules`:: | |
| 338 | + | `--no-remote-submodules`:: | |
| 320 | 339 | All submodules which are cloned will use the status of the submodule's | |
| 321 | 340 | remote-tracking branch to update the submodule, rather than the | |
| 322 | 341 | superproject's recorded SHA-1. Equivalent to passing `--remote` to | |
| @@ -335,8 +354,8 @@ Specify the given ref storage format for the repository. The valid values are: | |||
| 335 | 354 | + | |
| 336 | 355 | include::ref-storage-format.adoc[] | |
| 337 | 356 | ||
| 338 | - | `-j` _<n>_:: | |
| 339 | - | `--jobs` _<n>_:: | |
| 357 | + | `-j<n>`:: | |
| 358 | + | `--jobs=<n>`:: | |
| 340 | 359 | The number of submodules fetched at the same time. | |
| 341 | 360 | Defaults to the `submodule.fetchJobs` option. | |
| 342 | 361 | ||
modified Documentation/git-commit-graph.adoc
| @@ -34,7 +34,8 @@ OPTIONS | |||
| 34 | 34 | object directory, `git commit-graph ...` will exit with non-zero | |
| 35 | 35 | status. | |
| 36 | 36 | ||
| 37 | - | --[no-]progress:: | |
| 37 | + | --progress:: | |
| 38 | + | --no-progress:: | |
| 38 | 39 | Turn progress on/off explicitly. If neither is specified, progress is | |
| 39 | 40 | shown if standard error is connected to a terminal. | |
| 40 | 41 | ||
| @@ -70,7 +71,7 @@ take a while on large repositories. It provides significant performance gains | |||
| 70 | 71 | for getting history of a directory or a file with `git log -- <path>`. If | |
| 71 | 72 | this option is given, future commit-graph writes will automatically assume | |
| 72 | 73 | that this option was intended. Use `--no-changed-paths` to stop storing this | |
| 73 | - | data. | |
| 74 | + | data. `--changed-paths` is implied by config `commitGraph.changedPaths=true`. | |
| 74 | 75 | + | |
| 75 | 76 | With the `--max-new-filters=<n>` option, generate at most `n` new Bloom | |
| 76 | 77 | filters (if `--changed-paths` is specified). If `n` is `-1`, no limit is | |
| @@ -145,6 +146,12 @@ $ git show-ref -s | git commit-graph write --stdin-commits | |||
| 145 | 146 | $ git rev-parse HEAD | git commit-graph write --stdin-commits --append | |
| 146 | 147 | ------------------------------------------------ | |
| 147 | 148 | ||
| 149 | + | CAVEATS | |
| 150 | + | ------- | |
| 151 | + | ||
| 152 | + | The existence of replace objects or commit grafts turns off reading or | |
| 153 | + | writing to the commit-graph. See linkgit:git-replace[1]. | |
| 154 | + | ||
| 148 | 155 | CONFIGURATION | |
| 149 | 156 | ------------- | |
| 150 | 157 | ||
modified Documentation/git-commit.adoc
| @@ -76,6 +76,8 @@ OPTIONS | |||
| 76 | 76 | which changes to commit. See linkgit:git-add[1] for | |
| 77 | 77 | details. | |
| 78 | 78 | ||
| 79 | + | include::diff-context-options.adoc[] | |
| 80 | + | ||
| 79 | 81 | `-C <commit>`:: | |
| 80 | 82 | `--reuse-message=<commit>`:: | |
| 81 | 83 | Take an existing _<commit>_ object, and reuse the log message | |
| @@ -144,7 +146,8 @@ See linkgit:git-rebase[1] for details. | |||
| 144 | 146 | linkgit:git-status[1] for details. Implies `--dry-run`. | |
| 145 | 147 | ||
| 146 | 148 | `--branch`:: | |
| 147 | - | Show the branch and tracking info even in short-format. | |
| 149 | + | Show the branch and tracking info even in short-format. See | |
| 150 | + | linkgit:git-status[1] for details. | |
| 148 | 151 | ||
| 149 | 152 | `--porcelain`:: | |
| 150 | 153 | When doing a dry-run, give the output in a porcelain-ready | |
| @@ -152,12 +155,13 @@ See linkgit:git-rebase[1] for details. | |||
| 152 | 155 | `--dry-run`. | |
| 153 | 156 | ||
| 154 | 157 | `--long`:: | |
| 155 | - | When doing a dry-run, give the output in the long-format. | |
| 156 | - | Implies `--dry-run`. | |
| 158 | + | When doing a dry-run, give the output in the long-format. This | |
| 159 | + | is the default output of linkgit:git-status[1]. Implies | |
| 160 | + | `--dry-run`. | |
| 157 | 161 | ||
| 158 | 162 | `-z`:: | |
| 159 | 163 | `--null`:: | |
| 160 | - | When showing `short` or `porcelain` status output, print the | |
| 164 | + | When showing `short` or `porcelain` linkgit:git-status[1] output, print the | |
| 161 | 165 | filename verbatim and terminate the entries with _NUL_, instead of _LF_. | |
| 162 | 166 | If no format is given, implies the `--porcelain` output format. | |
| 163 | 167 | Without the `-z` option, filenames with "unusual" characters are | |
| @@ -212,7 +216,8 @@ include::signoff-option.adoc[] | |||
| 212 | 216 | each trailer would appear, and other details. | |
| 213 | 217 | ||
| 214 | 218 | `-n`:: | |
| 215 | - | `--[no-]verify`:: | |
| 219 | + | `--verify`:: | |
| 220 | + | `--no-verify`:: | |
| 216 | 221 | Bypass the `pre-commit` and `commit-msg` hooks. | |
| 217 | 222 | See also linkgit:githooks[5]. | |
| 218 | 223 | ||
| @@ -279,6 +284,7 @@ variable (see linkgit:git-config[1]). | |||
| 279 | 284 | + | |
| 280 | 285 | -- | |
| 281 | 286 | It is a rough equivalent for: | |
| 287 | + | ||
| 282 | 288 | ------ | |
| 283 | 289 | $ git reset --soft HEAD^ | |
| 284 | 290 | $ ... do something else to come up with the right tree ... | |
modified Documentation/git-config.adoc
| @@ -10,9 +10,9 @@ SYNOPSIS | |||
| 10 | 10 | -------- | |
| 11 | 11 | [verse] | |
| 12 | 12 | 'git config list' [<file-option>] [<display-option>] [--includes] | |
| 13 | - | 'git config get' [<file-option>] [<display-option>] [--includes] [--all] [--regexp] [--value=<value>] [--fixed-value] [--default=<default>] <name> | |
| 14 | - | 'git config set' [<file-option>] [--type=<type>] [--all] [--value=<value>] [--fixed-value] <name> <value> | |
| 15 | - | 'git config unset' [<file-option>] [--all] [--value=<value>] [--fixed-value] <name> | |
| 13 | + | 'git config get' [<file-option>] [<display-option>] [--includes] [--all] [--regexp] [--value=<pattern>] [--fixed-value] [--default=<default>] [--url=<url>] <name> | |
| 14 | + | 'git config set' [<file-option>] [--type=<type>] [--all] [--value=<pattern>] [--fixed-value] <name> <value> | |
| 15 | + | 'git config unset' [<file-option>] [--all] [--value=<pattern>] [--fixed-value] <name> | |
| 16 | 16 | 'git config rename-section' [<file-option>] <old-name> <new-name> | |
| 17 | 17 | 'git config remove-section' [<file-option>] <name> | |
| 18 | 18 | 'git config edit' [<file-option>] | |
| @@ -26,7 +26,7 @@ escaped. | |||
| 26 | 26 | ||
| 27 | 27 | Multiple lines can be added to an option by using the `--append` option. | |
| 28 | 28 | If you want to update or unset an option which can occur on multiple | |
| 29 | - | lines, a `value-pattern` (which is an extended regular expression, | |
| 29 | + | lines, `--value=<pattern>` (which is an extended regular expression, | |
| 30 | 30 | unless the `--fixed-value` option is given) needs to be given. Only the | |
| 31 | 31 | existing values that match the pattern are updated or unset. If | |
| 32 | 32 | you want to handle the lines that do *not* match the pattern, just | |
| @@ -109,7 +109,7 @@ OPTIONS | |||
| 109 | 109 | ||
| 110 | 110 | --replace-all:: | |
| 111 | 111 | Default behavior is to replace at most one line. This replaces | |
| 112 | - | all lines matching the key (and optionally the `value-pattern`). | |
| 112 | + | all lines matching the key (and optionally `--value=<pattern>`). | |
| 113 | 113 | ||
| 114 | 114 | --append:: | |
| 115 | 115 | Adds a new line to the option without altering any existing | |
| @@ -117,15 +117,15 @@ OPTIONS | |||
| 117 | 117 | ||
| 118 | 118 | --comment <message>:: | |
| 119 | 119 | Append a comment at the end of new or modified lines. | |
| 120 | - | ||
| 121 | - | If _<message>_ begins with one or more whitespaces followed | |
| 122 | - | by "#", it is used as-is. If it begins with "#", a space is | |
| 123 | - | prepended before it is used. Otherwise, a string " # " (a | |
| 124 | - | space followed by a hash followed by a space) is prepended | |
| 125 | - | to it. And the resulting string is placed immediately after | |
| 126 | - | the value defined for the variable. The _<message>_ must | |
| 127 | - | not contain linefeed characters (no multi-line comments are | |
| 128 | - | permitted). | |
| 120 | + | + | |
| 121 | + | If _<message>_ begins with one or more whitespaces followed | |
| 122 | + | by `#`, it is used as-is. If it begins with `#`, a space is | |
| 123 | + | prepended before it is used. Otherwise, a string `" # "` (a | |
| 124 | + | space followed by a hash followed by a space) is prepended | |
| 125 | + | to it. The resulting string is placed immediately after | |
| 126 | + | the value defined for the variable. The _<message>_ must | |
| 127 | + | not contain linefeed characters (no multi-line comments are | |
| 128 | + | permitted). | |
| 129 | 129 | ||
| 130 | 130 | --all:: | |
| 131 | 131 | With `get`, return all values for a multi-valued key. | |
| @@ -200,11 +200,19 @@ See also <<FILES>>. | |||
| 200 | 200 | section in linkgit:gitrevisions[7] for a more complete list of | |
| 201 | 201 | ways to spell blob names. | |
| 202 | 202 | ||
| 203 | + | `--value=<pattern>`:: | |
| 204 | + | `--no-value`:: | |
| 205 | + | With `get`, `set`, and `unset`, match only against | |
| 206 | + | _<pattern>_. The pattern is an extended regular expression unless | |
| 207 | + | `--fixed-value` is given. | |
| 208 | + | + | |
| 209 | + | Use `--no-value` to unset _<pattern>_. | |
| 210 | + | ||
| 203 | 211 | --fixed-value:: | |
| 204 | - | When used with the `value-pattern` argument, treat `value-pattern` as | |
| 212 | + | When used with `--value=<pattern>`, treat _<pattern>_ as | |
| 205 | 213 | an exact string instead of a regular expression. This will restrict | |
| 206 | 214 | the name/value pairs that are matched to only those where the value | |
| 207 | - | is exactly equal to the `value-pattern`. | |
| 215 | + | is exactly equal to _<pattern>_. | |
| 208 | 216 | ||
| 209 | 217 | --type <type>:: | |
| 210 | 218 | 'git config' will ensure that any input or output is valid under the given | |
| @@ -213,7 +221,8 @@ See also <<FILES>>. | |||
| 213 | 221 | + | |
| 214 | 222 | Valid `<type>`'s include: | |
| 215 | 223 | + | |
| 216 | - | - 'bool': canonicalize values `true`, `yes`,`on`, and positive | |
| 224 | + | -- | |
| 225 | + | - 'bool': canonicalize values `true`, `yes`, `on`, and positive | |
| 217 | 226 | numbers as "true", and values `false`, `no`, `off` and `0` as | |
| 218 | 227 | "false". | |
| 219 | 228 | - 'int': canonicalize values as simple decimal numbers. An optional suffix of | |
| @@ -231,7 +240,11 @@ Valid `<type>`'s include: | |||
| 231 | 240 | escape sequence. When setting a value, a sanity-check is performed to ensure | |
| 232 | 241 | that the given value is canonicalize-able as an ANSI color, but it is written | |
| 233 | 242 | as-is. | |
| 243 | + | -- | |
| 234 | 244 | + | |
| 245 | + | If the command is in `list` mode, then the `--type <type>` argument will apply | |
| 246 | + | to each listed config value. If the value does not successfully parse in that | |
| 247 | + | format, then it will be omitted from the list. | |
| 235 | 248 | ||
| 236 | 249 | --bool:: | |
| 237 | 250 | --int:: | |
| @@ -259,6 +272,12 @@ Valid `<type>`'s include: | |||
| 259 | 272 | Output only the names of config variables for `list` or | |
| 260 | 273 | `get`. | |
| 261 | 274 | ||
| 275 | + | `--show-names`:: | |
| 276 | + | `--no-show-names`:: | |
| 277 | + | With `get`, show config keys in addition to their values. The | |
| 278 | + | default is `--no-show-names` unless `--url` is given and there | |
| 279 | + | are no subsections in _<name>_. | |
| 280 | + | ||
| 262 | 281 | --show-origin:: | |
| 263 | 282 | Augment the output of all queried config options with the | |
| 264 | 283 | origin type (file, standard input, blob, command line) and | |
| @@ -281,7 +300,8 @@ Valid `<type>`'s include: | |||
| 281 | 300 | When the color setting for `name` is undefined, the command uses | |
| 282 | 301 | `color.ui` as fallback. | |
| 283 | 302 | ||
| 284 | - | --[no-]includes:: | |
| 303 | + | --includes:: | |
| 304 | + | --no-includes:: | |
| 285 | 305 | Respect `include.*` directives in config files when looking up | |
| 286 | 306 | values. Defaults to `off` when a specific file is given (e.g., | |
| 287 | 307 | using `--file`, `--global`, etc) and `on` when searching all | |
| @@ -317,7 +337,7 @@ recommended to migrate to the new syntax. | |||
| 317 | 337 | Replaced by `git config get --all --show-names --regexp <name-regexp>`. | |
| 318 | 338 | ||
| 319 | 339 | --get-urlmatch <name> <URL>:: | |
| 320 | - | Replaced by `git config get --all --show-names --url=<URL> <name>`. | |
| 340 | + | Replaced by `git config get --url=<URL> <name>`. | |
| 321 | 341 | ||
| 322 | 342 | --get-color <name> [<default>]:: | |
| 323 | 343 | Replaced by `git config get --type=color [--default=<default>] <name>`. | |
modified Documentation/git-count-objects.adoc
| @@ -28,6 +28,8 @@ size: disk space consumed by loose objects, in KiB (unless -H is specified) | |||
| 28 | 28 | + | |
| 29 | 29 | in-pack: the number of in-pack objects | |
| 30 | 30 | + | |
| 31 | + | packs: the number of pack files | |
| 32 | + | + | |
| 31 | 33 | size-pack: disk space consumed by the packs, in KiB (unless -H is specified) | |
| 32 | 34 | + | |
| 33 | 35 | prune-packable: the number of loose objects that are also present in | |
modified Documentation/git-describe.adoc
| @@ -7,10 +7,10 @@ git-describe - Give an object a human readable name based on an available ref | |||
| 7 | 7 | ||
| 8 | 8 | SYNOPSIS | |
| 9 | 9 | -------- | |
| 10 | - | [verse] | |
| 11 | - | 'git describe' [--all] [--tags] [--contains] [--abbrev=<n>] [<commit-ish>...] | |
| 12 | - | 'git describe' [--all] [--tags] [--contains] [--abbrev=<n>] --dirty[=<mark>] | |
| 13 | - | 'git describe' <blob> | |
| 10 | + | [synopsis] | |
| 11 | + | git describe [--all] [--tags] [--contains] [--abbrev=<n>] [<commit-ish>...] | |
| 12 | + | git describe [--all] [--tags] [--contains] [--abbrev=<n>] --dirty[=<mark>] | |
| 13 | + | git describe <blob> | |
| 14 | 14 | ||
| 15 | 15 | DESCRIPTION | |
| 16 | 16 | ----------- | |
| @@ -22,70 +22,70 @@ abbreviated object name of the most recent commit. The result | |||
| 22 | 22 | is a "human-readable" object name which can also be used to | |
| 23 | 23 | identify the commit to other git commands. | |
| 24 | 24 | ||
| 25 | - | By default (without --all or --tags) `git describe` only shows | |
| 25 | + | By default (without `--all` or `--tags`) `git describe` only shows | |
| 26 | 26 | annotated tags. For more information about creating annotated tags | |
| 27 | - | see the -a and -s options to linkgit:git-tag[1]. | |
| 27 | + | see the `-a` and `-s` options to linkgit:git-tag[1]. | |
| 28 | 28 | ||
| 29 | 29 | If the given object refers to a blob, it will be described | |
| 30 | 30 | as `<commit-ish>:<path>`, such that the blob can be found | |
| 31 | - | at `<path>` in the `<commit-ish>`, which itself describes the | |
| 31 | + | at _<path>_ in the _<commit-ish>_, which itself describes the | |
| 32 | 32 | first commit in which this blob occurs in a reverse revision walk | |
| 33 | - | from HEAD. | |
| 33 | + | from `HEAD`. | |
| 34 | 34 | ||
| 35 | 35 | OPTIONS | |
| 36 | 36 | ------- | |
| 37 | - | <commit-ish>...:: | |
| 38 | - | Commit-ish object names to describe. Defaults to HEAD if omitted. | |
| 37 | + | `<commit-ish>...`:: | |
| 38 | + | Commit-ish object names to describe. Defaults to `HEAD` if omitted. | |
| 39 | 39 | ||
| 40 | - | --dirty[=<mark>]:: | |
| 41 | - | --broken[=<mark>]:: | |
| 40 | + | `--dirty[=<mark>]`:: | |
| 41 | + | `--broken[=<mark>]`:: | |
| 42 | 42 | Describe the state of the working tree. When the working | |
| 43 | - | tree matches HEAD, the output is the same as "git describe | |
| 44 | - | HEAD". If the working tree has local modification "-dirty" | |
| 43 | + | tree matches `HEAD`, the output is the same as `git describe HEAD`. | |
| 44 | + | If the working tree has local modification, `-dirty` | |
| 45 | 45 | is appended to it. If a repository is corrupt and Git | |
| 46 | 46 | cannot determine if there is local modification, Git will | |
| 47 | - | error out, unless `--broken' is given, which appends | |
| 48 | - | the suffix "-broken" instead. | |
| 47 | + | error out, unless `--broken` is given, which appends | |
| 48 | + | the suffix `-broken` instead. | |
| 49 | 49 | ||
| 50 | - | --all:: | |
| 50 | + | `--all`:: | |
| 51 | 51 | Instead of using only the annotated tags, use any ref | |
| 52 | 52 | found in `refs/` namespace. This option enables matching | |
| 53 | 53 | any known branch, remote-tracking branch, or lightweight tag. | |
| 54 | 54 | ||
| 55 | - | --tags:: | |
| 55 | + | `--tags`:: | |
| 56 | 56 | Instead of using only the annotated tags, use any tag | |
| 57 | 57 | found in `refs/tags` namespace. This option enables matching | |
| 58 | 58 | a lightweight (non-annotated) tag. | |
| 59 | 59 | ||
| 60 | - | --contains:: | |
| 60 | + | `--contains`:: | |
| 61 | 61 | Instead of finding the tag that predates the commit, find | |
| 62 | 62 | the tag that comes after the commit, and thus contains it. | |
| 63 | - | Automatically implies --tags. | |
| 63 | + | Automatically implies `--tags`. | |
| 64 | 64 | ||
| 65 | - | --abbrev=<n>:: | |
| 65 | + | `--abbrev=<n>`:: | |
| 66 | 66 | Instead of using the default number of hexadecimal digits (which | |
| 67 | 67 | will vary according to the number of objects in the repository with | |
| 68 | - | a default of 7) of the abbreviated object name, use <n> digits, or | |
| 69 | - | as many digits as needed to form a unique object name. An <n> of 0 | |
| 68 | + | a default of 7) of the abbreviated object name, use _<n>_ digits, or | |
| 69 | + | as many digits as needed to form a unique object name. An _<n>_ of 0 | |
| 70 | 70 | will suppress long format, only showing the closest tag. | |
| 71 | 71 | ||
| 72 | - | --candidates=<n>:: | |
| 72 | + | `--candidates=<n>`:: | |
| 73 | 73 | Instead of considering only the 10 most recent tags as | |
| 74 | 74 | candidates to describe the input commit-ish consider | |
| 75 | - | up to <n> candidates. Increasing <n> above 10 will take | |
| 75 | + | up to _<n>_ candidates. Increasing _<n>_ above 10 will take | |
| 76 | 76 | slightly longer but may produce a more accurate result. | |
| 77 | - | An <n> of 0 will cause only exact matches to be output. | |
| 77 | + | An _<n>_ of 0 will cause only exact matches to be output. | |
| 78 | 78 | ||
| 79 | - | --exact-match:: | |
| 79 | + | `--exact-match`:: | |
| 80 | 80 | Only output exact matches (a tag directly references the | |
| 81 | - | supplied commit). This is a synonym for --candidates=0. | |
| 81 | + | supplied commit). This is a synonym for `--candidates=0`. | |
| 82 | 82 | ||
| 83 | - | --debug:: | |
| 83 | + | `--debug`:: | |
| 84 | 84 | Verbosely display information about the searching strategy | |
| 85 | 85 | being employed to standard error. The tag name will still | |
| 86 | 86 | be printed to standard out. | |
| 87 | 87 | ||
| 88 | - | --long:: | |
| 88 | + | `--long`:: | |
| 89 | 89 | Always output the long format (the tag, the number of commits | |
| 90 | 90 | and the abbreviated commit name) even when it matches a tag. | |
| 91 | 91 | This is useful when you want to see parts of the commit object name | |
| @@ -94,8 +94,8 @@ OPTIONS | |||
| 94 | 94 | describe such a commit as v1.2-0-gdeadbee (0th commit since tag v1.2 | |
| 95 | 95 | that points at object deadbee....). | |
| 96 | 96 | ||
| 97 | - | --match <pattern>:: | |
| 98 | - | Only consider tags matching the given `glob(7)` pattern, | |
| 97 | + | `--match <pattern>`:: | |
| 98 | + | Only consider tags matching the given `glob`(7) pattern, | |
| 99 | 99 | excluding the "refs/tags/" prefix. If used with `--all`, it also | |
| 100 | 100 | considers local branches and remote-tracking references matching the | |
| 101 | 101 | pattern, excluding respectively "refs/heads/" and "refs/remotes/" | |
| @@ -104,22 +104,22 @@ OPTIONS | |||
| 104 | 104 | matching any of the patterns will be considered. Use `--no-match` to | |
| 105 | 105 | clear and reset the list of patterns. | |
| 106 | 106 | ||
| 107 | - | --exclude <pattern>:: | |
| 108 | - | Do not consider tags matching the given `glob(7)` pattern, excluding | |
| 107 | + | `--exclude <pattern>`:: | |
| 108 | + | Do not consider tags matching the given `glob`(7) pattern, excluding | |
| 109 | 109 | the "refs/tags/" prefix. If used with `--all`, it also does not consider | |
| 110 | 110 | local branches and remote-tracking references matching the pattern, | |
| 111 | - | excluding respectively "refs/heads/" and "refs/remotes/" prefix; | |
| 111 | + | excluding respectively "`refs/heads/`" and "`refs/remotes/`" prefix; | |
| 112 | 112 | references of other types are never considered. If given multiple times, | |
| 113 | 113 | a list of patterns will be accumulated and tags matching any of the | |
| 114 | - | patterns will be excluded. When combined with --match a tag will be | |
| 115 | - | considered when it matches at least one --match pattern and does not | |
| 116 | - | match any of the --exclude patterns. Use `--no-exclude` to clear and | |
| 114 | + | patterns will be excluded. When combined with `--match` a tag will be | |
| 115 | + | considered when it matches at least one `--match` pattern and does not | |
| 116 | + | match any of the `--exclude` patterns. Use `--no-exclude` to clear and | |
| 117 | 117 | reset the list of patterns. | |
| 118 | 118 | ||
| 119 | - | --always:: | |
| 119 | + | `--always`:: | |
| 120 | 120 | Show uniquely abbreviated commit object as fallback. | |
| 121 | 121 | ||
| 122 | - | --first-parent:: | |
| 122 | + | `--first-parent`:: | |
| 123 | 123 | Follow only the first parent commit upon seeing a merge commit. | |
| 124 | 124 | This is useful when you wish to not match tags on branches merged | |
| 125 | 125 | in the history of the target commit. | |
| @@ -139,8 +139,8 @@ an abbreviated object name for the commit itself ("2414721") | |||
| 139 | 139 | at the end. | |
| 140 | 140 | ||
| 141 | 141 | The number of additional commits is the number | |
| 142 | - | of commits which would be displayed by "git log v1.0.4..parent". | |
| 143 | - | The hash suffix is "-g" + an unambiguous abbreviation for the tip commit | |
| 142 | + | of commits which would be displayed by `git log v1.0.4..parent`. | |
| 143 | + | The hash suffix is "`-g`" + an unambiguous abbreviation for the tip commit | |
| 144 | 144 | of parent (which was `2414721b194453f058079d897d13c4e377f92dc6`). The | |
| 145 | 145 | length of the abbreviation scales as the repository grows, using the | |
| 146 | 146 | approximate number of objects in the repository and a bit of math | |
| @@ -149,12 +149,12 @@ The "g" prefix stands for "git" and is used to allow describing the version of | |||
| 149 | 149 | a software depending on the SCM the software is managed with. This is useful | |
| 150 | 150 | in an environment where people may use different SCMs. | |
| 151 | 151 | ||
| 152 | - | Doing a 'git describe' on a tag-name will just show the tag name: | |
| 152 | + | Doing a `git describe` on a tag-name will just show the tag name: | |
| 153 | 153 | ||
| 154 | 154 | [torvalds@g5 git]$ git describe v1.0.4 | |
| 155 | 155 | v1.0.4 | |
| 156 | 156 | ||
| 157 | - | With --all, the command can use branch heads as references, so | |
| 157 | + | With `--all`, the command can use branch heads as references, so | |
| 158 | 158 | the output shows the reference path as well: | |
| 159 | 159 | ||
| 160 | 160 | [torvalds@g5 git]$ git describe --all --abbrev=4 v1.0.5^2 | |
| @@ -163,7 +163,7 @@ the output shows the reference path as well: | |||
| 163 | 163 | [torvalds@g5 git]$ git describe --all --abbrev=4 HEAD^ | |
| 164 | 164 | heads/lt/describe-7-g975b | |
| 165 | 165 | ||
| 166 | - | With --abbrev set to 0, the command can be used to find the | |
| 166 | + | With `--abbrev` set to 0, the command can be used to find the | |
| 167 | 167 | closest tagname without any suffix: | |
| 168 | 168 | ||
| 169 | 169 | [torvalds@g5 git]$ git describe --abbrev=0 v1.0.5^2 | |
| @@ -179,13 +179,13 @@ be sufficient to disambiguate these commits. | |||
| 179 | 179 | SEARCH STRATEGY | |
| 180 | 180 | --------------- | |
| 181 | 181 | ||
| 182 | - | For each commit-ish supplied, 'git describe' will first look for | |
| 182 | + | For each commit-ish supplied, `git describe` will first look for | |
| 183 | 183 | a tag which tags exactly that commit. Annotated tags will always | |
| 184 | 184 | be preferred over lightweight tags, and tags with newer dates will | |
| 185 | 185 | always be preferred over tags with older dates. If an exact match | |
| 186 | 186 | is found, its name will be output and searching will stop. | |
| 187 | 187 | ||
| 188 | - | If an exact match was not found, 'git describe' will walk back | |
| 188 | + | If an exact match was not found, `git describe` will walk back | |
| 189 | 189 | through the commit history to locate an ancestor commit which | |
| 190 | 190 | has been tagged. The ancestor's tag will be output along with an | |
| 191 | 191 | abbreviation of the input commit-ish's SHA-1. If `--first-parent` was | |
| @@ -203,7 +203,7 @@ BUGS | |||
| 203 | 203 | ||
| 204 | 204 | Tree objects as well as tag objects not pointing at commits, cannot be described. | |
| 205 | 205 | When describing blobs, the lightweight tags pointing at blobs are ignored, | |
| 206 | - | but the blob is still described as <commit-ish>:<path> despite the lightweight | |
| 206 | + | but the blob is still described as `<commit-ish>:<path>` despite the lightweight | |
| 207 | 207 | tag being favorable. | |
| 208 | 208 | ||
| 209 | 209 | GIT | |
modified Documentation/git-diff.adoc
| @@ -14,7 +14,7 @@ git diff [<options>] --cached [--merge-base] [<commit>] [--] [<path>...] | |||
| 14 | 14 | git diff [<options>] [--merge-base] <commit> [<commit>...] <commit> [--] [<path>...] | |
| 15 | 15 | git diff [<options>] <commit>...<commit> [--] [<path>...] | |
| 16 | 16 | git diff [<options>] <blob> <blob> | |
| 17 | - | git diff [<options>] --no-index [--] <path> <path> | |
| 17 | + | git diff [<options>] --no-index [--] <path> <path> [<pathspec>...] | |
| 18 | 18 | ||
| 19 | 19 | DESCRIPTION | |
| 20 | 20 | ----------- | |
| @@ -31,14 +31,18 @@ files on disk. | |||
| 31 | 31 | further add to the index but you still haven't. You can | |
| 32 | 32 | stage these changes by using linkgit:git-add[1]. | |
| 33 | 33 | ||
| 34 | - | `git diff [<options>] --no-index [--] <path> <path>`:: | |
| 34 | + | `git diff [<options>] --no-index [--] <path> <path> [<pathspec>...]`:: | |
| 35 | 35 | ||
| 36 | 36 | This form is to compare the given two paths on the | |
| 37 | 37 | filesystem. You can omit the `--no-index` option when | |
| 38 | 38 | running the command in a working tree controlled by Git and | |
| 39 | 39 | at least one of the paths points outside the working tree, | |
| 40 | 40 | or when running the command outside a working tree | |
| 41 | - | controlled by Git. This form implies `--exit-code`. | |
| 41 | + | controlled by Git. This form implies `--exit-code`. If both | |
| 42 | + | paths point to directories, additional pathspecs may be | |
| 43 | + | provided. These will limit the files included in the | |
| 44 | + | difference. All such pathspecs must be relative as they | |
| 45 | + | apply to both sides of the diff. | |
| 42 | 46 | ||
| 43 | 47 | `git diff [<options>] --cached [--merge-base] [<commit>] [--] [<path>...]`:: | |
| 44 | 48 | ||
modified Documentation/git-difftool.adoc
| @@ -7,64 +7,64 @@ git-difftool - Show changes using common diff tools | |||
| 7 | 7 | ||
| 8 | 8 | SYNOPSIS | |
| 9 | 9 | -------- | |
| 10 | - | [verse] | |
| 11 | - | 'git difftool' [<options>] [<commit> [<commit>]] [--] [<path>...] | |
| 10 | + | [synopsis] | |
| 11 | + | git difftool [<options>] [<commit> [<commit>]] [--] [<path>...] | |
| 12 | 12 | ||
| 13 | 13 | DESCRIPTION | |
| 14 | 14 | ----------- | |
| 15 | - | 'git difftool' is a Git command that allows you to compare and edit files | |
| 16 | - | between revisions using common diff tools. 'git difftool' is a frontend | |
| 17 | - | to 'git diff' and accepts the same options and arguments. See | |
| 15 | + | `git difftool` is a Git command that allows you to compare and edit files | |
| 16 | + | between revisions using common diff tools. `git difftool` is a frontend | |
| 17 | + | to `git diff` and accepts the same options and arguments. See | |
| 18 | 18 | linkgit:git-diff[1]. | |
| 19 | 19 | ||
| 20 | 20 | OPTIONS | |
| 21 | 21 | ------- | |
| 22 | - | -d:: | |
| 23 | - | --dir-diff:: | |
| 22 | + | `-d`:: | |
| 23 | + | `--dir-diff`:: | |
| 24 | 24 | Copy the modified files to a temporary location and perform | |
| 25 | 25 | a directory diff on them. This mode never prompts before | |
| 26 | 26 | launching the diff tool. | |
| 27 | 27 | ||
| 28 | - | -y:: | |
| 29 | - | --no-prompt:: | |
| 28 | + | `-y`:: | |
| 29 | + | `--no-prompt`:: | |
| 30 | 30 | Do not prompt before launching a diff tool. | |
| 31 | 31 | ||
| 32 | - | --prompt:: | |
| 32 | + | `--prompt`:: | |
| 33 | 33 | Prompt before each invocation of the diff tool. | |
| 34 | 34 | This is the default behaviour; the option is provided to | |
| 35 | 35 | override any configuration settings. | |
| 36 | 36 | ||
| 37 | - | --rotate-to=<file>:: | |
| 38 | - | Start showing the diff for the given path, | |
| 37 | + | `--rotate-to=<file>`:: | |
| 38 | + | Start showing the diff for _<file>_, | |
| 39 | 39 | the paths before it will move to the end and output. | |
| 40 | 40 | ||
| 41 | - | --skip-to=<file>:: | |
| 42 | - | Start showing the diff for the given path, skipping all | |
| 41 | + | `--skip-to=<file>`:: | |
| 42 | + | Start showing the diff for _<file>_, skipping all | |
| 43 | 43 | the paths before it. | |
| 44 | 44 | ||
| 45 | - | -t <tool>:: | |
| 46 | - | --tool=<tool>:: | |
| 47 | - | Use the diff tool specified by <tool>. Valid values include | |
| 45 | + | `-t <tool>`:: | |
| 46 | + | `--tool=<tool>`:: | |
| 47 | + | Use the diff tool specified by _<tool>_. Valid values include | |
| 48 | 48 | emerge, kompare, meld, and vimdiff. Run `git difftool --tool-help` | |
| 49 | - | for the list of valid <tool> settings. | |
| 49 | + | for the list of valid _<tool>_ settings. | |
| 50 | 50 | + | |
| 51 | - | If a diff tool is not specified, 'git difftool' | |
| 51 | + | If a diff tool is not specified, `git difftool` | |
| 52 | 52 | will use the configuration variable `diff.tool`. If the | |
| 53 | - | configuration variable `diff.tool` is not set, 'git difftool' | |
| 53 | + | configuration variable `diff.tool` is not set, `git difftool` | |
| 54 | 54 | will pick a suitable default. | |
| 55 | 55 | + | |
| 56 | 56 | You can explicitly provide a full path to the tool by setting the | |
| 57 | 57 | configuration variable `difftool.<tool>.path`. For example, you | |
| 58 | 58 | can configure the absolute path to kdiff3 by setting | |
| 59 | - | `difftool.kdiff3.path`. Otherwise, 'git difftool' assumes the | |
| 59 | + | `difftool.kdiff3.path`. Otherwise, `git difftool` assumes the | |
| 60 | 60 | tool is available in PATH. | |
| 61 | 61 | + | |
| 62 | 62 | Instead of running one of the known diff tools, | |
| 63 | - | 'git difftool' can be customized to run an alternative program | |
| 63 | + | `git difftool` can be customized to run an alternative program | |
| 64 | 64 | by specifying the command line to invoke in a configuration | |
| 65 | 65 | variable `difftool.<tool>.cmd`. | |
| 66 | 66 | + | |
| 67 | - | When 'git difftool' is invoked with this tool (either through the | |
| 67 | + | When `git difftool` is invoked with this tool (either through the | |
| 68 | 68 | `-t` or `--tool` option or the `diff.tool` configuration variable) | |
| 69 | 69 | the configured command line will be invoked with the following | |
| 70 | 70 | variables available: `$LOCAL` is set to the name of the temporary | |
| @@ -74,28 +74,30 @@ of the diff post-image. `$MERGED` is the name of the file which is | |||
| 74 | 74 | being compared. `$BASE` is provided for compatibility | |
| 75 | 75 | with custom merge tool commands and has the same value as `$MERGED`. | |
| 76 | 76 | ||
| 77 | - | --tool-help:: | |
| 77 | + | `--tool-help`:: | |
| 78 | 78 | Print a list of diff tools that may be used with `--tool`. | |
| 79 | 79 | ||
| 80 | - | --[no-]symlinks:: | |
| 81 | - | 'git difftool''s default behavior is to create symlinks to the | |
| 80 | + | `--symlinks`:: | |
| 81 | + | `--no-symlinks`:: | |
| 82 | + | `git difftool`'s default behavior is to create symlinks to the | |
| 82 | 83 | working tree when run in `--dir-diff` mode and the right-hand | |
| 83 | 84 | side of the comparison yields the same content as the file in | |
| 84 | 85 | the working tree. | |
| 85 | 86 | + | |
| 86 | - | Specifying `--no-symlinks` instructs 'git difftool' to create copies | |
| 87 | + | Specifying `--no-symlinks` instructs `git difftool` to create copies | |
| 87 | 88 | instead. `--no-symlinks` is the default on Windows. | |
| 88 | 89 | ||
| 89 | - | -x <command>:: | |
| 90 | - | --extcmd=<command>:: | |
| 90 | + | `-x <command>`:: | |
| 91 | + | `--extcmd=<command>`:: | |
| 91 | 92 | Specify a custom command for viewing diffs. | |
| 92 | - | 'git-difftool' ignores the configured defaults and runs | |
| 93 | + | `git-difftool` ignores the configured defaults and runs | |
| 93 | 94 | `<command> $LOCAL $REMOTE` when this option is specified. | |
| 94 | 95 | Additionally, `$BASE` is set in the environment. | |
| 95 | 96 | ||
| 96 | - | -g:: | |
| 97 | - | --[no-]gui:: | |
| 98 | - | When 'git-difftool' is invoked with the `-g` or `--gui` option | |
| 97 | + | `-g`:: | |
| 98 | + | `--gui`:: | |
| 99 | + | `--no-gui`:: | |
| 100 | + | When `git-difftool` is invoked with the `-g` or `--gui` option | |
| 99 | 101 | the default diff tool will be read from the configured | |
| 100 | 102 | `diff.guitool` variable instead of `diff.tool`. This may be | |
| 101 | 103 | selected automatically using the configuration variable | |
| @@ -104,19 +106,20 @@ instead. `--no-symlinks` is the default on Windows. | |||
| 104 | 106 | fallback in the order of `merge.guitool`, `diff.tool`, | |
| 105 | 107 | `merge.tool` until a tool is found. | |
| 106 | 108 | ||
| 107 | - | --[no-]trust-exit-code:: | |
| 109 | + | `--trust-exit-code`:: | |
| 110 | + | `--no-trust-exit-code`:: | |
| 108 | 111 | Errors reported by the diff tool are ignored by default. | |
| 109 | - | Use `--trust-exit-code` to make 'git-difftool' exit when an | |
| 112 | + | Use `--trust-exit-code` to make `git-difftool` exit when an | |
| 110 | 113 | invoked diff tool returns a non-zero exit code. | |
| 111 | 114 | + | |
| 112 | - | 'git-difftool' will forward the exit code of the invoked tool when | |
| 115 | + | `git-difftool` will forward the exit code of the invoked tool when | |
| 113 | 116 | `--trust-exit-code` is used. | |
| 114 | 117 | ||
| 115 | 118 | See linkgit:git-diff[1] for the full list of supported options. | |
| 116 | 119 | ||
| 117 | 120 | CONFIGURATION | |
| 118 | 121 | ------------- | |
| 119 | - | 'git difftool' falls back to 'git mergetool' config variables when the | |
| 122 | + | `git difftool` falls back to `git mergetool` config variables when the | |
| 120 | 123 | difftool equivalents have not been defined. | |
| 121 | 124 | ||
| 122 | 125 | include::includes/cmd-config-section-rest.adoc[] | |
modified Documentation/git-fast-export.adoc
| @@ -9,7 +9,7 @@ git-fast-export - Git data exporter | |||
| 9 | 9 | SYNOPSIS | |
| 10 | 10 | -------- | |
| 11 | 11 | [verse] | |
| 12 | - | 'git fast-export' [<options>] | 'git fast-import' | |
| 12 | + | 'git fast-export' [<options>] [<revision-range>] [[--] <path>...] | |
| 13 | 13 | ||
| 14 | 14 | DESCRIPTION | |
| 15 | 15 | ----------- | |
| @@ -50,6 +50,23 @@ resulting tag will have an invalid signature. | |||
| 50 | 50 | is the same as how earlier versions of this command without | |
| 51 | 51 | this option behaved. | |
| 52 | 52 | + | |
| 53 | + | When exported, a signature starts with: | |
| 54 | + | + | |
| 55 | + | gpgsig <git-hash-algo> <signature-format> | |
| 56 | + | + | |
| 57 | + | where <git-hash-algo> is the Git object hash so either "sha1" or | |
| 58 | + | "sha256", and <signature-format> is the signature type, so "openpgp", | |
| 59 | + | "x509", "ssh" or "unknown". | |
| 60 | + | + | |
| 61 | + | For example, an OpenPGP signature on a SHA-1 commit starts with | |
| 62 | + | `gpgsig sha1 openpgp`, while an SSH signature on a SHA-256 commit | |
| 63 | + | starts with `gpgsig sha256 ssh`. | |
| 64 | + | + | |
| 65 | + | While all the signatures of a commit are exported, an importer may | |
| 66 | + | choose to accept only some of them. For example | |
| 67 | + | linkgit:git-fast-import[1] currently stores at most one signature per | |
| 68 | + | Git hash algorithm in each commit. | |
| 69 | + | + | |
| 53 | 70 | NOTE: This is highly experimental and the format of the data stream may | |
| 54 | 71 | change in the future without compatibility guarantees. | |
| 55 | 72 | ||
modified Documentation/git-fast-import.adoc
| @@ -9,7 +9,7 @@ git-fast-import - Backend for fast Git data importers | |||
| 9 | 9 | SYNOPSIS | |
| 10 | 10 | -------- | |
| 11 | 11 | [verse] | |
| 12 | - | frontend | 'git fast-import' [<options>] | |
| 12 | + | 'git fast-import' [<options>] | |
| 13 | 13 | ||
| 14 | 14 | DESCRIPTION | |
| 15 | 15 | ----------- | |
| @@ -61,10 +61,43 @@ OPTIONS | |||
| 61 | 61 | currently impacts only the `export-marks`, `import-marks`, and | |
| 62 | 62 | `import-marks-if-exists` feature commands. | |
| 63 | 63 | + | |
| 64 | - | Only enable this option if you trust the program generating the | |
| 65 | - | fast-import stream! This option is enabled automatically for | |
| 66 | - | remote-helpers that use the `import` capability, as they are | |
| 67 | - | already trusted to run their own code. | |
| 64 | + | Only enable this option if you trust the program generating the | |
| 65 | + | fast-import stream! This option is enabled automatically for | |
| 66 | + | remote-helpers that use the `import` capability, as they are | |
| 67 | + | already trusted to run their own code. | |
| 68 | + | + | |
| 69 | + | Note that this option has to be spelled in full, and has to appear | |
| 70 | + | before any option whose value is separated from it by a space, for | |
| 71 | + | the unsafe `feature` commands in the stream to be allowed. So | |
| 72 | + | `--allow-unsafe` or `--depth 5 --allow-unsafe-features` still refuse | |
| 73 | + | them, while `--allow-unsafe-features --depth 5` and | |
| 74 | + | `--depth=5 --allow-unsafe-features` allow them. | |
| 75 | + | ||
| 76 | + | `--signed-tags=<mode>`:: | |
| 77 | + | Specify how to handle signed tags. Behaves in the same way as | |
| 78 | + | the `--signed-commits=<mode>` below. Like for signed commits, | |
| 79 | + | the default mode is `verbatim`. | |
| 80 | + | ||
| 81 | + | `--signed-commits=<mode>`:: | |
| 82 | + | Specify how to handle signed commits. The following <mode>s | |
| 83 | + | are supported: | |
| 84 | + | + | |
| 85 | + | * `verbatim`, which is the default, will silently import commit | |
| 86 | + | signatures. | |
| 87 | + | * `warn-verbatim` will import them, but will display a warning. | |
| 88 | + | * `abort` will make this program die when encountering a signed | |
| 89 | + | commit. | |
| 90 | + | * `strip` will silently make the commits unsigned. | |
| 91 | + | * `warn-strip` will make them unsigned, but will display a warning. | |
| 92 | + | * `strip-if-invalid` will check signatures and, if they are invalid, | |
| 93 | + | will strip them and display a warning. The validation is performed | |
| 94 | + | in the same way as linkgit:git-verify-commit[1] does it. | |
| 95 | + | * `sign-if-invalid[=<keyid>]`, similar to `strip-if-invalid`, verifies | |
| 96 | + | commit signatures and replaces invalid signatures with newly created ones. | |
| 97 | + | Valid signatures are left unchanged. If `<keyid>` is provided, that key is | |
| 98 | + | used for signing; otherwise the configured default signing key is used. | |
| 99 | + | * `abort-if-invalid` will make this program die when encountering a signed | |
| 100 | + | commit that is unable to be verified. | |
| 68 | 101 | ||
| 69 | 102 | Options for Frontends | |
| 70 | 103 | ~~~~~~~~~~~~~~~~~~~~~ | |
| @@ -111,7 +144,8 @@ Locations of Marks Files | |||
| 111 | 144 | Like --import-marks but instead of erroring out, silently | |
| 112 | 145 | skips the file if it does not exist. | |
| 113 | 146 | ||
| 114 | - | --[no-]relative-marks:: | |
| 147 | + | --relative-marks:: | |
| 148 | + | --no-relative-marks:: | |
| 115 | 149 | After specifying --relative-marks the paths specified | |
| 116 | 150 | with --import-marks= and --export-marks= are relative | |
| 117 | 151 | to an internal directory in the current repository. | |
| @@ -182,7 +216,7 @@ amount of memory usage and processing time. Assuming the frontend | |||
| 182 | 216 | is able to keep up with fast-import and feed it a constant stream of data, | |
| 183 | 217 | import times for projects holding 10+ years of history and containing | |
| 184 | 218 | 100,000+ individual commits are generally completed in just 1-2 | |
| 185 | - | hours on quite modest (~$2,000 USD) hardware. | |
| 219 | + | hours on quite modest hardware (~$2,000 USD in 2007). | |
| 186 | 220 | ||
| 187 | 221 | Most bottlenecks appear to be in foreign source data access (the | |
| 188 | 222 | source just cannot extract revisions fast enough) or disk IO (fast-import | |
| @@ -445,7 +479,7 @@ one). | |||
| 445 | 479 | original-oid? | |
| 446 | 480 | ('author' (SP <name>)? SP LT <email> GT SP <when> LF)? | |
| 447 | 481 | 'committer' (SP <name>)? SP LT <email> GT SP <when> LF | |
| 448 | - | ('gpgsig' SP <alg> LF data)? | |
| 482 | + | ('gpgsig' SP <algo> SP <format> LF data)? | |
| 449 | 483 | ('encoding' SP <encoding> LF)? | |
| 450 | 484 | data | |
| 451 | 485 | ('from' SP <commit-ish> LF)? | |
| @@ -518,13 +552,39 @@ their syntax. | |||
| 518 | 552 | ^^^^^^^^ | |
| 519 | 553 | ||
| 520 | 554 | The optional `gpgsig` command is used to include a PGP/GPG signature | |
| 521 | - | that signs the commit data. | |
| 555 | + | or other cryptographic signature that signs the commit data. | |
| 556 | + | ||
| 557 | + | .... | |
| 558 | + | 'gpgsig' SP <git-hash-algo> SP <signature-format> LF data | |
| 559 | + | .... | |
| 560 | + | ||
| 561 | + | The `gpgsig` command takes two arguments: | |
| 522 | 562 | ||
| 523 | - | Here <alg> specifies which hashing algorithm is used for this | |
| 524 | - | signature, either `sha1` or `sha256`. | |
| 563 | + | * `<git-hash-algo>` specifies which Git object format this signature | |
| 564 | + | applies to, either `sha1` or `sha256`. This allows to know which | |
| 565 | + | representation of the commit was signed (the SHA-1 or the SHA-256 | |
| 566 | + | version) which helps with both signature verification and | |
| 567 | + | interoperability between repos with different hash functions. | |
| 525 | 568 | ||
| 526 | - | NOTE: This is highly experimental and the format of the data stream may | |
| 527 | - | change in the future without compatibility guarantees. | |
| 569 | + | * `<signature-format>` specifies the type of signature, such as | |
| 570 | + | `openpgp`, `x509`, `ssh`, or `unknown`. This is a convenience for | |
| 571 | + | tools that process the stream, so they don't have to parse the ASCII | |
| 572 | + | armor to identify the signature type. | |
| 573 | + | ||
| 574 | + | A commit may have at most one signature for the SHA-1 object format | |
| 575 | + | (stored in the "gpgsig" header) and one for the SHA-256 object format | |
| 576 | + | (stored in the "gpgsig-sha256" header). | |
| 577 | + | ||
| 578 | + | See below for a detailed description of the `data` command which | |
| 579 | + | contains the raw signature data. | |
| 580 | + | ||
| 581 | + | Signatures are not yet checked in the current implementation | |
| 582 | + | though. (Already setting the `extensions.compatObjectFormat` | |
| 583 | + | configuration option might help with verifying both SHA-1 and SHA-256 | |
| 584 | + | object format signatures when it will be implemented.) | |
| 585 | + | ||
| 586 | + | NOTE: This is highly experimental and the format of the `gpgsig` | |
| 587 | + | command may change in the future without compatibility guarantees. | |
| 528 | 588 | ||
| 529 | 589 | `encoding` | |
| 530 | 590 | ^^^^^^^^^^ | |
| @@ -579,9 +639,11 @@ Marks must be declared (via `mark`) before they can be used. | |||
| 579 | 639 | ||
| 580 | 640 | The special case of restarting an incremental import from the | |
| 581 | 641 | current branch value should be written as: | |
| 642 | + | ||
| 582 | 643 | ---- | |
| 583 | 644 | from refs/heads/branch^0 | |
| 584 | 645 | ---- | |
| 646 | + | ||
| 585 | 647 | The `^0` suffix is necessary as fast-import does not permit a branch to | |
| 586 | 648 | start from itself, and the branch is created in memory before the | |
| 587 | 649 | `from` command is even read from the input. Adding `^0` will force | |
| @@ -618,7 +680,7 @@ External data format:: | |||
| 618 | 680 | + | |
| 619 | 681 | Here usually `<dataref>` must be either a mark reference (`:<idnum>`) | |
| 620 | 682 | set by a prior `blob` command, or a full 40-byte SHA-1 of an | |
| 621 | - | existing Git blob object. If `<mode>` is `040000`` then | |
| 683 | + | existing Git blob object. If `<mode>` is `040000` then | |
| 622 | 684 | `<dataref>` must be the full 40-byte SHA-1 of an existing | |
| 623 | 685 | Git tree object or a mark reference set with `--import-marks`. | |
| 624 | 686 | ||
modified Documentation/git-fetch.adoc
| @@ -8,11 +8,11 @@ git-fetch - Download objects and refs from another repository | |||
| 8 | 8 | ||
| 9 | 9 | SYNOPSIS | |
| 10 | 10 | -------- | |
| 11 | - | [verse] | |
| 12 | - | 'git fetch' [<options>] [<repository> [<refspec>...]] | |
| 13 | - | 'git fetch' [<options>] <group> | |
| 14 | - | 'git fetch' --multiple [<options>] [(<repository> | <group>)...] | |
| 15 | - | 'git fetch' --all [<options>] | |
| 11 | + | [synopsis] | |
| 12 | + | git fetch [<options>] [<repository> [<refspec>...]] | |
| 13 | + | git fetch [<options>] <group> | |
| 14 | + | git fetch --multiple [<options>] [(<repository>|<group>)...] | |
| 15 | + | git fetch --all [<options>] | |
| 16 | 16 | ||
| 17 | 17 | ||
| 18 | 18 | DESCRIPTION | |
| @@ -20,19 +20,19 @@ DESCRIPTION | |||
| 20 | 20 | Fetch branches and/or tags (collectively, "refs") from one or more | |
| 21 | 21 | other repositories, along with the objects necessary to complete their | |
| 22 | 22 | histories. Remote-tracking branches are updated (see the description | |
| 23 | - | of <refspec> below for ways to control this behavior). | |
| 23 | + | of _<refspec>_ below for ways to control this behavior). | |
| 24 | 24 | ||
| 25 | 25 | By default, any tag that points into the histories being fetched is | |
| 26 | 26 | also fetched; the effect is to fetch tags that | |
| 27 | 27 | point at branches that you are interested in. This default behavior | |
| 28 | - | can be changed by using the --tags or --no-tags options or by | |
| 29 | - | configuring remote.<name>.tagOpt. By using a refspec that fetches tags | |
| 28 | + | can be changed by using the `--tags` or `--no-tags` options or by | |
| 29 | + | configuring `remote.<name>.tagOpt`. By using a refspec that fetches tags | |
| 30 | 30 | explicitly, you can fetch tags that do not point into branches you | |
| 31 | 31 | are interested in as well. | |
| 32 | 32 | ||
| 33 | - | 'git fetch' can fetch from either a single named repository or URL, | |
| 34 | - | or from several repositories at once if <group> is given and | |
| 35 | - | there is a remotes.<group> entry in the configuration file. | |
| 33 | + | `git fetch` can fetch from either a single named repository or URL, | |
| 34 | + | or from several repositories at once if _<group>_ is given and | |
| 35 | + | there is a `remotes.<group>` entry in the configuration file. | |
| 36 | 36 | (See linkgit:git-config[1]). | |
| 37 | 37 | ||
| 38 | 38 | When no remote is specified, by default the `origin` remote will be used, | |
| @@ -48,15 +48,15 @@ include::fetch-options.adoc[] | |||
| 48 | 48 | ||
| 49 | 49 | include::pull-fetch-param.adoc[] | |
| 50 | 50 | ||
| 51 | - | --stdin:: | |
| 51 | + | `--stdin`:: | |
| 52 | 52 | Read refspecs, one per line, from stdin in addition to those provided | |
| 53 | - | as arguments. The "tag <name>" format is not supported. | |
| 53 | + | as arguments. The "tag _<name>_" format is not supported. | |
| 54 | 54 | ||
| 55 | 55 | include::urls-remotes.adoc[] | |
| 56 | 56 | ||
| 57 | - | ||
| 58 | - | CONFIGURED REMOTE-TRACKING BRANCHES[[CRTB]] | |
| 59 | - | ------------------------------------------- | |
| 57 | + | [[CRTB]] | |
| 58 | + | CONFIGURED REMOTE-TRACKING BRANCHES | |
| 59 | + | ----------------------------------- | |
| 60 | 60 | ||
| 61 | 61 | You often interact with the same remote repository by | |
| 62 | 62 | regularly and repeatedly fetching from it. In order to keep track | |
| @@ -84,13 +84,13 @@ This configuration is used in two ways: | |||
| 84 | 84 | ||
| 85 | 85 | * When `git fetch` is run with explicit branches and/or tags | |
| 86 | 86 | to fetch on the command line, e.g. `git fetch origin master`, the | |
| 87 | - | <refspec>s given on the command line determine what are to be | |
| 87 | + | _<refspec>s_ given on the command line determine what are to be | |
| 88 | 88 | fetched (e.g. `master` in the example, | |
| 89 | 89 | which is a short-hand for `master:`, which in turn means | |
| 90 | - | "fetch the 'master' branch but I do not explicitly say what | |
| 90 | + | "fetch the `master` branch but I do not explicitly say what | |
| 91 | 91 | remote-tracking branch to update with it from the command line"), | |
| 92 | 92 | and the example command will | |
| 93 | - | fetch _only_ the 'master' branch. The `remote.<repository>.fetch` | |
| 93 | + | fetch _only_ the `master` branch. The `remote.<repository>.fetch` | |
| 94 | 94 | values determine which | |
| 95 | 95 | remote-tracking branch, if any, is updated. When used in this | |
| 96 | 96 | way, the `remote.<repository>.fetch` values do not have any | |
| @@ -144,9 +144,9 @@ tracking branches that are deleted, but any local tag that doesn't | |||
| 144 | 144 | exist on the remote. | |
| 145 | 145 | ||
| 146 | 146 | This might not be what you expect, i.e. you want to prune remote | |
| 147 | - | `<name>`, but also explicitly fetch tags from it, so when you fetch | |
| 147 | + | _<name>_, but also explicitly fetch tags from it, so when you fetch | |
| 148 | 148 | from it you delete all your local tags, most of which may not have | |
| 149 | - | come from the `<name>` remote in the first place. | |
| 149 | + | come from the _<name>_ remote in the first place. | |
| 150 | 150 | ||
| 151 | 151 | So be careful when using this with a refspec like | |
| 152 | 152 | `refs/tags/*:refs/tags/*`, or any other refspec which might map | |
| @@ -213,11 +213,11 @@ of the form: | |||
| 213 | 213 | <flag> <old-object-id> <new-object-id> <local-reference> | |
| 214 | 214 | ------------------------------- | |
| 215 | 215 | ||
| 216 | - | The status of up-to-date refs is shown only if the --verbose option is | |
| 216 | + | The status of up-to-date refs is shown only if the `--verbose` option is | |
| 217 | 217 | used. | |
| 218 | 218 | ||
| 219 | 219 | In compact output mode, specified with configuration variable | |
| 220 | - | fetch.output, if either entire `<from>` or `<to>` is found in the | |
| 220 | + | fetch.output, if either entire _<from>_ or _<to>_ is found in the | |
| 221 | 221 | other string, it will be substituted with `*` in the other string. For | |
| 222 | 222 | example, `master -> origin/master` becomes `master -> origin/*`. | |
| 223 | 223 | ||
| @@ -303,7 +303,7 @@ include::config/fetch.adoc[] | |||
| 303 | 303 | ||
| 304 | 304 | BUGS | |
| 305 | 305 | ---- | |
| 306 | - | Using --recurse-submodules can only fetch new commits in submodules that are | |
| 306 | + | Using `--recurse-submodules` can only fetch new commits in submodules that are | |
| 307 | 307 | present locally e.g. in `$GIT_DIR/modules/`. If the upstream adds a new | |
| 308 | 308 | submodule, that submodule cannot be fetched until it is cloned e.g. by `git | |
| 309 | 309 | submodule update`. This is expected to be fixed in a future Git version. | |
modified Documentation/git-fmt-merge-msg.adoc
| @@ -35,7 +35,8 @@ OPTIONS | |||
| 35 | 35 | Do not list one-line descriptions from the actual commits being | |
| 36 | 36 | merged. | |
| 37 | 37 | ||
| 38 | - | --[no-]summary:: | |
| 38 | + | --summary:: | |
| 39 | + | --no-summary:: | |
| 39 | 40 | Synonyms to --log and --no-log; these are deprecated and will be | |
| 40 | 41 | removed in the future. | |
| 41 | 42 | ||
modified Documentation/git-for-each-ref.adoc
| @@ -7,106 +7,28 @@ git-for-each-ref - Output information on each ref | |||
| 7 | 7 | ||
| 8 | 8 | SYNOPSIS | |
| 9 | 9 | -------- | |
| 10 | - | [verse] | |
| 11 | - | 'git for-each-ref' [--count=<count>] [--shell|--perl|--python|--tcl] | |
| 10 | + | [synopsis] | |
| 11 | + | git for-each-ref [--count=<count>] [--shell|--perl|--python|--tcl] | |
| 12 | 12 | [(--sort=<key>)...] [--format=<format>] | |
| 13 | - | [--include-root-refs] [ --stdin | <pattern>... ] | |
| 14 | - | [--points-at=<object>] | |
| 13 | + | [--include-root-refs] [--points-at=<object>] | |
| 15 | 14 | [--merged[=<object>]] [--no-merged[=<object>]] | |
| 16 | 15 | [--contains[=<object>]] [--no-contains[=<object>]] | |
| 17 | - | [--exclude=<pattern> ...] | |
| 16 | + | [(--exclude=<pattern>)...] [--start-after=<marker>] | |
| 17 | + | [ --stdin | (<pattern>...)] | |
| 18 | 18 | ||
| 19 | 19 | DESCRIPTION | |
| 20 | 20 | ----------- | |
| 21 | 21 | ||
| 22 | - | Iterate over all refs that match `<pattern>` and show them | |
| 23 | - | according to the given `<format>`, after sorting them according | |
| 24 | - | to the given set of `<key>`. If `<count>` is given, stop after | |
| 25 | - | showing that many refs. The interpolated values in `<format>` | |
| 22 | + | Iterate over all refs that match _<pattern>_ and show them | |
| 23 | + | according to the given _<format>_, after sorting them according | |
| 24 | + | to the given set of _<key>_. If _<count>_ is given, stop after | |
| 25 | + | showing that many refs. The interpolated values in _<format>_ | |
| 26 | 26 | can optionally be quoted as string literals in the specified | |
| 27 | 27 | host language allowing their direct evaluation in that language. | |
| 28 | 28 | ||
| 29 | 29 | OPTIONS | |
| 30 | 30 | ------- | |
| 31 | - | <pattern>...:: | |
| 32 | - | If one or more patterns are given, only refs are shown that | |
| 33 | - | match against at least one pattern, either using fnmatch(3) or | |
| 34 | - | literally, in the latter case matching completely or from the | |
| 35 | - | beginning up to a slash. | |
| 36 | - | ||
| 37 | - | --stdin:: | |
| 38 | - | If `--stdin` is supplied, then the list of patterns is read from | |
| 39 | - | standard input instead of from the argument list. | |
| 40 | - | ||
| 41 | - | --count=<count>:: | |
| 42 | - | By default the command shows all refs that match | |
| 43 | - | `<pattern>`. This option makes it stop after showing | |
| 44 | - | that many refs. | |
| 45 | - | ||
| 46 | - | --sort=<key>:: | |
| 47 | - | A field name to sort on. Prefix `-` to sort in | |
| 48 | - | descending order of the value. When unspecified, | |
| 49 | - | `refname` is used. You may use the --sort=<key> option | |
| 50 | - | multiple times, in which case the last key becomes the primary | |
| 51 | - | key. | |
| 52 | - | ||
| 53 | - | --format=<format>:: | |
| 54 | - | A string that interpolates `%(fieldname)` from a ref being shown and | |
| 55 | - | the object it points at. In addition, the string literal `%%` | |
| 56 | - | renders as `%` and `%xx` - where `xx` are hex digits - renders as | |
| 57 | - | the character with hex code `xx`. For example, `%00` interpolates to | |
| 58 | - | `\0` (NUL), `%09` to `\t` (TAB), and `%0a` to `\n` (LF). | |
| 59 | - | + | |
| 60 | - | When unspecified, `<format>` defaults to `%(objectname) SPC %(objecttype) | |
| 61 | - | TAB %(refname)`. | |
| 62 | - | ||
| 63 | - | --color[=<when>]:: | |
| 64 | - | Respect any colors specified in the `--format` option. The | |
| 65 | - | `<when>` field must be one of `always`, `never`, or `auto` (if | |
| 66 | - | `<when>` is absent, behave as if `always` was given). | |
| 67 | - | ||
| 68 | - | --shell:: | |
| 69 | - | --perl:: | |
| 70 | - | --python:: | |
| 71 | - | --tcl:: | |
| 72 | - | If given, strings that substitute `%(fieldname)` | |
| 73 | - | placeholders are quoted as string literals suitable for | |
| 74 | - | the specified host language. This is meant to produce | |
| 75 | - | a scriptlet that can directly be `eval`ed. | |
| 76 | - | ||
| 77 | - | --points-at=<object>:: | |
| 78 | - | Only list refs which points at the given object. | |
| 79 | - | ||
| 80 | - | --merged[=<object>]:: | |
| 81 | - | Only list refs whose tips are reachable from the | |
| 82 | - | specified commit (HEAD if not specified). | |
| 83 | - | ||
| 84 | - | --no-merged[=<object>]:: | |
| 85 | - | Only list refs whose tips are not reachable from the | |
| 86 | - | specified commit (HEAD if not specified). | |
| 87 | - | ||
| 88 | - | --contains[=<object>]:: | |
| 89 | - | Only list refs which contain the specified commit (HEAD if not | |
| 90 | - | specified). | |
| 91 | - | ||
| 92 | - | --no-contains[=<object>]:: | |
| 93 | - | Only list refs which don't contain the specified commit (HEAD | |
| 94 | - | if not specified). | |
| 95 | - | ||
| 96 | - | --ignore-case:: | |
| 97 | - | Sorting and filtering refs are case insensitive. | |
| 98 | - | ||
| 99 | - | --omit-empty:: | |
| 100 | - | Do not print a newline after formatted refs where the format expands | |
| 101 | - | to the empty string. | |
| 102 | - | ||
| 103 | - | --exclude=<pattern>:: | |
| 104 | - | If one or more patterns are given, only refs which do not match | |
| 105 | - | any excluded pattern(s) are shown. Matching is done using the | |
| 106 | - | same rules as `<pattern>` above. | |
| 107 | - | ||
| 108 | - | --include-root-refs:: | |
| 109 | - | List root refs (HEAD and pseudorefs) apart from regular refs. | |
| 31 | + | include::for-each-ref-options.adoc[] | |
| 110 | 32 | ||
| 111 | 33 | FIELD NAMES | |
| 112 | 34 | ----------- | |
| @@ -117,44 +39,44 @@ keys. | |||
| 117 | 39 | ||
| 118 | 40 | For all objects, the following names can be used: | |
| 119 | 41 | ||
| 120 | - | refname:: | |
| 121 | - | The name of the ref (the part after $GIT_DIR/). | |
| 42 | + | `refname`:: | |
| 43 | + | The name of the ref (the part after `$GIT_DIR/`). | |
| 122 | 44 | For a non-ambiguous short name of the ref append `:short`. | |
| 123 | - | The option core.warnAmbiguousRefs is used to select the strict | |
| 124 | - | abbreviation mode. If `lstrip=<N>` (`rstrip=<N>`) is appended, strips `<N>` | |
| 45 | + | The option `core.warnAmbiguousRefs` is used to select the strict | |
| 46 | + | abbreviation mode. If `lstrip=<n>` (`rstrip=<n>`) is appended, strip _<n>_ | |
| 125 | 47 | slash-separated path components from the front (back) of the refname | |
| 126 | 48 | (e.g. `%(refname:lstrip=2)` turns `refs/tags/foo` into `foo` and | |
| 127 | 49 | `%(refname:rstrip=2)` turns `refs/tags/foo` into `refs`). | |
| 128 | - | If `<N>` is a negative number, strip as many path components as | |
| 129 | - | necessary from the specified end to leave `-<N>` path components | |
| 50 | + | If _<n>_ is a negative number, strip as many path components as | |
| 51 | + | necessary from the specified end to leave `-<n>` path components | |
| 130 | 52 | (e.g. `%(refname:lstrip=-2)` turns | |
| 131 | 53 | `refs/tags/foo` into `tags/foo` and `%(refname:rstrip=-1)` | |
| 132 | 54 | turns `refs/tags/foo` into `refs`). When the ref does not have | |
| 133 | 55 | enough components, the result becomes an empty string if | |
| 134 | - | stripping with positive <N>, or it becomes the full refname if | |
| 135 | - | stripping with negative <N>. Neither is an error. | |
| 56 | + | stripping with positive _<n>_, or it becomes the full refname if | |
| 57 | + | stripping with negative _<N>_. Neither is an error. | |
| 136 | 58 | + | |
| 137 | 59 | `strip` can be used as a synonym to `lstrip`. | |
| 138 | 60 | ||
| 139 | - | objecttype:: | |
| 61 | + | `objecttype`:: | |
| 140 | 62 | The type of the object (`blob`, `tree`, `commit`, `tag`). | |
| 141 | 63 | ||
| 142 | - | objectsize:: | |
| 64 | + | `objectsize`:: | |
| 143 | 65 | The size of the object (the same as 'git cat-file -s' reports). | |
| 144 | 66 | Append `:disk` to get the size, in bytes, that the object takes up on | |
| 145 | - | disk. See the note about on-disk sizes in the `CAVEATS` section below. | |
| 146 | - | objectname:: | |
| 67 | + | disk. See the note about on-disk sizes in the 'CAVEATS' section below. | |
| 68 | + | `objectname`:: | |
| 147 | 69 | The object name (aka SHA-1). | |
| 148 | 70 | For a non-ambiguous abbreviation of the object name append `:short`. | |
| 149 | 71 | For an abbreviation of the object name with desired length append | |
| 150 | - | `:short=<length>`, where the minimum length is MINIMUM_ABBREV. The | |
| 72 | + | `:short=<length>`, where the minimum length is `MINIMUM_ABBREV`. The | |
| 151 | 73 | length may be exceeded to ensure unique object names. | |
| 152 | - | deltabase:: | |
| 74 | + | `deltabase`:: | |
| 153 | 75 | This expands to the object name of the delta base for the | |
| 154 | 76 | given object, if it is stored as a delta. Otherwise it | |
| 155 | 77 | expands to the null object name (all zeroes). | |
| 156 | 78 | ||
| 157 | - | upstream:: | |
| 79 | + | `upstream`:: | |
| 158 | 80 | The name of a local ref which can be considered ``upstream'' | |
| 159 | 81 | from the displayed ref. Respects `:short`, `:lstrip` and | |
| 160 | 82 | `:rstrip` in the same way as `refname` above. Additionally | |
| @@ -176,100 +98,103 @@ Has no effect if the ref does not have tracking information associated | |||
| 176 | 98 | with it. All the options apart from `nobracket` are mutually exclusive, | |
| 177 | 99 | but if used together the last option is selected. | |
| 178 | 100 | ||
| 179 | - | push:: | |
| 101 | + | `push`:: | |
| 180 | 102 | The name of a local ref which represents the `@{push}` | |
| 181 | 103 | location for the displayed ref. Respects `:short`, `:lstrip`, | |
| 182 | 104 | `:rstrip`, `:track`, `:trackshort`, `:remotename`, and `:remoteref` | |
| 183 | 105 | options as `upstream` does. Produces an empty string if no `@{push}` | |
| 184 | 106 | ref is configured. | |
| 185 | 107 | ||
| 186 | - | HEAD:: | |
| 187 | - | '*' if HEAD matches current ref (the checked out branch), ' ' | |
| 108 | + | `HEAD`:: | |
| 109 | + | `*` if `HEAD` matches current ref (the checked out branch), ' ' | |
| 188 | 110 | otherwise. | |
| 189 | 111 | ||
| 190 | - | color:: | |
| 112 | + | `color`:: | |
| 191 | 113 | Change output color. Followed by `:<colorname>`, where color | |
| 192 | 114 | names are described under Values in the "CONFIGURATION FILE" | |
| 193 | 115 | section of linkgit:git-config[1]. For example, | |
| 194 | 116 | `%(color:bold red)`. | |
| 195 | 117 | ||
| 196 | - | align:: | |
| 118 | + | `align`:: | |
| 197 | 119 | Left-, middle-, or right-align the content between | |
| 198 | - | %(align:...) and %(end). The "align:" is followed by | |
| 120 | + | `%(align:...)` and `%(end)`. The "`align:`" is followed by | |
| 199 | 121 | `width=<width>` and `position=<position>` in any order | |
| 200 | - | separated by a comma, where the `<position>` is either left, | |
| 201 | - | right or middle, default being left and `<width>` is the total | |
| 122 | + | separated by a comma, where the _<position>_ is either `left`, | |
| 123 | + | `right` or `middle`, default being `left` and _<width>_ is the total | |
| 202 | 124 | length of the content with alignment. For brevity, the | |
| 203 | 125 | "width=" and/or "position=" prefixes may be omitted, and bare | |
| 204 | - | <width> and <position> used instead. For instance, | |
| 126 | + | _<width>_ and _<position>_ used instead. For instance, | |
| 205 | 127 | `%(align:<width>,<position>)`. If the contents length is more | |
| 206 | 128 | than the width then no alignment is performed. If used with | |
| 207 | - | `--quote` everything in between %(align:...) and %(end) is | |
| 129 | + | `--quote` everything in between `%(align:...)` and `%(end)` is | |
| 208 | 130 | quoted, but if nested then only the topmost level performs | |
| 209 | 131 | quoting. | |
| 210 | 132 | ||
| 211 | - | if:: | |
| 212 | - | Used as %(if)...%(then)...%(end) or | |
| 213 | - | %(if)...%(then)...%(else)...%(end). If there is an atom with | |
| 214 | - | value or string literal after the %(if) then everything after | |
| 215 | - | the %(then) is printed, else if the %(else) atom is used, then | |
| 133 | + | `if`:: | |
| 134 | + | Used as `%(if)...%(then)...%(end)` or | |
| 135 | + | `%(if)...%(then)...%(else)...%(end)`. If there is an atom with | |
| 136 | + | value or string literal after the `%(if)` then everything after | |
| 137 | + | the `%(then)` is printed, else if the `%(else)` atom is used, then | |
| 216 | 138 | everything after %(else) is printed. We ignore space when | |
| 217 | - | evaluating the string before %(then), this is useful when we | |
| 218 | - | use the %(HEAD) atom which prints either "*" or " " and we | |
| 219 | - | want to apply the 'if' condition only on the 'HEAD' ref. | |
| 220 | - | Append ":equals=<string>" or ":notequals=<string>" to compare | |
| 221 | - | the value between the %(if:...) and %(then) atoms with the | |
| 139 | + | evaluating the string before `%(then)`, this is useful when we | |
| 140 | + | use the `%(HEAD)` atom which prints either "`*`" or " " and we | |
| 141 | + | want to apply the 'if' condition only on the `HEAD` ref. | |
| 142 | + | Append "`:equals=<string>`" or "`:notequals=<string>`" to compare | |
| 143 | + | the value between the `%(if:...)` and `%(then)` atoms with the | |
| 222 | 144 | given string. | |
| 223 | 145 | ||
| 224 | - | symref:: | |
| 146 | + | `symref`:: | |
| 225 | 147 | The ref which the given symbolic ref refers to. If not a | |
| 226 | 148 | symbolic ref, nothing is printed. Respects the `:short`, | |
| 227 | 149 | `:lstrip` and `:rstrip` options in the same way as `refname` | |
| 228 | 150 | above. | |
| 229 | 151 | ||
| 230 | - | signature:: | |
| 152 | + | `signature`:: | |
| 231 | 153 | The GPG signature of a commit. | |
| 232 | 154 | ||
| 233 | - | signature:grade:: | |
| 234 | - | Show "G" for a good (valid) signature, "B" for a bad | |
| 235 | - | signature, "U" for a good signature with unknown validity, "X" | |
| 236 | - | for a good signature that has expired, "Y" for a good | |
| 237 | - | signature made by an expired key, "R" for a good signature | |
| 238 | - | made by a revoked key, "E" if the signature cannot be | |
| 239 | - | checked (e.g. missing key) and "N" for no signature. | |
| 240 | - | ||
| 241 | - | signature:signer:: | |
| 155 | + | `signature:grade`:: | |
| 156 | + | Show | |
| 157 | + | `G`;; for a good (valid) signature | |
| 158 | + | `B`;; for a bad signature | |
| 159 | + | `U`;; for a good signature with unknown validity | |
| 160 | + | `X`;; for a good signature that has expired | |
| 161 | + | `Y`;; for a good signature made by an expired key | |
| 162 | + | `R`;; for a good signature made by a revoked key | |
| 163 | + | `E`;; if the signature cannot be checked (e.g. missing key) | |
| 164 | + | `N`;; for no signature. | |
| 165 | + | ||
| 166 | + | `signature:signer`:: | |
| 242 | 167 | The signer of the GPG signature of a commit. | |
| 243 | 168 | ||
| 244 | - | signature:key:: | |
| 169 | + | `signature:key`:: | |
| 245 | 170 | The key of the GPG signature of a commit. | |
| 246 | 171 | ||
| 247 | - | signature:fingerprint:: | |
| 172 | + | `signature:fingerprint`:: | |
| 248 | 173 | The fingerprint of the GPG signature of a commit. | |
| 249 | 174 | ||
| 250 | - | signature:primarykeyfingerprint:: | |
| 175 | + | `signature:primarykeyfingerprint`:: | |
| 251 | 176 | The primary key fingerprint of the GPG signature of a commit. | |
| 252 | 177 | ||
| 253 | - | signature:trustlevel:: | |
| 178 | + | `signature:trustlevel`:: | |
| 254 | 179 | The trust level of the GPG signature of a commit. Possible | |
| 255 | 180 | outputs are `ultimate`, `fully`, `marginal`, `never` and `undefined`. | |
| 256 | 181 | ||
| 257 | - | worktreepath:: | |
| 182 | + | `worktreepath`:: | |
| 258 | 183 | The absolute path to the worktree in which the ref is checked | |
| 259 | 184 | out, if it is checked out in any linked worktree. Empty string | |
| 260 | 185 | otherwise. | |
| 261 | 186 | ||
| 262 | - | ahead-behind:<committish>:: | |
| 187 | + | `ahead-behind:<commit-ish>`:: | |
| 263 | 188 | Two integers, separated by a space, demonstrating the number of | |
| 264 | 189 | commits ahead and behind, respectively, when comparing the output | |
| 265 | - | ref to the `<committish>` specified in the format. | |
| 190 | + | ref to the _<committish>_ specified in the format. | |
| 266 | 191 | ||
| 267 | - | is-base:<committish>:: | |
| 268 | - | In at most one row, `(<committish>)` will appear to indicate the ref | |
| 192 | + | `is-base:<commit-ish>`:: | |
| 193 | + | In at most one row, `(<commit-ish>)` will appear to indicate the ref | |
| 269 | 194 | that is most likely the ref used as a starting point for the branch | |
| 270 | - | that produced `<committish>`. This choice is made using a heuristic: | |
| 195 | + | that produced _<commit-ish>_. This choice is made using a heuristic: | |
| 271 | 196 | choose the ref that minimizes the number of commits in the | |
| 272 | - | first-parent history of `<committish>` and not in the first-parent | |
| 197 | + | first-parent history of _<commit-ish>_ and not in the first-parent | |
| 273 | 198 | history of the ref. | |
| 274 | 199 | + | |
| 275 | 200 | For example, consider the following figure of first-parent histories of | |
| @@ -303,29 +228,29 @@ common first-parent ancestor of `B` and `C` and ties are broken by the | |||
| 303 | 228 | earliest ref in the sorted order. | |
| 304 | 229 | + | |
| 305 | 230 | Note that this token will not appear if the first-parent history of | |
| 306 | - | `<committish>` does not intersect the first-parent histories of the | |
| 231 | + | _<commit-ish>_ does not intersect the first-parent histories of the | |
| 307 | 232 | filtered refs. | |
| 308 | 233 | ||
| 309 | - | describe[:options]:: | |
| 234 | + | `describe[:<option>,...]`:: | |
| 310 | 235 | A human-readable name, like linkgit:git-describe[1]; | |
| 311 | 236 | empty string for undescribable commits. The `describe` string may | |
| 312 | 237 | be followed by a colon and one or more comma-separated options. | |
| 313 | 238 | + | |
| 314 | 239 | -- | |
| 315 | - | tags=<bool-value>;; | |
| 240 | + | `tags=<bool-value>`;; | |
| 316 | 241 | Instead of only considering annotated tags, consider | |
| 317 | 242 | lightweight tags as well; see the corresponding option in | |
| 318 | 243 | linkgit:git-describe[1] for details. | |
| 319 | - | abbrev=<number>;; | |
| 320 | - | Use at least <number> hexadecimal digits; see the corresponding | |
| 244 | + | `abbrev=<number>`;; | |
| 245 | + | Use at least _<number>_ hexadecimal digits; see the corresponding | |
| 321 | 246 | option in linkgit:git-describe[1] for details. | |
| 322 | - | match=<pattern>;; | |
| 323 | - | Only consider tags matching the given `glob(7)` pattern, | |
| 324 | - | excluding the "refs/tags/" prefix; see the corresponding option | |
| 247 | + | `match=<pattern>`;; | |
| 248 | + | Only consider tags matching the `glob`(7) _<pattern>_, | |
| 249 | + | excluding the `refs/tags/` prefix; see the corresponding option | |
| 325 | 250 | in linkgit:git-describe[1] for details. | |
| 326 | - | exclude=<pattern>;; | |
| 327 | - | Do not consider tags matching the given `glob(7)` pattern, | |
| 328 | - | excluding the "refs/tags/" prefix; see the corresponding option | |
| 251 | + | `exclude=<pattern>`;; | |
| 252 | + | Do not consider tags matching the `glob`(7) _<pattern>_, | |
| 253 | + | excluding the `refs/tags/` prefix; see the corresponding option | |
| 329 | 254 | in linkgit:git-describe[1] for details. | |
| 330 | 255 | -- | |
| 331 | 256 | ||
| @@ -357,7 +282,7 @@ variable (see linkgit:gitmailmap[5]). | |||
| 357 | 282 | ||
| 358 | 283 | The raw data in an object is `raw`. | |
| 359 | 284 | ||
| 360 | - | raw:size:: | |
| 285 | + | `raw:size`:: | |
| 361 | 286 | The raw data size of the object. | |
| 362 | 287 | ||
| 363 | 288 | Note that `--format=%(raw)` can not be used with `--python`, `--shell`, `--tcl`, | |
| @@ -367,10 +292,10 @@ variable type. | |||
| 367 | 292 | The message in a commit or a tag object is `contents`, from which | |
| 368 | 293 | `contents:<part>` can be used to extract various parts out of: | |
| 369 | 294 | ||
| 370 | - | contents:size:: | |
| 295 | + | `contents:size`:: | |
| 371 | 296 | The size in bytes of the commit or tag message. | |
| 372 | 297 | ||
| 373 | - | contents:subject:: | |
| 298 | + | `contents:subject`:: | |
| 374 | 299 | The first paragraph of the message, which typically is a | |
| 375 | 300 | single line, is taken as the "subject" of the commit or the | |
| 376 | 301 | tag message. | |
| @@ -378,19 +303,19 @@ contents:subject:: | |||
| 378 | 303 | obtain same results. `:sanitize` can be appended to `subject` for | |
| 379 | 304 | subject line suitable for filename. | |
| 380 | 305 | ||
| 381 | - | contents:body:: | |
| 306 | + | `contents:body`:: | |
| 382 | 307 | The remainder of the commit or the tag message that follows | |
| 383 | 308 | the "subject". | |
| 384 | 309 | ||
| 385 | - | contents:signature:: | |
| 310 | + | `contents:signature`:: | |
| 386 | 311 | The optional GPG signature of the tag. | |
| 387 | 312 | ||
| 388 | - | contents:lines=N:: | |
| 389 | - | The first `N` lines of the message. | |
| 313 | + | `contents:lines=<n>`:: | |
| 314 | + | The first _<n>_ lines of the message. | |
| 390 | 315 | ||
| 391 | 316 | Additionally, the trailers as interpreted by linkgit:git-interpret-trailers[1] | |
| 392 | - | are obtained as `trailers[:options]` (or by using the historical alias | |
| 393 | - | `contents:trailers[:options]`). For valid [:option] values see `trailers` | |
| 317 | + | are obtained as `trailers[:<option>,...]` (or by using the historical alias | |
| 318 | + | `contents:trailers[:<option>,...]`). For valid _<option>_ values see `trailers` | |
| 394 | 319 | section of linkgit:git-log[1]. | |
| 395 | 320 | ||
| 396 | 321 | For sorting purposes, fields with numeric values sort in numeric order | |
| @@ -410,8 +335,8 @@ option to linkgit:git-rev-list[1] takes). If this formatting is provided in | |||
| 410 | 335 | a `--sort` key, references will be sorted according to the byte-value of the | |
| 411 | 336 | formatted string rather than the numeric value of the underlying timestamp. | |
| 412 | 337 | ||
| 413 | - | Some atoms like %(align) and %(if) always require a matching %(end). | |
| 414 | - | We call them "opening atoms" and sometimes denote them as %($open). | |
| 338 | + | Some atoms like `%(align)` and `%(if)` always require a matching `%(end)`. | |
| 339 | + | We call them "opening atoms" and sometimes denote them as `%($open)`. | |
| 415 | 340 | ||
| 416 | 341 | When a scripting language specific quoting is in effect, everything | |
| 417 | 342 | between a top-level opening atom and its matching %(end) is evaluated | |
| @@ -429,7 +354,7 @@ An example directly producing formatted text. Show the most recent | |||
| 429 | 354 | #!/bin/sh | |
| 430 | 355 | ||
| 431 | 356 | git for-each-ref --count=3 --sort='-*authordate' \ | |
| 432 | - | --format='From: %(*authorname) %(*authoremail) | |
| 357 | + | `--format='From: %(*authorname) %(*authoremail) | |
| 433 | 358 | Subject: %(*subject) | |
| 434 | 359 | Date: %(*authordate) | |
| 435 | 360 | Ref: %(*refname) | |
| @@ -440,7 +365,7 @@ Ref: %(*refname) | |||
| 440 | 365 | ||
| 441 | 366 | ||
| 442 | 367 | A simple example showing the use of shell eval on the output, | |
| 443 | - | demonstrating the use of --shell. List the prefixes of all heads: | |
| 368 | + | demonstrating the use of `--shell`. List the prefixes of all heads: | |
| 444 | 369 | ||
| 445 | 370 | ------------ | |
| 446 | 371 | #!/bin/sh | |
| @@ -508,7 +433,7 @@ eval "$eval" | |||
| 508 | 433 | ------------ | |
| 509 | 434 | ||
| 510 | 435 | ||
| 511 | - | An example to show the usage of %(if)...%(then)...%(else)...%(end). | |
| 436 | + | An example to show the usage of `%(if)...%(then)...%(else)...%(end)`. | |
| 512 | 437 | This prefixes the current branch with a star. | |
| 513 | 438 | ||
| 514 | 439 | ------------ | |
| @@ -516,7 +441,7 @@ git for-each-ref --format="%(if)%(HEAD)%(then)* %(else) %(end)%(refname:short)" | |||
| 516 | 441 | ------------ | |
| 517 | 442 | ||
| 518 | 443 | ||
| 519 | - | An example to show the usage of %(if)...%(then)...%(end). | |
| 444 | + | An example to show the usage of `%(if)...%(then)...%(end)`. | |
| 520 | 445 | This prints the authorname, if present. | |
| 521 | 446 | ||
| 522 | 447 | ------------ | |
modified Documentation/git-format-patch.adoc
| @@ -8,8 +8,8 @@ git-format-patch - Prepare patches for e-mail submission | |||
| 8 | 8 | ||
| 9 | 9 | SYNOPSIS | |
| 10 | 10 | -------- | |
| 11 | - | [verse] | |
| 12 | - | 'git format-patch' [-k] [(-o|--output-directory) <dir> | --stdout] | |
| 11 | + | [synopsis] | |
| 12 | + | git format-patch [-k] [(-o|--output-directory) <dir> | --stdout] | |
| 13 | 13 | [--no-thread | --thread[=<style>]] | |
| 14 | 14 | [(--attach|--inline)[=<boundary>] | --no-attach] | |
| 15 | 15 | [-s | --signoff] | |
| @@ -24,6 +24,7 @@ SYNOPSIS | |||
| 24 | 24 | [(--reroll-count|-v) <n>] | |
| 25 | 25 | [--to=<email>] [--cc=<email>] | |
| 26 | 26 | [--[no-]cover-letter] [--quiet] | |
| 27 | + | [--commit-list-format=<format-spec>] | |
| 27 | 28 | [--[no-]encode-email-headers] | |
| 28 | 29 | [--no-notes | --notes[=<ref>]] | |
| 29 | 30 | [--interdiff=<previous>] | |
| @@ -39,20 +40,20 @@ DESCRIPTION | |||
| 39 | 40 | Prepare each non-merge commit with its "patch" in | |
| 40 | 41 | one "message" per commit, formatted to resemble a UNIX mailbox. | |
| 41 | 42 | The output of this command is convenient for e-mail submission or | |
| 42 | - | for use with 'git am'. | |
| 43 | + | for use with `git am`. | |
| 43 | 44 | ||
| 44 | 45 | A "message" generated by the command consists of three parts: | |
| 45 | 46 | ||
| 46 | 47 | * A brief metadata header that begins with `From <commit>` | |
| 47 | 48 | with a fixed `Mon Sep 17 00:00:00 2001` datestamp to help programs | |
| 48 | - | like "file(1)" to recognize that the file is an output from this | |
| 49 | + | like `file`(1) to recognize that the file is an output from this | |
| 49 | 50 | command, fields that record the author identity, the author date, | |
| 50 | 51 | and the title of the change (taken from the first paragraph of the | |
| 51 | 52 | commit log message). | |
| 52 | 53 | ||
| 53 | 54 | * The second and subsequent paragraphs of the commit log message. | |
| 54 | 55 | ||
| 55 | - | * The "patch", which is the "diff -p --stat" output (see | |
| 56 | + | * The "patch", which is the `diff -p --stat` output (see | |
| 56 | 57 | linkgit:git-diff[1]) between the commit and its parent. | |
| 57 | 58 | ||
| 58 | 59 | The log message and the patch are separated by a line with a | |
| @@ -60,18 +61,18 @@ three-dash line. | |||
| 60 | 61 | ||
| 61 | 62 | There are two ways to specify which commits to operate on. | |
| 62 | 63 | ||
| 63 | - | 1. A single commit, <since>, specifies that the commits leading | |
| 64 | + | 1. A single commit, _<since>_, specifies that the commits leading | |
| 64 | 65 | to the tip of the current branch that are not in the history | |
| 65 | - | that leads to the <since> to be output. | |
| 66 | + | that leads to the _<since>_ to be output. | |
| 66 | 67 | ||
| 67 | - | 2. Generic <revision-range> expression (see "SPECIFYING | |
| 68 | - | REVISIONS" section in linkgit:gitrevisions[7]) means the | |
| 68 | + | 2. Generic _<revision-range>_ expression (see 'SPECIFYING | |
| 69 | + | REVISIONS' section in linkgit:gitrevisions[7]) means the | |
| 69 | 70 | commits in the specified range. | |
| 70 | 71 | ||
| 71 | - | The first rule takes precedence in the case of a single <commit>. To | |
| 72 | + | The first rule takes precedence in the case of a single _<commit>_. To | |
| 72 | 73 | apply the second rule, i.e., format everything since the beginning of | |
| 73 | - | history up until <commit>, use the `--root` option: `git format-patch | |
| 74 | - | --root <commit>`. If you want to format only <commit> itself, you | |
| 74 | + | history up until _<commit>_, use the `--root` option: `git format-patch | |
| 75 | + | --root <commit>`. If you want to format only _<commit>_ itself, you | |
| 75 | 76 | can do this with `git format-patch -1 <commit>`. | |
| 76 | 77 | ||
| 77 | 78 | By default, each output file is numbered sequentially from 1, and uses the | |
| @@ -81,7 +82,7 @@ will only be numbers, without the first line of the commit appended. | |||
| 81 | 82 | The names of the output files are printed to standard | |
| 82 | 83 | output, unless the `--stdout` option is specified. | |
| 83 | 84 | ||
| 84 | - | If `-o` is specified, output files are created in <dir>. Otherwise | |
| 85 | + | If `-o` is specified, output files are created in _<dir>_. Otherwise | |
| 85 | 86 | they are created in the current working directory. The default path | |
| 86 | 87 | can be set with the `format.outputDirectory` configuration option. | |
| 87 | 88 | The `-o` option takes precedence over `format.outputDirectory`. | |
| @@ -107,123 +108,122 @@ OPTIONS | |||
| 107 | 108 | :git-format-patch: 1 | |
| 108 | 109 | include::diff-options.adoc[] | |
| 109 | 110 | ||
| 110 | - | -<n>:: | |
| 111 | - | Prepare patches from the topmost <n> commits. | |
| 111 | + | `-<n>`:: | |
| 112 | + | Prepare patches from the topmost _<n>_ commits. | |
| 112 | 113 | ||
| 113 | - | -o <dir>:: | |
| 114 | - | --output-directory <dir>:: | |
| 115 | - | Use <dir> to store the resulting files, instead of the | |
| 114 | + | `-o <dir>`:: | |
| 115 | + | `--output-directory=<dir>`:: | |
| 116 | + | Use _<dir>_ to store the resulting files, instead of the | |
| 116 | 117 | current working directory. | |
| 117 | 118 | ||
| 118 | - | -n:: | |
| 119 | - | --numbered:: | |
| 119 | + | `-n`:: | |
| 120 | + | `--numbered`:: | |
| 120 | 121 | Name output in '[PATCH n/m]' format, even with a single patch. | |
| 121 | 122 | ||
| 122 | - | -N:: | |
| 123 | - | --no-numbered:: | |
| 123 | + | `-N`:: | |
| 124 | + | `--no-numbered`:: | |
| 124 | 125 | Name output in '[PATCH]' format. | |
| 125 | 126 | ||
| 126 | - | --start-number <n>:: | |
| 127 | - | Start numbering the patches at <n> instead of 1. | |
| 127 | + | `--start-number <n>`:: | |
| 128 | + | Start numbering the patches at _<n>_ instead of 1. | |
| 128 | 129 | ||
| 129 | - | --numbered-files:: | |
| 130 | + | `--numbered-files`:: | |
| 130 | 131 | Output file names will be a simple number sequence | |
| 131 | 132 | without the default first line of the commit appended. | |
| 132 | 133 | ||
| 133 | - | -k:: | |
| 134 | - | --keep-subject:: | |
| 134 | + | `-k`:: | |
| 135 | + | `--keep-subject`:: | |
| 135 | 136 | Do not strip/add '[PATCH]' from the first line of the | |
| 136 | 137 | commit log message. | |
| 137 | 138 | ||
| 138 | - | -s:: | |
| 139 | - | --signoff:: | |
| 139 | + | `-s`:: | |
| 140 | + | `--signoff`:: | |
| 140 | 141 | Add a `Signed-off-by` trailer to the commit message, using | |
| 141 | 142 | the committer identity of yourself. | |
| 142 | 143 | See the signoff option in linkgit:git-commit[1] for more information. | |
| 143 | 144 | ||
| 144 | - | --stdout:: | |
| 145 | + | `--stdout`:: | |
| 145 | 146 | Print all commits to the standard output in mbox format, | |
| 146 | 147 | instead of creating a file for each one. | |
| 147 | 148 | ||
| 148 | - | --attach[=<boundary>]:: | |
| 149 | + | `--attach[=<boundary>]`:: | |
| 149 | 150 | Create multipart/mixed attachment, the first part of | |
| 150 | 151 | which is the commit message and the patch itself in the | |
| 151 | 152 | second part, with `Content-Disposition: attachment`. | |
| 152 | 153 | ||
| 153 | - | --no-attach:: | |
| 154 | + | `--no-attach`:: | |
| 154 | 155 | Disable the creation of an attachment, overriding the | |
| 155 | 156 | configuration setting. | |
| 156 | 157 | ||
| 157 | - | --inline[=<boundary>]:: | |
| 158 | + | `--inline[=<boundary>]`:: | |
| 158 | 159 | Create multipart/mixed attachment, the first part of | |
| 159 | 160 | which is the commit message and the patch itself in the | |
| 160 | 161 | second part, with `Content-Disposition: inline`. | |
| 161 | 162 | ||
| 162 | - | --thread[=<style>]:: | |
| 163 | - | --no-thread:: | |
| 164 | - | Controls addition of `In-Reply-To` and `References` headers to | |
| 163 | + | `--thread[=<style>]`:: | |
| 164 | + | `--no-thread`:: | |
| 165 | + | Control addition of `In-Reply-To` and `References` headers to | |
| 165 | 166 | make the second and subsequent mails appear as replies to the | |
| 166 | 167 | first. Also controls generation of the `Message-ID` header to | |
| 167 | 168 | reference. | |
| 168 | 169 | + | |
| 169 | - | The optional <style> argument can be either `shallow` or `deep`. | |
| 170 | - | 'shallow' threading makes every mail a reply to the head of the | |
| 170 | + | The optional _<style>_ argument can be either `shallow` or `deep`. | |
| 171 | + | `shallow` threading makes every mail a reply to the head of the | |
| 171 | 172 | series, where the head is chosen from the cover letter, the | |
| 172 | - | `--in-reply-to`, and the first patch mail, in this order. 'deep' | |
| 173 | + | `--in-reply-to`, and the first patch mail, in this order. `deep` | |
| 173 | 174 | threading makes every mail a reply to the previous one. | |
| 174 | 175 | + | |
| 175 | 176 | The default is `--no-thread`, unless the `format.thread` configuration | |
| 176 | 177 | is set. `--thread` without an argument is equivalent to `--thread=shallow`. | |
| 177 | 178 | + | |
| 178 | - | Beware that the default for 'git send-email' is to thread emails | |
| 179 | + | Beware that the default for `git send-email` is to thread emails | |
| 179 | 180 | itself. If you want `git format-patch` to take care of threading, you | |
| 180 | 181 | will want to ensure that threading is disabled for `git send-email`. | |
| 181 | 182 | ||
| 182 | - | --in-reply-to=<message-id>:: | |
| 183 | + | `--in-reply-to=<message-id>`:: | |
| 183 | 184 | Make the first mail (or all the mails with `--no-thread`) appear as a | |
| 184 | - | reply to the given <message-id>, which avoids breaking threads to | |
| 185 | + | reply to the given _<message-id>_, which avoids breaking threads to | |
| 185 | 186 | provide a new patch series. | |
| 186 | 187 | ||
| 187 | - | --ignore-if-in-upstream:: | |
| 188 | + | `--ignore-if-in-upstream`:: | |
| 188 | 189 | Do not include a patch that matches a commit in | |
| 189 | - | <until>..<since>. This will examine all patches reachable | |
| 190 | - | from <since> but not from <until> and compare them with the | |
| 190 | + | _<until>_.._<since>_. This will examine all patches reachable | |
| 191 | + | from _<since>_ but not from _<until>_ and compare them with the | |
| 191 | 192 | patches being generated, and any patch that matches is | |
| 192 | 193 | ignored. | |
| 193 | 194 | ||
| 194 | - | --always:: | |
| 195 | + | `--always`:: | |
| 195 | 196 | Include patches for commits that do not introduce any change, | |
| 196 | 197 | which are omitted by default. | |
| 197 | 198 | ||
| 198 | - | --cover-from-description=<mode>:: | |
| 199 | - | Controls which parts of the cover letter will be automatically | |
| 199 | + | `--cover-from-description=<mode>`:: | |
| 200 | + | Control which parts of the cover letter will be automatically | |
| 200 | 201 | populated using the branch's description. | |
| 201 | 202 | + | |
| 202 | - | If `<mode>` is `message` or `default`, the cover letter subject will be | |
| 203 | + | _<mode>_ can have the following values: | |
| 204 | + | ||
| 205 | + | `message`;; | |
| 206 | + | `default`;; the cover letter subject will be | |
| 203 | 207 | populated with placeholder text. The body of the cover letter will be | |
| 204 | 208 | populated with the branch's description. This is the default mode when | |
| 205 | 209 | no configuration nor command line option is specified. | |
| 206 | - | + | |
| 207 | - | If `<mode>` is `subject`, the first paragraph of the branch description will | |
| 210 | + | `subject`;; the first paragraph of the branch description will | |
| 208 | 211 | populate the cover letter subject. The remainder of the description will | |
| 209 | 212 | populate the body of the cover letter. | |
| 210 | - | + | |
| 211 | - | If `<mode>` is `auto`, if the first paragraph of the branch description | |
| 213 | + | `auto`;; if the first paragraph of the branch description | |
| 212 | 214 | is greater than 100 bytes, then the mode will be `message`, otherwise | |
| 213 | 215 | `subject` will be used. | |
| 214 | - | + | |
| 215 | - | If `<mode>` is `none`, both the cover letter subject and body will be | |
| 216 | + | `none`;; both the cover letter subject and body will be | |
| 216 | 217 | populated with placeholder text. | |
| 217 | 218 | ||
| 218 | - | --description-file=<file>:: | |
| 219 | - | Use the contents of <file> instead of the branch's description | |
| 219 | + | `--description-file=<file>`:: | |
| 220 | + | Use the contents of _<file>_ instead of the branch's description | |
| 220 | 221 | for generating the cover letter. | |
| 221 | 222 | ||
| 222 | - | --subject-prefix=<subject-prefix>:: | |
| 223 | - | Instead of the standard '[PATCH]' prefix in the subject | |
| 224 | - | line, instead use '[<subject-prefix>]'. This can be used | |
| 225 | - | to name a patch series, and can be combined with the | |
| 226 | - | `--numbered` option. | |
| 223 | + | `--subject-prefix=<subject-prefix>`:: | |
| 224 | + | Use '[<subject-prefix>]' instead of the standard '[PATCH]' | |
| 225 | + | prefix in the subject line. This can be used to name a patch | |
| 226 | + | series, and can be combined with the `--numbered` option. | |
| 227 | 227 | + | |
| 228 | 228 | The configuration variable `format.subjectPrefix` may also be used | |
| 229 | 229 | to configure a subject prefix to apply to a given repository for | |
| @@ -231,14 +231,14 @@ all patches. This is often useful on mailing lists which receive | |||
| 231 | 231 | patches for several repositories and can be used to disambiguate | |
| 232 | 232 | the patches (with a value of e.g. "PATCH my-project"). | |
| 233 | 233 | ||
| 234 | - | --filename-max-length=<n>:: | |
| 234 | + | `--filename-max-length=<n>`:: | |
| 235 | 235 | Instead of the standard 64 bytes, chomp the generated output | |
| 236 | - | filenames at around '<n>' bytes (too short a value will be | |
| 236 | + | filenames at around _<n>_ bytes (too short a value will be | |
| 237 | 237 | silently raised to a reasonable length). Defaults to the | |
| 238 | 238 | value of the `format.filenameMaxLength` configuration | |
| 239 | 239 | variable, or 64 if unconfigured. | |
| 240 | 240 | ||
| 241 | - | --rfc[=<rfc>]:: | |
| 241 | + | `--rfc[=<rfc>]`:: | |
| 242 | 242 | Prepends the string _<rfc>_ (defaults to "RFC") to | |
| 243 | 243 | the subject prefix. As the subject prefix defaults to | |
| 244 | 244 | "PATCH", you'll get "RFC PATCH" by default. | |
| @@ -254,39 +254,40 @@ can be prefixed with a dash ("`-`") to signal that the rest of | |||
| 254 | 254 | the _<rfc>_ string should be appended to the subject prefix instead, | |
| 255 | 255 | e.g., `--rfc='-(WIP)'` results in "PATCH (WIP)". | |
| 256 | 256 | ||
| 257 | - | -v <n>:: | |
| 258 | - | --reroll-count=<n>:: | |
| 259 | - | Mark the series as the <n>-th iteration of the topic. The | |
| 257 | + | `-v <n>`:: | |
| 258 | + | `--reroll-count=<n>`:: | |
| 259 | + | Mark the series as the _<n>_-th iteration of the topic. The | |
| 260 | 260 | output filenames have `v<n>` prepended to them, and the | |
| 261 | 261 | subject prefix ("PATCH" by default, but configurable via the | |
| 262 | - | `--subject-prefix` option) has ` v<n>` appended to it. E.g. | |
| 262 | + | `--subject-prefix` option) has `v<n>` appended to it. E.g. | |
| 263 | 263 | `--reroll-count=4` may produce `v4-0001-add-makefile.patch` | |
| 264 | 264 | file that has "Subject: [PATCH v4 1/20] Add makefile" in it. | |
| 265 | - | `<n>` does not have to be an integer (e.g. "--reroll-count=4.4", | |
| 266 | - | or "--reroll-count=4rev2" are allowed), but the downside of | |
| 265 | + | _<n>_ does not have to be an integer (e.g. `--reroll-count=4.4`, | |
| 266 | + | or `--reroll-count=4rev2` are allowed), but the downside of | |
| 267 | 267 | using such a reroll-count is that the range-diff/interdiff | |
| 268 | 268 | with the previous version does not state exactly which | |
| 269 | 269 | version the new iteration is compared against. | |
| 270 | 270 | ||
| 271 | - | --to=<email>:: | |
| 271 | + | `--to=<email>`:: | |
| 272 | 272 | Add a `To:` header to the email headers. This is in addition | |
| 273 | 273 | to any configured headers, and may be used multiple times. | |
| 274 | 274 | The negated form `--no-to` discards all `To:` headers added so | |
| 275 | 275 | far (from config or command line). | |
| 276 | 276 | ||
| 277 | - | --cc=<email>:: | |
| 277 | + | `--cc=<email>`:: | |
| 278 | 278 | Add a `Cc:` header to the email headers. This is in addition | |
| 279 | 279 | to any configured headers, and may be used multiple times. | |
| 280 | 280 | The negated form `--no-cc` discards all `Cc:` headers added so | |
| 281 | 281 | far (from config or command line). | |
| 282 | 282 | ||
| 283 | - | --from:: | |
| 284 | - | --from=<ident>:: | |
| 285 | - | Use `ident` in the `From:` header of each commit email. If the | |
| 286 | - | author ident of the commit is not textually identical to the | |
| 287 | - | provided `ident`, place a `From:` header in the body of the | |
| 288 | - | message with the original author. If no `ident` is given, use | |
| 289 | - | the committer ident. | |
| 283 | + | `--from`:: | |
| 284 | + | `--from=<ident>`:: | |
| 285 | + | Use _<ident>_ in the `From:` header of each email. In case of a | |
| 286 | + | commit email, if the author ident of the commit is not textually | |
| 287 | + | identical to the provided _<ident>_, place a `From:` header in the | |
| 288 | + | body of the message with the original author. If no _<ident>_ is | |
| 289 | + | given, or if the option is not passed at all, use the ident of | |
| 290 | + | the current committer. | |
| 290 | 291 | + | |
| 291 | 292 | Note that this option is only useful if you are actually sending the | |
| 292 | 293 | emails and want to identify yourself as the sender, but retain the | |
| @@ -295,7 +296,8 @@ header). Note also that `git send-email` already handles this | |||
| 295 | 296 | transformation for you, and this option should not be used if you are | |
| 296 | 297 | feeding the result to `git send-email`. | |
| 297 | 298 | ||
| 298 | - | --[no-]force-in-body-from:: | |
| 299 | + | `--force-in-body-from`:: | |
| 300 | + | `--no-force-in-body-from`:: | |
| 299 | 301 | With the e-mail sender specified via the `--from` option, by | |
| 300 | 302 | default, an in-body "From:" to identify the real author of | |
| 301 | 303 | the commit is added at the top of the commit log message if | |
| @@ -306,7 +308,7 @@ feeding the result to `git send-email`. | |||
| 306 | 308 | Defaults to the value of the `format.forceInBodyFrom` | |
| 307 | 309 | configuration variable. | |
| 308 | 310 | ||
| 309 | - | --add-header=<header>:: | |
| 311 | + | `--add-header=<header>`:: | |
| 310 | 312 | Add an arbitrary header to the email headers. This is in addition | |
| 311 | 313 | to any configured headers, and may be used multiple times. | |
| 312 | 314 | For example, `--add-header="Organization: git-foo"`. | |
| @@ -314,33 +316,46 @@ feeding the result to `git send-email`. | |||
| 314 | 316 | `Cc:`, and custom) headers added so far from config or command | |
| 315 | 317 | line. | |
| 316 | 318 | ||
| 317 | - | --[no-]cover-letter:: | |
| 318 | - | In addition to the patches, generate a cover letter file | |
| 319 | - | containing the branch description, shortlog and the overall diffstat. You can | |
| 320 | - | fill in a description in the file before sending it out. | |
| 321 | - | ||
| 322 | - | --encode-email-headers:: | |
| 323 | - | --no-encode-email-headers:: | |
| 319 | + | `--cover-letter`:: | |
| 320 | + | `--no-cover-letter`:: | |
| 321 | + | In addition to the patches, generate a cover letter file containing the | |
| 322 | + | branch description, commit list and the overall diffstat. You can fill | |
| 323 | + | in a description in the file before sending it out. | |
| 324 | + | ||
| 325 | + | `--commit-list-format=<format-spec>`:: | |
| 326 | + | Specify the format in which to generate the commit list of the patch | |
| 327 | + | series. The accepted values for format-spec are `shortlog`, `modern` or | |
| 328 | + | a format-string prefixed with `log:`. E.g. `log: %s (%an)`. | |
| 329 | + | `modern` is the same as `log:%w(72)[%(count)/%(total)] %s`. | |
| 330 | + | The `log:` prefix can be omitted if the format-string has a `%` in it | |
| 331 | + | (expecting that it is part of `%<placeholder>`). | |
| 332 | + | Defaults to the `format.commitListFormat` configuration variable, if | |
| 333 | + | set, or `shortlog`. | |
| 334 | + | This option given from the command-line implies the use of | |
| 335 | + | `--cover-letter` unless `--no-cover-letter` is given. | |
| 336 | + | ||
| 337 | + | `--encode-email-headers`:: | |
| 338 | + | `--no-encode-email-headers`:: | |
| 324 | 339 | Encode email headers that have non-ASCII characters with | |
| 325 | 340 | "Q-encoding" (described in RFC 2047), instead of outputting the | |
| 326 | 341 | headers verbatim. Defaults to the value of the | |
| 327 | 342 | `format.encodeEmailHeaders` configuration variable. | |
| 328 | 343 | ||
| 329 | - | --interdiff=<previous>:: | |
| 344 | + | `--interdiff=<previous>`:: | |
| 330 | 345 | As a reviewer aid, insert an interdiff into the cover letter, | |
| 331 | 346 | or as commentary of the lone patch of a 1-patch series, showing | |
| 332 | 347 | the differences between the previous version of the patch series and | |
| 333 | - | the series currently being formatted. `previous` is a single revision | |
| 348 | + | the series currently being formatted. _<previous>_ is a single revision | |
| 334 | 349 | naming the tip of the previous series which shares a common base with | |
| 335 | 350 | the series being formatted (for example `git format-patch | |
| 336 | 351 | --cover-letter --interdiff=feature/v1 -3 feature/v2`). | |
| 337 | 352 | ||
| 338 | - | --range-diff=<previous>:: | |
| 353 | + | `--range-diff=<previous>`:: | |
| 339 | 354 | As a reviewer aid, insert a range-diff (see linkgit:git-range-diff[1]) | |
| 340 | 355 | into the cover letter, or as commentary of the lone patch of a | |
| 341 | 356 | 1-patch series, showing the differences between the previous | |
| 342 | 357 | version of the patch series and the series currently being formatted. | |
| 343 | - | `previous` can be a single revision naming the tip of the previous | |
| 358 | + | _<previous>_ can be a single revision naming the tip of the previous | |
| 344 | 359 | series if it shares a common base with the series being formatted (for | |
| 345 | 360 | example `git format-patch --cover-letter --range-diff=feature/v1 -3 | |
| 346 | 361 | feature/v2`), or a revision range if the two versions of the series are | |
| @@ -352,7 +367,7 @@ product of `format-patch` is generated, and they are not passed to | |||
| 352 | 367 | the underlying `range-diff` machinery used to generate the cover-letter | |
| 353 | 368 | material (this may change in the future). | |
| 354 | 369 | ||
| 355 | - | --creation-factor=<percent>:: | |
| 370 | + | `--creation-factor=<percent>`:: | |
| 356 | 371 | Used with `--range-diff`, tweak the heuristic which matches up commits | |
| 357 | 372 | between the previous and current series of patches by adjusting the | |
| 358 | 373 | creation/deletion cost fudge factor. See linkgit:git-range-diff[1]) | |
| @@ -363,8 +378,8 @@ case is to show comparison with an older iteration of the same | |||
| 363 | 378 | topic and the tool should find more correspondence between the two | |
| 364 | 379 | sets of patches. | |
| 365 | 380 | ||
| 366 | - | --notes[=<ref>]:: | |
| 367 | - | --no-notes:: | |
| 381 | + | `--notes[=<ref>]`:: | |
| 382 | + | `--no-notes`:: | |
| 368 | 383 | Append the notes (see linkgit:git-notes[1]) for the commit | |
| 369 | 384 | after the three-dash line. | |
| 370 | 385 | + | |
| @@ -379,16 +394,17 @@ configuration options in linkgit:git-notes[1] to use this workflow). | |||
| 379 | 394 | The default is `--no-notes`, unless the `format.notes` configuration is | |
| 380 | 395 | set. | |
| 381 | 396 | ||
| 382 | - | --[no-]signature=<signature>:: | |
| 397 | + | `--signature=<signature>`:: | |
| 398 | + | `--no-signature`:: | |
| 383 | 399 | Add a signature to each message produced. Per RFC 3676 the signature | |
| 384 | - | is separated from the body by a line with '-- ' on it. If the | |
| 400 | + | is separated from the body by a line with "-- " on it. If the | |
| 385 | 401 | signature option is omitted the signature defaults to the Git version | |
| 386 | 402 | number. | |
| 387 | 403 | ||
| 388 | - | --signature-file=<file>:: | |
| 389 | - | Works just like --signature except the signature is read from a file. | |
| 404 | + | `--signature-file=<file>`:: | |
| 405 | + | Works just like `--signature` except the signature is read from a file. | |
| 390 | 406 | ||
| 391 | - | --suffix=.<sfx>:: | |
| 407 | + | `--suffix=.<sfx>`:: | |
| 392 | 408 | Instead of using `.patch` as the suffix for generated | |
| 393 | 409 | filenames, use specified suffix. A common alternative is | |
| 394 | 410 | `--suffix=.txt`. Leaving this empty will remove the `.patch` | |
| @@ -397,35 +413,36 @@ set. | |||
| 397 | 413 | Note that the leading character does not have to be a dot; for example, | |
| 398 | 414 | you can use `--suffix=-patch` to get `0001-description-of-my-change-patch`. | |
| 399 | 415 | ||
| 400 | - | -q:: | |
| 401 | - | --quiet:: | |
| 416 | + | `-q`:: | |
| 417 | + | `--quiet`:: | |
| 402 | 418 | Do not print the names of the generated files to standard output. | |
| 403 | 419 | ||
| 404 | - | --no-binary:: | |
| 420 | + | `--no-binary`:: | |
| 405 | 421 | Do not output contents of changes in binary files, instead | |
| 406 | 422 | display a notice that those files changed. Patches generated | |
| 407 | 423 | using this option cannot be applied properly, but they are | |
| 408 | 424 | still useful for code review. | |
| 409 | 425 | ||
| 410 | - | --zero-commit:: | |
| 426 | + | `--zero-commit`:: | |
| 411 | 427 | Output an all-zero hash in each patch's From header instead | |
| 412 | 428 | of the hash of the commit. | |
| 413 | 429 | ||
| 414 | - | --[no-]base[=<commit>]:: | |
| 430 | + | `--no-base`:: | |
| 431 | + | `--base[=<commit>]`:: | |
| 415 | 432 | Record the base tree information to identify the state the | |
| 416 | 433 | patch series applies to. See the BASE TREE INFORMATION section | |
| 417 | - | below for details. If <commit> is "auto", a base commit is | |
| 434 | + | below for details. If _<commit>_ is `auto`, a base commit is | |
| 418 | 435 | automatically chosen. The `--no-base` option overrides a | |
| 419 | 436 | `format.useAutoBase` configuration. | |
| 420 | 437 | ||
| 421 | - | --root:: | |
| 422 | - | Treat the revision argument as a <revision-range>, even if it | |
| 438 | + | `--root`:: | |
| 439 | + | Treat the revision argument as a _<revision-range>_, even if it | |
| 423 | 440 | is just a single commit (that would normally be treated as a | |
| 424 | - | <since>). Note that root commits included in the specified | |
| 441 | + | _<since>_). Note that root commits included in the specified | |
| 425 | 442 | range are always formatted as creation patches, independently | |
| 426 | 443 | of this flag. | |
| 427 | 444 | ||
| 428 | - | --progress:: | |
| 445 | + | `--progress`:: | |
| 429 | 446 | Show progress reports on stderr as patches are generated. | |
| 430 | 447 | ||
| 431 | 448 | CONFIGURATION | |
| @@ -436,7 +453,7 @@ outputting more than one patch, add "To:" or "Cc:" headers, configure | |||
| 436 | 453 | attachments, change the patch output directory, and sign off patches | |
| 437 | 454 | with configuration variables. | |
| 438 | 455 | ||
| 439 | - | ------------ | |
| 456 | + | ---- | |
| 440 | 457 | [format] | |
| 441 | 458 | headers = "Organization: git-foo\n" | |
| 442 | 459 | subjectPrefix = CHANGE | |
| @@ -448,18 +465,18 @@ with configuration variables. | |||
| 448 | 465 | signOff = true | |
| 449 | 466 | outputDirectory = <directory> | |
| 450 | 467 | coverLetter = auto | |
| 468 | + | commitListFormat = shortlog | |
| 451 | 469 | coverFromDescription = auto | |
| 452 | - | ------------ | |
| 453 | - | ||
| 470 | + | ---- | |
| 454 | 471 | ||
| 455 | 472 | DISCUSSION | |
| 456 | 473 | ---------- | |
| 457 | 474 | ||
| 458 | - | The patch produced by 'git format-patch' is in UNIX mailbox format, | |
| 475 | + | The patch produced by `git format-patch` is in UNIX mailbox format, | |
| 459 | 476 | with a fixed "magic" time stamp to indicate that the file is output | |
| 460 | 477 | from format-patch rather than a real mailbox, like so: | |
| 461 | 478 | ||
| 462 | - | ------------ | |
| 479 | + | ---- | |
| 463 | 480 | From 8f72bad1baf19a53459661343e21d6491c3908d3 Mon Sep 17 00:00:00 2001 | |
| 464 | 481 | From: Tony Luck <tony.luck@intel.com> | |
| 465 | 482 | Date: Tue, 13 Jul 2010 11:42:54 -0700 | |
| @@ -474,7 +491,7 @@ arch/arm config files were slimmed down using a python script | |||
| 474 | 491 | ||
| 475 | 492 | Do the same for ia64 so we can have sleek & trim looking | |
| 476 | 493 | ... | |
| 477 | - | ------------ | |
| 494 | + | ---- | |
| 478 | 495 | ||
| 479 | 496 | Typically it will be placed in a MUA's drafts folder, edited to add | |
| 480 | 497 | timely commentary that should not go in the changelog after the three | |
| @@ -484,12 +501,12 @@ can save interesting patches in a UNIX mailbox and apply them with | |||
| 484 | 501 | linkgit:git-am[1]. | |
| 485 | 502 | ||
| 486 | 503 | When a patch is part of an ongoing discussion, the patch generated by | |
| 487 | - | 'git format-patch' can be tweaked to take advantage of the 'git am | |
| 488 | - | --scissors' feature. After your response to the discussion comes a | |
| 504 | + | `git format-patch` can be tweaked to take advantage of the `git am | |
| 505 | + | --scissors` feature. After your response to the discussion comes a | |
| 489 | 506 | line that consists solely of "`-- >8 --`" (scissors and perforation), | |
| 490 | 507 | followed by the patch with unnecessary header fields removed: | |
| 491 | 508 | ||
| 492 | - | ------------ | |
| 509 | + | ---- | |
| 493 | 510 | ... | |
| 494 | 511 | > So we should do such-and-such. | |
| 495 | 512 | ||
| @@ -500,7 +517,7 @@ Subject: [IA64] Put ia64 config files on the Uwe Kleine-König diet | |||
| 500 | 517 | ||
| 501 | 518 | arch/arm config files were slimmed down using a python script | |
| 502 | 519 | ... | |
| 503 | - | ------------ | |
| 520 | + | ---- | |
| 504 | 521 | ||
| 505 | 522 | When sending a patch this way, most often you are sending your own | |
| 506 | 523 | patch, so in addition to the "`From $SHA1 $magic_timestamp`" marker you | |
| @@ -522,7 +539,7 @@ two common types of corruption: | |||
| 522 | 539 | One way to test if your MUA is set up correctly is: | |
| 523 | 540 | ||
| 524 | 541 | * Send the patch to yourself, exactly the way you would, except | |
| 525 | - | with To: and Cc: lines that do not contain the list and | |
| 542 | + | with `To:` and `Cc:` lines that do not contain the list and | |
| 526 | 543 | maintainer address. | |
| 527 | 544 | ||
| 528 | 545 | * Save that patch to a file in UNIX mailbox format. Call it a.patch, | |
| @@ -543,12 +560,12 @@ If it does not apply correctly, there can be various reasons. | |||
| 543 | 560 | this case. | |
| 544 | 561 | ||
| 545 | 562 | * The MUA corrupted your patch; "am" would complain that | |
| 546 | - | the patch does not apply. Look in the .git/rebase-apply/ subdirectory and | |
| 547 | - | see what 'patch' file contains and check for the common | |
| 548 | - | corruption patterns mentioned above. | |
| 563 | + | the patch does not apply. Look in the `.git/rebase-apply/` subdirectory and | |
| 564 | + | see what `patch` file contains and check for the common | |
| 565 | + | corruption patterns mentioned above. | |
| 549 | 566 | ||
| 550 | - | * While at it, check the 'info' and 'final-commit' files as well. | |
| 551 | - | If what is in 'final-commit' is not exactly what you would want to | |
| 567 | + | * While at it, check the `info` and `final-commit` files as well. | |
| 568 | + | If what is in `final-commit` is not exactly what you would want to | |
| 552 | 569 | see in the commit log message, it is very likely that the | |
| 553 | 570 | receiver would end up hand editing the log message when applying | |
| 554 | 571 | your patch. Things like "Hi, this is my first patch.\n" in the | |
| @@ -564,11 +581,11 @@ GMail | |||
| 564 | 581 | ~~~~~ | |
| 565 | 582 | GMail does not have any way to turn off line wrapping in the web | |
| 566 | 583 | interface, so it will mangle any emails that you send. You can however | |
| 567 | - | use "git send-email" and send your patches through the GMail SMTP server, or | |
| 584 | + | use `git send-email` and send your patches through the GMail SMTP server, or | |
| 568 | 585 | use any IMAP email client to connect to the google IMAP server and forward | |
| 569 | 586 | the emails through that. | |
| 570 | 587 | ||
| 571 | - | For hints on using 'git send-email' to send your patches through the | |
| 588 | + | For hints on using `git send-email` to send your patches through the | |
| 572 | 589 | GMail SMTP server, see the EXAMPLE section of linkgit:git-send-email[1]. | |
| 573 | 590 | ||
| 574 | 591 | For hints on submission using the IMAP interface, see the EXAMPLE | |
| @@ -577,7 +594,7 @@ section of linkgit:git-imap-send[1]. | |||
| 577 | 594 | Thunderbird | |
| 578 | 595 | ~~~~~~~~~~~ | |
| 579 | 596 | By default, Thunderbird will both wrap emails as well as flag | |
| 580 | - | them as being 'format=flowed', both of which will make the | |
| 597 | + | them as being `format=flowed`, both of which will make the | |
| 581 | 598 | resulting email unusable by Git. | |
| 582 | 599 | ||
| 583 | 600 | There are three different approaches: use an add-on to turn off line wraps, | |
| @@ -587,13 +604,19 @@ an external editor to keep Thunderbird from mangling the patches. | |||
| 587 | 604 | Approach #1 (add-on) | |
| 588 | 605 | ^^^^^^^^^^^^^^^^^^^^ | |
| 589 | 606 | ||
| 590 | - | Install the Toggle Word Wrap add-on that is available from | |
| 591 | - | https://addons.mozilla.org/thunderbird/addon/toggle-word-wrap/ | |
| 592 | - | It adds a menu entry "Enable Word Wrap" in the composer's "Options" menu | |
| 607 | + | Install the Toggle Line Wrap add-on that is available from | |
| 608 | + | https://addons.thunderbird.net/thunderbird/addon/toggle-line-wrap | |
| 609 | + | It adds a button "Line Wrap" to the composer's toolbar | |
| 593 | 610 | that you can tick off. Now you can compose the message as you otherwise do | |
| 594 | - | (cut + paste, 'git format-patch' | 'git imap-send', etc), but you have to | |
| 611 | + | (cut + paste, `git format-patch` | `git imap-send`, etc), but you have to | |
| 595 | 612 | insert line breaks manually in any text that you type. | |
| 596 | 613 | ||
| 614 | + | As a bonus feature, the add-on can detect patch text in the composer | |
| 615 | + | and warns when line wrapping has not yet been turned off. | |
| 616 | + | ||
| 617 | + | The add-on requires a few tweaks of the advanced configuration | |
| 618 | + | (`about:config`). These are listed on the download page. | |
| 619 | + | ||
| 597 | 620 | Approach #2 (configuration) | |
| 598 | 621 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
| 599 | 622 | Three steps: | |
| @@ -619,7 +642,7 @@ Toggle it to make sure it is set to `false`. Also, search for | |||
| 619 | 642 | Toggle it to make sure it is set to `false`. | |
| 620 | 643 | ||
| 621 | 644 | After that is done, you should be able to compose email as you | |
| 622 | - | otherwise would (cut + paste, 'git format-patch' | 'git imap-send', etc), | |
| 645 | + | otherwise would (cut + paste, `git format-patch` | `git imap-send`, etc), | |
| 623 | 646 | and the patches will not be mangled. | |
| 624 | 647 | ||
| 625 | 648 | Approach #3 (external editor) | |
| @@ -636,14 +659,14 @@ External Editor from https://globs.org/articles.php?lng=en&pg=8 | |||
| 636 | 659 | "Composition & Addressing" panel of the account to be used to | |
| 637 | 660 | send the patch. | |
| 638 | 661 | ||
| 639 | - | 3. In the main Thunderbird window, 'before' you open the compose | |
| 662 | + | 3. In the main Thunderbird window, _before_ you open the compose | |
| 640 | 663 | window for the patch, use Tools->about:config to set the | |
| 641 | 664 | following to the indicated values: | |
| 642 | 665 | + | |
| 643 | - | ---------- | |
| 666 | + | ---- | |
| 644 | 667 | mailnews.send_plaintext_flowed => false | |
| 645 | 668 | mailnews.wraplength => 0 | |
| 646 | - | ---------- | |
| 669 | + | ---- | |
| 647 | 670 | ||
| 648 | 671 | 4. Open a compose window and click the external editor icon. | |
| 649 | 672 | ||
| @@ -653,11 +676,11 @@ External Editor from https://globs.org/articles.php?lng=en&pg=8 | |||
| 653 | 676 | Side note: it may be possible to do step 2 with | |
| 654 | 677 | about:config and the following settings but no one's tried yet. | |
| 655 | 678 | ||
| 656 | - | ---------- | |
| 679 | + | ---- | |
| 657 | 680 | mail.html_compose => false | |
| 658 | 681 | mail.identity.default.compose_html => false | |
| 659 | 682 | mail.identity.id?.compose_html => false | |
| 660 | - | ---------- | |
| 683 | + | ---- | |
| 661 | 684 | ||
| 662 | 685 | There is a script in contrib/thunderbird-patch-inline which can help | |
| 663 | 686 | you include patches with Thunderbird in an easy way. To use it, do the | |
| @@ -684,15 +707,15 @@ BASE TREE INFORMATION | |||
| 684 | 707 | ||
| 685 | 708 | The base tree information block is used for maintainers or third party | |
| 686 | 709 | testers to know the exact state the patch series applies to. It consists | |
| 687 | - | of the 'base commit', which is a well-known commit that is part of the | |
| 710 | + | of the "base commit", which is a well-known commit that is part of the | |
| 688 | 711 | stable part of the project history everybody else works off of, and zero | |
| 689 | - | or more 'prerequisite patches', which are well-known patches in flight | |
| 690 | - | that is not yet part of the 'base commit' that need to be applied on top | |
| 691 | - | of 'base commit' in topological order before the patches can be applied. | |
| 712 | + | or more "prerequisite patches", which are well-known patches in flight | |
| 713 | + | that is not yet part of the "base commit" that need to be applied on top | |
| 714 | + | of "base commit" in topological order before the patches can be applied. | |
| 692 | 715 | ||
| 693 | - | The 'base commit' is shown as "base-commit: " followed by the 40-hex of | |
| 694 | - | the commit object name. A 'prerequisite patch' is shown as | |
| 695 | - | "prerequisite-patch-id: " followed by the 40-hex 'patch id', which can | |
| 716 | + | The "base commit" is shown as "`base-commit:` " followed by the 40-hex of | |
| 717 | + | the commit object name. A "prerequisite patch" is shown as | |
| 718 | + | "`prerequisite-patch-id:` " followed by the 40-hex "patch id", which can | |
| 696 | 719 | be obtained by passing the patch through the `git patch-id --stable` | |
| 697 | 720 | command. | |
| 698 | 721 | ||
| @@ -710,12 +733,12 @@ range), the base tree information block is shown at the end of the | |||
| 710 | 733 | first message the command outputs (either the first patch, or the | |
| 711 | 734 | cover letter), like this: | |
| 712 | 735 | ||
| 713 | - | ------------ | |
| 736 | + | ---- | |
| 714 | 737 | base-commit: P | |
| 715 | 738 | prerequisite-patch-id: X | |
| 716 | 739 | prerequisite-patch-id: Y | |
| 717 | 740 | prerequisite-patch-id: Z | |
| 718 | - | ------------ | |
| 741 | + | ---- | |
| 719 | 742 | ||
| 720 | 743 | For non-linear topology, such as | |
| 721 | 744 | ||
| @@ -739,7 +762,7 @@ EXAMPLES | |||
| 739 | 762 | -------- | |
| 740 | 763 | ||
| 741 | 764 | * Extract commits between revisions R1 and R2, and apply them on top of | |
| 742 | - | the current branch using 'git am' to cherry-pick them: | |
| 765 | + | the current branch using `git am` to cherry-pick them: | |
| 743 | 766 | + | |
| 744 | 767 | ------------ | |
| 745 | 768 | $ git format-patch -k --stdout R1..R2 | git am -3 -k | |
| @@ -754,7 +777,7 @@ $ git format-patch origin | |||
| 754 | 777 | + | |
| 755 | 778 | For each commit a separate file is created in the current directory. | |
| 756 | 779 | ||
| 757 | - | * Extract all commits that lead to 'origin' since the inception of the | |
| 780 | + | * Extract all commits that lead to `origin` since the inception of the | |
| 758 | 781 | project: | |
| 759 | 782 | + | |
| 760 | 783 | ------------ | |
| @@ -770,7 +793,7 @@ $ git format-patch -M -B origin | |||
| 770 | 793 | Additionally, it detects and handles renames and complete rewrites | |
| 771 | 794 | intelligently to produce a renaming patch. A renaming patch reduces | |
| 772 | 795 | the amount of text output, and generally makes it easier to review. | |
| 773 | - | Note that non-Git "patch" programs won't understand renaming patches, so | |
| 796 | + | Note that non-Git `patch` programs won't understand renaming patches, so | |
| 774 | 797 | use it only when you know the recipient uses Git to apply your patch. | |
| 775 | 798 | ||
| 776 | 799 | * Extract three topmost commits from the current branch and format them | |
| @@ -788,6 +811,10 @@ if they are part of the requested range. A simple "patch" does not | |||
| 788 | 811 | include enough information for the receiving end to reproduce the same | |
| 789 | 812 | merge commit. | |
| 790 | 813 | ||
| 814 | + | === PATCH APPLICATION | |
| 815 | + | ||
| 816 | + | include::format-patch-caveats.adoc[] | |
| 817 | + | ||
| 791 | 818 | SEE ALSO | |
| 792 | 819 | -------- | |
| 793 | 820 | linkgit:git-am[1], linkgit:git-send-email[1] | |
added Documentation/git-format-rev.adoc mode 100644
| @@ -0,0 +1,215 @@ | |||
| 1 | + | git-format-rev(1) | |
| 2 | + | ================= | |
| 3 | + | ||
| 4 | + | NAME | |
| 5 | + | ---- | |
| 6 | + | git-format-rev - EXPERIMENTAL: Pretty format revisions on demand | |
| 7 | + | ||
| 8 | + | ||
| 9 | + | SYNOPSIS | |
| 10 | + | -------- | |
| 11 | + | [synopsis] | |
| 12 | + | (EXPERIMENTAL!) git format-rev --stdin-mode=<mode> --format=<pretty> [--[no-]notes=<ref>] [-z] [--[no-]null-output] [--[no-]null-input] | |
| 13 | + | ||
| 14 | + | DESCRIPTION | |
| 15 | + | ----------- | |
| 16 | + | ||
| 17 | + | Pretty format revisions from standard input. | |
| 18 | + | ||
| 19 | + | THIS COMMAND IS EXPERIMENTAL. THE BEHAVIOR MAY CHANGE. | |
| 20 | + | ||
| 21 | + | OPTIONS | |
| 22 | + | ------- | |
| 23 | + | ||
| 24 | + | `--stdin-mode=<mode>`:: | |
| 25 | + | How to interpret standard input data: | |
| 26 | + | + | |
| 27 | + | -- | |
| 28 | + | `revs`;; Each line or record (see the <<io,INPUT AND OUTPUT FORMATS>> | |
| 29 | + | section) is interpreted as a commit. Any kind of revision | |
| 30 | + | expression can be used (see linkgit:gitrevisions[7]). Annotated | |
| 31 | + | tags are peeled (see linkgit:gitglossary[7]). | |
| 32 | + | + | |
| 33 | + | The argument `rev` is also accepted. | |
| 34 | + | ||
| 35 | + | `text`;; Formats all commit object names found in freeform text. These | |
| 36 | + | must be full object names, i.e. abbreviated hexadecimal object | |
| 37 | + | names will not be interpreted. | |
| 38 | + | + | |
| 39 | + | Anything that is parsed as an object name but that is not found to be a | |
| 40 | + | commit object name is left alone (echoed). | |
| 41 | + | -- | |
| 42 | + | ||
| 43 | + | `--format=<pretty>`:: | |
| 44 | + | Pretty format string. | |
| 45 | + | ||
| 46 | + | `--notes=<ref>`:: | |
| 47 | + | `--no-notes`:: | |
| 48 | + | Custom notes ref. Notes are displayed when using the `%N` | |
| 49 | + | atom. See linkgit:git-notes[1]. | |
| 50 | + | ||
| 51 | + | `-z`:: | |
| 52 | + | `--null`:: | |
| 53 | + | Use _NUL_ character to terminate both input and output instead | |
| 54 | + | of newline. This option cannot be negated. | |
| 55 | + | + | |
| 56 | + | This is useful if both the input and output could contain newlines or if | |
| 57 | + | the input to this command also uses _NUL_ character termination; see the | |
| 58 | + | <<io,INPUT AND OUTPUT FORMATS>> section below. | |
| 59 | + | + | |
| 60 | + | The mode `--stdin-mode=text` can have use for this option when it needs | |
| 61 | + | to process input like for example `git last-modified -z`; see the | |
| 62 | + | <<examples,EXAMPLES>> section below. | |
| 63 | + | ||
| 64 | + | `--null-output`:: | |
| 65 | + | `--no-null-output`:: | |
| 66 | + | Use _NUL_ character to terminate output instead of newline. The | |
| 67 | + | default is `--no-null-output`. | |
| 68 | + | + | |
| 69 | + | This is useful if the output could contain newlines, for example if the | |
| 70 | + | `%n` (newline) atom is used. | |
| 71 | + | ||
| 72 | + | `--null-input`:: | |
| 73 | + | `--no-null-input`:: | |
| 74 | + | Use _NUL_ character to terminate input instead of newline. The | |
| 75 | + | default is `--no-null-input`. | |
| 76 | + | + | |
| 77 | + | This is useful if the input revision expressions could contain newlines. | |
| 78 | + | ||
| 79 | + | [[io]] | |
| 80 | + | INPUT AND OUTPUT FORMAT | |
| 81 | + | ----------------------- | |
| 82 | + | ||
| 83 | + | The command uses newlines for both input and output termination by | |
| 84 | + | default. See the `-z`, `--null-output`, and `--null-input` options for | |
| 85 | + | using _NUL_ character as the terminator. | |
| 86 | + | ||
| 87 | + | The mode `--stdin-mode=revs` outputs one formatted commit followed by | |
| 88 | + | the terminator. This could either be called a _line_ or a _record_ in | |
| 89 | + | case "line" is too suggestive of newline termination. | |
| 90 | + | ||
| 91 | + | Note that this means that the terminator character (newline or _NUL_) | |
| 92 | + | acts as a _terminator_, not a _separator_. In other words, the final | |
| 93 | + | line or record is also terminated by the terminator character. | |
| 94 | + | ||
| 95 | + | The mode `--stdin-mode=text` replaces each object name with the | |
| 96 | + | formatted commit, i.e. the format `%s` would transform some commit | |
| 97 | + | object name to `<subject>` without any termination. Like this: | |
| 98 | + | ||
| 99 | + | ---- | |
| 100 | + | Did we not fix this in "<subject>"? | |
| 101 | + | ---- | |
| 102 | + | ||
| 103 | + | It is safe to interactively read and write from this command since each | |
| 104 | + | record is immediately flushed. | |
| 105 | + | ||
| 106 | + | [[examples]] | |
| 107 | + | EXAMPLES | |
| 108 | + | -------- | |
| 109 | + | ||
| 110 | + | The command linkgit:git-last-modified[1] shows the commit that each file | |
| 111 | + | was last modified in. | |
| 112 | + | ||
| 113 | + | ---- | |
| 114 | + | $ git last-modified -- README.md Makefile | |
| 115 | + | 7798034171030be0909c56377a4e0e10e6d2df93 Makefile | |
| 116 | + | c50fbb2dd225e7e82abba4380423ae105089f4d7 README.md | |
| 117 | + | ---- | |
| 118 | + | ||
| 119 | + | We can pipe the result to this command in order to replace the object | |
| 120 | + | name with the commit author. | |
| 121 | + | ||
| 122 | + | ---- | |
| 123 | + | $ git last-modified -- README.md Makefile | | |
| 124 | + | git format-rev --stdin-mode=text --format=%an | |
| 125 | + | Junio C Hamano Makefile | |
| 126 | + | Todd Zullinger README.md | |
| 127 | + | ---- | |
| 128 | + | ||
| 129 | + | Another example is _formatting commits in commit messages_. Given this commit message: | |
| 130 | + | ||
| 131 | + | ---- | |
| 132 | + | Fix off-by-one error | |
| 133 | + | ||
| 134 | + | Fix off-by-one error introduced in | |
| 135 | + | e83c5163316f89bfbde7d9ab23ca2e25604af290. | |
| 136 | + | ||
| 137 | + | We thought we fixed this in 5569bf9bbedd63a00780fc5c110e0cfab3aa97b9 but | |
| 138 | + | that only covered 1/3 of the faulty cases. | |
| 139 | + | ---- | |
| 140 | + | ||
| 141 | + | We can format the commits and use par(1) to reflow the text, say in a | |
| 142 | + | `commit-msg` hook: | |
| 143 | + | ||
| 144 | + | ---- | |
| 145 | + | $ git config set hook.reference-commits.event commit-msg | |
| 146 | + | $ git config set hook.reference-commits.command reference-commits | |
| 147 | + | $ cat $(which reference-commits) | |
| 148 | + | #/bin/sh | |
| 149 | + | ||
| 150 | + | msg="$1" | |
| 151 | + | rewritten=$(mktemp) | |
| 152 | + | git format-rev --stdin-mode=text --format=reference <"$msg" | | |
| 153 | + | par >"$rewritten" | |
| 154 | + | mv "$rewritten" "$msg" | |
| 155 | + | ---- | |
| 156 | + | ||
| 157 | + | Which will produce something like this: | |
| 158 | + | ||
| 159 | + | ---- | |
| 160 | + | Fix off-by-one error | |
| 161 | + | ||
| 162 | + | Fix off-by-one error introduced in e83c5163316 (Implement better memory | |
| 163 | + | allocator, 2005-04-07). | |
| 164 | + | ||
| 165 | + | We thought we fixed this in 5569bf9bbed (Fix memory allocator, | |
| 166 | + | 2005-06-22) but that only covered 1/3 of the faulty cases. | |
| 167 | + | ---- | |
| 168 | + | ||
| 169 | + | DISCUSSION | |
| 170 | + | ---------- | |
| 171 | + | ||
| 172 | + | This command lets you format any number of revisions in any order | |
| 173 | + | through one command invocation. Consider the | |
| 174 | + | linkgit:git-last-modified[1] case from the <<examples,EXAMPLES>> section | |
| 175 | + | above: | |
| 176 | + | ||
| 177 | + | 1. There might be hundreds of files | |
| 178 | + | 2. Commits can be repeated, i.e. two or more files were last modified in | |
| 179 | + | the same commit | |
| 180 | + | ||
| 181 | + | Two widely-used commands which pretty formats commits are | |
| 182 | + | linkgit:git-log[1] and linkgit:git-show[1]. It turns out that they are | |
| 183 | + | not a good fit for the above use case. | |
| 184 | + | ||
| 185 | + | - The output of linkgit:git-last-modified[1] would have to be processed | |
| 186 | + | in stages since you need to transform the first column separately and | |
| 187 | + | then link the author to the filename. But this is surmountable. | |
| 188 | + | - You can feed each commit to `git show` or `git log --no-walk -1`. But | |
| 189 | + | that means that you need to create a process for each line. | |
| 190 | + | - Let’s say that you want to use one process, not one per line. So you | |
| 191 | + | want to feed all the commits to the command. Now you face the problem | |
| 192 | + | that you have to feed all the commits to the commands before you get | |
| 193 | + | any output (this is also the case for the `--stdin` modes). In other | |
| 194 | + | words, you cannot loop through each line, get the author for the | |
| 195 | + | commit, and output the author and the filename. You need to feed all | |
| 196 | + | the commits, get back all the output, and match the output with the | |
| 197 | + | filename. | |
| 198 | + | - But the next problem is that commands will deduplicate the input and | |
| 199 | + | only output one commit one single time only. Thus you cannot make the | |
| 200 | + | output order match the input order, since a commit could have been | |
| 201 | + | repeated in the original input. | |
| 202 | + | ||
| 203 | + | In short, it is straightforward to use these two commands if you use one | |
| 204 | + | process per line. It is much more work if you just want to use one | |
| 205 | + | process, but still doable. In contrast, this problem is solved with just | |
| 206 | + | another shell pipeline with this command. | |
| 207 | + | ||
| 208 | + | SEE ALSO | |
| 209 | + | -------- | |
| 210 | + | linkgit:git-name-rev[1], | |
| 211 | + | linkgit:git-log[1]. | |
| 212 | + | ||
| 213 | + | GIT | |
| 214 | + | --- | |
| 215 | + | Part of the linkgit:git[1] suite | |
modified Documentation/git-fsck.adoc
| @@ -31,7 +31,8 @@ index file, all SHA-1 references in the `refs` namespace, and all reflogs | |||
| 31 | 31 | Print out objects that exist but that aren't reachable from any | |
| 32 | 32 | of the reference nodes. | |
| 33 | 33 | ||
| 34 | - | --[no-]dangling:: | |
| 34 | + | --dangling:: | |
| 35 | + | --no-dangling:: | |
| 35 | 36 | Print objects that exist but that are never 'directly' used (default). | |
| 36 | 37 | `--no-dangling` can be used to omit this information from the output. | |
| 37 | 38 | ||
| @@ -97,14 +98,16 @@ care about this output and want to speed it up further. | |||
| 97 | 98 | compatible with linkgit:git-rev-parse[1], e.g. | |
| 98 | 99 | `HEAD@{1234567890}~25^2:src/`. | |
| 99 | 100 | ||
| 100 | - | --[no-]progress:: | |
| 101 | + | --progress:: | |
| 102 | + | --no-progress:: | |
| 101 | 103 | Progress status is reported on the standard error stream by | |
| 102 | 104 | default when it is attached to a terminal, unless | |
| 103 | 105 | --no-progress or --verbose is specified. --progress forces | |
| 104 | 106 | progress status even if the standard error stream is not | |
| 105 | 107 | directed to a terminal. | |
| 106 | 108 | ||
| 107 | - | --[no-]references:: | |
| 109 | + | --references:: | |
| 110 | + | --no-references:: | |
| 108 | 111 | Control whether to check the references database consistency | |
| 109 | 112 | via 'git refs verify'. See linkgit:git-refs[1] for details. | |
| 110 | 113 | The default is to check the references database. | |
modified Documentation/git-fsmonitor--daemon.adoc
| @@ -76,9 +76,9 @@ repositories; this may be overridden by setting `fsmonitor.allowRemote` to | |||
| 76 | 76 | correctly with all network-mounted repositories, so such use is considered | |
| 77 | 77 | experimental. | |
| 78 | 78 | ||
| 79 | - | On Mac OS, the inter-process communication (IPC) between various Git | |
| 79 | + | On Mac OS and Linux, the inter-process communication (IPC) between various Git | |
| 80 | 80 | commands and the fsmonitor daemon is done via a Unix domain socket (UDS) -- a | |
| 81 | - | special type of file -- which is supported by native Mac OS filesystems, | |
| 81 | + | special type of file -- which is supported by native Mac OS and Linux filesystems, | |
| 82 | 82 | but not on network-mounted filesystems, NTFS, or FAT32. Other filesystems | |
| 83 | 83 | may or may not have the needed support; the fsmonitor daemon is not guaranteed | |
| 84 | 84 | to work with these filesystems and such use is considered experimental. | |
| @@ -87,13 +87,33 @@ By default, the socket is created in the `.git` directory. However, if the | |||
| 87 | 87 | `.git` directory is on a network-mounted filesystem, it will instead be | |
| 88 | 88 | created at `$HOME/.git-fsmonitor-*` unless `$HOME` itself is on a | |
| 89 | 89 | network-mounted filesystem, in which case you must set the configuration | |
| 90 | - | variable `fsmonitor.socketDir` to the path of a directory on a Mac OS native | |
| 90 | + | variable `fsmonitor.socketDir` to the path of a directory on a native | |
| 91 | 91 | filesystem in which to create the socket file. | |
| 92 | 92 | ||
| 93 | 93 | If none of the above directories (`.git`, `$HOME`, or `fsmonitor.socketDir`) | |
| 94 | - | is on a native Mac OS file filesystem the fsmonitor daemon will report an | |
| 94 | + | is on a native filesystem the fsmonitor daemon will report an | |
| 95 | 95 | error that will cause the daemon and the currently running command to exit. | |
| 96 | 96 | ||
| 97 | + | LINUX CAVEATS | |
| 98 | + | ~~~~~~~~~~~~~ | |
| 99 | + | ||
| 100 | + | On Linux, the fsmonitor daemon uses inotify to monitor filesystem events. | |
| 101 | + | The inotify system has per-user limits on the number of watches that can | |
| 102 | + | be created. The default limit is typically 8192 watches per user. | |
| 103 | + | ||
| 104 | + | For large repositories with many directories, you may need to increase | |
| 105 | + | this limit. Check the current limit with: | |
| 106 | + | ||
| 107 | + | cat /proc/sys/fs/inotify/max_user_watches | |
| 108 | + | ||
| 109 | + | To temporarily increase the limit: | |
| 110 | + | ||
| 111 | + | sudo sysctl fs.inotify.max_user_watches=65536 | |
| 112 | + | ||
| 113 | + | To make the change permanent, add to `/etc/sysctl.conf`: | |
| 114 | + | ||
| 115 | + | fs.inotify.max_user_watches=65536 | |
| 116 | + | ||
| 97 | 117 | CONFIGURATION | |
| 98 | 118 | ------------- | |
| 99 | 119 | ||
modified Documentation/git-gc.adoc
| @@ -53,11 +53,13 @@ configuration options such as `gc.auto` and `gc.autoPackLimit`, all | |||
| 53 | 53 | other housekeeping tasks (e.g. rerere, working trees, reflog...) will | |
| 54 | 54 | be performed as well. | |
| 55 | 55 | ||
| 56 | - | --[no-]detach:: | |
| 56 | + | --detach:: | |
| 57 | + | --no-detach:: | |
| 57 | 58 | Run in the background if the system supports it. This option overrides | |
| 58 | 59 | the `gc.autoDetach` config. | |
| 59 | 60 | ||
| 60 | - | --[no-]cruft:: | |
| 61 | + | --cruft:: | |
| 62 | + | --no-cruft:: | |
| 61 | 63 | When expiring unreachable objects, pack them separately into a | |
| 62 | 64 | cruft pack instead of storing them as loose objects. `--cruft` | |
| 63 | 65 | is on by default. | |
modified Documentation/git-grep.adoc
| @@ -8,8 +8,8 @@ git-grep - Print lines matching a pattern | |||
| 8 | 8 | ||
| 9 | 9 | SYNOPSIS | |
| 10 | 10 | -------- | |
| 11 | - | [verse] | |
| 12 | - | 'git grep' [-a | --text] [-I] [--textconv] [-i | --ignore-case] [-w | --word-regexp] | |
| 11 | + | [synopsis] | |
| 12 | + | git grep [-a | --text] [-I] [--textconv] [-i | --ignore-case] [-w | --word-regexp] | |
| 13 | 13 | [-v | --invert-match] [-h|-H] [--full-name] | |
| 14 | 14 | [-E | --extended-regexp] [-G | --basic-regexp] | |
| 15 | 15 | [-P | --perl-regexp] | |
| @@ -41,139 +41,139 @@ characters. An empty string as search expression matches all lines. | |||
| 41 | 41 | ||
| 42 | 42 | OPTIONS | |
| 43 | 43 | ------- | |
| 44 | - | --cached:: | |
| 44 | + | `--cached`:: | |
| 45 | 45 | Instead of searching tracked files in the working tree, search | |
| 46 | 46 | blobs registered in the index file. | |
| 47 | 47 | ||
| 48 | - | --untracked:: | |
| 48 | + | `--untracked`:: | |
| 49 | 49 | In addition to searching in the tracked files in the working | |
| 50 | 50 | tree, search also in untracked files. | |
| 51 | 51 | ||
| 52 | - | --no-index:: | |
| 52 | + | `--no-index`:: | |
| 53 | 53 | Search files in the current directory that is not managed by Git, | |
| 54 | 54 | or by ignoring that the current directory is managed by Git. This | |
| 55 | - | is rather similar to running the regular `grep(1)` utility with its | |
| 55 | + | is rather similar to running the regular `grep`(1) utility with its | |
| 56 | 56 | `-r` option specified, but with some additional benefits, such as | |
| 57 | - | using pathspec patterns to limit paths; see the 'pathspec' entry | |
| 57 | + | using pathspec patterns to limit paths; see the `pathspec` entry | |
| 58 | 58 | in linkgit:gitglossary[7] for more information. | |
| 59 | 59 | + | |
| 60 | 60 | This option cannot be used together with `--cached` or `--untracked`. | |
| 61 | 61 | See also `grep.fallbackToNoIndex` in 'CONFIGURATION' below. | |
| 62 | 62 | ||
| 63 | - | --no-exclude-standard:: | |
| 63 | + | `--no-exclude-standard`:: | |
| 64 | 64 | Also search in ignored files by not honoring the `.gitignore` | |
| 65 | 65 | mechanism. Only useful with `--untracked`. | |
| 66 | 66 | ||
| 67 | - | --exclude-standard:: | |
| 67 | + | `--exclude-standard`:: | |
| 68 | 68 | Do not pay attention to ignored files specified via the `.gitignore` | |
| 69 | 69 | mechanism. Only useful when searching files in the current directory | |
| 70 | 70 | with `--no-index`. | |
| 71 | 71 | ||
| 72 | - | --recurse-submodules:: | |
| 72 | + | `--recurse-submodules`:: | |
| 73 | 73 | Recursively search in each submodule that is active and | |
| 74 | 74 | checked out in the repository. When used in combination with the | |
| 75 | 75 | _<tree>_ option the prefix of all submodule output will be the name of | |
| 76 | 76 | the parent project's _<tree>_ object. This option cannot be used together | |
| 77 | 77 | with `--untracked`, and it has no effect if `--no-index` is specified. | |
| 78 | 78 | ||
| 79 | - | -a:: | |
| 80 | - | --text:: | |
| 79 | + | `-a`:: | |
| 80 | + | `--text`:: | |
| 81 | 81 | Process binary files as if they were text. | |
| 82 | 82 | ||
| 83 | - | --textconv:: | |
| 83 | + | `--textconv`:: | |
| 84 | 84 | Honor textconv filter settings. | |
| 85 | 85 | ||
| 86 | - | --no-textconv:: | |
| 86 | + | `--no-textconv`:: | |
| 87 | 87 | Do not honor textconv filter settings. | |
| 88 | 88 | This is the default. | |
| 89 | 89 | ||
| 90 | - | -i:: | |
| 91 | - | --ignore-case:: | |
| 90 | + | `-i`:: | |
| 91 | + | `--ignore-case`:: | |
| 92 | 92 | Ignore case differences between the patterns and the | |
| 93 | 93 | files. | |
| 94 | 94 | ||
| 95 | - | -I:: | |
| 95 | + | `-I`:: | |
| 96 | 96 | Don't match the pattern in binary files. | |
| 97 | 97 | ||
| 98 | - | --max-depth <depth>:: | |
| 99 | - | For each <pathspec> given on command line, descend at most <depth> | |
| 98 | + | `--max-depth <depth>`:: | |
| 99 | + | For each _<pathspec>_ given on command line, descend at most _<depth>_ | |
| 100 | 100 | levels of directories. A value of -1 means no limit. | |
| 101 | - | This option is ignored if <pathspec> contains active wildcards. | |
| 101 | + | This option is ignored if _<pathspec>_ contains active wildcards. | |
| 102 | 102 | In other words if "a*" matches a directory named "a*", | |
| 103 | - | "*" is matched literally so --max-depth is still effective. | |
| 103 | + | "*" is matched literally so `--max-depth` is still effective. | |
| 104 | 104 | ||
| 105 | - | -r:: | |
| 106 | - | --recursive:: | |
| 105 | + | `-r`:: | |
| 106 | + | `--recursive`:: | |
| 107 | 107 | Same as `--max-depth=-1`; this is the default. | |
| 108 | 108 | ||
| 109 | - | --no-recursive:: | |
| 109 | + | `--no-recursive`:: | |
| 110 | 110 | Same as `--max-depth=0`. | |
| 111 | 111 | ||
| 112 | - | -w:: | |
| 113 | - | --word-regexp:: | |
| 112 | + | `-w`:: | |
| 113 | + | `--word-regexp`:: | |
| 114 | 114 | Match the pattern only at word boundary (either begin at the | |
| 115 | 115 | beginning of a line, or preceded by a non-word character; end at | |
| 116 | 116 | the end of a line or followed by a non-word character). | |
| 117 | 117 | ||
| 118 | - | -v:: | |
| 119 | - | --invert-match:: | |
| 118 | + | `-v`:: | |
| 119 | + | `--invert-match`:: | |
| 120 | 120 | Select non-matching lines. | |
| 121 | 121 | ||
| 122 | - | -h:: | |
| 123 | - | -H:: | |
| 122 | + | `-h`:: | |
| 123 | + | `-H`:: | |
| 124 | 124 | By default, the command shows the filename for each | |
| 125 | 125 | match. `-h` option is used to suppress this output. | |
| 126 | 126 | `-H` is there for completeness and does not do anything | |
| 127 | 127 | except it overrides `-h` given earlier on the command | |
| 128 | 128 | line. | |
| 129 | 129 | ||
| 130 | - | --full-name:: | |
| 130 | + | `--full-name`:: | |
| 131 | 131 | When run from a subdirectory, the command usually | |
| 132 | 132 | outputs paths relative to the current directory. This | |
| 133 | 133 | option forces paths to be output relative to the project | |
| 134 | 134 | top directory. | |
| 135 | 135 | ||
| 136 | - | -E:: | |
| 137 | - | --extended-regexp:: | |
| 138 | - | -G:: | |
| 139 | - | --basic-regexp:: | |
| 136 | + | `-E`:: | |
| 137 | + | `--extended-regexp`:: | |
| 138 | + | `-G`:: | |
| 139 | + | `--basic-regexp`:: | |
| 140 | 140 | Use POSIX extended/basic regexp for patterns. Default | |
| 141 | 141 | is to use basic regexp. | |
| 142 | 142 | ||
| 143 | - | -P:: | |
| 144 | - | --perl-regexp:: | |
| 143 | + | `-P`:: | |
| 144 | + | `--perl-regexp`:: | |
| 145 | 145 | Use Perl-compatible regular expressions for patterns. | |
| 146 | 146 | + | |
| 147 | 147 | Support for these types of regular expressions is an optional | |
| 148 | 148 | compile-time dependency. If Git wasn't compiled with support for them | |
| 149 | 149 | providing this option will cause it to die. | |
| 150 | 150 | ||
| 151 | - | -F:: | |
| 152 | - | --fixed-strings:: | |
| 151 | + | `-F`:: | |
| 152 | + | `--fixed-strings`:: | |
| 153 | 153 | Use fixed strings for patterns (don't interpret pattern | |
| 154 | 154 | as a regex). | |
| 155 | 155 | ||
| 156 | - | -n:: | |
| 157 | - | --line-number:: | |
| 156 | + | `-n`:: | |
| 157 | + | `--line-number`:: | |
| 158 | 158 | Prefix the line number to matching lines. | |
| 159 | 159 | ||
| 160 | - | --column:: | |
| 160 | + | `--column`:: | |
| 161 | 161 | Prefix the 1-indexed byte-offset of the first match from the start of the | |
| 162 | 162 | matching line. | |
| 163 | 163 | ||
| 164 | - | -l:: | |
| 165 | - | --files-with-matches:: | |
| 166 | - | --name-only:: | |
| 167 | - | -L:: | |
| 168 | - | --files-without-match:: | |
| 164 | + | `-l`:: | |
| 165 | + | `--files-with-matches`:: | |
| 166 | + | `--name-only`:: | |
| 167 | + | `-L`:: | |
| 168 | + | `--files-without-match`:: | |
| 169 | 169 | Instead of showing every matched line, show only the | |
| 170 | 170 | names of files that contain (or do not contain) matches. | |
| 171 | - | For better compatibility with 'git diff', `--name-only` is a | |
| 171 | + | For better compatibility with `git diff`, `--name-only` is a | |
| 172 | 172 | synonym for `--files-with-matches`. | |
| 173 | 173 | ||
| 174 | - | -O[<pager>]:: | |
| 175 | - | --open-files-in-pager[=<pager>]:: | |
| 176 | - | Open the matching files in the pager (not the output of 'grep'). | |
| 174 | + | `-O[<pager>]`:: | |
| 175 | + | `--open-files-in-pager[=<pager>]`:: | |
| 176 | + | Open the matching files in the pager (not the output of `grep`). | |
| 177 | 177 | If the pager happens to be "less" or "vi", and the user | |
| 178 | 178 | specified only one pattern, the first file is positioned at | |
| 179 | 179 | the first match automatically. The `pager` argument is | |
| @@ -181,65 +181,65 @@ providing this option will cause it to die. | |||
| 181 | 181 | without a space. If `pager` is unspecified, the default pager | |
| 182 | 182 | will be used (see `core.pager` in linkgit:git-config[1]). | |
| 183 | 183 | ||
| 184 | - | -z:: | |
| 185 | - | --null:: | |
| 184 | + | `-z`:: | |
| 185 | + | `--null`:: | |
| 186 | 186 | Use \0 as the delimiter for pathnames in the output, and print | |
| 187 | 187 | them verbatim. Without this option, pathnames with "unusual" | |
| 188 | 188 | characters are quoted as explained for the configuration | |
| 189 | 189 | variable `core.quotePath` (see linkgit:git-config[1]). | |
| 190 | 190 | ||
| 191 | - | -o:: | |
| 192 | - | --only-matching:: | |
| 191 | + | `-o`:: | |
| 192 | + | `--only-matching`:: | |
| 193 | 193 | Print only the matched (non-empty) parts of a matching line, with each such | |
| 194 | 194 | part on a separate output line. | |
| 195 | 195 | ||
| 196 | - | -c:: | |
| 197 | - | --count:: | |
| 196 | + | `-c`:: | |
| 197 | + | `--count`:: | |
| 198 | 198 | Instead of showing every matched line, show the number of | |
| 199 | 199 | lines that match. | |
| 200 | 200 | ||
| 201 | - | --color[=<when>]:: | |
| 201 | + | `--color[=<when>]`:: | |
| 202 | 202 | Show colored matches. | |
| 203 | - | The value must be always (the default), never, or auto. | |
| 203 | + | The value must be `always` (the default), `never`, or `auto`. | |
| 204 | 204 | ||
| 205 | - | --no-color:: | |
| 205 | + | `--no-color`:: | |
| 206 | 206 | Turn off match highlighting, even when the configuration file | |
| 207 | 207 | gives the default to color output. | |
| 208 | 208 | Same as `--color=never`. | |
| 209 | 209 | ||
| 210 | - | --break:: | |
| 210 | + | `--break`:: | |
| 211 | 211 | Print an empty line between matches from different files. | |
| 212 | 212 | ||
| 213 | - | --heading:: | |
| 213 | + | `--heading`:: | |
| 214 | 214 | Show the filename above the matches in that file instead of | |
| 215 | 215 | at the start of each shown line. | |
| 216 | 216 | ||
| 217 | - | -p:: | |
| 218 | - | --show-function:: | |
| 217 | + | `-p`:: | |
| 218 | + | `--show-function`:: | |
| 219 | 219 | Show the preceding line that contains the function name of | |
| 220 | 220 | the match, unless the matching line is a function name itself. | |
| 221 | 221 | The name is determined in the same way as `git diff` works out | |
| 222 | 222 | patch hunk headers (see 'Defining a custom hunk-header' in | |
| 223 | 223 | linkgit:gitattributes[5]). | |
| 224 | 224 | ||
| 225 | - | -<num>:: | |
| 226 | - | -C <num>:: | |
| 227 | - | --context <num>:: | |
| 228 | - | Show <num> leading and trailing lines, and place a line | |
| 225 | + | `-<num>`:: | |
| 226 | + | `-C <num>`:: | |
| 227 | + | `--context <num>`:: | |
| 228 | + | Show _<num>_ leading and trailing lines, and place a line | |
| 229 | 229 | containing `--` between contiguous groups of matches. | |
| 230 | 230 | ||
| 231 | - | -A <num>:: | |
| 232 | - | --after-context <num>:: | |
| 233 | - | Show <num> trailing lines, and place a line containing | |
| 231 | + | `-A <num>`:: | |
| 232 | + | `--after-context <num>`:: | |
| 233 | + | Show _<num>_ trailing lines, and place a line containing | |
| 234 | 234 | `--` between contiguous groups of matches. | |
| 235 | 235 | ||
| 236 | - | -B <num>:: | |
| 237 | - | --before-context <num>:: | |
| 238 | - | Show <num> leading lines, and place a line containing | |
| 236 | + | `-B <num>`:: | |
| 237 | + | `--before-context <num>`:: | |
| 238 | + | Show _<num>_ leading lines, and place a line containing | |
| 239 | 239 | `--` between contiguous groups of matches. | |
| 240 | 240 | ||
| 241 | - | -W:: | |
| 242 | - | --function-context:: | |
| 241 | + | `-W`:: | |
| 242 | + | `--function-context`:: | |
| 243 | 243 | Show the surrounding text from the previous line containing a | |
| 244 | 244 | function name up to the one before the next function name, | |
| 245 | 245 | effectively showing the whole function in which the match was | |
| @@ -247,22 +247,22 @@ providing this option will cause it to die. | |||
| 247 | 247 | `git diff` works out patch hunk headers (see 'Defining a | |
| 248 | 248 | custom hunk-header' in linkgit:gitattributes[5]). | |
| 249 | 249 | ||
| 250 | - | -m <num>:: | |
| 251 | - | --max-count <num>:: | |
| 250 | + | `-m <num>`:: | |
| 251 | + | `--max-count <num>`:: | |
| 252 | 252 | Limit the amount of matches per file. When using the `-v` or | |
| 253 | 253 | `--invert-match` option, the search stops after the specified | |
| 254 | 254 | number of non-matches. A value of -1 will return unlimited | |
| 255 | 255 | results (the default). A value of 0 will exit immediately with | |
| 256 | 256 | a non-zero status. | |
| 257 | 257 | ||
| 258 | - | --threads <num>:: | |
| 259 | - | Number of `grep` worker threads to use. See 'NOTES ON THREADS' | |
| 258 | + | `--threads <num>`:: | |
| 259 | + | Number of `grep` worker threads to use. See `NOTES ON THREADS` | |
| 260 | 260 | and `grep.threads` in 'CONFIGURATION' for more information. | |
| 261 | 261 | ||
| 262 | - | -f <file>:: | |
| 263 | - | Read patterns from <file>, one per line. | |
| 262 | + | `-f <file>`:: | |
| 263 | + | Read patterns from _<file>_, one per line. | |
| 264 | 264 | + | |
| 265 | - | Passing the pattern via <file> allows for providing a search pattern | |
| 265 | + | Passing the pattern via _<file>_ allows for providing a search pattern | |
| 266 | 266 | containing a \0. | |
| 267 | 267 | + | |
| 268 | 268 | Not all pattern types support patterns containing \0. Git will error | |
| @@ -279,44 +279,44 @@ In future versions we may learn to support patterns containing \0 for | |||
| 279 | 279 | more search backends, until then we'll die when the pattern type in | |
| 280 | 280 | question doesn't support them. | |
| 281 | 281 | ||
| 282 | - | -e:: | |
| 282 | + | `-e`:: | |
| 283 | 283 | The next parameter is the pattern. This option has to be | |
| 284 | 284 | used for patterns starting with `-` and should be used in | |
| 285 | 285 | scripts passing user input to grep. Multiple patterns are | |
| 286 | - | combined by 'or'. | |
| 286 | + | combined by `or`. | |
| 287 | 287 | ||
| 288 | - | --and:: | |
| 289 | - | --or:: | |
| 290 | - | --not:: | |
| 291 | - | ( ... ):: | |
| 288 | + | `--and`:: | |
| 289 | + | `--or`:: | |
| 290 | + | `--not`:: | |
| 291 | + | `( ... )`:: | |
| 292 | 292 | Specify how multiple patterns are combined using Boolean | |
| 293 | 293 | expressions. `--or` is the default operator. `--and` has | |
| 294 | 294 | higher precedence than `--or`. `-e` has to be used for all | |
| 295 | 295 | patterns. | |
| 296 | 296 | ||
| 297 | - | --all-match:: | |
| 297 | + | `--all-match`:: | |
| 298 | 298 | When giving multiple pattern expressions combined with `--or`, | |
| 299 | 299 | this flag is specified to limit the match to files that | |
| 300 | 300 | have lines to match all of them. | |
| 301 | 301 | ||
| 302 | - | -q:: | |
| 303 | - | --quiet:: | |
| 302 | + | `-q`:: | |
| 303 | + | `--quiet`:: | |
| 304 | 304 | Do not output matched lines; instead, exit with status 0 when | |
| 305 | 305 | there is a match and with non-zero status when there isn't. | |
| 306 | 306 | ||
| 307 | - | <tree>...:: | |
| 307 | + | `<tree>...`:: | |
| 308 | 308 | Instead of searching tracked files in the working tree, search | |
| 309 | 309 | blobs in the given trees. | |
| 310 | 310 | ||
| 311 | - | \--:: | |
| 311 | + | `--`:: | |
| 312 | 312 | Signals the end of options; the rest of the parameters | |
| 313 | - | are <pathspec> limiters. | |
| 313 | + | are _<pathspec>_ limiters. | |
| 314 | 314 | ||
| 315 | - | <pathspec>...:: | |
| 315 | + | `<pathspec>...`:: | |
| 316 | 316 | If given, limit the search to paths matching at least one pattern. | |
| 317 | - | Both leading paths match and glob(7) patterns are supported. | |
| 317 | + | Both leading paths match and `glob`(7) patterns are supported. | |
| 318 | 318 | + | |
| 319 | - | For more details about the <pathspec> syntax, see the 'pathspec' entry | |
| 319 | + | For more details about the _<pathspec>_ syntax, see the `pathspec` entry | |
| 320 | 320 | in linkgit:gitglossary[7]. | |
| 321 | 321 | ||
| 322 | 322 | EXAMPLES | |
added Documentation/git-history.adoc mode 100644
| @@ -0,0 +1,249 @@ | |||
| 1 | + | git-history(1) | |
| 2 | + | ============== | |
| 3 | + | ||
| 4 | + | NAME | |
| 5 | + | ---- | |
| 6 | + | git-history - EXPERIMENTAL: Rewrite history | |
| 7 | + | ||
| 8 | + | SYNOPSIS | |
| 9 | + | -------- | |
| 10 | + | [synopsis] | |
| 11 | + | git history drop <commit> [--dry-run] [--update-refs=(branches|head)] [--empty=(drop|keep|abort)] | |
| 12 | + | git history fixup <commit> [--dry-run] [--update-refs=(branches|head)] [--reedit-message] [--empty=(drop|keep|abort)] | |
| 13 | + | git history reword <commit> [--dry-run] [--update-refs=(branches|head)] | |
| 14 | + | git history split <commit> [--dry-run] [--update-refs=(branches|head)] [--] [<pathspec>...] | |
| 15 | + | ||
| 16 | + | DESCRIPTION | |
| 17 | + | ----------- | |
| 18 | + | ||
| 19 | + | Rewrite history by rearranging or modifying specific commits in the | |
| 20 | + | history. | |
| 21 | + | ||
| 22 | + | THIS COMMAND IS EXPERIMENTAL. THE BEHAVIOR MAY CHANGE. | |
| 23 | + | ||
| 24 | + | This command is related to linkgit:git-rebase[1] in that both commands can be | |
| 25 | + | used to rewrite history. There are a couple of major differences though: | |
| 26 | + | ||
| 27 | + | * Most subcommands of linkgit:git-history[1] can work in a bare repository as | |
| 28 | + | they do not need to touch either the index or the worktree. The `fixup` | |
| 29 | + | subcommand is an exception to this, as it reads staged changes from the index. | |
| 30 | + | * linkgit:git-history[1] does not execute any linkgit:githooks[5] at the | |
| 31 | + | current point in time. This may change in the future. | |
| 32 | + | * linkgit:git-history[1] by default updates all branches that are descendants | |
| 33 | + | of the original commit to point to the rewritten commit. | |
| 34 | + | ||
| 35 | + | Overall, linkgit:git-history[1] aims to provide a more opinionated way to modify | |
| 36 | + | your commit history that is simpler to use compared to linkgit:git-rebase[1] in | |
| 37 | + | general. | |
| 38 | + | ||
| 39 | + | Use linkgit:git-rebase[1] if you want to reapply a range of commits onto a | |
| 40 | + | different base, or interactive rebases if you want to edit a range of commits | |
| 41 | + | at once. | |
| 42 | + | ||
| 43 | + | LIMITATIONS | |
| 44 | + | ----------- | |
| 45 | + | ||
| 46 | + | This command does not (yet) work with histories that contain merges. You | |
| 47 | + | should use linkgit:git-rebase[1] with the `--rebase-merges` flag instead. | |
| 48 | + | ||
| 49 | + | Furthermore, the command does not support operations that can result in merge | |
| 50 | + | conflicts. This limitation is by design as history rewrites are not intended to | |
| 51 | + | be stateful operations. The limitation can be lifted once (if) Git learns about | |
| 52 | + | first-class conflicts. | |
| 53 | + | ||
| 54 | + | When using `fixup` with `--empty=drop`, dropping the root commit is not yet | |
| 55 | + | supported. Likewise, `drop` cannot remove the root commit or a merge commit. | |
| 56 | + | ||
| 57 | + | COMMANDS | |
| 58 | + | -------- | |
| 59 | + | ||
| 60 | + | The following commands are available to rewrite history in different ways: | |
| 61 | + | ||
| 62 | + | `drop <commit>`:: | |
| 63 | + | Remove the specified commit from the history. All descendants of the | |
| 64 | + | commit are replayed directly onto its parent. | |
| 65 | + | + | |
| 66 | + | The root commit cannot be dropped as that may lead to edge cases where refs | |
| 67 | + | end up with no commits anymore. Merge commits cannot be dropped either; see | |
| 68 | + | LIMITATIONS. | |
| 69 | + | + | |
| 70 | + | If `HEAD` points at a commit that is to be rewritten, the index and working | |
| 71 | + | tree are updated to match the new `HEAD`. The command aborts before any | |
| 72 | + | references are updated in case local modifications would be overwritten. | |
| 73 | + | + | |
| 74 | + | If replaying any descendant would result in a conflict, the command aborts | |
| 75 | + | with an error. | |
| 76 | + | ||
| 77 | + | `fixup <commit>`:: | |
| 78 | + | Apply the currently staged changes to the specified commit. This is | |
| 79 | + | similar in nature to `git commit --fixup=<commit>` followed by `git | |
| 80 | + | rebase --autosquash <commit>~`. Changes are applied to the target | |
| 81 | + | commit by performing a three-way merge between the HEAD commit, the | |
| 82 | + | target commit and the tree generated from staged changes. | |
| 83 | + | + | |
| 84 | + | The commit message and authorship of the target commit are preserved by | |
| 85 | + | default, unless you specify `--reedit-message`. | |
| 86 | + | + | |
| 87 | + | If applying the staged changes would result in a conflict, the command | |
| 88 | + | aborts with an error. All branches that are descendants of the original | |
| 89 | + | commit are updated to point to the rewritten history. | |
| 90 | + | ||
| 91 | + | `reword <commit>`:: | |
| 92 | + | Rewrite the commit message of the specified commit. All the other | |
| 93 | + | details of this commit remain unchanged. This command will spawn an | |
| 94 | + | editor with the current message of that commit. | |
| 95 | + | ||
| 96 | + | `split <commit> [--] [<pathspec>...]`:: | |
| 97 | + | Interactively split up <commit> into two commits by choosing | |
| 98 | + | hunks introduced by it that will be moved into the new split-out | |
| 99 | + | commit. These hunks will then be written into a new commit that | |
| 100 | + | becomes the parent of the previous commit. The original commit | |
| 101 | + | stays intact, except that its parent will be the newly split-out | |
| 102 | + | commit. | |
| 103 | + | + | |
| 104 | + | The commit messages of the split-up commits will be asked for by launching | |
| 105 | + | the configured editor. Authorship of the commit will be the same as for the | |
| 106 | + | original commit. | |
| 107 | + | + | |
| 108 | + | If passed, _<pathspec>_ can be used to limit which changes shall be split out | |
| 109 | + | of the original commit. Files not matching any of the pathspecs will remain | |
| 110 | + | part of the original commit. For more details, see the 'pathspec' entry in | |
| 111 | + | linkgit:gitglossary[7]. | |
| 112 | + | + | |
| 113 | + | It is invalid to select either all or no hunks, as that would lead to | |
| 114 | + | one of the commits becoming empty. | |
| 115 | + | ||
| 116 | + | OPTIONS | |
| 117 | + | ------- | |
| 118 | + | ||
| 119 | + | `--dry-run`:: | |
| 120 | + | Do not update any references, but instead print any ref updates in a | |
| 121 | + | format that can be consumed by linkgit:git-update-ref[1]. Necessary new | |
| 122 | + | objects will be written into the repository, so applying these printed | |
| 123 | + | ref updates is generally safe. | |
| 124 | + | ||
| 125 | + | `--reedit-message`:: | |
| 126 | + | Open an editor to modify the target commit's message. | |
| 127 | + | ||
| 128 | + | `--empty=(drop|keep|abort)`:: | |
| 129 | + | Control what happens when a commit becomes empty as a result of the | |
| 130 | + | fixup. This can happen in two situations: | |
| 131 | + | + | |
| 132 | + | -- | |
| 133 | + | * The fixup target itself becomes empty because the staged changes exactly | |
| 134 | + | cancel out all changes introduced by that commit. | |
| 135 | + | ||
| 136 | + | * A descendant commit becomes empty during replay because it introduced the | |
| 137 | + | same change that was just fixed up into an ancestor. | |
| 138 | + | -- | |
| 139 | + | + | |
| 140 | + | With `drop` (the default), empty commits are removed from the rewritten | |
| 141 | + | history. Descendants of a dropped target commit are replayed directly onto | |
| 142 | + | the target's parent. Note that dropping the root commit is not supported; | |
| 143 | + | see LIMITATIONS. | |
| 144 | + | + | |
| 145 | + | With `keep`, empty commits are retained in the rewritten history as-is. | |
| 146 | + | + | |
| 147 | + | With `abort`, the command stops with an error if any commit would become | |
| 148 | + | empty. | |
| 149 | + | ||
| 150 | + | `--update-refs=(branches|head)`:: | |
| 151 | + | Control which references will be updated by the command, if any. With | |
| 152 | + | `branches`, all local branches that point to commits which are | |
| 153 | + | descendants of the original commit will be rewritten. With `head`, only | |
| 154 | + | the current `HEAD` reference will be rewritten. Defaults to `branches`. | |
| 155 | + | ||
| 156 | + | EXAMPLES | |
| 157 | + | -------- | |
| 158 | + | ||
| 159 | + | Fixup a commit | |
| 160 | + | ~~~~~~~~~~~~~~ | |
| 161 | + | ||
| 162 | + | ---------- | |
| 163 | + | $ git log --oneline --stat | |
| 164 | + | abc1234 (HEAD -> main) third | |
| 165 | + | third.txt | 1 + | |
| 166 | + | def5678 second | |
| 167 | + | second.txt | 1 + | |
| 168 | + | ghi9012 first | |
| 169 | + | first.txt | 1 + | |
| 170 | + | ||
| 171 | + | $ echo "change" >>unrelated.txt | |
| 172 | + | $ git add unrelated.txt | |
| 173 | + | $ git history fixup ghi9012 | |
| 174 | + | ||
| 175 | + | $ git log --oneline --stat | |
| 176 | + | jkl3456 (HEAD -> main) third | |
| 177 | + | third.txt | 1 + | |
| 178 | + | mno7890 second | |
| 179 | + | second.txt | 1 + | |
| 180 | + | pqr1234 first | |
| 181 | + | first.txt | 1 + | |
| 182 | + | unrelated.txt | 1 + | |
| 183 | + | ---------- | |
| 184 | + | ||
| 185 | + | The staged addition of `unrelated.txt` has been incorporated into the `first` | |
| 186 | + | commit. All descendant commits have been replayed on top of the rewritten | |
| 187 | + | history. | |
| 188 | + | ||
| 189 | + | Drop a commit | |
| 190 | + | ~~~~~~~~~~~~~ | |
| 191 | + | ||
| 192 | + | ---------- | |
| 193 | + | $ git log --oneline | |
| 194 | + | abc1234 (HEAD -> main) third | |
| 195 | + | def5678 second | |
| 196 | + | ghi9012 first | |
| 197 | + | ||
| 198 | + | $ git history drop 'main^{/second}' | |
| 199 | + | ||
| 200 | + | $ git log --oneline | |
| 201 | + | jkl3456 (HEAD -> main) third | |
| 202 | + | ghi9012 first | |
| 203 | + | ---------- | |
| 204 | + | ||
| 205 | + | The `second` commit has been removed from the history, and `third` has been | |
| 206 | + | replayed directly on top of `first`. All branches that pointed at the dropped | |
| 207 | + | commit have been moved to its parent. | |
| 208 | + | ||
| 209 | + | Split a commit | |
| 210 | + | ~~~~~~~~~~~~~~ | |
| 211 | + | ||
| 212 | + | ---------- | |
| 213 | + | $ git log --stat --oneline | |
| 214 | + | 3f81232 (HEAD -> main) original | |
| 215 | + | bar | 1 + | |
| 216 | + | foo | 1 + | |
| 217 | + | 2 files changed, 2 insertions(+) | |
| 218 | + | ||
| 219 | + | $ git history split HEAD | |
| 220 | + | diff --git a/bar b/bar | |
| 221 | + | new file mode 100644 | |
| 222 | + | index 0000000..5716ca5 | |
| 223 | + | --- /dev/null | |
| 224 | + | +++ b/bar | |
| 225 | + | @@ -0,0 +1 @@ | |
| 226 | + | +bar | |
| 227 | + | (1/1) Stage addition [y,n,q,a,d,p,?]? y | |
| 228 | + | ||
| 229 | + | diff --git a/foo b/foo | |
| 230 | + | new file mode 100644 | |
| 231 | + | index 0000000..257cc56 | |
| 232 | + | --- /dev/null | |
| 233 | + | +++ b/foo | |
| 234 | + | @@ -0,0 +1 @@ | |
| 235 | + | +foo | |
| 236 | + | (1/1) Stage addition [y,n,q,a,d,p,?]? n | |
| 237 | + | ||
| 238 | + | $ git log --stat --oneline | |
| 239 | + | 7cebe64 (HEAD -> main) original | |
| 240 | + | foo | 1 + | |
| 241 | + | 1 file changed, 1 insertion(+) | |
| 242 | + | d1582f3 split-out commit | |
| 243 | + | bar | 1 + | |
| 244 | + | 1 file changed, 1 insertion(+) | |
| 245 | + | ---------- | |
| 246 | + | ||
| 247 | + | GIT | |
| 248 | + | --- | |
| 249 | + | Part of the linkgit:git[1] suite | |
modified Documentation/git-hook.adoc
| @@ -3,34 +3,132 @@ git-hook(1) | |||
| 3 | 3 | ||
| 4 | 4 | NAME | |
| 5 | 5 | ---- | |
| 6 | - | git-hook - Run git hooks | |
| 6 | + | git-hook - Run Git hooks | |
| 7 | 7 | ||
| 8 | 8 | SYNOPSIS | |
| 9 | 9 | -------- | |
| 10 | 10 | [verse] | |
| 11 | - | 'git hook' run [--ignore-missing] [--to-stdin=<path>] <hook-name> [-- <hook-args>] | |
| 11 | + | 'git hook' run [--allow-unknown-hook-name] [--ignore-missing] [--to-stdin=<path>] [(-j|--jobs) <n>] | |
| 12 | + | <hook-name> [-- <hook-args>] | |
| 13 | + | 'git hook' list [--allow-unknown-hook-name] [-z] [--show-scope] <hook-name> | |
| 12 | 14 | ||
| 13 | 15 | DESCRIPTION | |
| 14 | 16 | ----------- | |
| 15 | 17 | ||
| 16 | - | A command interface for running git hooks (see linkgit:githooks[5]), | |
| 17 | - | for use by other scripted git commands. | |
| 18 | + | A command interface for running Git hooks (see linkgit:githooks[5]), | |
| 19 | + | for use by other scripted Git commands. | |
| 20 | + | ||
| 21 | + | This command parses the default configuration files for sets of configs like | |
| 22 | + | so: | |
| 23 | + | ||
| 24 | + | [hook "linter"] | |
| 25 | + | event = pre-commit | |
| 26 | + | command = ~/bin/linter --cpp20 | |
| 27 | + | ||
| 28 | + | In this example, `[hook "linter"]` represents one script - `~/bin/linter | |
| 29 | + | --cpp20` - which can be shared by many repos, and even by many hook events, if | |
| 30 | + | appropriate. | |
| 31 | + | ||
| 32 | + | To add an unrelated hook which runs on a different event, for example a | |
| 33 | + | spell-checker for your commit messages, you would write a configuration like so: | |
| 34 | + | ||
| 35 | + | [hook "linter"] | |
| 36 | + | event = pre-commit | |
| 37 | + | command = ~/bin/linter --cpp20 | |
| 38 | + | [hook "spellcheck"] | |
| 39 | + | event = commit-msg | |
| 40 | + | command = ~/bin/spellchecker | |
| 41 | + | ||
| 42 | + | With this config, when you run 'git commit', first `~/bin/linter --cpp20` will | |
| 43 | + | have a chance to check your files to be committed (during the `pre-commit` hook | |
| 44 | + | event), and then `~/bin/spellchecker` will have a chance to check your commit | |
| 45 | + | message (during the `commit-msg` hook event). | |
| 46 | + | ||
| 47 | + | Commands are run in the order Git encounters their associated | |
| 48 | + | `hook.<friendly-name>.event` configs during the configuration parse (see | |
| 49 | + | linkgit:git-config[1]). Although multiple `hook.linter.event` configs can be | |
| 50 | + | added, only one `hook.linter.command` event is valid - Git uses "last-one-wins" | |
| 51 | + | to determine which command to run. | |
| 52 | + | ||
| 53 | + | So if you wanted your linter to run when you commit as well as when you push, | |
| 54 | + | you would configure it like so: | |
| 55 | + | ||
| 56 | + | [hook "linter"] | |
| 57 | + | event = pre-commit | |
| 58 | + | event = pre-push | |
| 59 | + | command = ~/bin/linter --cpp20 | |
| 60 | + | ||
| 61 | + | With this config, `~/bin/linter --cpp20` would be run by Git before a commit is | |
| 62 | + | generated (during `pre-commit`) as well as before a push is performed (during | |
| 63 | + | `pre-push`). | |
| 64 | + | ||
| 65 | + | And if you wanted to run your linter as well as a secret-leak detector during | |
| 66 | + | only the "pre-commit" hook event, you would configure it instead like so: | |
| 67 | + | ||
| 68 | + | [hook "linter"] | |
| 69 | + | event = pre-commit | |
| 70 | + | command = ~/bin/linter --cpp20 | |
| 71 | + | [hook "no-leaks"] | |
| 72 | + | event = pre-commit | |
| 73 | + | command = ~/bin/leak-detector | |
| 74 | + | ||
| 75 | + | With this config, before a commit is generated (during `pre-commit`), Git would | |
| 76 | + | first start `~/bin/linter --cpp20` and second start `~/bin/leak-detector`. It | |
| 77 | + | would evaluate the output of each when deciding whether to proceed with the | |
| 78 | + | commit. | |
| 79 | + | ||
| 80 | + | For a full list of hook events which you can set your `hook.<friendly-name>.event` to, | |
| 81 | + | and how hooks are invoked during those events, see linkgit:githooks[5]. | |
| 82 | + | ||
| 83 | + | Git will ignore any `hook.<friendly-name>.event` that specifies an event it doesn't | |
| 84 | + | recognize. This is intended so that tools which wrap Git can use the hook | |
| 85 | + | infrastructure to run their own hooks; see "WRAPPERS" for more guidance. | |
| 86 | + | ||
| 87 | + | In general, when instructions suggest adding a script to | |
| 88 | + | `.git/hooks/<hook-event>`, you can specify it in the config instead by running: | |
| 89 | + | ||
| 90 | + | ---- | |
| 91 | + | git config set hook.<some-name>.command <path-to-script> | |
| 92 | + | git config set --append hook.<some-name>.event <hook-event> | |
| 93 | + | ---- | |
| 94 | + | ||
| 95 | + | This way you can share the script between multiple repos. That is, `cp | |
| 96 | + | ~/my-script.sh ~/project/.git/hooks/pre-commit` would become: | |
| 97 | + | ||
| 98 | + | ---- | |
| 99 | + | git config set hook.my-script.command ~/my-script.sh | |
| 100 | + | git config set --append hook.my-script.event pre-commit | |
| 101 | + | ---- | |
| 18 | 102 | ||
| 19 | 103 | SUBCOMMANDS | |
| 20 | 104 | ----------- | |
| 21 | 105 | ||
| 22 | 106 | run:: | |
| 23 | - | Run the `<hook-name>` hook. See linkgit:githooks[5] for | |
| 24 | - | supported hook names. | |
| 107 | + | Runs hooks configured for `<hook-name>`, in the order they are | |
| 108 | + | discovered during the config parse. The default `<hook-name>` from | |
| 109 | + | the hookdir is run last. See linkgit:githooks[5] for supported | |
| 110 | + | hook names. | |
| 25 | 111 | + | |
| 26 | 112 | ||
| 27 | 113 | Any positional arguments to the hook should be passed after a | |
| 28 | 114 | mandatory `--` (or `--end-of-options`, see linkgit:gitcli[7]). See | |
| 29 | 115 | linkgit:githooks[5] for arguments hooks might expect (if any). | |
| 30 | 116 | ||
| 117 | + | list [-z] [--show-scope]:: | |
| 118 | + | Print a list of hooks which will be run on `<hook-name>` event. If no | |
| 119 | + | hooks are configured for that event, print a warning and return 1. | |
| 120 | + | Use `-z` to terminate output lines with NUL instead of newlines. | |
| 121 | + | ||
| 31 | 122 | OPTIONS | |
| 32 | 123 | ------- | |
| 33 | 124 | ||
| 125 | + | --allow-unknown-hook-name:: | |
| 126 | + | By default `git hook run` and `git hook list` will bail out when | |
| 127 | + | `<hook-name>` is not a hook event known to Git (see linkgit:githooks[5] | |
| 128 | + | for the list of known hooks). This is meant to help catch typos | |
| 129 | + | such as `prereceive` when `pre-receive` was intended. Pass this | |
| 130 | + | flag to allow unknown hook names. | |
| 131 | + | ||
| 34 | 132 | --to-stdin:: | |
| 35 | 133 | For "run"; specify a file which will be streamed into the | |
| 36 | 134 | hook's stdin. The hook will receive the entire file from | |
| @@ -41,6 +139,74 @@ OPTIONS | |||
| 41 | 139 | tools that want to do a blind one-shot run of a hook that may | |
| 42 | 140 | or may not be present. | |
| 43 | 141 | ||
| 142 | + | -z:: | |
| 143 | + | Terminate "list" output lines with NUL instead of newlines. | |
| 144 | + | ||
| 145 | + | --show-scope:: | |
| 146 | + | For "list"; prefix each configured hook's friendly name with a | |
| 147 | + | tab-separated config scope (e.g. `local`, `global`, `system`), | |
| 148 | + | mirroring the output style of `git config --show-scope`. Traditional | |
| 149 | + | hooks from the hookdir are unaffected. | |
| 150 | + | ||
| 151 | + | -j:: | |
| 152 | + | --jobs:: | |
| 153 | + | Only valid for `run`. | |
| 154 | + | + | |
| 155 | + | Specify how many hooks to run simultaneously. If this flag is not specified, | |
| 156 | + | the value of the `hook.jobs` config is used, see linkgit:git-config[1]. If | |
| 157 | + | neither is specified, defaults to 1 (serial execution). | |
| 158 | + | + | |
| 159 | + | When greater than 1, it overrides the per-hook `hook.<friendly-name>.parallel` | |
| 160 | + | setting, allowing all hooks for the event to run concurrently, even if they | |
| 161 | + | are not individually marked as parallel. | |
| 162 | + | + | |
| 163 | + | Some hooks always run sequentially regardless of this flag or the | |
| 164 | + | `hook.jobs` config, because Git knows they cannot safely run in parallel: | |
| 165 | + | `applypatch-msg`, `pre-commit`, `prepare-commit-msg`, `commit-msg`, | |
| 166 | + | `post-commit`, `post-checkout`, and `push-to-checkout`. | |
| 167 | + | ||
| 168 | + | WRAPPERS | |
| 169 | + | -------- | |
| 170 | + | ||
| 171 | + | `git hook run` has been designed to make it easy for tools which wrap Git to | |
| 172 | + | configure and execute hooks using the Git hook infrastructure. It is possible to | |
| 173 | + | provide arguments and stdin via the command line, as well as specifying parallel | |
| 174 | + | or series execution if the user has provided multiple hooks. | |
| 175 | + | ||
| 176 | + | Assuming your wrapper wants to support a hook named "mywrapper-start-tests", you | |
| 177 | + | can have your users specify their hooks like so: | |
| 178 | + | ||
| 179 | + | [hook "setup-test-dashboard"] | |
| 180 | + | event = mywrapper-start-tests | |
| 181 | + | command = ~/mywrapper/setup-dashboard.py --tap | |
| 182 | + | ||
| 183 | + | Then, in your 'mywrapper' tool, you can invoke any users' configured hooks by | |
| 184 | + | running: | |
| 185 | + | ||
| 186 | + | ---- | |
| 187 | + | git hook run --allow-unknown-hook-name mywrapper-start-tests \ | |
| 188 | + | # providing something to stdin | |
| 189 | + | --stdin some-tempfile-123 \ | |
| 190 | + | # execute multiple hooks in parallel | |
| 191 | + | --jobs 3 \ | |
| 192 | + | # plus some arguments of your own... | |
| 193 | + | -- \ | |
| 194 | + | --testname bar \ | |
| 195 | + | baz | |
| 196 | + | ---- | |
| 197 | + | ||
| 198 | + | Take care to name your wrapper's hook events in a way which is unlikely to | |
| 199 | + | overlap with Git's native hooks (see linkgit:githooks[5]) - a hook event named | |
| 200 | + | `mywrappertool-validate-commit` is much less likely to be added to native Git | |
| 201 | + | than a hook event named `validate-commit`. If Git begins to use a hook event | |
| 202 | + | named the same thing as your wrapper hook, it may invoke your users' hooks in | |
| 203 | + | unintended and unsupported ways. | |
| 204 | + | ||
| 205 | + | CONFIGURATION | |
| 206 | + | ------------- | |
| 207 | + | :git-hook: 1 | |
| 208 | + | include::config/hook.adoc[] | |
| 209 | + | ||
| 44 | 210 | SEE ALSO | |
| 45 | 211 | -------- | |
| 46 | 212 | linkgit:githooks[5] | |
modified Documentation/git-http-fetch.adoc
| @@ -25,8 +25,11 @@ commit-id:: | |||
| 25 | 25 | Either the hash or the filename under [URL]/refs/ to | |
| 26 | 26 | pull. | |
| 27 | 27 | ||
| 28 | - | -a, -c, -t:: | |
| 28 | + | -a:: | |
| 29 | + | -c:: | |
| 30 | + | -t:: | |
| 29 | 31 | These options are ignored for historical reasons. | |
| 32 | + | ||
| 30 | 33 | -v:: | |
| 31 | 34 | Report what is downloaded. | |
| 32 | 35 | ||
| @@ -45,13 +48,15 @@ commit-id:: | |||
| 45 | 48 | line (which is not expected in | |
| 46 | 49 | this case), 'git http-fetch' fetches the packfile directly at the given | |
| 47 | 50 | URL and uses index-pack to generate corresponding .idx and .keep files. | |
| 48 | - | The hash is used to determine the name of the temporary file and is | |
| 49 | - | arbitrary. The output of index-pack is printed to stdout. Requires | |
| 50 | - | --index-pack-args. | |
| 51 | + | The hash is used to determine the name of the temporary file. It need | |
| 52 | + | not be the pack hash, but it must uniquely identify the pack contents | |
| 53 | + | for resumption. The output of index-pack is printed to stdout. Requires | |
| 54 | + | one or more --index-pack-arg options. | |
| 51 | 55 | ||
| 52 | - | --index-pack-args=<args>:: | |
| 53 | - | For internal use only. The command to run on the contents of the | |
| 54 | - | downloaded pack. Arguments are URL-encoded separated by spaces. | |
| 56 | + | --index-pack-arg=<arg>:: | |
| 57 | + | For internal use only. The first instance specifies the command run on | |
| 58 | + | the contents of the downloaded pack. Subsequent instances specify its | |
| 59 | + | arguments. | |
| 55 | 60 | ||
| 56 | 61 | --recover:: | |
| 57 | 62 | Verify that everything reachable from target is fetched. Used after | |
modified Documentation/git-imap-send.adoc
| @@ -8,45 +8,55 @@ git-imap-send - Send a collection of patches from stdin to an IMAP folder | |||
| 8 | 8 | ||
| 9 | 9 | SYNOPSIS | |
| 10 | 10 | -------- | |
| 11 | - | [verse] | |
| 12 | - | 'git imap-send' [-v] [-q] [--[no-]curl] | |
| 11 | + | [synopsis] | |
| 12 | + | git imap-send [-v] [-q] [--[no-]curl] [(--folder|-f) <folder>] | |
| 13 | + | git imap-send --list | |
| 13 | 14 | ||
| 14 | 15 | ||
| 15 | 16 | DESCRIPTION | |
| 16 | 17 | ----------- | |
| 17 | - | This command uploads a mailbox generated with 'git format-patch' | |
| 18 | + | This command uploads a mailbox generated with `git format-patch` | |
| 18 | 19 | into an IMAP drafts folder. This allows patches to be sent as | |
| 19 | 20 | other email is when using mail clients that cannot read mailbox | |
| 20 | 21 | files directly. The command also works with any general mailbox | |
| 21 | - | in which emails have the fields "From", "Date", and "Subject" in | |
| 22 | + | in which emails have the fields `From`, `Date`, and `Subject` in | |
| 22 | 23 | that order. | |
| 23 | 24 | ||
| 24 | 25 | Typical usage is something like: | |
| 25 | 26 | ||
| 26 | - | git format-patch --signoff --stdout --attach origin | git imap-send | |
| 27 | + | ---- | |
| 28 | + | $ git format-patch --signoff --stdout --attach origin | git imap-send | |
| 29 | + | ---- | |
| 27 | 30 | ||
| 28 | 31 | ||
| 29 | 32 | OPTIONS | |
| 30 | 33 | ------- | |
| 31 | 34 | ||
| 32 | - | -v:: | |
| 33 | - | --verbose:: | |
| 35 | + | `-v`:: | |
| 36 | + | `--verbose`:: | |
| 34 | 37 | Be verbose. | |
| 35 | 38 | ||
| 36 | - | -q:: | |
| 37 | - | --quiet:: | |
| 39 | + | `-q`:: | |
| 40 | + | `--quiet`:: | |
| 38 | 41 | Be quiet. | |
| 39 | 42 | ||
| 40 | - | --curl:: | |
| 43 | + | `-f <folder>`:: | |
| 44 | + | `--folder=<folder>`:: | |
| 45 | + | Specify the folder in which the emails have to saved. | |
| 46 | + | For example: `--folder=[Gmail]/Drafts` or `-f INBOX/Drafts`. | |
| 47 | + | ||
| 48 | + | `--curl`:: | |
| 41 | 49 | Use libcurl to communicate with the IMAP server, unless tunneling | |
| 42 | 50 | into it. Ignored if Git was built without the USE_CURL_FOR_IMAP_SEND | |
| 43 | 51 | option set. | |
| 44 | 52 | ||
| 45 | - | --no-curl:: | |
| 53 | + | `--no-curl`:: | |
| 46 | 54 | Talk to the IMAP server using git's own IMAP routines instead of | |
| 47 | 55 | using libcurl. Ignored if Git was built with the NO_OPENSSL option | |
| 48 | 56 | set. | |
| 49 | 57 | ||
| 58 | + | `--list`:: | |
| 59 | + | Run the IMAP LIST command to output a list of all the folders present. | |
| 50 | 60 | ||
| 51 | 61 | CONFIGURATION | |
| 52 | 62 | ------------- | |
| @@ -58,6 +68,34 @@ include::includes/cmd-config-section-rest.adoc[] | |||
| 58 | 68 | ||
| 59 | 69 | include::config/imap.adoc[] | |
| 60 | 70 | ||
| 71 | + | GETTING A LIST OF AVAILABLE FOLDERS | |
| 72 | + | ----------------------------------- | |
| 73 | + | ||
| 74 | + | In order to send an email to a specific folder, you need to know the correct name of | |
| 75 | + | intended folder in your mailbox. The names like "Junk", "Trash" etc. displayed by | |
| 76 | + | various email clients need not be the actual names of the folders stored in the mail | |
| 77 | + | server of your email provider. | |
| 78 | + | ||
| 79 | + | In order to get the correct folder name to be used with `git imap-send`, you can run | |
| 80 | + | `git imap-send --list`. This will display a list of valid folder names. An example | |
| 81 | + | of such an output when run on a Gmail account is: | |
| 82 | + | ||
| 83 | + | ......................... | |
| 84 | + | * LIST (\HasNoChildren) "/" "INBOX" | |
| 85 | + | * LIST (\HasChildren \Noselect) "/" "[Gmail]" | |
| 86 | + | * LIST (\All \HasNoChildren) "/" "[Gmail]/All Mail" | |
| 87 | + | * LIST (\Drafts \HasNoChildren) "/" "[Gmail]/Drafts" | |
| 88 | + | * LIST (\HasNoChildren \Important) "/" "[Gmail]/Important" | |
| 89 | + | * LIST (\HasNoChildren \Sent) "/" "[Gmail]/Sent Mail" | |
| 90 | + | * LIST (\HasNoChildren \Junk) "/" "[Gmail]/Spam" | |
| 91 | + | * LIST (\Flagged \HasNoChildren) "/" "[Gmail]/Starred" | |
| 92 | + | * LIST (\HasNoChildren \Trash) "/" "[Gmail]/Trash" | |
| 93 | + | ......................... | |
| 94 | + | ||
| 95 | + | Here, you can observe that the correct name for the "Junk" folder is `[Gmail]/Spam` | |
| 96 | + | and for the "Trash" folder is `[Gmail]/Trash`. Similar logic can be used to determine | |
| 97 | + | other folders as well. | |
| 98 | + | ||
| 61 | 99 | EXAMPLES | |
| 62 | 100 | -------- | |
| 63 | 101 | Using tunnel mode: | |
| @@ -100,30 +138,72 @@ have set up) may not be verified correctly. | |||
| 100 | 138 | ||
| 101 | 139 | Using Gmail's IMAP interface: | |
| 102 | 140 | ||
| 103 | - | --------- | |
| 141 | + | ---- | |
| 104 | 142 | [imap] | |
| 105 | - | folder = "[Gmail]/Drafts" | |
| 106 | - | host = imaps://imap.gmail.com | |
| 107 | - | user = user@gmail.com | |
| 108 | - | port = 993 | |
| 109 | - | --------- | |
| 143 | + | folder = "[Gmail]/Drafts" | |
| 144 | + | host = imaps://imap.gmail.com | |
| 145 | + | user = user@gmail.com | |
| 146 | + | port = 993 | |
| 147 | + | ---- | |
| 148 | + | ||
| 149 | + | Gmail does not allow using your regular password for `git imap-send`. | |
| 150 | + | If you have multi-factor authentication set up on your Gmail account, you | |
| 151 | + | can generate an app-specific password for use with `git imap-send`. | |
| 152 | + | Visit https://security.google.com/settings/security/apppasswords to create | |
| 153 | + | it. Alternatively, use OAuth2.0 authentication as described below. | |
| 110 | 154 | ||
| 111 | 155 | [NOTE] | |
| 112 | 156 | You might need to instead use: `folder = "[Google Mail]/Drafts"` if you get an error | |
| 113 | - | that the "Folder doesn't exist". | |
| 157 | + | that the "Folder doesn't exist". You can also run `git imap-send --list` to get a | |
| 158 | + | list of available folders. | |
| 114 | 159 | ||
| 115 | 160 | [NOTE] | |
| 116 | 161 | If your Gmail account is set to another language than English, the name of the "Drafts" | |
| 117 | 162 | folder will be localized. | |
| 118 | 163 | ||
| 164 | + | If you want to use OAuth2.0 based authentication, you can specify | |
| 165 | + | `OAUTHBEARER` or `XOAUTH2` mechanism in your config. It is more secure | |
| 166 | + | than using app-specific passwords, and also does not enforce the need of | |
| 167 | + | having multi-factor authentication. You will have to use an OAuth2.0 | |
| 168 | + | access token in place of your password when using this authentication. | |
| 169 | + | ||
| 170 | + | ---- | |
| 171 | + | [imap] | |
| 172 | + | folder = "[Gmail]/Drafts" | |
| 173 | + | host = imaps://imap.gmail.com | |
| 174 | + | user = user@gmail.com | |
| 175 | + | port = 993 | |
| 176 | + | authmethod = OAUTHBEARER | |
| 177 | + | ---- | |
| 178 | + | ||
| 179 | + | Using Outlook's IMAP interface: | |
| 180 | + | ||
| 181 | + | Unlike Gmail, Outlook only supports OAuth2.0 based authentication. Also, it | |
| 182 | + | supports only `XOAUTH2` as the mechanism. | |
| 183 | + | ||
| 184 | + | ---- | |
| 185 | + | [imap] | |
| 186 | + | folder = "Drafts" | |
| 187 | + | host = imaps://outlook.office365.com | |
| 188 | + | user = user@outlook.com | |
| 189 | + | port = 993 | |
| 190 | + | authmethod = XOAUTH2 | |
| 191 | + | ---- | |
| 192 | + | ||
| 119 | 193 | Once the commits are ready to be sent, run the following command: | |
| 120 | 194 | ||
| 121 | - | $ git format-patch --cover-letter -M --stdout origin/master | git imap-send | |
| 195 | + | ---- | |
| 196 | + | $ git format-patch --cover-letter -M --stdout origin/master | git imap-send | |
| 197 | + | ---- | |
| 122 | 198 | ||
| 123 | 199 | Just make sure to disable line wrapping in the email client (Gmail's web | |
| 124 | 200 | interface will wrap lines no matter what, so you need to use a real | |
| 125 | 201 | IMAP client). | |
| 126 | 202 | ||
| 203 | + | In case you are using OAuth2.0 authentication, it is easier to use credential | |
| 204 | + | helpers to generate tokens. Credential helpers suggested in | |
| 205 | + | linkgit:git-send-email[1] can be used for `git imap-send` as well. | |
| 206 | + | ||
| 127 | 207 | CAUTION | |
| 128 | 208 | ------- | |
| 129 | 209 | It is still your responsibility to make sure that the email message | |
| @@ -139,7 +219,7 @@ users may wish to visit this web page for more information: | |||
| 139 | 219 | ||
| 140 | 220 | SEE ALSO | |
| 141 | 221 | -------- | |
| 142 | - | linkgit:git-format-patch[1], linkgit:git-send-email[1], mbox(5) | |
| 222 | + | linkgit:git-format-patch[1], linkgit:git-send-email[1], `mbox`(5) | |
| 143 | 223 | ||
| 144 | 224 | GIT | |
| 145 | 225 | --- | |
modified Documentation/git-index-pack.adoc
| @@ -36,7 +36,8 @@ OPTIONS | |||
| 36 | 36 | fails if the name of packed archive does not end | |
| 37 | 37 | with .pack). | |
| 38 | 38 | ||
| 39 | - | --[no-]rev-index:: | |
| 39 | + | --rev-index:: | |
| 40 | + | --no-rev-index:: | |
| 40 | 41 | When this flag is provided, generate a reverse index | |
| 41 | 42 | (a `.rev` file) corresponding to the given pack. If | |
| 42 | 43 | `--verify` is given, ensure that the existing | |
modified Documentation/git-init.adoc
| @@ -77,9 +77,15 @@ If this is a reinitialization, the repository will be moved to the specified pat | |||
| 77 | 77 | `-b <branch-name>`:: | |
| 78 | 78 | `--initial-branch=<branch-name>`:: | |
| 79 | 79 | Use _<branch-name>_ for the initial branch in the newly created | |
| 80 | - | repository. If not specified, fall back to the default name (currently | |
| 81 | - | `master`, but this is subject to change in the future; the name can be | |
| 82 | - | customized via the `init.defaultBranch` configuration variable). | |
| 80 | + | repository. If not specified, fall back to the default name | |
| 81 | + | ifndef::with-breaking-changes[] | |
| 82 | + | (currently `master`, but this will change to `main` when Git 3.0 is released). | |
| 83 | + | endif::with-breaking-changes[] | |
| 84 | + | ifdef::with-breaking-changes[] | |
| 85 | + | `main`. | |
| 86 | + | endif::with-breaking-changes[] | |
| 87 | + | The default name can be customized via the `init.defaultBranch` configuration | |
| 88 | + | variable. | |
| 83 | 89 | ||
| 84 | 90 | `--shared[=(false|true|umask|group|all|world|everybody|<perm>)]`:: | |
| 85 | 91 | ||
modified Documentation/git-interpret-trailers.adoc
| @@ -3,20 +3,26 @@ git-interpret-trailers(1) | |||
| 3 | 3 | ||
| 4 | 4 | NAME | |
| 5 | 5 | ---- | |
| 6 | - | git-interpret-trailers - Add or parse structured information in commit messages | |
| 6 | + | git-interpret-trailers - Add or parse metadata in commit messages | |
| 7 | 7 | ||
| 8 | 8 | SYNOPSIS | |
| 9 | 9 | -------- | |
| 10 | - | [verse] | |
| 11 | - | 'git interpret-trailers' [--in-place] [--trim-empty] | |
| 10 | + | [synopsis] | |
| 11 | + | git interpret-trailers [--in-place] [--trim-empty] | |
| 12 | 12 | [(--trailer (<key>|<key-alias>)[(=|:)<value>])...] | |
| 13 | 13 | [--parse] [<file>...] | |
| 14 | 14 | ||
| 15 | 15 | DESCRIPTION | |
| 16 | 16 | ----------- | |
| 17 | - | Add or parse 'trailer' lines that look similar to RFC 822 e-mail | |
| 18 | - | headers, at the end of the otherwise free-form part of a commit | |
| 19 | - | message. For example, in the following commit message | |
| 17 | + | Add or parse trailer metadata at the end of the otherwise | |
| 18 | + | free-form part of a commit message, or any other kind of text. | |
| 19 | + | ||
| 20 | + | A _trailer_ in its simplest form is a key-value pair with a colon as a | |
| 21 | + | separator. The _key_ consists of ASCII alphanumeric characters and | |
| 22 | + | hyphens (`-`). A _trailer block_ consists of one or more trailers. The | |
| 23 | + | trailer block needs to be preceded by a blank line, where a _blank line_ | |
| 24 | + | is either an empty or a whitespace-only line. For example, in the | |
| 25 | + | following commit message | |
| 20 | 26 | ||
| 21 | 27 | ------------------------------------------------ | |
| 22 | 28 | subject | |
| @@ -27,23 +33,24 @@ Signed-off-by: Alice <alice@example.com> | |||
| 27 | 33 | Signed-off-by: Bob <bob@example.com> | |
| 28 | 34 | ------------------------------------------------ | |
| 29 | 35 | ||
| 30 | - | the last two lines starting with "Signed-off-by" are trailers. | |
| 36 | + | the last two lines starting with `Signed-off-by` are trailers. | |
| 31 | 37 | ||
| 32 | 38 | This command reads commit messages from either the | |
| 33 | - | <file> arguments or the standard input if no <file> is specified. | |
| 39 | + | _<file>_ arguments or the standard input if no _<file>_ is specified. | |
| 34 | 40 | If `--parse` is specified, the output consists of the parsed trailers | |
| 35 | 41 | coming from the input, without influencing them with any command line | |
| 36 | 42 | options or configuration variables. | |
| 37 | 43 | ||
| 38 | - | Otherwise, this command applies `trailer.*` configuration variables | |
| 39 | - | (which could potentially add new trailers, as well as reposition them), | |
| 40 | - | as well as any command line arguments that can override configuration | |
| 41 | - | variables (such as `--trailer=...` which could also add new trailers), | |
| 42 | - | to each input file. The result is emitted on the standard output. | |
| 44 | + | Otherwise, this command applies `trailer.<key-alias>` configuration | |
| 45 | + | variables (which could potentially add new trailers, as well as | |
| 46 | + | reposition them), as well as any command line arguments that can | |
| 47 | + | override configuration variables (such as `--trailer=...` which could | |
| 48 | + | also add new trailers), to each input file. The result is emitted on the | |
| 49 | + | standard output. | |
| 43 | 50 | ||
| 44 | 51 | This command can also operate on the output of linkgit:git-format-patch[1], | |
| 45 | 52 | which is more elaborate than a plain commit message. Namely, such output | |
| 46 | - | includes a commit message (as above), a "---" divider line, and a patch part. | |
| 53 | + | includes a commit message (as above), a `---` divider line, and a patch part. | |
| 47 | 54 | For these inputs, the divider and patch parts are not modified by | |
| 48 | 55 | this command and are emitted as is on the output, unless | |
| 49 | 56 | `--no-divider` is specified. | |
| @@ -53,24 +60,42 @@ are applied to each input and the way any existing trailer in | |||
| 53 | 60 | the input is changed. They also make it possible to | |
| 54 | 61 | automatically add some trailers. | |
| 55 | 62 | ||
| 56 | - | By default, a '<key>=<value>' or '<key>:<value>' argument given | |
| 57 | - | using `--trailer` will be appended after the existing trailers only if | |
| 58 | - | the last trailer has a different (<key>, <value>) pair (or if there | |
| 59 | - | is no existing trailer). The <key> and <value> parts will be trimmed | |
| 63 | + | Let's consider new trailers added with `--trailer`. | |
| 64 | + | By default, the new trailer will appear at the end of the trailer block. | |
| 65 | + | Also by default, this new trailer will only be added | |
| 66 | + | if the last trailer is different to it. | |
| 67 | + | A trailer block will be created with only that trailer if a trailer | |
| 68 | + | block does not already exist. Recall that a trailer block needs to be | |
| 69 | + | preceded by a blank line, so a blank line will be inserted before the | |
| 70 | + | new trailer block in that case. | |
| 71 | + | ||
| 72 | + | This is how the new trailer is added: a `<key>=<value>` or | |
| 73 | + | `<key>:<value>` argument given using `--trailer` will be appended after | |
| 74 | + | the existing trailers. The _<key>_ and _<value>_ parts will be trimmed | |
| 60 | 75 | to remove starting and trailing whitespace, and the resulting trimmed | |
| 61 | - | <key> and <value> will appear in the output like this: | |
| 76 | + | _<key>_ and _<value>_ will appear in the output like this: | |
| 62 | 77 | ||
| 63 | 78 | ------------------------------------------------ | |
| 64 | 79 | key: value | |
| 65 | 80 | ------------------------------------------------ | |
| 66 | 81 | ||
| 67 | - | This means that the trimmed <key> and <value> will be separated by | |
| 68 | - | `': '` (one colon followed by one space). | |
| 82 | + | This means that the trimmed _<key>_ and _<value>_ will be separated by | |
| 83 | + | "`:`{nbsp}" (one colon followed by one space). | |
| 84 | + | ||
| 85 | + | Existing trailers are extracted from the input by looking for the | |
| 86 | + | trailer block. A trailer block is a group of one or more lines that (i) | |
| 87 | + | is all trailers, or (ii) contains at least one Git-generated or | |
| 88 | + | user-configured trailer and consists of at | |
| 89 | + | least 25% trailers. | |
| 90 | + | The trailer block is by definition at the end of the commit message. | |
| 91 | + | The message in turn is either (i) at the end of the input, or (ii) the | |
| 92 | + | last non-whitespace lines before a line that starts with `---` (followed | |
| 93 | + | by a space or the end of the line). | |
| 69 | 94 | ||
| 70 | - | For convenience, a <key-alias> can be configured to make using `--trailer` | |
| 95 | + | For convenience, a _<key-alias>_ can be configured to make using `--trailer` | |
| 71 | 96 | shorter to type on the command line. This can be configured using the | |
| 72 | - | 'trailer.<key-alias>.key' configuration variable. The <keyAlias> must be a prefix | |
| 73 | - | of the full <key> string, although case sensitivity does not matter. For | |
| 97 | + | `trailer.<key-alias>.key` configuration variable. The _<key-alias>_ must be a prefix | |
| 98 | + | of the full _<key>_ string, although case sensitivity does not matter. For | |
| 74 | 99 | example, if you have | |
| 75 | 100 | ||
| 76 | 101 | ------------------------------------------------ | |
| @@ -80,24 +105,10 @@ trailer.sign.key "Signed-off-by: " | |||
| 80 | 105 | in your configuration, you only need to specify `--trailer="sign: foo"` | |
| 81 | 106 | on the command line instead of `--trailer="Signed-off-by: foo"`. | |
| 82 | 107 | ||
| 83 | - | By default the new trailer will appear at the end of all the existing | |
| 84 | - | trailers. If there is no existing trailer, the new trailer will appear | |
| 85 | - | at the end of the input. A blank line will be added before the new | |
| 86 | - | trailer if there isn't one already. | |
| 87 | - | ||
| 88 | - | Existing trailers are extracted from the input by looking for | |
| 89 | - | a group of one or more lines that (i) is all trailers, or (ii) contains at | |
| 90 | - | least one Git-generated or user-configured trailer and consists of at | |
| 91 | - | least 25% trailers. | |
| 92 | - | The group must be preceded by one or more empty (or whitespace-only) lines. | |
| 93 | - | The group must either be at the end of the input or be the last | |
| 94 | - | non-whitespace lines before a line that starts with '---' (followed by a | |
| 95 | - | space or the end of the line). | |
| 96 | - | ||
| 97 | 108 | When reading trailers, there can be no whitespace before or inside the | |
| 98 | - | <key>, but any number of regular space and tab characters are allowed | |
| 99 | - | between the <key> and the separator. There can be whitespaces before, | |
| 100 | - | inside or after the <value>. The <value> may be split over multiple lines | |
| 109 | + | _<key>_, but any number of regular space and tab characters are allowed | |
| 110 | + | between the _<key>_ and the separator. There can be whitespaces before, | |
| 111 | + | inside or after the _<value>_. The _<value>_ may be split over multiple lines | |
| 101 | 112 | with each subsequent line starting with at least one whitespace, like | |
| 102 | 113 | the "folding" in RFC 822. Example: | |
| 103 | 114 | ||
| @@ -106,82 +117,109 @@ key: This is a very long value, with spaces and | |||
| 106 | 117 | newlines in it. | |
| 107 | 118 | ------------------------------------------------ | |
| 108 | 119 | ||
| 109 | - | Note that trailers do not follow (nor are they intended to follow) many of the | |
| 110 | - | rules for RFC 822 headers. For example they do not follow the encoding rule. | |
| 120 | + | OTHER RULES | |
| 121 | + | ----------- | |
| 122 | + | ||
| 123 | + | What was covered in the previous section are the rules that are relevant | |
| 124 | + | for regular use. The following points are included for completeness. | |
| 125 | + | ||
| 126 | + | This command ignores comment lines (see `core.commentString` in | |
| 127 | + | linkgit:git-config[1]). This is for use with the `prepare-commit-msg` | |
| 128 | + | and `commit-msg` hooks. | |
| 111 | 129 | ||
| 112 | 130 | OPTIONS | |
| 113 | 131 | ------- | |
| 114 | - | --in-place:: | |
| 115 | - | Edit the files in place. | |
| 132 | + | `--in-place`:: | |
| 133 | + | `--no-in-place`:: | |
| 134 | + | Edit the files in place. The default is `--no-in-place`. | |
| 116 | 135 | ||
| 117 | - | --trim-empty:: | |
| 118 | - | If the <value> part of any trailer contains only whitespace, | |
| 136 | + | `--trim-empty`:: | |
| 137 | + | `--no-trim-empty`:: | |
| 138 | + | If the _<value>_ part of any trailer contains only whitespace, | |
| 119 | 139 | the whole trailer will be removed from the output. | |
| 120 | 140 | This applies to existing trailers as well as new trailers. | |
| 141 | + | + | |
| 142 | + | The default is `--no-trim-empty`. | |
| 121 | 143 | ||
| 122 | - | --trailer <key>[(=|:)<value>]:: | |
| 123 | - | Specify a (<key>, <value>) pair that should be applied as a | |
| 124 | - | trailer to the inputs. See the description of this | |
| 125 | - | command. | |
| 144 | + | `--trailer=<key>[(=|:)<value>]`:: | |
| 145 | + | `--no-trailer`:: | |
| 146 | + | Specify a (_<key>_, _<value>_) pair that should be applied as a | |
| 147 | + | trailer to the inputs. See the description of this command. Can | |
| 148 | + | be given multiple times. | |
| 149 | + | + | |
| 150 | + | Use `--no-trailer` to reset the list. | |
| 126 | 151 | ||
| 127 | - | --where <placement>:: | |
| 128 | - | --no-where:: | |
| 152 | + | `--where=<placement>`:: | |
| 153 | + | `--no-where`:: | |
| 129 | 154 | Specify where all new trailers will be added. A setting | |
| 130 | - | provided with '--where' overrides the `trailer.where` and any | |
| 131 | - | applicable `trailer.<keyAlias>.where` configuration variables | |
| 132 | - | and applies to all '--trailer' options until the next occurrence of | |
| 133 | - | '--where' or '--no-where'. Upon encountering '--no-where', clear the | |
| 134 | - | effect of any previous use of '--where', such that the relevant configuration | |
| 135 | - | variables are no longer overridden. Possible placements are `after`, | |
| 155 | + | provided with `--where` overrides the `trailer.where` and any | |
| 156 | + | applicable `trailer.<key-alias>.where` configuration variables | |
| 157 | + | and applies to all `--trailer` options until the next occurrence of | |
| 158 | + | `--where` or `--no-where`. Possible placements are `after`, | |
| 136 | 159 | `before`, `end` or `start`. | |
| 160 | + | + | |
| 161 | + | Use `--no-where` to clear the effect of any previous use of `--where`, | |
| 162 | + | such that the relevant configuration variables are no longer overridden. | |
| 137 | 163 | ||
| 138 | - | --if-exists <action>:: | |
| 139 | - | --no-if-exists:: | |
| 164 | + | `--if-exists=<action>`:: | |
| 165 | + | `--no-if-exists`:: | |
| 140 | 166 | Specify what action will be performed when there is already at | |
| 141 | - | least one trailer with the same <key> in the input. A setting | |
| 142 | - | provided with '--if-exists' overrides the `trailer.ifExists` and any | |
| 143 | - | applicable `trailer.<keyAlias>.ifExists` configuration variables | |
| 144 | - | and applies to all '--trailer' options until the next occurrence of | |
| 145 | - | '--if-exists' or '--no-if-exists'. Upon encountering '--no-if-exists, clear the | |
| 146 | - | effect of any previous use of '--if-exists, such that the relevant configuration | |
| 147 | - | variables are no longer overridden. Possible actions are `addIfDifferent`, | |
| 167 | + | least one trailer with the same _<key>_ in the input. A setting | |
| 168 | + | provided with `--if-exists` overrides the `trailer.ifExists` and any | |
| 169 | + | applicable `trailer.<key-alias>.ifExists` configuration variables | |
| 170 | + | and applies to all `--trailer` options until the next occurrence of | |
| 171 | + | `--if-exists` or `--no-if-exists`. Possible actions are `addIfDifferent`, | |
| 148 | 172 | `addIfDifferentNeighbor`, `add`, `replace` and `doNothing`. | |
| 173 | + | + | |
| 174 | + | Use `--no-if-exists` to clear the effect of any previous use of | |
| 175 | + | `--if-exists`, such that the relevant configuration variables are no | |
| 176 | + | longer overridden. | |
| 149 | 177 | ||
| 150 | - | --if-missing <action>:: | |
| 151 | - | --no-if-missing:: | |
| 178 | + | `--if-missing=<action>`:: | |
| 179 | + | `--no-if-missing`:: | |
| 152 | 180 | Specify what action will be performed when there is no other | |
| 153 | - | trailer with the same <key> in the input. A setting | |
| 154 | - | provided with '--if-missing' overrides the `trailer.ifMissing` and any | |
| 155 | - | applicable `trailer.<keyAlias>.ifMissing` configuration variables | |
| 156 | - | and applies to all '--trailer' options until the next occurrence of | |
| 157 | - | '--if-missing' or '--no-if-missing'. Upon encountering '--no-if-missing, | |
| 158 | - | clear the effect of any previous use of '--if-missing, such that the relevant | |
| 159 | - | configuration variables are no longer overridden. Possible actions are `doNothing` | |
| 160 | - | or `add`. | |
| 161 | - | ||
| 162 | - | --only-trailers:: | |
| 163 | - | Output only the trailers, not any other parts of the input. | |
| 164 | - | ||
| 165 | - | --only-input:: | |
| 181 | + | trailer with the same _<key>_ in the input. A setting | |
| 182 | + | provided with `--if-missing` overrides the `trailer.ifMissing` and any | |
| 183 | + | applicable `trailer.<key-alias>.ifMissing` configuration variables | |
| 184 | + | and applies to all `--trailer` options until the next occurrence of | |
| 185 | + | `--if-missing` or `--no-if-missing`. Possible actions are | |
| 186 | + | `doNothing` or `add`. | |
| 187 | + | + | |
| 188 | + | Use `--no-if-missing` to clear the effect of any previous use of | |
| 189 | + | `--if-missing`, such that the relevant configuration variables are no | |
| 190 | + | longer overridden. | |
| 191 | + | ||
| 192 | + | `--only-trailers`:: | |
| 193 | + | `--no-only-trailers`:: | |
| 194 | + | Output only the trailers, not any other parts of the | |
| 195 | + | input. The default is `--no-only-trailers`. | |
| 196 | + | ||
| 197 | + | `--only-input`:: | |
| 198 | + | `--no-only-input`:: | |
| 166 | 199 | Output only trailers that exist in the input; do not add any | |
| 167 | - | from the command-line or by applying `trailer.*` configuration | |
| 168 | - | variables. | |
| 200 | + | from the command-line or by applying `trailer.<key-alias>` configuration | |
| 201 | + | variables. The default is `--no-only-input`. | |
| 169 | 202 | ||
| 170 | - | --unfold:: | |
| 203 | + | `--unfold`:: | |
| 204 | + | `--no-unfold`:: | |
| 171 | 205 | If a trailer has a value that runs over multiple lines (aka "folded"), | |
| 172 | - | reformat the value into a single line. | |
| 206 | + | reformat the value into a single line. The default is `--no-unfold`. | |
| 173 | 207 | ||
| 174 | - | --parse:: | |
| 208 | + | `--parse`:: | |
| 175 | 209 | A convenience alias for `--only-trailers --only-input | |
| 176 | 210 | --unfold`. This makes it easier to only see the trailers coming from the | |
| 177 | 211 | input without influencing them with any command line options or | |
| 178 | 212 | configuration variables, while also making the output machine-friendly with | |
| 179 | - | --unfold. | |
| 213 | + | `--unfold`. | |
| 214 | + | + | |
| 215 | + | There is no convenience alias to negate this alias. | |
| 180 | 216 | ||
| 181 | - | --no-divider:: | |
| 182 | - | Do not treat `---` as the end of the commit message. Use this | |
| 183 | - | when you know your input contains just the commit message itself | |
| 184 | - | (and not an email or the output of `git format-patch`). | |
| 217 | + | `--divider`:: | |
| 218 | + | `--no-divider`:: | |
| 219 | + | Treat `---` as the end of the commit message. This is the default. | |
| 220 | + | Use `--no-divider` when you know your input contains just the | |
| 221 | + | commit message itself (and not an email or the output of | |
| 222 | + | linkgit:git-format-patch[1]). | |
| 185 | 223 | ||
| 186 | 224 | CONFIGURATION VARIABLES | |
| 187 | 225 | ----------------------- | |
| @@ -193,7 +231,7 @@ include::config/trailer.adoc[] | |||
| 193 | 231 | EXAMPLES | |
| 194 | 232 | -------- | |
| 195 | 233 | ||
| 196 | - | * Configure a 'sign' trailer with a 'Signed-off-by' key, and then | |
| 234 | + | * Configure a `sign` trailer with a `Signed-off-by` key, and then | |
| 197 | 235 | add two of these trailers to a commit message file: | |
| 198 | 236 | + | |
| 199 | 237 | ------------ | |
| @@ -230,8 +268,8 @@ Signed-off-by: Bob <bob@example.com> | |||
| 230 | 268 | Acked-by: Alice <alice@example.com> | |
| 231 | 269 | ------------ | |
| 232 | 270 | ||
| 233 | - | * Extract the last commit as a patch, and add a 'Cc' and a | |
| 234 | - | 'Reviewed-by' trailer to it: | |
| 271 | + | * Extract the last commit as a patch, and add a `Cc` and a | |
| 272 | + | `Reviewed-by` trailer to it: | |
| 235 | 273 | + | |
| 236 | 274 | ------------ | |
| 237 | 275 | $ git format-patch -1 | |
| @@ -239,9 +277,9 @@ $ git format-patch -1 | |||
| 239 | 277 | $ git interpret-trailers --trailer 'Cc: Alice <alice@example.com>' --trailer 'Reviewed-by: Bob <bob@example.com>' 0001-foo.patch >0001-bar.patch | |
| 240 | 278 | ------------ | |
| 241 | 279 | ||
| 242 | - | * Configure a 'sign' trailer with a command to automatically add a | |
| 243 | - | 'Signed-off-by: ' with the author information only if there is no | |
| 244 | - | 'Signed-off-by: ' already, and show how it works: | |
| 280 | + | * Configure a `sign` trailer with a command to automatically add a | |
| 281 | + | "`Signed-off-by:`{nbsp}" with the author information only if there is no | |
| 282 | + | "`Signed-off-by:`{nbsp}" already, and show how it works: | |
| 245 | 283 | + | |
| 246 | 284 | ------------ | |
| 247 | 285 | $ cat msg1.txt | |
| @@ -272,7 +310,7 @@ body text | |||
| 272 | 310 | Signed-off-by: Alice <alice@example.com> | |
| 273 | 311 | ------------ | |
| 274 | 312 | ||
| 275 | - | * Configure a 'fix' trailer with a key that contains a '#' and no | |
| 313 | + | * Configure a `fix` trailer with a key that contains a `#` and no | |
| 276 | 314 | space after this character, and show how it works: | |
| 277 | 315 | + | |
| 278 | 316 | ------------ | |
| @@ -284,7 +322,7 @@ subject | |||
| 284 | 322 | Fix #42 | |
| 285 | 323 | ------------ | |
| 286 | 324 | ||
| 287 | - | * Configure a 'help' trailer with a cmd use a script `glog-find-author` | |
| 325 | + | * Configure a `help` trailer with a cmd use a script `glog-find-author` | |
| 288 | 326 | which search specified author identity from git log in git repository | |
| 289 | 327 | and show how it works: | |
| 290 | 328 | + | |
| @@ -308,7 +346,7 @@ Helped-by: Junio C Hamano <gitster@pobox.com> | |||
| 308 | 346 | Helped-by: Christian Couder <christian.couder@gmail.com> | |
| 309 | 347 | ------------ | |
| 310 | 348 | ||
| 311 | - | * Configure a 'ref' trailer with a cmd use a script `glog-grep` | |
| 349 | + | * Configure a `ref` trailer with a cmd use a script `glog-grep` | |
| 312 | 350 | to grep last relevant commit from git log in the git repository | |
| 313 | 351 | and show how it works: | |
| 314 | 352 | + | |
| @@ -331,7 +369,7 @@ body text | |||
| 331 | 369 | Reference-to: 8bc9a0c769 (Add copyright notices., 2005-04-07) | |
| 332 | 370 | ------------ | |
| 333 | 371 | ||
| 334 | - | * Configure a 'see' trailer with a command to show the subject of a | |
| 372 | + | * Configure a `see` trailer with a command to show the subject of a | |
| 335 | 373 | commit that is related, and show how it works: | |
| 336 | 374 | + | |
| 337 | 375 | ------------ | |
| @@ -359,8 +397,8 @@ See-also: fe3187489d69c4 (subject of related commit) | |||
| 359 | 397 | * Configure a commit template with some trailers with empty values | |
| 360 | 398 | (using sed to show and keep the trailing spaces at the end of the | |
| 361 | 399 | trailers), then configure a commit-msg hook that uses | |
| 362 | - | 'git interpret-trailers' to remove trailers with empty values and | |
| 363 | - | to add a 'git-version' trailer: | |
| 400 | + | git-interpret-trailers(1) to remove trailers with empty values and to | |
| 401 | + | add a `git-version` trailer: | |
| 364 | 402 | + | |
| 365 | 403 | ------------ | |
| 366 | 404 | $ cat temp.txt | |
| @@ -381,6 +419,29 @@ mv "\$1.new" "\$1" | |||
| 381 | 419 | $ chmod +x .git/hooks/commit-msg | |
| 382 | 420 | ------------ | |
| 383 | 421 | ||
| 422 | + | * Here we try to use three different trailer keys. But it fails because | |
| 423 | + | two of them are not recognized as trailer keys. | |
| 424 | + | + | |
| 425 | + | ---- | |
| 426 | + | $ cat msg.txt | |
| 427 | + | subject | |
| 428 | + | ||
| 429 | + | Skapad-på: some-branch | |
| 430 | + | Hash-in-v6.11: 45c12d3269fe48f22834320c782ffe86c3560f2c | |
| 431 | + | Reviewed-by: Alice <alice@example.com> | |
| 432 | + | $ git interpret-trailers --only-trailers <msg.txt | |
| 433 | + | $ | |
| 434 | + | ---- | |
| 435 | + | + | |
| 436 | + | Recall that a trailer key has to consist of only ASCII alphanumeric | |
| 437 | + | characters and hyphens, and this does not hold for the two first | |
| 438 | + | supposed trailer keys. And now none are recognized as trailers because | |
| 439 | + | the candidate trailer block has at least one non-trailer line, even | |
| 440 | + | though `Reviewed-by` is a valid trailer key. Recall that a trailer block | |
| 441 | + | has to either (i) be all trailers, or (ii) consist of at least one | |
| 442 | + | Git-generated or user-configured trailer (and some other conditions). | |
| 443 | + | And (ii) is not satisfied since we have not configured any trailer keys. | |
| 444 | + | ||
| 384 | 445 | SEE ALSO | |
| 385 | 446 | -------- | |
| 386 | 447 | linkgit:git-commit[1], linkgit:git-format-patch[1], linkgit:git-config[1] | |
added Documentation/git-last-modified.adoc mode 100644
| @@ -0,0 +1,81 @@ | |||
| 1 | + | git-last-modified(1) | |
| 2 | + | ==================== | |
| 3 | + | ||
| 4 | + | NAME | |
| 5 | + | ---- | |
| 6 | + | git-last-modified - EXPERIMENTAL: Show when files were last modified | |
| 7 | + | ||
| 8 | + | ||
| 9 | + | SYNOPSIS | |
| 10 | + | -------- | |
| 11 | + | [synopsis] | |
| 12 | + | git last-modified [--recursive] [--show-trees] [--max-depth=<depth>] [-z] | |
| 13 | + | [<revision-range>] [[--] <pathspec>...] | |
| 14 | + | ||
| 15 | + | DESCRIPTION | |
| 16 | + | ----------- | |
| 17 | + | ||
| 18 | + | Shows which commit last modified each of the relevant files and subdirectories. | |
| 19 | + | A commit renaming a path, or changing it's mode is also taken into account. | |
| 20 | + | ||
| 21 | + | THIS COMMAND IS EXPERIMENTAL. THE BEHAVIOR MAY CHANGE. | |
| 22 | + | ||
| 23 | + | OPTIONS | |
| 24 | + | ------- | |
| 25 | + | ||
| 26 | + | `-r`:: | |
| 27 | + | `--recursive`:: | |
| 28 | + | Recursively traverse into all subtrees. By default, the command only | |
| 29 | + | shows tree entries matching the `<pathspec>`. With this option, it | |
| 30 | + | descends into subtrees and displays all entries within them. | |
| 31 | + | Equivalent to `--max-depth=-1`. | |
| 32 | + | ||
| 33 | + | `-t`:: | |
| 34 | + | `--show-trees`:: | |
| 35 | + | Show tree entries even when recursing into them. | |
| 36 | + | ||
| 37 | + | `--max-depth=<depth>`:: | |
| 38 | + | For each pathspec given on the command line, traverse at most `<depth>` | |
| 39 | + | levels into subtrees. A negative value means no limit. | |
| 40 | + | The default is 0, which shows all paths matching the pathspec | |
| 41 | + | without descending into subtrees. | |
| 42 | + | ||
| 43 | + | `-z`:: | |
| 44 | + | Terminate each line with a _NUL_ character rather than a newline. | |
| 45 | + | ||
| 46 | + | `<revision-range>`:: | |
| 47 | + | Only traverse commits in the specified revision range. When no | |
| 48 | + | `<revision-range>` is specified, it defaults to `HEAD` (i.e. the whole | |
| 49 | + | history leading to the current commit). For a complete list of ways to | |
| 50 | + | spell `<revision-range>`, see the 'Specifying Ranges' section of | |
| 51 | + | linkgit:gitrevisions[7]. | |
| 52 | + | ||
| 53 | + | `[--] <pathspec>...`:: | |
| 54 | + | Show the commit that last modified each path matching _<pathspec>_. | |
| 55 | + | If no _<pathspec>_ is given, all files and subdirectories are included. | |
| 56 | + | See linkgit:gitglossary[7] for details on pathspec syntax. | |
| 57 | + | ||
| 58 | + | OUTPUT | |
| 59 | + | ------ | |
| 60 | + | ||
| 61 | + | The output is in the format: | |
| 62 | + | ||
| 63 | + | ------------ | |
| 64 | + | <oid> TAB <path> LF | |
| 65 | + | ------------ | |
| 66 | + | ||
| 67 | + | If a path contains any special characters, the path is C-style quoted. To | |
| 68 | + | avoid quoting, pass option `-z` to terminate each line with a NUL. | |
| 69 | + | ||
| 70 | + | ------------ | |
| 71 | + | <oid> TAB <path> NUL | |
| 72 | + | ------------ | |
| 73 | + | ||
| 74 | + | SEE ALSO | |
| 75 | + | -------- | |
| 76 | + | linkgit:git-blame[1], | |
| 77 | + | linkgit:git-log[1]. | |
| 78 | + | ||
| 79 | + | GIT | |
| 80 | + | --- | |
| 81 | + | Part of the linkgit:git[1] suite | |
modified Documentation/git-log.adoc
| @@ -8,8 +8,8 @@ git-log - Show commit logs | |||
| 8 | 8 | ||
| 9 | 9 | SYNOPSIS | |
| 10 | 10 | -------- | |
| 11 | - | [verse] | |
| 12 | - | 'git log' [<options>] [<revision-range>] [[--] <path>...] | |
| 11 | + | [synopsis] | |
| 12 | + | git log [<options>] [<revision-range>] [[--] <path>...] | |
| 13 | 13 | ||
| 14 | 14 | DESCRIPTION | |
| 15 | 15 | ----------- | |
| @@ -27,28 +27,34 @@ each commit introduces are shown. | |||
| 27 | 27 | OPTIONS | |
| 28 | 28 | ------- | |
| 29 | 29 | ||
| 30 | - | --follow:: | |
| 30 | + | `--follow`:: | |
| 31 | 31 | Continue listing the history of a file beyond renames | |
| 32 | 32 | (works only for a single file). | |
| 33 | 33 | ||
| 34 | - | --no-decorate:: | |
| 35 | - | --decorate[=short|full|auto|no]:: | |
| 36 | - | Print out the ref names of any commits that are shown. If 'short' is | |
| 37 | - | specified, the ref name prefixes 'refs/heads/', 'refs/tags/' and | |
| 38 | - | 'refs/remotes/' will not be printed. If 'full' is specified, the | |
| 39 | - | full ref name (including prefix) will be printed. If 'auto' is | |
| 40 | - | specified, then if the output is going to a terminal, the ref names | |
| 41 | - | are shown as if 'short' were given, otherwise no ref names are | |
| 42 | - | shown. The option `--decorate` is short-hand for `--decorate=short`. | |
| 43 | - | Default to configuration value of `log.decorate` if configured, | |
| 44 | - | otherwise, `auto`. | |
| 45 | - | ||
| 46 | - | --decorate-refs=<pattern>:: | |
| 47 | - | --decorate-refs-exclude=<pattern>:: | |
| 34 | + | `--no-decorate`:: | |
| 35 | + | `--decorate[=(short|full|auto|no)]`:: | |
| 36 | + | Print out the ref names of any commits that are shown. Possible values | |
| 37 | + | are: | |
| 38 | + | + | |
| 39 | + | -- | |
| 40 | + | `short`;; the ref name prefixes `refs/heads/`, `refs/tags/` and | |
| 41 | + | `refs/remotes/` are not printed. | |
| 42 | + | `full`;; the full ref name (including prefix) is printed. | |
| 43 | + | `auto`;; if the output is going to a terminal, the ref names | |
| 44 | + | are shown as if `short` were given, otherwise no ref names are | |
| 45 | + | shown. | |
| 46 | + | -- | |
| 47 | + | + | |
| 48 | + | The option `--decorate` is short-hand for `--decorate=short`. Default to | |
| 49 | + | configuration value of `log.decorate` if configured, otherwise, `auto`. | |
| 50 | + | ||
| 51 | + | `--decorate-refs=<pattern>`:: | |
| 52 | + | `--decorate-refs-exclude=<pattern>`:: | |
| 48 | 53 | For each candidate reference, do not use it for decoration if it | |
| 49 | - | matches any patterns given to `--decorate-refs-exclude` or if it | |
| 50 | - | doesn't match any of the patterns given to `--decorate-refs`. The | |
| 51 | - | `log.excludeDecoration` config option allows excluding refs from | |
| 54 | + | matches any of the _<pattern>_ parameters given to | |
| 55 | + | `--decorate-refs-exclude` or if it doesn't match any of the | |
| 56 | + | _<pattern>_ parameters given to `--decorate-refs`. | |
| 57 | + | The `log.excludeDecoration` config option allows excluding refs from | |
| 52 | 58 | the decorations, but an explicit `--decorate-refs` pattern will | |
| 53 | 59 | override a match in `log.excludeDecoration`. | |
| 54 | 60 | + | |
| @@ -56,51 +62,53 @@ If none of these options or config settings are given, then references are | |||
| 56 | 62 | used as decoration if they match `HEAD`, `refs/heads/`, `refs/remotes/`, | |
| 57 | 63 | `refs/stash/`, or `refs/tags/`. | |
| 58 | 64 | ||
| 59 | - | --clear-decorations:: | |
| 65 | + | `--clear-decorations`:: | |
| 60 | 66 | When specified, this option clears all previous `--decorate-refs` | |
| 61 | 67 | or `--decorate-refs-exclude` options and relaxes the default | |
| 62 | 68 | decoration filter to include all references. This option is | |
| 63 | 69 | assumed if the config value `log.initialDecorationSet` is set to | |
| 64 | 70 | `all`. | |
| 65 | 71 | ||
| 66 | - | --source:: | |
| 72 | + | `--source`:: | |
| 67 | 73 | Print out the ref name given on the command line by which each | |
| 68 | 74 | commit was reached. | |
| 69 | 75 | ||
| 70 | - | --[no-]mailmap:: | |
| 71 | - | --[no-]use-mailmap:: | |
| 76 | + | `--mailmap`:: | |
| 77 | + | `--no-mailmap`:: | |
| 78 | + | `--use-mailmap`:: | |
| 79 | + | `--no-use-mailmap`:: | |
| 72 | 80 | Use mailmap file to map author and committer names and email | |
| 73 | 81 | addresses to canonical real names and email addresses. See | |
| 74 | 82 | linkgit:git-shortlog[1]. | |
| 75 | 83 | ||
| 76 | - | --full-diff:: | |
| 84 | + | `--full-diff`:: | |
| 77 | 85 | Without this flag, `git log -p <path>...` shows commits that | |
| 78 | 86 | touch the specified paths, and diffs about the same specified | |
| 79 | 87 | paths. With this, the full diff is shown for commits that touch | |
| 80 | - | the specified paths; this means that "<path>..." limits only | |
| 88 | + | the specified paths; this means that "`<path>...`" limits only | |
| 81 | 89 | commits, and doesn't limit diff for those commits. | |
| 82 | 90 | + | |
| 83 | 91 | Note that this affects all diff-based output types, e.g. those | |
| 84 | 92 | produced by `--stat`, etc. | |
| 85 | 93 | ||
| 86 | - | --log-size:: | |
| 87 | - | Include a line ``log size <number>'' in the output for each commit, | |
| 88 | - | where <number> is the length of that commit's message in bytes. | |
| 94 | + | `--log-size`:: | |
| 95 | + | Include a line `log size <number>` in the output for each commit, | |
| 96 | + | where _<number>_ is the length of that commit's message in bytes. | |
| 89 | 97 | Intended to speed up tools that read log messages from `git log` | |
| 90 | 98 | output by allowing them to allocate space in advance. | |
| 91 | 99 | ||
| 92 | 100 | include::line-range-options.adoc[] | |
| 93 | 101 | ||
| 94 | - | <revision-range>:: | |
| 102 | + | _<revision-range>_:: | |
| 95 | 103 | Show only commits in the specified revision range. When no | |
| 96 | - | <revision-range> is specified, it defaults to `HEAD` (i.e. the | |
| 104 | + | _<revision-range>_ is specified, it defaults to `HEAD` (i.e. the | |
| 97 | 105 | whole history leading to the current commit). `origin..HEAD` | |
| 98 | 106 | specifies all the commits reachable from the current commit | |
| 99 | 107 | (i.e. `HEAD`), but not from `origin`. For a complete list of | |
| 100 | - | ways to spell <revision-range>, see the 'Specifying Ranges' | |
| 108 | + | ways to spell _<revision-range>_, see the 'Specifying Ranges' | |
| 101 | 109 | section of linkgit:gitrevisions[7]. | |
| 102 | 110 | ||
| 103 | - | [--] <path>...:: | |
| 111 | + | `[--] <path>...`:: | |
| 104 | 112 | Show only commits that are enough to explain how the files | |
| 105 | 113 | that match the specified paths came to be. See 'History | |
| 106 | 114 | Simplification' below for details and other simplification | |
| @@ -145,14 +153,14 @@ EXAMPLES | |||
| 145 | 153 | ||
| 146 | 154 | `git log --since="2 weeks ago" -- gitk`:: | |
| 147 | 155 | ||
| 148 | - | Show the changes during the last two weeks to the file 'gitk'. | |
| 156 | + | Show the changes during the last two weeks to the file `gitk`. | |
| 149 | 157 | The `--` is necessary to avoid confusion with the *branch* named | |
| 150 | - | 'gitk' | |
| 158 | + | `gitk` | |
| 151 | 159 | ||
| 152 | 160 | `git log --name-status release..test`:: | |
| 153 | 161 | ||
| 154 | - | Show the commits that are in the "test" branch but not yet | |
| 155 | - | in the "release" branch, along with the list of paths | |
| 162 | + | Show the commits that are in the "`test`" branch but not yet | |
| 163 | + | in the "`release`" branch, along with the list of paths | |
| 156 | 164 | each commit modifies. | |
| 157 | 165 | ||
| 158 | 166 | `git log --follow builtin/rev-list.c`:: | |
| @@ -164,7 +172,7 @@ EXAMPLES | |||
| 164 | 172 | `git log --branches --not --remotes=origin`:: | |
| 165 | 173 | ||
| 166 | 174 | Shows all commits that are in any of local branches but not in | |
| 167 | - | any of remote-tracking branches for 'origin' (what you have that | |
| 175 | + | any of remote-tracking branches for `origin` (what you have that | |
| 168 | 176 | origin doesn't). | |
| 169 | 177 | ||
| 170 | 178 | `git log master --not --remotes=*/master`:: | |
| @@ -200,11 +208,11 @@ CONFIGURATION | |||
| 200 | 208 | See linkgit:git-config[1] for core variables and linkgit:git-diff[1] | |
| 201 | 209 | for settings related to diff generation. | |
| 202 | 210 | ||
| 203 | - | format.pretty:: | |
| 211 | + | `format.pretty`:: | |
| 204 | 212 | Default for the `--format` option. (See 'Pretty Formats' above.) | |
| 205 | 213 | Defaults to `medium`. | |
| 206 | 214 | ||
| 207 | - | i18n.logOutputEncoding:: | |
| 215 | + | `i18n.logOutputEncoding`:: | |
| 208 | 216 | Encoding to use when displaying logs. (See 'Discussion' above.) | |
| 209 | 217 | Defaults to the value of `i18n.commitEncoding` if set, and UTF-8 | |
| 210 | 218 | otherwise. | |
modified Documentation/git-ls-files.adoc
| @@ -331,7 +331,7 @@ can give `--exclude-per-directory=.gitignore`, and then specify: | |||
| 331 | 331 | 1. The file specified by the `core.excludesfile` configuration | |
| 332 | 332 | variable, if exists, or the `$XDG_CONFIG_HOME/git/ignore` file. | |
| 333 | 333 | ||
| 334 | - | 2. The `$GIT_DIR/info/exclude` file. | |
| 334 | + | 2. The `$GIT_COMMON_DIR/info/exclude` file. | |
| 335 | 335 | ||
| 336 | 336 | via the `--exclude-from=` option. | |
| 337 | 337 | ||
modified Documentation/git-maintenance.adoc
| @@ -12,6 +12,7 @@ SYNOPSIS | |||
| 12 | 12 | 'git maintenance' run [<options>] | |
| 13 | 13 | 'git maintenance' start [--scheduler=<scheduler>] | |
| 14 | 14 | 'git maintenance' (stop|register|unregister) [<options>] | |
| 15 | + | 'git maintenance' is-needed [<options>] | |
| 15 | 16 | ||
| 16 | 17 | ||
| 17 | 18 | DESCRIPTION | |
| @@ -84,6 +85,16 @@ The `unregister` subcommand will report an error if the current repository | |||
| 84 | 85 | is not already registered. Use the `--force` option to return success even | |
| 85 | 86 | when the current repository is not registered. | |
| 86 | 87 | ||
| 88 | + | is-needed:: | |
| 89 | + | Check whether maintenance needs to be run without actually running it. | |
| 90 | + | Exits with a 0 status code if maintenance needs to be run, 1 otherwise. | |
| 91 | + | Ideally used with the '--auto' flag. | |
| 92 | + | + | |
| 93 | + | If one or more `--task` options are specified, then those tasks are checked | |
| 94 | + | in that order. Otherwise, the tasks are determined by which | |
| 95 | + | `maintenance.<task>.enabled` config options are true. By default, only | |
| 96 | + | `maintenance.gc.enabled` is true. | |
| 97 | + | ||
| 87 | 98 | TASKS | |
| 88 | 99 | ----- | |
| 89 | 100 | ||
| @@ -183,6 +194,8 @@ OPTIONS | |||
| 183 | 194 | in the `gc.auto` config setting, or when the number of pack-files | |
| 184 | 195 | exceeds the `gc.autoPackLimit` config setting. Not compatible with | |
| 185 | 196 | the `--schedule` option. | |
| 197 | + | When combined with the `is-needed` subcommand, check if the required | |
| 198 | + | thresholds are met without actually running maintenance. | |
| 186 | 199 | ||
| 187 | 200 | --schedule:: | |
| 188 | 201 | When combined with the `run` subcommand, run maintenance tasks | |
modified Documentation/git-merge-file.adoc
| @@ -85,6 +85,9 @@ object store and the object ID of its blob is written to standard output. | |||
| 85 | 85 | ||
| 86 | 86 | --zdiff3:: | |
| 87 | 87 | Show conflicts in "zdiff3" style. | |
| 88 | + | + | |
| 89 | + | The `--diff3` and `--zdiff3` options default to the value of the | |
| 90 | + | `merge.conflictStyle` configuration variable (see linkgit:git-config[1]). | |
| 88 | 91 | ||
| 89 | 92 | --ours:: | |
| 90 | 93 | --theirs:: | |
modified Documentation/git-merge-tree.adoc
| @@ -59,7 +59,8 @@ OPTIONS | |||
| 59 | 59 | do not list filenames multiple times if they have multiple | |
| 60 | 60 | conflicting stages). | |
| 61 | 61 | ||
| 62 | - | --[no-]messages:: | |
| 62 | + | --messages:: | |
| 63 | + | --no-messages:: | |
| 63 | 64 | Write any informational messages such as "Auto-merging <path>" | |
| 64 | 65 | or CONFLICT notices to the end of stdout. If unspecified, the | |
| 65 | 66 | default is to include these messages if there are merge | |
| @@ -78,11 +79,17 @@ OPTIONS | |||
| 78 | 79 | ||
| 79 | 80 | --merge-base=<tree-ish>:: | |
| 80 | 81 | Instead of finding the merge-bases for <branch1> and <branch2>, | |
| 81 | - | specify a merge-base for the merge, and specifying multiple bases is | |
| 82 | - | currently not supported. This option is incompatible with `--stdin`. | |
| 82 | + | specify a merge-base for the merge. This option is incompatible with | |
| 83 | + | `--stdin`. | |
| 83 | 84 | + | |
| 84 | - | As the merge-base is provided directly, <branch1> and <branch2> do not need | |
| 85 | - | to specify commits; trees are enough. | |
| 85 | + | Specifying multiple bases is currently not supported, which means that when | |
| 86 | + | merging two branches with more than one merge-base, using this option may | |
| 87 | + | cause merge results to differ from what `git merge` would compute. This | |
| 88 | + | can include potentially losing some changes made on one side of the history | |
| 89 | + | in the resulting merge. | |
| 90 | + | + | |
| 91 | + | With this option, since the merge-base is provided directly, <branch1> and | |
| 92 | + | <branch2> do not need to specify commits; trees are enough. | |
| 86 | 93 | ||
| 87 | 94 | -X<option>:: | |
| 88 | 95 | --strategy-option=<option>:: | |
modified Documentation/git-merge.adoc
| @@ -9,7 +9,7 @@ git-merge - Join two or more development histories together | |||
| 9 | 9 | SYNOPSIS | |
| 10 | 10 | -------- | |
| 11 | 11 | [synopsis] | |
| 12 | - | git merge [-n] [--stat] [--no-commit] [--squash] [--[no-]edit] | |
| 12 | + | git merge [-n] [--stat] [--compact-summary] [--no-commit] [--squash] [--[no-]edit] | |
| 13 | 13 | [--no-verify] [-s <strategy>] [-X <strategy-option>] [-S[<keyid>]] | |
| 14 | 14 | [--[no-]allow-unrelated-histories] | |
| 15 | 15 | [--[no-]rerere-autoupdate] [-m <msg>] [-F <file>] | |
| @@ -28,8 +28,8 @@ Assume the following history exists and the current branch is | |||
| 28 | 28 | `master`: | |
| 29 | 29 | ||
| 30 | 30 | ------------ | |
| 31 | - | A---B---C topic | |
| 32 | - | / | |
| 31 | + | A---B---C topic | |
| 32 | + | / | |
| 33 | 33 | D---E---F---G master | |
| 34 | 34 | ------------ | |
| 35 | 35 | ||
| @@ -38,11 +38,11 @@ Then `git merge topic` will replay the changes made on the | |||
| 38 | 38 | its current commit (`C`) on top of `master`, and record the result | |
| 39 | 39 | in a new commit along with the names of the two parent commits and | |
| 40 | 40 | a log message from the user describing the changes. Before the operation, | |
| 41 | - | `ORIG_HEAD` is set to the tip of the current branch (`C`). | |
| 41 | + | `ORIG_HEAD` is set to the tip of the current branch (`G`). | |
| 42 | 42 | ||
| 43 | 43 | ------------ | |
| 44 | - | A---B---C topic | |
| 45 | - | / \ | |
| 44 | + | A---B---C topic | |
| 45 | + | / \ | |
| 46 | 46 | D---E---F---G---H master | |
| 47 | 47 | ------------ | |
| 48 | 48 | ||
modified Documentation/git-multi-pack-index.adoc
| @@ -9,7 +9,16 @@ git-multi-pack-index - Write and verify multi-pack-indexes | |||
| 9 | 9 | SYNOPSIS | |
| 10 | 10 | -------- | |
| 11 | 11 | [verse] | |
| 12 | - | 'git multi-pack-index' [--object-dir=<dir>] [--[no-]bitmap] <sub-command> | |
| 12 | + | 'git multi-pack-index' [<options>] write [--preferred-pack=<pack>] | |
| 13 | + | [--[no-]bitmap] [--[no-]incremental] [--[no-]stdin-packs] | |
| 14 | + | [--refs-snapshot=<path>] [--[no-]write-chain-file] | |
| 15 | + | [--base=<checksum>] | |
| 16 | + | 'git multi-pack-index' [<options>] compact [--[no-]incremental] | |
| 17 | + | [--[no-]bitmap] [--base=<checksum>] [--[no-]write-chain-file] | |
| 18 | + | <from> <to> | |
| 19 | + | 'git multi-pack-index' [<options>] verify | |
| 20 | + | 'git multi-pack-index' [<options>] expire | |
| 21 | + | 'git multi-pack-index' [<options>] repack [--batch-size=<size>] | |
| 13 | 22 | ||
| 14 | 23 | DESCRIPTION | |
| 15 | 24 | ----------- | |
| @@ -18,6 +27,8 @@ Write or verify a multi-pack-index (MIDX) file. | |||
| 18 | 27 | OPTIONS | |
| 19 | 28 | ------- | |
| 20 | 29 | ||
| 30 | + | The following command-line options are applicable to all sub-commands: | |
| 31 | + | ||
| 21 | 32 | --object-dir=<dir>:: | |
| 22 | 33 | Use given directory for the location of Git objects. We check | |
| 23 | 34 | `<dir>/packs/multi-pack-index` for the current MIDX file, and | |
| @@ -25,10 +36,11 @@ OPTIONS | |||
| 25 | 36 | + | |
| 26 | 37 | `<dir>` must be an alternate of the current repository. | |
| 27 | 38 | ||
| 28 | - | --[no-]progress:: | |
| 39 | + | --progress:: | |
| 40 | + | --no-progress:: | |
| 29 | 41 | Turn progress on/off explicitly. If neither is specified, progress is | |
| 30 | 42 | shown if standard error is connected to a terminal. Supported by | |
| 31 | - | sub-commands `write`, `verify`, `expire`, and `repack. | |
| 43 | + | sub-commands `write`, `verify`, `expire`, and `repack`. | |
| 32 | 44 | ||
| 33 | 45 | The following subcommands are available: | |
| 34 | 46 | ||
| @@ -72,8 +84,51 @@ marker). | |||
| 72 | 84 | Write an incremental MIDX file containing only objects | |
| 73 | 85 | and packs not present in an existing MIDX layer. | |
| 74 | 86 | Migrates non-incremental MIDXs to incremental ones when | |
| 75 | - | necessary. Incompatible with `--bitmap`. | |
| 87 | + | necessary. | |
| 88 | + | ||
| 89 | + | --[no-]write-chain-file:: | |
| 90 | + | When used with `--incremental`, write a new MIDX layer | |
| 91 | + | but do not update the multi-pack-index-chain file. | |
| 92 | + | The checksum of the new layer is printed to standard | |
| 93 | + | output, allowing the caller to assemble and write the | |
| 94 | + | chain itself. Requires `--incremental`. | |
| 95 | + | ||
| 96 | + | --base=<checksum>:: | |
| 97 | + | Specify the checksum of an existing MIDX layer to use | |
| 98 | + | as the base when writing a new incremental layer. | |
| 99 | + | The special value `none` indicates that the new layer | |
| 100 | + | should have no base (i.e., it becomes a root layer). | |
| 101 | + | Requires `--no-write-chain-file`. | |
| 102 | + | -- | |
| 103 | + | ||
| 104 | + | compact:: | |
| 105 | + | Write a new MIDX layer containing only objects and packs present | |
| 106 | + | in the range `<from>` to `<to>`, where both arguments are | |
| 107 | + | checksums of existing layers in the MIDX chain. | |
| 108 | + | + | |
| 76 | 109 | -- | |
| 110 | + | --incremental:: | |
| 111 | + | Write the result to a MIDX chain instead of writing a | |
| 112 | + | stand-alone MIDX. | |
| 113 | + | ||
| 114 | + | --[no-]bitmap:: | |
| 115 | + | Control whether or not a multi-pack bitmap is written. | |
| 116 | + | ||
| 117 | + | --[no-]write-chain-file:: | |
| 118 | + | When used with `--incremental`, write a new compacted | |
| 119 | + | MIDX layer but do not update the multi-pack-index-chain | |
| 120 | + | file. The checksum of the new layer is printed to | |
| 121 | + | standard output. Requires `--incremental`. | |
| 122 | + | ||
| 123 | + | --base=<checksum>:: | |
| 124 | + | Specify the checksum of an existing MIDX layer to use | |
| 125 | + | as the base for the compacted result, instead of using | |
| 126 | + | the immediate parent of `<from>`. The special value | |
| 127 | + | `none` indicates that the result should have no base. | |
| 128 | + | -- | |
| 129 | + | + | |
| 130 | + | Note that the compact command requires writing a version-2 midx that | |
| 131 | + | cannot be read by versions of Git prior to v2.54. | |
| 77 | 132 | ||
| 78 | 133 | verify:: | |
| 79 | 134 | Verify the contents of the MIDX file. | |
modified Documentation/git-p4.adoc
| @@ -66,6 +66,7 @@ Clone | |||
| 66 | 66 | ~~~~~ | |
| 67 | 67 | Generally, 'git p4 clone' is used to create a new Git directory | |
| 68 | 68 | from an existing p4 repository: | |
| 69 | + | ||
| 69 | 70 | ------------ | |
| 70 | 71 | $ git p4 clone //depot/path/project | |
| 71 | 72 | ------------ | |
modified Documentation/git-pack-objects.adoc
| @@ -10,13 +10,13 @@ SYNOPSIS | |||
| 10 | 10 | -------- | |
| 11 | 11 | [verse] | |
| 12 | 12 | 'git pack-objects' [-q | --progress | --all-progress] [--all-progress-implied] | |
| 13 | - | [--no-reuse-delta] [--delta-base-offset] [--non-empty] | |
| 14 | - | [--local] [--incremental] [--window=<n>] [--depth=<n>] | |
| 15 | - | [--revs [--unpacked | --all]] [--keep-pack=<pack-name>] | |
| 16 | - | [--cruft] [--cruft-expiration=<time>] | |
| 17 | - | [--stdout [--filter=<filter-spec>] | <base-name>] | |
| 18 | - | [--shallow] [--keep-true-parents] [--[no-]sparse] | |
| 19 | - | [--name-hash-version=<n>] < <object-list> | |
| 13 | + | [--no-reuse-delta] [--delta-base-offset] [--non-empty] | |
| 14 | + | [--local] [--incremental] [--window=<n>] [--depth=<n>] | |
| 15 | + | [--revs [--unpacked | --all]] [--keep-pack=<pack-name>] | |
| 16 | + | [--cruft] [--cruft-expiration=<time>] | |
| 17 | + | [--stdout [--filter=<filter-spec>] | <base-name>] | |
| 18 | + | [--shallow] [--keep-true-parents] [--[no-]sparse] | |
| 19 | + | [--name-hash-version=<n>] [--path-walk] < <object-list> | |
| 20 | 20 | ||
| 21 | 21 | ||
| 22 | 22 | DESCRIPTION | |
| @@ -87,13 +87,32 @@ base-name:: | |||
| 87 | 87 | reference was included in the resulting packfile. This | |
| 88 | 88 | can be useful to send new tags to native Git clients. | |
| 89 | 89 | ||
| 90 | - | --stdin-packs:: | |
| 90 | + | --stdin-packs[=<mode>]:: | |
| 91 | 91 | Read the basenames of packfiles (e.g., `pack-1234abcd.pack`) | |
| 92 | 92 | from the standard input, instead of object names or revision | |
| 93 | 93 | arguments. The resulting pack contains all objects listed in the | |
| 94 | 94 | included packs (those not beginning with `^`), excluding any | |
| 95 | 95 | objects listed in the excluded packs (beginning with `^`). | |
| 96 | 96 | + | |
| 97 | + | When `mode` is "follow" packs may additionally be prefixed with `!`, | |
| 98 | + | indicating that they are excluded but not necessarily closed under | |
| 99 | + | reachability. In addition to objects in included packs, the resulting | |
| 100 | + | pack may include additional objects based on the following: | |
| 101 | + | + | |
| 102 | + | -- | |
| 103 | + | * If any packs are marked with `!`, then objects reachable from such | |
| 104 | + | packs or included ones via objects outside of excluded-closed packs | |
| 105 | + | will be included. In this case, all `^` packs are treated as closed | |
| 106 | + | under reachability. | |
| 107 | + | * Otherwise (if there are no `!` packs), objects within unlisted packs | |
| 108 | + | will be included if those objects are (1) reachable from the | |
| 109 | + | included packs, and (2) not found in any excluded packs. | |
| 110 | + | -- | |
| 111 | + | + | |
| 112 | + | This mode is useful, for example, to resurrect once-unreachable | |
| 113 | + | objects found in cruft packs to generate packs which are closed under | |
| 114 | + | reachability up to the boundary set by the excluded packs. | |
| 115 | + | + | |
| 97 | 116 | Incompatible with `--revs`, or options that imply `--revs` (such as | |
| 98 | 117 | `--all`), with the exception of `--unpacked`, which is compatible. | |
| 99 | 118 | ||
| @@ -235,7 +254,8 @@ depth is 4095. | |||
| 235 | 254 | Add --no-reuse-object if you want to force a uniform compression | |
| 236 | 255 | level on all data no matter the source. | |
| 237 | 256 | ||
| 238 | - | --[no-]sparse:: | |
| 257 | + | --sparse:: | |
| 258 | + | --no-sparse:: | |
| 239 | 259 | Toggle the "sparse" algorithm to determine which objects to include in | |
| 240 | 260 | the pack, when combined with the "--revs" option. This algorithm | |
| 241 | 261 | only walks trees that appear in paths that introduce new objects. | |
| @@ -375,6 +395,21 @@ many different directories. At the moment, this version is not allowed | |||
| 375 | 395 | when writing reachability bitmap files with `--write-bitmap-index` and it | |
| 376 | 396 | will be automatically changed to version `1`. | |
| 377 | 397 | ||
| 398 | + | --path-walk:: | |
| 399 | + | Perform compression by first organizing objects by path, then a | |
| 400 | + | second pass that compresses across paths as normal. This has the | |
| 401 | + | potential to improve delta compression especially in the presence | |
| 402 | + | of filenames that cause collisions in Git's default name-hash | |
| 403 | + | algorithm. | |
| 404 | + | + | |
| 405 | + | When `--use-bitmap-index` is specified with `--path-walk`, a successful | |
| 406 | + | bitmap traversal is used for object enumeration, with path-walk | |
| 407 | + | remaining as the fallback traversal when the bitmap cannot satisfy the | |
| 408 | + | request. The `--path-walk` option supports the `--filter=<spec>` forms | |
| 409 | + | `blob:none`, `blob:limit=<n>`, `tree:0`, `object:type=<type>`, and | |
| 410 | + | `sparse:<oid>`. These supported filter types can be combined with the | |
| 411 | + | `combine:<spec>+<spec>` form. | |
| 412 | + | ||
| 378 | 413 | ||
| 379 | 414 | DELTA ISLANDS | |
| 380 | 415 | ------------- | |
modified Documentation/git-pack-refs.adoc
| @@ -45,55 +45,7 @@ unpacked. | |||
| 45 | 45 | OPTIONS | |
| 46 | 46 | ------- | |
| 47 | 47 | ||
| 48 | - | --all:: | |
| 49 | - | ||
| 50 | - | The command by default packs all tags and refs that are already | |
| 51 | - | packed, and leaves other refs | |
| 52 | - | alone. This is because branches are expected to be actively | |
| 53 | - | developed and packing their tips does not help performance. | |
| 54 | - | This option causes all refs to be packed as well, with the exception | |
| 55 | - | of hidden refs, broken refs, and symbolic refs. Useful for a repository | |
| 56 | - | with many branches of historical interests. | |
| 57 | - | ||
| 58 | - | --no-prune:: | |
| 59 | - | ||
| 60 | - | The command usually removes loose refs under `$GIT_DIR/refs` | |
| 61 | - | hierarchy after packing them. This option tells it not to. | |
| 62 | - | ||
| 63 | - | --auto:: | |
| 64 | - | ||
| 65 | - | Pack refs as needed depending on the current state of the ref database. The | |
| 66 | - | behavior depends on the ref format used by the repository and may change in the | |
| 67 | - | future. | |
| 68 | - | + | |
| 69 | - | - "files": No special handling for `--auto` has been implemented. | |
| 70 | - | + | |
| 71 | - | - "reftable": Tables are compacted such that they form a geometric | |
| 72 | - | sequence. For two tables N and N+1, where N+1 is newer, this | |
| 73 | - | maintains the property that N is at least twice as big as N+1. Only | |
| 74 | - | tables that violate this property are compacted. | |
| 75 | - | ||
| 76 | - | --include <pattern>:: | |
| 77 | - | ||
| 78 | - | Pack refs based on a `glob(7)` pattern. Repetitions of this option | |
| 79 | - | accumulate inclusion patterns. If a ref is both included in `--include` and | |
| 80 | - | `--exclude`, `--exclude` takes precedence. Using `--include` will preclude all | |
| 81 | - | tags from being included by default. Symbolic refs and broken refs will never | |
| 82 | - | be packed. When used with `--all`, it will be a noop. Use `--no-include` to clear | |
| 83 | - | and reset the list of patterns. | |
| 84 | - | ||
| 85 | - | --exclude <pattern>:: | |
| 86 | - | ||
| 87 | - | Do not pack refs matching the given `glob(7)` pattern. Repetitions of this option | |
| 88 | - | accumulate exclusion patterns. Use `--no-exclude` to clear and reset the list of | |
| 89 | - | patterns. If a ref is already packed, including it with `--exclude` will not | |
| 90 | - | unpack it. | |
| 91 | - | + | |
| 92 | - | When used with `--all`, pack only loose refs which do not match any of | |
| 93 | - | the provided `--exclude` patterns. | |
| 94 | - | + | |
| 95 | - | When used with `--include`, refs provided to `--include`, minus refs that are | |
| 96 | - | provided to `--exclude` will be packed. | |
| 48 | + | include::pack-refs-options.adoc[] | |
| 97 | 49 | ||
| 98 | 50 | ||
| 99 | 51 | BUGS | |
modified Documentation/git-patch-id.adoc
| @@ -3,16 +3,16 @@ git-patch-id(1) | |||
| 3 | 3 | ||
| 4 | 4 | NAME | |
| 5 | 5 | ---- | |
| 6 | - | git-patch-id - Compute unique ID for a patch | |
| 6 | + | git-patch-id - Compute unique IDs for patches | |
| 7 | 7 | ||
| 8 | 8 | SYNOPSIS | |
| 9 | 9 | -------- | |
| 10 | - | [verse] | |
| 11 | - | 'git patch-id' [--stable | --unstable | --verbatim] | |
| 10 | + | [synopsis] | |
| 11 | + | git patch-id [--stable | --unstable | --verbatim] | |
| 12 | 12 | ||
| 13 | 13 | DESCRIPTION | |
| 14 | 14 | ----------- | |
| 15 | - | Read a patch from the standard input and compute the patch ID for it. | |
| 15 | + | Read patches from standard input and compute the patch IDs. | |
| 16 | 16 | ||
| 17 | 17 | A "patch ID" is nothing but a sum of SHA-1 of the file diffs associated with a | |
| 18 | 18 | patch, with line numbers ignored. As such, it's "reasonably stable", but at | |
| @@ -21,48 +21,96 @@ the same time also reasonably unique, i.e., two patches that have the same | |||
| 21 | 21 | ||
| 22 | 22 | The main usecase for this command is to look for likely duplicate commits. | |
| 23 | 23 | ||
| 24 | - | When dealing with 'git diff-tree' output, it takes advantage of | |
| 24 | + | When dealing with `git diff-tree --patch` output, it takes advantage of | |
| 25 | 25 | the fact that the patch is prefixed with the object name of the | |
| 26 | 26 | commit, and outputs two 40-byte hexadecimal strings. The first | |
| 27 | 27 | string is the patch ID, and the second string is the commit ID. | |
| 28 | - | This can be used to make a mapping from patch ID to commit ID. | |
| 28 | + | This can be used to make a mapping from patch ID to commit ID for a | |
| 29 | + | set or range of commits. | |
| 29 | 30 | ||
| 30 | 31 | OPTIONS | |
| 31 | 32 | ------- | |
| 32 | 33 | ||
| 33 | - | --verbatim:: | |
| 34 | - | Calculate the patch-id of the input as it is given, do not strip | |
| 35 | - | any whitespace. | |
| 34 | + | `--verbatim`:: | |
| 35 | + | Calculate the patch ID of the input as it is given, do not strip | |
| 36 | + | any whitespace. Implies `--stable` and forbids `--unstable`. | |
| 37 | + | + | |
| 38 | + | This is the default if `patchid.verbatim` is `true`. | |
| 36 | 39 | ||
| 37 | - | This is the default if patchid.verbatim is true. | |
| 38 | - | ||
| 39 | - | --stable:: | |
| 40 | + | `--stable`:: | |
| 40 | 41 | Use a "stable" sum of hashes as the patch ID. With this option: | |
| 41 | - | - Reordering file diffs that make up a patch does not affect the ID. | |
| 42 | - | In particular, two patches produced by comparing the same two trees | |
| 43 | - | with two different settings for "-O<orderfile>" result in the same | |
| 44 | - | patch ID signature, thereby allowing the computed result to be used | |
| 45 | - | as a key to index some meta-information about the change between | |
| 46 | - | the two trees; | |
| 42 | + | + | |
| 43 | + | -- | |
| 44 | + | - Reordering file diffs that make up a patch does not affect the ID. | |
| 45 | + | In particular, two patches produced by comparing the same two trees | |
| 46 | + | with two different settings for `-O<orderfile>` result in the same | |
| 47 | + | patch ID signature, thereby allowing the computed result to be used | |
| 48 | + | as a key to index some meta-information about the change between | |
| 49 | + | the two trees. | |
| 50 | + | ||
| 51 | + | - The result is different from the value produced by Git 1.9 and older | |
| 52 | + | or produced when an "unstable" hash (see `--unstable` below) is | |
| 53 | + | configured - even when used on a diff output taken without any use | |
| 54 | + | of `-O<orderfile>`, thereby making existing databases storing such | |
| 55 | + | "unstable" or historical patch IDs unusable. | |
| 56 | + | ||
| 57 | + | - All whitespace within the patch is ignored and does not affect the ID. | |
| 58 | + | -- | |
| 59 | + | + | |
| 60 | + | This is the default if `patchid.stable` is set to `true`. | |
| 61 | + | ||
| 62 | + | `--unstable`:: | |
| 63 | + | Use an "unstable" hash as the patch ID. With this option, | |
| 64 | + | the result produced is compatible with the patch ID value produced | |
| 65 | + | by Git 1.9 and older and whitespace is ignored. Users with pre-existing | |
| 66 | + | databases storing patch IDs produced by Git 1.9 and older (who do not deal | |
| 67 | + | with reordered patches) may want to use this option. | |
| 68 | + | + | |
| 69 | + | This is the default. | |
| 47 | 70 | ||
| 48 | - | - Result is different from the value produced by git 1.9 and older | |
| 49 | - | or produced when an "unstable" hash (see --unstable below) is | |
| 50 | - | configured - even when used on a diff output taken without any use | |
| 51 | - | of "-O<orderfile>", thereby making existing databases storing such | |
| 52 | - | "unstable" or historical patch-ids unusable. | |
| 71 | + | EXAMPLES | |
| 72 | + | -------- | |
| 53 | 73 | ||
| 54 | - | - All whitespace within the patch is ignored and does not affect the id. | |
| 74 | + | linkgit:git-cherry[1] shows what commits from a branch have patch ID | |
| 75 | + | equivalent commits in some upstream branch. But it only tells you | |
| 76 | + | whether such a commit exists or not. What if you wanted to know the | |
| 77 | + | relevant commits in the upstream? We can use this command to make a | |
| 78 | + | mapping between your branch and the upstream branch: | |
| 55 | 79 | ||
| 56 | - | This is the default if patchid.stable is set to true. | |
| 80 | + | ---- | |
| 81 | + | #!/bin/sh | |
| 82 | + | ||
| 83 | + | upstream="$1" | |
| 84 | + | branch="$2" | |
| 85 | + | test -z "$branch" && branch=HEAD | |
| 86 | + | limit="$3" | |
| 87 | + | if test -n "$limit" | |
| 88 | + | then | |
| 89 | + | tail_opts="$limit".."$upstream" | |
| 90 | + | else | |
| 91 | + | since=$(git log --format=%aI "$upstream".."$branch" | tail -1) | |
| 92 | + | tail_opts=--since="$since"' '"$upstream" | |
| 93 | + | fi | |
| 94 | + | for_branch=$(mktemp) | |
| 95 | + | for_upstream=$(mktemp) | |
| 96 | + | ||
| 97 | + | git rev-list --no-merges "$upstream".."$branch" | | |
| 98 | + | git diff-tree --patch --stdin | | |
| 99 | + | git patch-id --stable | sort >"$for_branch" | |
| 100 | + | git rev-list --no-merges $tail_opts | | |
| 101 | + | git diff-tree --patch --stdin | | |
| 102 | + | git patch-id --stable | sort >"$for_upstream" | |
| 103 | + | join -a1 "$for_branch" "$for_upstream" | cut -d' ' -f2,3 | |
| 104 | + | rm "$for_branch" | |
| 105 | + | rm "$for_upstream" | |
| 106 | + | ---- | |
| 57 | 107 | ||
| 58 | - | --unstable:: | |
| 59 | - | Use an "unstable" hash as the patch ID. With this option, | |
| 60 | - | the result produced is compatible with the patch-id value produced | |
| 61 | - | by git 1.9 and older and whitespace is ignored. Users with pre-existing | |
| 62 | - | databases storing patch-ids produced by git 1.9 and older (who do not deal | |
| 63 | - | with reordered patches) may want to use this option. | |
| 108 | + | Now the first column shows the commit from your branch and the second | |
| 109 | + | column shows the patch ID equivalent commit, if it exists. | |
| 64 | 110 | ||
| 65 | - | This is the default. | |
| 111 | + | SEE ALSO | |
| 112 | + | -------- | |
| 113 | + | linkgit:git-cherry[1] | |
| 66 | 114 | ||
| 67 | 115 | GIT | |
| 68 | 116 | --- | |
modified Documentation/git-pull.adoc
| @@ -8,86 +8,73 @@ git-pull - Fetch from and integrate with another repository or a local branch | |||
| 8 | 8 | ||
| 9 | 9 | SYNOPSIS | |
| 10 | 10 | -------- | |
| 11 | - | [verse] | |
| 12 | - | 'git pull' [<options>] [<repository> [<refspec>...]] | |
| 11 | + | [synopsis] | |
| 12 | + | git pull [<options>] [<repository> [<refspec>...]] | |
| 13 | 13 | ||
| 14 | 14 | ||
| 15 | 15 | DESCRIPTION | |
| 16 | 16 | ----------- | |
| 17 | 17 | ||
| 18 | - | Incorporates changes from a remote repository into the current branch. | |
| 19 | - | If the current branch is behind the remote, then by default it will | |
| 20 | - | fast-forward the current branch to match the remote. If the current | |
| 21 | - | branch and the remote have diverged, the user needs to specify how to | |
| 22 | - | reconcile the divergent branches with `--rebase` or `--no-rebase` (or | |
| 23 | - | the corresponding configuration option in `pull.rebase`). | |
| 18 | + | Integrate changes from a remote repository into the current branch. | |
| 24 | 19 | ||
| 25 | - | More precisely, `git pull` runs `git fetch` with the given parameters | |
| 26 | - | and then depending on configuration options or command line flags, | |
| 27 | - | will call either `git rebase` or `git merge` to reconcile diverging | |
| 28 | - | branches. | |
| 20 | + | First, `git pull` runs `git fetch` with the same arguments | |
| 21 | + | (excluding merge options) to fetch remote branch(es). | |
| 22 | + | Then it decides which remote branch to integrate: if you run `git pull` | |
| 23 | + | with no arguments this defaults to the <<UPSTREAM-BRANCHES,upstream>> | |
| 24 | + | for the current branch. | |
| 25 | + | Then it integrates that branch into the current branch. | |
| 29 | 26 | ||
| 30 | - | <repository> should be the name of a remote repository as | |
| 31 | - | passed to linkgit:git-fetch[1]. <refspec> can name an | |
| 32 | - | arbitrary remote ref (for example, the name of a tag) or even | |
| 33 | - | a collection of refs with corresponding remote-tracking branches | |
| 34 | - | (e.g., refs/heads/{asterisk}:refs/remotes/origin/{asterisk}), | |
| 35 | - | but usually it is the name of a branch in the remote repository. | |
| 27 | + | There are 4 main options for integrating the remote branch: | |
| 36 | 28 | ||
| 37 | - | Default values for <repository> and <branch> are read from the | |
| 38 | - | "remote" and "merge" configuration for the current branch | |
| 39 | - | as set by linkgit:git-branch[1] `--track`. | |
| 29 | + | 1. `git pull --ff-only` will only do "fast-forward" updates: it | |
| 30 | + | fails if your local branch has diverged from the remote branch. | |
| 31 | + | This is the default. | |
| 32 | + | 2. `git pull --rebase` runs `git rebase` | |
| 33 | + | 3. `git pull --no-rebase` runs `git merge`. | |
| 34 | + | 4. `git pull --squash` runs `git merge --squash` | |
| 40 | 35 | ||
| 41 | - | Assume the following history exists and the current branch is | |
| 42 | - | "`master`": | |
| 36 | + | You can also set the configuration options `pull.rebase`, `pull.squash`, | |
| 37 | + | or `pull.ff` with your preferred behaviour. | |
| 43 | 38 | ||
| 44 | - | ------------ | |
| 45 | - | A---B---C master on origin | |
| 46 | - | / | |
| 47 | - | D---E---F---G master | |
| 48 | - | ^ | |
| 49 | - | origin/master in your repository | |
| 50 | - | ------------ | |
| 51 | - | ||
| 52 | - | Then "`git pull`" will fetch and replay the changes from the remote | |
| 53 | - | `master` branch since it diverged from the local `master` (i.e., `E`) | |
| 54 | - | until its current commit (`C`) on top of `master` and record the | |
| 55 | - | result in a new commit along with the names of the two parent commits | |
| 56 | - | and a log message from the user describing the changes. | |
| 57 | - | ||
| 58 | - | ------------ | |
| 59 | - | A---B---C origin/master | |
| 60 | - | / \ | |
| 61 | - | D---E---F---G---H master | |
| 62 | - | ------------ | |
| 63 | - | ||
| 64 | - | See linkgit:git-merge[1] for details, including how conflicts | |
| 65 | - | are presented and handled. | |
| 66 | - | ||
| 67 | - | In Git 1.7.0 or later, to cancel a conflicting merge, use | |
| 68 | - | `git reset --merge`. *Warning*: In older versions of Git, running 'git pull' | |
| 69 | - | with uncommitted changes is discouraged: while possible, it leaves you | |
| 70 | - | in a state that may be hard to back out of in the case of a conflict. | |
| 71 | - | ||
| 72 | - | If any of the remote changes overlap with local uncommitted changes, | |
| 73 | - | the merge will be automatically canceled and the work tree untouched. | |
| 74 | - | It is generally best to get any local changes in working order before | |
| 75 | - | pulling or stash them away with linkgit:git-stash[1]. | |
| 39 | + | If there's a merge conflict during the merge or rebase that you don't | |
| 40 | + | want to handle, you can safely abort it with `git merge --abort` or | |
| 41 | + | `git rebase --abort`. | |
| 76 | 42 | ||
| 77 | 43 | OPTIONS | |
| 78 | 44 | ------- | |
| 79 | 45 | ||
| 80 | - | -q:: | |
| 81 | - | --quiet:: | |
| 46 | + | _<repository>_:: | |
| 47 | + | The "remote" repository to pull from. This can be either | |
| 48 | + | a URL (see the section <<URLS,GIT URLS>> below) or the name | |
| 49 | + | of a remote (see the section <<REMOTES,REMOTES>> below). | |
| 50 | + | + | |
| 51 | + | Defaults to the configured upstream for the current branch, or `origin`. | |
| 52 | + | See <<UPSTREAM-BRANCHES,UPSTREAM BRANCHES>> below for more on how to | |
| 53 | + | configure upstreams. | |
| 54 | + | ||
| 55 | + | _<refspec>_:: | |
| 56 | + | Which branch or other reference(s) to fetch and integrate into the | |
| 57 | + | current branch, for example `main` in `git pull origin main`. | |
| 58 | + | Defaults to the configured upstream for the current branch. | |
| 59 | + | + | |
| 60 | + | This can be a branch, tag, or other collection of reference(s). | |
| 61 | + | See <<fetch-refspec,_<refspec>_>> below under "Options related to fetching" | |
| 62 | + | for the full syntax, and <<DEFAULT-BEHAVIOUR,DEFAULT BEHAVIOUR>> below | |
| 63 | + | for how `git pull` uses this argument to determine which remote branch | |
| 64 | + | to integrate. | |
| 65 | + | ||
| 66 | + | `-q`:: | |
| 67 | + | `--quiet`:: | |
| 82 | 68 | This is passed to both underlying git-fetch to squelch reporting of | |
| 83 | 69 | during transfer, and underlying git-merge to squelch output during | |
| 84 | 70 | merging. | |
| 85 | 71 | ||
| 86 | - | -v:: | |
| 87 | - | --verbose:: | |
| 88 | - | Pass --verbose to git-fetch and git-merge. | |
| 72 | + | `-v`:: | |
| 73 | + | `--verbose`:: | |
| 74 | + | Pass `--verbose` to git-fetch and git-merge. | |
| 89 | 75 | ||
| 90 | - | --[no-]recurse-submodules[=(yes|on-demand|no)]:: | |
| 76 | + | `--recurse-submodules[=(yes|on-demand|no)]`:: | |
| 77 | + | `--no-recurse-submodules`:: | |
| 91 | 78 | This option controls if new commits of populated submodules should | |
| 92 | 79 | be fetched, and if the working trees of active submodules should be | |
| 93 | 80 | updated, too (see linkgit:git-fetch[1], linkgit:git-config[1] and | |
| @@ -104,21 +91,20 @@ Options related to merging | |||
| 104 | 91 | ||
| 105 | 92 | include::merge-options.adoc[] | |
| 106 | 93 | ||
| 107 | - | -r:: | |
| 108 | - | --rebase[=(false|true|merges|interactive)]:: | |
| 109 | - | When true, rebase the current branch on top of the upstream | |
| 94 | + | `-r`:: | |
| 95 | + | `--rebase[=(true|merges|false|interactive)]`:: | |
| 96 | + | `true`;; rebase the current branch on top of the upstream | |
| 110 | 97 | branch after fetching. If there is a remote-tracking branch | |
| 111 | 98 | corresponding to the upstream branch and the upstream branch | |
| 112 | 99 | was rebased since last fetched, the rebase uses that information | |
| 113 | - | to avoid rebasing non-local changes. | |
| 114 | - | + | |
| 115 | - | When set to `merges`, rebase using `git rebase --rebase-merges` so that | |
| 100 | + | to avoid rebasing non-local changes. This is the default. | |
| 101 | + | ||
| 102 | + | `merges`;; rebase using `git rebase --rebase-merges` so that | |
| 116 | 103 | the local merge commits are included in the rebase (see | |
| 117 | 104 | linkgit:git-rebase[1] for details). | |
| 118 | - | + | |
| 119 | - | When false, merge the upstream branch into the current branch. | |
| 120 | - | + | |
| 121 | - | When `interactive`, enable the interactive mode of rebase. | |
| 105 | + | `false`;; merge the upstream branch into the current branch. | |
| 106 | + | `interactive`;; enable the interactive mode of rebase. | |
| 107 | + | ||
| 122 | 108 | + | |
| 123 | 109 | See `pull.rebase`, `branch.<name>.rebase` and `branch.autoSetupRebase` in | |
| 124 | 110 | linkgit:git-config[1] if you want to make `git pull` always use | |
| @@ -130,8 +116,8 @@ It rewrites history, which does not bode well when you | |||
| 130 | 116 | published that history already. Do *not* use this option | |
| 131 | 117 | unless you have read linkgit:git-rebase[1] carefully. | |
| 132 | 118 | ||
| 133 | - | --no-rebase:: | |
| 134 | - | This is shorthand for --rebase=false. | |
| 119 | + | `--no-rebase`:: | |
| 120 | + | This is shorthand for `--rebase=false`. | |
| 135 | 121 | ||
| 136 | 122 | Options related to fetching | |
| 137 | 123 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
| @@ -144,6 +130,7 @@ include::urls-remotes.adoc[] | |||
| 144 | 130 | ||
| 145 | 131 | include::merge-strategies.adoc[] | |
| 146 | 132 | ||
| 133 | + | [[DEFAULT-BEHAVIOUR]] | |
| 147 | 134 | DEFAULT BEHAVIOUR | |
| 148 | 135 | ----------------- | |
| 149 | 136 | ||
| @@ -190,7 +177,7 @@ uses the refspec from the configuration or | |||
| 190 | 177 | rules apply: | |
| 191 | 178 | ||
| 192 | 179 | . If `branch.<name>.merge` configuration for the current | |
| 193 | - | branch `<name>` exists, that is the name of the branch at the | |
| 180 | + | branch _<name>_ exists, that is the name of the branch at the | |
| 194 | 181 | remote site that is merged. | |
| 195 | 182 | ||
| 196 | 183 | . If the refspec is a globbing one, nothing is merged. | |
| @@ -210,9 +197,9 @@ $ git pull | |||
| 210 | 197 | $ git pull origin | |
| 211 | 198 | ------------------------------------------------ | |
| 212 | 199 | + | |
| 213 | - | Normally the branch merged in is the HEAD of the remote repository, | |
| 214 | - | but the choice is determined by the branch.<name>.remote and | |
| 215 | - | branch.<name>.merge options; see linkgit:git-config[1] for details. | |
| 200 | + | Normally the branch merged in is the `HEAD` of the remote repository, | |
| 201 | + | but the choice is determined by the `branch.<name>.remote` and | |
| 202 | + | `branch.<name>.merge` options; see linkgit:git-config[1] for details. | |
| 216 | 203 | ||
| 217 | 204 | * Merge into the current branch the remote branch `next`: | |
| 218 | 205 | + | |
| @@ -220,7 +207,7 @@ branch.<name>.merge options; see linkgit:git-config[1] for details. | |||
| 220 | 207 | $ git pull origin next | |
| 221 | 208 | ------------------------------------------------ | |
| 222 | 209 | + | |
| 223 | - | This leaves a copy of `next` temporarily in FETCH_HEAD, and | |
| 210 | + | This leaves a copy of `next` temporarily in `FETCH_HEAD`, and | |
| 224 | 211 | updates the remote-tracking branch `origin/next`. | |
| 225 | 212 | The same can be done by invoking fetch and merge: | |
| 226 | 213 | + | |
| @@ -231,14 +218,14 @@ $ git merge origin/next | |||
| 231 | 218 | ||
| 232 | 219 | ||
| 233 | 220 | If you tried a pull which resulted in complex conflicts and | |
| 234 | - | would want to start over, you can recover with 'git reset'. | |
| 221 | + | would want to start over, you can recover with `git reset`. | |
| 235 | 222 | ||
| 236 | 223 | ||
| 237 | 224 | include::transfer-data-leaks.adoc[] | |
| 238 | 225 | ||
| 239 | 226 | BUGS | |
| 240 | 227 | ---- | |
| 241 | - | Using --recurse-submodules can only fetch new commits in already checked | |
| 228 | + | Using `--recurse-submodules` can only fetch new commits in already checked | |
| 242 | 229 | out submodules right now. When e.g. upstream added a new submodule in the | |
| 243 | 230 | just fetched commits of the superproject the submodule itself cannot be | |
| 244 | 231 | fetched, making it impossible to check out that submodule later without | |
modified Documentation/git-push.adoc
| @@ -8,150 +8,138 @@ git-push - Update remote refs along with associated objects | |||
| 8 | 8 | ||
| 9 | 9 | SYNOPSIS | |
| 10 | 10 | -------- | |
| 11 | - | [verse] | |
| 12 | - | 'git push' [--all | --branches | --mirror | --tags] [--follow-tags] [--atomic] [-n | --dry-run] [--receive-pack=<git-receive-pack>] | |
| 13 | - | [--repo=<repository>] [-f | --force] [-d | --delete] [--prune] [-q | --quiet] [-v | --verbose] | |
| 14 | - | [-u | --set-upstream] [-o <string> | --push-option=<string>] | |
| 15 | - | [--[no-]signed|--signed=(true|false|if-asked)] | |
| 16 | - | [--force-with-lease[=<refname>[:<expect>]] [--force-if-includes]] | |
| 17 | - | [--no-verify] [<repository> [<refspec>...]] | |
| 11 | + | [synopsis] | |
| 12 | + | git push [--all | --branches | --mirror | --tags] [--follow-tags] [--atomic] [-n | --dry-run] [--receive-pack=<git-receive-pack>] | |
| 13 | + | [--repo=<repository>] [-f | --force] [-d | --delete] [--prune] [-q | --quiet] [-v | --verbose] | |
| 14 | + | [-u | --set-upstream] [-o <string> | --push-option=<string>] | |
| 15 | + | [--[no-]signed | --signed=(true|false|if-asked)] | |
| 16 | + | [--force-with-lease[=<refname>[:<expect>]] [--force-if-includes]] | |
| 17 | + | [--no-verify] [<repository> [<refspec>...]] | |
| 18 | 18 | ||
| 19 | 19 | DESCRIPTION | |
| 20 | 20 | ----------- | |
| 21 | + | Updates one or more branches, tags, or other references in one or more | |
| 22 | + | remote repositories from your local repository, and sends all necessary | |
| 23 | + | data that isn't already on the remote. | |
| 21 | 24 | ||
| 22 | - | Updates remote refs using local refs, while sending objects | |
| 23 | - | necessary to complete the given refs. | |
| 25 | + | The simplest way to push is `git push <remote> <branch>`. | |
| 26 | + | `git push origin main` will push the local `main` branch to the `main` | |
| 27 | + | branch on the remote named `origin`. | |
| 24 | 28 | ||
| 25 | - | You can make interesting things happen to a repository | |
| 26 | - | every time you push into it, by setting up 'hooks' there. See | |
| 27 | - | documentation for linkgit:git-receive-pack[1]. | |
| 29 | + | You can also push to multiple remotes at once by using a remote group. | |
| 30 | + | A remote group is a named list of remotes configured via `remotes.<name>` | |
| 31 | + | in your git config: | |
| 28 | 32 | ||
| 29 | - | When the command line does not specify where to push with the | |
| 30 | - | `<repository>` argument, `branch.*.remote` configuration for the | |
| 31 | - | current branch is consulted to determine where to push. If the | |
| 32 | - | configuration is missing, it defaults to 'origin'. | |
| 33 | + | $ git config remotes.all-remotes "origin gitlab backup" | |
| 33 | 34 | ||
| 34 | - | When the command line does not specify what to push with `<refspec>...` | |
| 35 | - | arguments or `--all`, `--mirror`, `--tags` options, the command finds | |
| 36 | - | the default `<refspec>` by consulting `remote.*.push` configuration, | |
| 37 | - | and if it is not found, honors `push.default` configuration to decide | |
| 38 | - | what to push (See linkgit:git-config[1] for the meaning of `push.default`). | |
| 35 | + | Then `git push all-remotes` will push to `origin`, `gitlab`, and | |
| 36 | + | `backup` in turn, as if you had run `git push` against each one | |
| 37 | + | individually. Each remote is pushed independently using its own | |
| 38 | + | push mapping configuration. There is a `remotes.<group>` entry in | |
| 39 | + | the configuration file. (See linkgit:git-config[1]). | |
| 39 | 40 | ||
| 40 | - | When neither the command-line nor the configuration specifies what to | |
| 41 | - | push, the default behavior is used, which corresponds to the `simple` | |
| 42 | - | value for `push.default`: the current branch is pushed to the | |
| 43 | - | corresponding upstream branch, but as a safety measure, the push is | |
| 44 | - | aborted if the upstream branch does not have the same name as the | |
| 45 | - | local one. | |
| 41 | + | The `<repository>` argument defaults to the upstream for the current | |
| 42 | + | branch, or `origin` if there's no configured upstream. | |
| 46 | 43 | ||
| 44 | + | To decide which branches, tags, or other refs to push, Git uses | |
| 45 | + | (in order of precedence): | |
| 47 | 46 | ||
| 48 | - | OPTIONS[[OPTIONS]] | |
| 49 | - | ------------------ | |
| 50 | - | <repository>:: | |
| 51 | - | The "remote" repository that is the destination of a push | |
| 52 | - | operation. This parameter can be either a URL | |
| 53 | - | (see the section <<URLS,GIT URLS>> below) or the name | |
| 54 | - | of a remote (see the section <<REMOTES,REMOTES>> below). | |
| 47 | + | 1. The `<refspec>` argument(s) (for example `main` in `git push origin main`) | |
| 48 | + | or the `--all`, `--mirror`, or `--tags` options | |
| 49 | + | 2. The `remote.<name>.push` configuration for the repository being pushed to | |
| 50 | + | 3. The `push.default` configuration. The default is `push.default=simple`, | |
| 51 | + | which will push to a branch with the same name as the current branch. | |
| 52 | + | See the <<CONFIGURATION,CONFIGURATION>> section below for more on `push.default`. | |
| 55 | 53 | ||
| 56 | - | <refspec>...:: | |
| 57 | - | Specify what destination ref to update with what source object. | |
| 58 | - | The format of a <refspec> parameter is an optional plus | |
| 59 | - | `+`, followed by the source object <src>, followed | |
| 60 | - | by a colon `:`, followed by the destination ref <dst>. | |
| 61 | - | + | |
| 62 | - | The <src> is often the name of the branch you would want to push, but | |
| 63 | - | it can be any arbitrary "SHA-1 expression", such as `master~4` or | |
| 64 | - | `HEAD` (see linkgit:gitrevisions[7]). | |
| 65 | - | + | |
| 66 | - | The <dst> tells which ref on the remote side is updated with this | |
| 67 | - | push. Arbitrary expressions cannot be used here, an actual ref must | |
| 68 | - | be named. | |
| 69 | - | If `git push [<repository>]` without any `<refspec>` argument is set to | |
| 70 | - | update some ref at the destination with `<src>` with | |
| 71 | - | `remote.<repository>.push` configuration variable, `:<dst>` part can | |
| 72 | - | be omitted--such a push will update a ref that `<src>` normally updates | |
| 73 | - | without any `<refspec>` on the command line. Otherwise, missing | |
| 74 | - | `:<dst>` means to update the same ref as the `<src>`. | |
| 75 | - | + | |
| 76 | - | If <dst> doesn't start with `refs/` (e.g. `refs/heads/master`) we will | |
| 77 | - | try to infer where in `refs/*` on the destination <repository> it | |
| 78 | - | belongs based on the type of <src> being pushed and whether <dst> | |
| 79 | - | is ambiguous. | |
| 80 | - | + | |
| 81 | - | -- | |
| 82 | - | * If <dst> unambiguously refers to a ref on the <repository> remote, | |
| 83 | - | then push to that ref. | |
| 54 | + | `git push` may fail if you haven't set an upstream for the current branch, | |
| 55 | + | depending on what `push.default` is set to. | |
| 56 | + | See the <<UPSTREAM-BRANCHES,UPSTREAM BRANCHES>> section below for more | |
| 57 | + | on how to set and use upstreams. | |
| 84 | 58 | ||
| 85 | - | * If <src> resolves to a ref starting with refs/heads/ or refs/tags/, | |
| 86 | - | then prepend that to <dst>. | |
| 59 | + | You can make interesting things happen to a repository | |
| 60 | + | every time you push into it, by setting up 'hooks' there. See | |
| 61 | + | documentation for linkgit:git-receive-pack[1]. | |
| 87 | 62 | ||
| 88 | - | * Other ambiguity resolutions might be added in the future, but for | |
| 89 | - | now any other cases will error out with an error indicating what we | |
| 90 | - | tried, and depending on the `advice.pushUnqualifiedRefname` | |
| 91 | - | configuration (see linkgit:git-config[1]) suggest what refs/ | |
| 92 | - | namespace you may have wanted to push to. | |
| 63 | + | [[OPTIONS]] | |
| 64 | + | OPTIONS | |
| 65 | + | ------- | |
| 66 | + | _<repository>_:: | |
| 67 | + | The "remote" repository that is the destination of a push | |
| 68 | + | operation. This parameter can be either a URL | |
| 69 | + | (see the section <<URLS,GIT URLS>> below), the name | |
| 70 | + | of a remote (see the section <<REMOTES,REMOTES>> below), | |
| 71 | + | or the name of a remote group | |
| 72 | + | (see the section <<REMOTE-GROUPS,REMOTE GROUPS>> below). | |
| 93 | 73 | ||
| 94 | - | -- | |
| 95 | - | + | |
| 96 | - | The object referenced by <src> is used to update the <dst> reference | |
| 97 | - | on the remote side. Whether this is allowed depends on where in | |
| 98 | - | `refs/*` the <dst> reference lives as described in detail below, in | |
| 99 | - | those sections "update" means any modifications except deletes, which | |
| 100 | - | as noted after the next few sections are treated differently. | |
| 101 | - | + | |
| 102 | - | The `refs/heads/*` namespace will only accept commit objects, and | |
| 103 | - | updates only if they can be fast-forwarded. | |
| 104 | - | + | |
| 105 | - | The `refs/tags/*` namespace will accept any kind of object (as | |
| 106 | - | commits, trees and blobs can be tagged), and any updates to them will | |
| 107 | - | be rejected. | |
| 108 | - | + | |
| 109 | - | It's possible to push any type of object to any namespace outside of | |
| 110 | - | `refs/{tags,heads}/*`. In the case of tags and commits, these will be | |
| 111 | - | treated as if they were the commits inside `refs/heads/*` for the | |
| 112 | - | purposes of whether the update is allowed. | |
| 113 | - | + | |
| 114 | - | I.e. a fast-forward of commits and tags outside `refs/{tags,heads}/*` | |
| 115 | - | is allowed, even in cases where what's being fast-forwarded is not a | |
| 116 | - | commit, but a tag object which happens to point to a new commit which | |
| 117 | - | is a fast-forward of the commit the last tag (or commit) it's | |
| 118 | - | replacing. Replacing a tag with an entirely different tag is also | |
| 119 | - | allowed, if it points to the same commit, as well as pushing a peeled | |
| 120 | - | tag, i.e. pushing the commit that existing tag object points to, or a | |
| 121 | - | new tag object which an existing commit points to. | |
| 122 | - | + | |
| 123 | - | Tree and blob objects outside of `refs/{tags,heads}/*` will be treated | |
| 124 | - | the same way as if they were inside `refs/tags/*`, any update of them | |
| 125 | - | will be rejected. | |
| 126 | - | + | |
| 127 | - | All of the rules described above about what's not allowed as an update | |
| 128 | - | can be overridden by adding an the optional leading `+` to a refspec | |
| 129 | - | (or using `--force` command line option). The only exception to this | |
| 130 | - | is that no amount of forcing will make the `refs/heads/*` namespace | |
| 131 | - | accept a non-commit object. Hooks and configuration can also override | |
| 132 | - | or amend these rules, see e.g. `receive.denyNonFastForwards` in | |
| 133 | - | linkgit:git-config[1] and `pre-receive` and `update` in | |
| 134 | - | linkgit:githooks[5]. | |
| 135 | - | + | |
| 136 | - | Pushing an empty <src> allows you to delete the <dst> ref from the | |
| 137 | - | remote repository. Deletions are always accepted without a leading `+` | |
| 138 | - | in the refspec (or `--force`), except when forbidden by configuration | |
| 139 | - | or hooks. See `receive.denyDeletes` in linkgit:git-config[1] and | |
| 140 | - | `pre-receive` and `update` in linkgit:githooks[5]. | |
| 141 | - | + | |
| 142 | - | The special refspec `:` (or `+:` to allow non-fast-forward updates) | |
| 143 | - | directs Git to push "matching" branches: for every branch that exists on | |
| 144 | - | the local side, the remote side is updated if a branch of the same name | |
| 145 | - | already exists on the remote side. | |
| 74 | + | `<refspec>...`:: | |
| 75 | + | Specify what destination ref to update with what source object. | |
| 146 | 76 | + | |
| 147 | - | `tag <tag>` means the same as `refs/tags/<tag>:refs/tags/<tag>`. | |
| 148 | - | ||
| 149 | - | --all:: | |
| 150 | - | --branches:: | |
| 77 | + | The format for a refspec is `[+]<src>[:<dst>]`, for example `main`, | |
| 78 | + | `main:other`, or `HEAD^:refs/heads/main`. | |
| 79 | + | + | |
| 80 | + | The _<src>_ is often the name of the local branch to push, but it can be | |
| 81 | + | any arbitrary "SHA-1 expression" (see linkgit:gitrevisions[7]). | |
| 82 | + | + | |
| 83 | + | The _<dst>_ determines what ref to update on the remote side. It must be the | |
| 84 | + | name of a branch, tag, or other ref, not an arbitrary expression. | |
| 85 | + | + | |
| 86 | + | The `+` is optional and does the same thing as `--force`. | |
| 87 | + | + | |
| 88 | + | You can write a refspec using the fully expanded form (for | |
| 89 | + | example `refs/heads/main:refs/heads/main`) which specifies the exact source | |
| 90 | + | and destination, or with a shorter form (for example `main` or | |
| 91 | + | `main:other`). Here are the rules for how refspecs are expanded, | |
| 92 | + | as well as various other special refspec forms: | |
| 93 | + | + | |
| 94 | + | * _<src>_ without a `:<dst>` means to update the same ref as the | |
| 95 | + | _<src>_, unless the `remote.<repository>.push` configuration specifies a | |
| 96 | + | different _<dst>_. For example, if `main` is a branch, then the refspec | |
| 97 | + | `main` expands to `main:refs/heads/main`. | |
| 98 | + | * If _<dst>_ unambiguously refers to a ref on the <repository> remote, | |
| 99 | + | then expand it to that ref. For example, if `v1.0` is a tag on the | |
| 100 | + | remote, then `HEAD:v1.0` expands to `HEAD:refs/tags/v1.0`. | |
| 101 | + | * If _<src>_ resolves to a ref starting with `refs/heads/` or `refs/tags/`, | |
| 102 | + | then prepend that to <dst>. For example, if `main` is a branch, then | |
| 103 | + | `main:other` expands to `main:refs/heads/other` | |
| 104 | + | * The special refspec `:` (or `+:` to allow non-fast-forward updates) | |
| 105 | + | directs Git to push "matching" branches: for every branch that exists on | |
| 106 | + | the local side, the remote side is updated if a branch of the same name | |
| 107 | + | already exists on the remote side. | |
| 108 | + | * _<src>_ may contain a `*` to indicate a simple pattern match. | |
| 109 | + | This works like a glob that matches any ref matching the pattern. | |
| 110 | + | There must be only one `*` in both the `<src>` and `<dst>`. | |
| 111 | + | It will map refs to the destination by replacing the * with the | |
| 112 | + | contents matched from the source. For example, `refs/heads/*:refs/heads/*` | |
| 113 | + | will push all branches. | |
| 114 | + | * A refspec starting with `^` is a negative refspec. | |
| 115 | + | This specifies refs to exclude. A ref will be considered to | |
| 116 | + | match if it matches at least one positive refspec, and does not | |
| 117 | + | match any negative refspec. Negative refspecs can be pattern refspecs. | |
| 118 | + | They must only contain a _<src>_. | |
| 119 | + | Fully spelled out hex object names are also not supported. | |
| 120 | + | For example, `git push origin 'refs/heads/*' '^refs/heads/dev-*'` | |
| 121 | + | will push all branches except for those starting with `dev-` | |
| 122 | + | * If _<src>_ is empty, it deletes the _<dst>_ ref from the remote | |
| 123 | + | repository. For example, `git push origin :dev` will | |
| 124 | + | delete the `dev` branch. | |
| 125 | + | * `tag <tag>` expands to `refs/tags/<tag>:refs/tags/<tag>`. | |
| 126 | + | This is technically a special syntax for `git push` and not a refspec, | |
| 127 | + | since in `git push origin tag v1.0` the arguments `tag` and `v1.0` | |
| 128 | + | are separate. | |
| 129 | + | * If the refspec can't be expanded unambiguously, error out | |
| 130 | + | with an error indicating what was tried, and depending | |
| 131 | + | on the `advice.pushUnqualifiedRefname` configuration (see | |
| 132 | + | linkgit:git-config[1]) suggest what refs/ namespace you may have | |
| 133 | + | wanted to push to. | |
| 134 | + | ||
| 135 | + | Not all updates are allowed: see PUSH RULES below for the details. | |
| 136 | + | ||
| 137 | + | `--all`:: | |
| 138 | + | `--branches`:: | |
| 151 | 139 | Push all branches (i.e. refs under `refs/heads/`); cannot be | |
| 152 | 140 | used with other <refspec>. | |
| 153 | 141 | ||
| 154 | - | --prune:: | |
| 142 | + | `--prune`:: | |
| 155 | 143 | Remove remote branches that don't have a local counterpart. For example | |
| 156 | 144 | a remote branch `tmp` will be removed if a local branch with the same | |
| 157 | 145 | name doesn't exist any more. This also respects refspecs, e.g. | |
| @@ -159,7 +147,7 @@ already exists on the remote side. | |||
| 159 | 147 | make sure that remote `refs/tmp/foo` will be removed if `refs/heads/foo` | |
| 160 | 148 | doesn't exist. | |
| 161 | 149 | ||
| 162 | - | --mirror:: | |
| 150 | + | `--mirror`:: | |
| 163 | 151 | Instead of naming each ref to push, specifies that all | |
| 164 | 152 | refs under `refs/` (which includes but is not | |
| 165 | 153 | limited to `refs/heads/`, `refs/remotes/`, and `refs/tags/`) | |
| @@ -170,26 +158,26 @@ already exists on the remote side. | |||
| 170 | 158 | if the configuration option `remote.<remote>.mirror` is | |
| 171 | 159 | set. | |
| 172 | 160 | ||
| 173 | - | -n:: | |
| 174 | - | --dry-run:: | |
| 161 | + | `-n`:: | |
| 162 | + | `--dry-run`:: | |
| 175 | 163 | Do everything except actually send the updates. | |
| 176 | 164 | ||
| 177 | - | --porcelain:: | |
| 165 | + | `--porcelain`:: | |
| 178 | 166 | Produce machine-readable output. The output status line for each ref | |
| 179 | 167 | will be tab-separated and sent to stdout instead of stderr. The full | |
| 180 | 168 | symbolic names of the refs will be given. | |
| 181 | 169 | ||
| 182 | - | -d:: | |
| 183 | - | --delete:: | |
| 170 | + | `-d`:: | |
| 171 | + | `--delete`:: | |
| 184 | 172 | All listed refs are deleted from the remote repository. This is | |
| 185 | 173 | the same as prefixing all refs with a colon. | |
| 186 | 174 | ||
| 187 | - | --tags:: | |
| 175 | + | `--tags`:: | |
| 188 | 176 | All refs under `refs/tags` are pushed, in | |
| 189 | 177 | addition to refspecs explicitly listed on the command | |
| 190 | 178 | line. | |
| 191 | 179 | ||
| 192 | - | --follow-tags:: | |
| 180 | + | `--follow-tags`:: | |
| 193 | 181 | Push all the refs that would be pushed without this option, | |
| 194 | 182 | and also push annotated tags in `refs/tags` that are missing | |
| 195 | 183 | from the remote but are pointing at commit-ish that are | |
| @@ -197,27 +185,34 @@ already exists on the remote side. | |||
| 197 | 185 | with configuration variable `push.followTags`. For more | |
| 198 | 186 | information, see `push.followTags` in linkgit:git-config[1]. | |
| 199 | 187 | ||
| 200 | - | --[no-]signed:: | |
| 201 | - | --signed=(true|false|if-asked):: | |
| 188 | + | `--signed`:: | |
| 189 | + | `--no-signed`:: | |
| 190 | + | `--signed=(true|false|if-asked)`:: | |
| 202 | 191 | GPG-sign the push request to update refs on the receiving | |
| 203 | 192 | side, to allow it to be checked by the hooks and/or be | |
| 204 | - | logged. If `false` or `--no-signed`, no signing will be | |
| 205 | - | attempted. If `true` or `--signed`, the push will fail if the | |
| 206 | - | server does not support signed pushes. If set to `if-asked`, | |
| 207 | - | sign if and only if the server supports signed pushes. The push | |
| 208 | - | will also fail if the actual call to `gpg --sign` fails. See | |
| 209 | - | linkgit:git-receive-pack[1] for the details on the receiving end. | |
| 210 | - | ||
| 211 | - | --[no-]atomic:: | |
| 193 | + | logged. Possible values are: | |
| 194 | + | `false`;; | |
| 195 | + | `--no-signed`;; | |
| 196 | + | no signing will be attempted. | |
| 197 | + | `true`;; | |
| 198 | + | `--signed`;; | |
| 199 | + | the push will fail if the server does not support signed pushes. | |
| 200 | + | `if-asked`;; | |
| 201 | + | sign if and only if the server supports signed pushes. The push | |
| 202 | + | will also fail if the actual call to `gpg --sign` fails. See | |
| 203 | + | linkgit:git-receive-pack[1] for the details on the receiving end. | |
| 204 | + | ||
| 205 | + | `--atomic`:: | |
| 206 | + | `--no-atomic`:: | |
| 212 | 207 | Use an atomic transaction on the remote side if available. | |
| 213 | 208 | Either all refs are updated, or on error, no refs are updated. | |
| 214 | 209 | If the server does not support atomic pushes the push will fail. | |
| 215 | 210 | ||
| 216 | - | -o <option>:: | |
| 217 | - | --push-option=<option>:: | |
| 211 | + | `-o <option>`:: | |
| 212 | + | `--push-option=<option>`:: | |
| 218 | 213 | Transmit the given string to the server, which passes them to | |
| 219 | 214 | the pre-receive as well as the post-receive hook. The given string | |
| 220 | - | must not contain a NUL or LF character. | |
| 215 | + | must not contain a _NUL_ or _LF_ character. | |
| 221 | 216 | When multiple `--push-option=<option>` are given, they are | |
| 222 | 217 | all sent to the other side in the order listed on the | |
| 223 | 218 | command line. | |
| @@ -225,21 +220,22 @@ already exists on the remote side. | |||
| 225 | 220 | line, the values of configuration variable `push.pushOption` | |
| 226 | 221 | are used instead. | |
| 227 | 222 | ||
| 228 | - | --receive-pack=<git-receive-pack>:: | |
| 229 | - | --exec=<git-receive-pack>:: | |
| 223 | + | `--receive-pack=<git-receive-pack>`:: | |
| 224 | + | `--exec=<git-receive-pack>`:: | |
| 230 | 225 | Path to the 'git-receive-pack' program on the remote | |
| 231 | 226 | end. Sometimes useful when pushing to a remote | |
| 232 | 227 | repository over ssh, and you do not have the program in | |
| 233 | - | a directory on the default $PATH. | |
| 228 | + | a directory on the default `$PATH`. | |
| 234 | 229 | ||
| 235 | - | --[no-]force-with-lease:: | |
| 236 | - | --force-with-lease=<refname>:: | |
| 237 | - | --force-with-lease=<refname>:<expect>:: | |
| 238 | - | Usually, "git push" refuses to update a remote ref that is | |
| 230 | + | `--force-with-lease`:: | |
| 231 | + | `--no-force-with-lease`:: | |
| 232 | + | `--force-with-lease=<refname>`:: | |
| 233 | + | `--force-with-lease=<refname>:<expect>`:: | |
| 234 | + | Usually, `git push` refuses to update a remote ref that is | |
| 239 | 235 | not an ancestor of the local ref used to overwrite it. | |
| 240 | 236 | + | |
| 241 | 237 | This option overrides this restriction if the current value of the | |
| 242 | - | remote ref is the expected value. "git push" fails otherwise. | |
| 238 | + | remote ref is the expected value. `git push` fails otherwise. | |
| 243 | 239 | + | |
| 244 | 240 | Imagine that you have to rebase what you have already published. | |
| 245 | 241 | You will have to bypass the "must fast-forward" rule in order to | |
| @@ -261,16 +257,16 @@ current value to be the same as the remote-tracking branch we have | |||
| 261 | 257 | for them. | |
| 262 | 258 | + | |
| 263 | 259 | `--force-with-lease=<refname>`, without specifying the expected value, will | |
| 264 | - | protect the named ref (alone), if it is going to be updated, by | |
| 260 | + | protect _<refname>_ (alone), if it is going to be updated, by | |
| 265 | 261 | requiring its current value to be the same as the remote-tracking | |
| 266 | 262 | branch we have for it. | |
| 267 | 263 | + | |
| 268 | - | `--force-with-lease=<refname>:<expect>` will protect the named ref (alone), | |
| 264 | + | `--force-with-lease=<refname>:<expect>` will protect _<refname>_ (alone), | |
| 269 | 265 | if it is going to be updated, by requiring its current value to be | |
| 270 | - | the same as the specified value `<expect>` (which is allowed to be | |
| 266 | + | the same as the specified value _<expect>_ (which is allowed to be | |
| 271 | 267 | different from the remote-tracking branch we have for the refname, | |
| 272 | 268 | or we do not even have to have such a remote-tracking branch when | |
| 273 | - | this form is used). If `<expect>` is the empty string, then the named ref | |
| 269 | + | this form is used). If _<expect>_ is the empty string, then the named ref | |
| 274 | 270 | must not already exist. | |
| 275 | 271 | + | |
| 276 | 272 | Note that all forms other than `--force-with-lease=<refname>:<expect>` | |
| @@ -278,7 +274,7 @@ that specifies the expected current value of the ref explicitly are | |||
| 278 | 274 | still experimental and their semantics may change as we gain experience | |
| 279 | 275 | with this feature. | |
| 280 | 276 | + | |
| 281 | - | "--no-force-with-lease" will cancel all the previous --force-with-lease on the | |
| 277 | + | `--no-force-with-lease` will cancel all the previous `--force-with-lease` on the | |
| 282 | 278 | command line. | |
| 283 | 279 | + | |
| 284 | 280 | A general note on safety: supplying this option without an expected | |
| @@ -298,23 +294,29 @@ If your editor or some other system is running `git fetch` in the | |||
| 298 | 294 | background for you a way to mitigate this is to simply set up another | |
| 299 | 295 | remote: | |
| 300 | 296 | + | |
| 301 | - | git remote add origin-push $(git config remote.origin.url) | |
| 302 | - | git fetch origin-push | |
| 297 | + | ---- | |
| 298 | + | git remote add origin-push $(git config remote.origin.url) | |
| 299 | + | git fetch origin-push | |
| 300 | + | ---- | |
| 303 | 301 | + | |
| 304 | 302 | Now when the background process runs `git fetch origin` the references | |
| 305 | 303 | on `origin-push` won't be updated, and thus commands like: | |
| 306 | 304 | + | |
| 307 | - | git push --force-with-lease origin-push | |
| 305 | + | ---- | |
| 306 | + | git push --force-with-lease origin-push | |
| 307 | + | ---- | |
| 308 | 308 | + | |
| 309 | 309 | Will fail unless you manually run `git fetch origin-push`. This method | |
| 310 | 310 | is of course entirely defeated by something that runs `git fetch | |
| 311 | 311 | --all`, in that case you'd need to either disable it or do something | |
| 312 | 312 | more tedious like: | |
| 313 | 313 | + | |
| 314 | - | git fetch # update 'master' from remote | |
| 315 | - | git tag base master # mark our base point | |
| 316 | - | git rebase -i master # rewrite some commits | |
| 317 | - | git push --force-with-lease=master:base master:master | |
| 314 | + | ---- | |
| 315 | + | git fetch # update 'master' from remote | |
| 316 | + | git tag base master # mark our base point | |
| 317 | + | git rebase -i master # rewrite some commits | |
| 318 | + | git push --force-with-lease=master:base master:master | |
| 319 | + | ---- | |
| 318 | 320 | + | |
| 319 | 321 | I.e. create a `base` tag for versions of the upstream code that you've | |
| 320 | 322 | seen and are willing to overwrite, then rewrite history, and finally | |
| @@ -330,27 +332,26 @@ verify if updates from the remote-tracking refs that may have been | |||
| 330 | 332 | implicitly updated in the background are integrated locally before | |
| 331 | 333 | allowing a forced update. | |
| 332 | 334 | ||
| 333 | - | -f:: | |
| 334 | - | --force:: | |
| 335 | - | Usually, the command refuses to update a remote ref that is | |
| 336 | - | not an ancestor of the local ref used to overwrite it. | |
| 337 | - | Also, when `--force-with-lease` option is used, the command refuses | |
| 338 | - | to update a remote ref whose current value does not match | |
| 339 | - | what is expected. | |
| 335 | + | `-f`:: | |
| 336 | + | `--force`:: | |
| 337 | + | Usually, `git push` will refuse to update a branch that is not an | |
| 338 | + | ancestor of the commit being pushed. | |
| 340 | 339 | + | |
| 341 | - | This flag disables these checks, and can cause the remote repository | |
| 342 | - | to lose commits; use it with care. | |
| 340 | + | This flag disables that check, the other safety checks in PUSH RULES | |
| 341 | + | below, and the checks in `--force-with-lease`. It can cause the remote | |
| 342 | + | repository to lose commits; use it with care. | |
| 343 | 343 | + | |
| 344 | 344 | Note that `--force` applies to all the refs that are pushed, hence | |
| 345 | 345 | using it with `push.default` set to `matching` or with multiple push | |
| 346 | - | destinations configured with `remote.*.push` may overwrite refs | |
| 346 | + | destinations configured with `remote.<name>.push` may overwrite refs | |
| 347 | 347 | other than the current branch (including local refs that are | |
| 348 | 348 | strictly behind their remote counterpart). To force a push to only | |
| 349 | 349 | one branch, use a `+` in front of the refspec to push (e.g `git push | |
| 350 | 350 | origin +master` to force a push to the `master` branch). See the | |
| 351 | 351 | `<refspec>...` section above for details. | |
| 352 | 352 | ||
| 353 | - | --[no-]force-if-includes:: | |
| 353 | + | `--force-if-includes`:: | |
| 354 | + | `--no-force-if-includes`:: | |
| 354 | 355 | Force an update only if the tip of the remote-tracking ref | |
| 355 | 356 | has been integrated locally. | |
| 356 | 357 | + | |
| @@ -366,74 +367,133 @@ a "no-op". | |||
| 366 | 367 | + | |
| 367 | 368 | Specifying `--no-force-if-includes` disables this behavior. | |
| 368 | 369 | ||
| 369 | - | --repo=<repository>:: | |
| 370 | - | This option is equivalent to the <repository> argument. If both | |
| 370 | + | `--repo=<repository>`:: | |
| 371 | + | This option is equivalent to the _<repository>_ argument. If both | |
| 371 | 372 | are specified, the command-line argument takes precedence. | |
| 372 | 373 | ||
| 373 | - | -u:: | |
| 374 | - | --set-upstream:: | |
| 374 | + | `-u`:: | |
| 375 | + | `--set-upstream`:: | |
| 375 | 376 | For every branch that is up to date or successfully pushed, add | |
| 376 | 377 | upstream (tracking) reference, used by argument-less | |
| 377 | 378 | linkgit:git-pull[1] and other commands. For more information, | |
| 378 | 379 | see `branch.<name>.merge` in linkgit:git-config[1]. | |
| 379 | 380 | ||
| 380 | - | --[no-]thin:: | |
| 381 | + | `--thin`:: | |
| 382 | + | `--no-thin`:: | |
| 381 | 383 | These options are passed to linkgit:git-send-pack[1]. A thin transfer | |
| 382 | 384 | significantly reduces the amount of sent data when the sender and | |
| 383 | 385 | receiver share many of the same objects in common. The default is | |
| 384 | 386 | `--thin`. | |
| 385 | 387 | ||
| 386 | - | -q:: | |
| 387 | - | --quiet:: | |
| 388 | + | `-q`:: | |
| 389 | + | `--quiet`:: | |
| 388 | 390 | Suppress all output, including the listing of updated refs, | |
| 389 | 391 | unless an error occurs. Progress is not reported to the standard | |
| 390 | 392 | error stream. | |
| 391 | 393 | ||
| 392 | - | -v:: | |
| 393 | - | --verbose:: | |
| 394 | + | `-v`:: | |
| 395 | + | `--verbose`:: | |
| 394 | 396 | Run verbosely. | |
| 395 | 397 | ||
| 396 | - | --progress:: | |
| 398 | + | `--progress`:: | |
| 397 | 399 | Progress status is reported on the standard error stream | |
| 398 | - | by default when it is attached to a terminal, unless -q | |
| 400 | + | by default when it is attached to a terminal, unless `-q` | |
| 399 | 401 | is specified. This flag forces progress status even if the | |
| 400 | 402 | standard error stream is not directed to a terminal. | |
| 401 | 403 | ||
| 402 | - | --no-recurse-submodules:: | |
| 403 | - | --recurse-submodules=check|on-demand|only|no:: | |
| 404 | + | `--no-recurse-submodules`:: | |
| 405 | + | `--recurse-submodules=(check|on-demand|only|no)`:: | |
| 404 | 406 | May be used to make sure all submodule commits used by the | |
| 405 | 407 | revisions to be pushed are available on a remote-tracking branch. | |
| 406 | - | If 'check' is used Git will verify that all submodule commits that | |
| 408 | + | Possible values are: | |
| 409 | + | `check`;; | |
| 410 | + | Git will verify that all submodule commits that | |
| 407 | 411 | changed in the revisions to be pushed are available on at least one | |
| 408 | 412 | remote of the submodule. If any commits are missing the push will | |
| 409 | - | be aborted and exit with non-zero status. If 'on-demand' is used | |
| 413 | + | be aborted and exit with non-zero status. | |
| 414 | + | `on-demand`;; | |
| 410 | 415 | all submodules that changed in the revisions to be pushed will be | |
| 411 | - | pushed. If on-demand was not able to push all necessary revisions it will | |
| 412 | - | also be aborted and exit with non-zero status. If 'only' is used all | |
| 413 | - | submodules will be pushed while the superproject is left | |
| 414 | - | unpushed. A value of 'no' or using `--no-recurse-submodules` can be used | |
| 415 | - | to override the push.recurseSubmodules configuration variable when no | |
| 416 | - | submodule recursion is required. | |
| 417 | - | + | |
| 418 | - | When using 'on-demand' or 'only', if a submodule has a | |
| 419 | - | "push.recurseSubmodules={on-demand,only}" or "submodule.recurse" configuration, | |
| 420 | - | further recursion will occur. In this case, "only" is treated as "on-demand". | |
| 421 | - | ||
| 422 | - | --[no-]verify:: | |
| 416 | + | pushed. If `on-demand` was not able to push all necessary revisions it will | |
| 417 | + | also be aborted and exit with non-zero status. | |
| 418 | + | `only`;; | |
| 419 | + | all submodules will be pushed while the superproject is left | |
| 420 | + | unpushed. | |
| 421 | + | `no`;; | |
| 422 | + | override the `push.recurseSubmodules` configuration variable when no | |
| 423 | + | submodule recursion is required. Similar to using `--no-recurse-submodules`. | |
| 424 | + | ||
| 425 | + | + | |
| 426 | + | When using `on-demand` or `only`, if a submodule has a | |
| 427 | + | `push.recurseSubmodules=(on-demand|only)` or `submodule.recurse` configuration, | |
| 428 | + | further recursion will occur. In this case, `only` is treated as `on-demand`. | |
| 429 | + | ||
| 430 | + | `--verify`:: | |
| 431 | + | `--no-verify`:: | |
| 423 | 432 | Toggle the pre-push hook (see linkgit:githooks[5]). The | |
| 424 | - | default is --verify, giving the hook a chance to prevent the | |
| 425 | - | push. With --no-verify, the hook is bypassed completely. | |
| 433 | + | default is `--verify`, giving the hook a chance to prevent the | |
| 434 | + | push. With `--no-verify`, the hook is bypassed completely. | |
| 426 | 435 | ||
| 427 | - | -4:: | |
| 428 | - | --ipv4:: | |
| 436 | + | `-4`:: | |
| 437 | + | `--ipv4`:: | |
| 429 | 438 | Use IPv4 addresses only, ignoring IPv6 addresses. | |
| 430 | 439 | ||
| 431 | - | -6:: | |
| 432 | - | --ipv6:: | |
| 440 | + | `-6`:: | |
| 441 | + | `--ipv6`:: | |
| 433 | 442 | Use IPv6 addresses only, ignoring IPv4 addresses. | |
| 434 | 443 | ||
| 435 | 444 | include::urls-remotes.adoc[] | |
| 436 | 445 | ||
| 446 | + | [[REMOTE-GROUPS]] | |
| 447 | + | REMOTE GROUPS | |
| 448 | + | ------------- | |
| 449 | + | ||
| 450 | + | A remote group is a named list of remotes configured via `remotes.<name>` | |
| 451 | + | in your git config: | |
| 452 | + | ||
| 453 | + | $ git config remotes.all-remotes "r1 r2 r3" | |
| 454 | + | ||
| 455 | + | When a group name is given as the `<repository>` argument, the push is | |
| 456 | + | performed to each member remote in turn. The defining principle is: | |
| 457 | + | ||
| 458 | + | git push <options> all-remotes <args> | |
| 459 | + | ||
| 460 | + | is exactly equivalent to: | |
| 461 | + | ||
| 462 | + | git push <options> r1 <args> | |
| 463 | + | git push <options> r2 <args> | |
| 464 | + | ... | |
| 465 | + | git push <options> rN <args> | |
| 466 | + | ||
| 467 | + | where r1, r2, ..., rN are the members of `all-remotes`. No special | |
| 468 | + | behaviour is added or removed — the group is purely a shorthand for | |
| 469 | + | running the same push command against each member remote individually. | |
| 470 | + | ||
| 471 | + | When pushing to a group of more than one remote, Git spawns a separate | |
| 472 | + | `git push` subprocess for each member remote in sequence. Each subprocess | |
| 473 | + | receives the same flags and refspecs as the original invocation. This | |
| 474 | + | means that per-remote push mappings configured via `remote.<name>.push` | |
| 475 | + | and mirror mode (`remote.<name>.mirror`) are evaluated independently for | |
| 476 | + | each remote, and a mirror remote in the group cannot affect the push | |
| 477 | + | behaviour of other non-mirror remotes in the same group. | |
| 478 | + | ||
| 479 | + | The `--atomic` option is not supported for group pushes, because atomicity | |
| 480 | + | can only be guaranteed within a single transport connection to a single | |
| 481 | + | remote. Git will refuse the invocation with an error if `--atomic` is | |
| 482 | + | combined with a group name. | |
| 483 | + | ||
| 484 | + | If any member remote fails whether due to a push rejection (e.g. a | |
| 485 | + | non-fast-forward update, a server-side hook refusing a ref) or a connection | |
| 486 | + | error (e.g. the repository does not exist, authentication fails, or the | |
| 487 | + | network is unreachable), Git reports the error and continues pushing to | |
| 488 | + | the remaining remotes in the group. The overall exit code is non-zero if | |
| 489 | + | any member push fails. | |
| 490 | + | ||
| 491 | + | This means the user is responsible for ensuring that the sequence of | |
| 492 | + | individual pushes makes sense. If `git push r1`` would fail for a given | |
| 493 | + | set of options and arguments, then `git push all-remotes` will fail in | |
| 494 | + | the same way when it reaches r1. The group push does not do anything | |
| 495 | + | special to make a failing individual push succeed. | |
| 496 | + | ||
| 437 | 497 | OUTPUT | |
| 438 | 498 | ------ | |
| 439 | 499 | ||
| @@ -448,16 +508,16 @@ representing the status of a single ref. Each line is of the form: | |||
| 448 | 508 | <flag> <summary> <from> -> <to> (<reason>) | |
| 449 | 509 | ------------------------------- | |
| 450 | 510 | ||
| 451 | - | If --porcelain is used, then each line of the output is of the form: | |
| 511 | + | If `--porcelain` is used, then each line of the output is of the form: | |
| 452 | 512 | ||
| 453 | 513 | ------------------------------- | |
| 454 | 514 | <flag> \t <from>:<to> \t <summary> (<reason>) | |
| 455 | 515 | ------------------------------- | |
| 456 | 516 | ||
| 457 | - | The status of up-to-date refs is shown only if --porcelain or --verbose | |
| 517 | + | The status of up-to-date refs is shown only if `--porcelain` or `--verbose` | |
| 458 | 518 | option is used. | |
| 459 | 519 | ||
| 460 | - | flag:: | |
| 520 | + | _<flag>_:: | |
| 461 | 521 | A single character indicating the status of the ref: | |
| 462 | 522 | (space);; for a successfully pushed fast-forward; | |
| 463 | 523 | `+`;; for a successful forced update; | |
| @@ -466,7 +526,7 @@ flag:: | |||
| 466 | 526 | `!`;; for a ref that was rejected or failed to push; and | |
| 467 | 527 | `=`;; for a ref that was up to date and did not need pushing. | |
| 468 | 528 | ||
| 469 | - | summary:: | |
| 529 | + | _<summary>_:: | |
| 470 | 530 | For a successfully pushed ref, the summary shows the old and new | |
| 471 | 531 | values of the ref in a form suitable for using as an argument to | |
| 472 | 532 | `git log` (this is `<old>..<new>` in most cases, and | |
| @@ -508,6 +568,45 @@ reason:: | |||
| 508 | 568 | refs, no explanation is needed. For a failed ref, the reason for | |
| 509 | 569 | failure is described. | |
| 510 | 570 | ||
| 571 | + | PUSH RULES | |
| 572 | + | ---------- | |
| 573 | + | ||
| 574 | + | As a safety feature, the `git push` command only allows certain kinds of | |
| 575 | + | updates to prevent you from accidentally losing data on the remote. | |
| 576 | + | ||
| 577 | + | Because branches and tags are intended to be used differently, the | |
| 578 | + | safety rules for pushing to a branch are different from the rules | |
| 579 | + | for pushing to a tag. In the following rules "update" means any | |
| 580 | + | modifications except deletions and creations. Deletions and creations | |
| 581 | + | are always allowed, except when forbidden by configuration or hooks. | |
| 582 | + | ||
| 583 | + | 1. If the push destination is a **branch** (`refs/heads/*`): only | |
| 584 | + | fast-forward updates are allowed, which means the destination must be | |
| 585 | + | an ancestor of the source commit. The source must be a commit. | |
| 586 | + | 2. If the push destination is a **tag** (`refs/tags/*`): all updates will | |
| 587 | + | be rejected. The source can be any object. | |
| 588 | + | 3. If the push destination is not a branch or tag: | |
| 589 | + | * If the source is a tree or blob object, any updates will be rejected | |
| 590 | + | * If the source is a tag or commit object, any fast-forward update | |
| 591 | + | is allowed, even in cases where what's being fast-forwarded is not a | |
| 592 | + | commit, but a tag object which happens to point to a new commit which | |
| 593 | + | is a fast-forward of the commit the last tag (or commit) it's | |
| 594 | + | replacing. Replacing a tag with an entirely different tag is also | |
| 595 | + | allowed, if it points to the same commit, as well as pushing a peeled | |
| 596 | + | tag, i.e. pushing the commit that existing tag object points to, or a | |
| 597 | + | new tag object which an existing commit points to. | |
| 598 | + | ||
| 599 | + | You can override these rules by passing `--force` or by adding the | |
| 600 | + | optional leading `+` to a refspec. The only exceptions are that no | |
| 601 | + | amount of forcing will make a branch accept a non-commit object, | |
| 602 | + | and forcing won't make the remote repository accept a push that it's | |
| 603 | + | configured to deny. | |
| 604 | + | ||
| 605 | + | Hooks and configuration can also override or amend these rules, | |
| 606 | + | see e.g. `receive.denyNonFastForwards` and `receive.denyDeletes` | |
| 607 | + | in linkgit:git-config[1] and `pre-receive` and `update` in | |
| 608 | + | linkgit:githooks[5]. | |
| 609 | + | ||
| 511 | 610 | NOTE ABOUT FAST-FORWARDS | |
| 512 | 611 | ------------------------ | |
| 513 | 612 | ||
| @@ -568,7 +667,7 @@ Updating A with the resulting merge commit will fast-forward and your | |||
| 568 | 667 | push will be accepted. | |
| 569 | 668 | ||
| 570 | 669 | Alternatively, you can rebase your change between X and B on top of A, | |
| 571 | - | with "git pull --rebase", and push the result back. The rebase will | |
| 670 | + | with `git pull --rebase`, and push the result back. The rebase will | |
| 572 | 671 | create a new commit D that builds the change between X and B on top of | |
| 573 | 672 | A. | |
| 574 | 673 | ||
| @@ -586,12 +685,12 @@ accepted. | |||
| 586 | 685 | There is another common situation where you may encounter non-fast-forward | |
| 587 | 686 | rejection when you try to push, and it is possible even when you are | |
| 588 | 687 | pushing into a repository nobody else pushes into. After you push commit | |
| 589 | - | A yourself (in the first picture in this section), replace it with "git | |
| 590 | - | commit --amend" to produce commit B, and you try to push it out, because | |
| 688 | + | A yourself (in the first picture in this section), replace it with `git | |
| 689 | + | commit --amend` to produce commit B, and you try to push it out, because | |
| 591 | 690 | forgot that you have pushed A out already. In such a case, and only if | |
| 592 | 691 | you are certain that nobody in the meantime fetched your earlier commit A | |
| 593 | - | (and started building on top of it), you can run "git push --force" to | |
| 594 | - | overwrite it. In other words, "git push --force" is a method reserved for | |
| 692 | + | (and started building on top of it), you can run `git push --force` to | |
| 693 | + | overwrite it. In other words, `git push --force` is a method reserved for | |
| 595 | 694 | a case where you do mean to lose history. | |
| 596 | 695 | ||
| 597 | 696 | ||
| @@ -609,18 +708,18 @@ EXAMPLES | |||
| 609 | 708 | variable) if it has the same name as the current branch, and | |
| 610 | 709 | errors out without pushing otherwise. | |
| 611 | 710 | + | |
| 612 | - | The default behavior of this command when no <refspec> is given can be | |
| 711 | + | The default behavior of this command when no _<refspec>_ is given can be | |
| 613 | 712 | configured by setting the `push` option of the remote, or the `push.default` | |
| 614 | 713 | configuration variable. | |
| 615 | 714 | + | |
| 616 | 715 | For example, to default to pushing only the current branch to `origin` | |
| 617 | - | use `git config remote.origin.push HEAD`. Any valid <refspec> (like | |
| 716 | + | use `git config remote.origin.push HEAD`. Any valid _<refspec>_ (like | |
| 618 | 717 | the ones in the examples below) can be configured as the default for | |
| 619 | 718 | `git push origin`. | |
| 620 | 719 | ||
| 621 | 720 | `git push origin :`:: | |
| 622 | 721 | Push "matching" branches to `origin`. See | |
| 623 | - | <refspec> in the <<OPTIONS,OPTIONS>> section above for a | |
| 722 | + | _<refspec>_ in the <<OPTIONS,OPTIONS>> section above for a | |
| 624 | 723 | description of "matching" branches. | |
| 625 | 724 | ||
| 626 | 725 | `git push origin master`:: | |
| @@ -697,6 +796,7 @@ a `git gc` command on the origin repository. | |||
| 697 | 796 | ||
| 698 | 797 | include::transfer-data-leaks.adoc[] | |
| 699 | 798 | ||
| 799 | + | [[CONFIGURATION]] | |
| 700 | 800 | CONFIGURATION | |
| 701 | 801 | ------------- | |
| 702 | 802 | ||
modified Documentation/git-range-diff.adoc
| @@ -7,11 +7,11 @@ git-range-diff - Compare two commit ranges (e.g. two versions of a branch) | |||
| 7 | 7 | ||
| 8 | 8 | SYNOPSIS | |
| 9 | 9 | -------- | |
| 10 | - | [verse] | |
| 11 | - | 'git range-diff' [--color=[<when>]] [--no-color] [<diff-options>] | |
| 10 | + | [synopsis] | |
| 11 | + | git range-diff [--color=[<when>]] [--no-color] [<diff-options>] | |
| 12 | 12 | [--no-dual-color] [--creation-factor=<factor>] | |
| 13 | 13 | [--left-only | --right-only] [--diff-merges=<format>] | |
| 14 | - | [--remerge-diff] | |
| 14 | + | [--remerge-diff] [--no-notes | --notes[=<ref>]] | |
| 15 | 15 | ( <range1> <range2> | <rev1>...<rev2> | <base> <rev1> <rev2> ) | |
| 16 | 16 | [[--] <path>...] | |
| 17 | 17 | ||
| @@ -21,14 +21,14 @@ DESCRIPTION | |||
| 21 | 21 | This command shows the differences between two versions of a patch | |
| 22 | 22 | series, or more generally, two commit ranges (ignoring merge commits). | |
| 23 | 23 | ||
| 24 | - | In the presence of `<path>` arguments, these commit ranges are limited | |
| 24 | + | In the presence of _<path>_ arguments, these commit ranges are limited | |
| 25 | 25 | accordingly. | |
| 26 | 26 | ||
| 27 | 27 | To that end, it first finds pairs of commits from both commit ranges | |
| 28 | 28 | that correspond with each other. Two commits are said to correspond when | |
| 29 | 29 | the diff between their patches (i.e. the author information, the commit | |
| 30 | 30 | message and the commit diff) is reasonably small compared to the | |
| 31 | - | patches' size. See ``Algorithm`` below for details. | |
| 31 | + | patches' size. See 'Algorithm' below for details. | |
| 32 | 32 | ||
| 33 | 33 | Finally, the list of matching commits is shown in the order of the | |
| 34 | 34 | second commit range, with unmatched commits being inserted just after | |
| @@ -37,7 +37,7 @@ all of their ancestors have been shown. | |||
| 37 | 37 | There are three ways to specify the commit ranges: | |
| 38 | 38 | ||
| 39 | 39 | - `<range1> <range2>`: Either commit range can be of the form | |
| 40 | - | `<base>..<rev>`, `<rev>^!` or `<rev>^-<n>`. See `SPECIFYING RANGES` | |
| 40 | + | `<base>..<rev>`, `<rev>^!` or `<rev>^-<n>`. See 'SPECIFYING RANGES' | |
| 41 | 41 | in linkgit:gitrevisions[7] for more details. | |
| 42 | 42 | ||
| 43 | 43 | - `<rev1>...<rev2>`. This is equivalent to | |
| @@ -48,7 +48,7 @@ There are three ways to specify the commit ranges: | |||
| 48 | 48 | ||
| 49 | 49 | OPTIONS | |
| 50 | 50 | ------- | |
| 51 | - | --no-dual-color:: | |
| 51 | + | `--no-dual-color`:: | |
| 52 | 52 | When the commit diffs differ, `git range-diff` recreates the | |
| 53 | 53 | original diffs' coloring, and adds outer -/+ diff markers with | |
| 54 | 54 | the *background* being red/green to make it easier to see e.g. | |
| @@ -56,33 +56,33 @@ OPTIONS | |||
| 56 | 56 | + | |
| 57 | 57 | Additionally, the commit diff lines that are only present in the first commit | |
| 58 | 58 | range are shown "dimmed" (this can be overridden using the `color.diff.<slot>` | |
| 59 | - | config setting where `<slot>` is one of `contextDimmed`, `oldDimmed` and | |
| 59 | + | config setting where _<slot>_ is one of `contextDimmed`, `oldDimmed` and | |
| 60 | 60 | `newDimmed`), and the commit diff lines that are only present in the second | |
| 61 | 61 | commit range are shown in bold (which can be overridden using the config | |
| 62 | - | settings `color.diff.<slot>` with `<slot>` being one of `contextBold`, | |
| 62 | + | settings `color.diff.<slot>` with _<slot>_ being one of `contextBold`, | |
| 63 | 63 | `oldBold` or `newBold`). | |
| 64 | 64 | + | |
| 65 | 65 | This is known to `range-diff` as "dual coloring". Use `--no-dual-color` | |
| 66 | 66 | to revert to color all lines according to the outer diff markers | |
| 67 | 67 | (and completely ignore the inner diff when it comes to color). | |
| 68 | 68 | ||
| 69 | - | --creation-factor=<percent>:: | |
| 70 | - | Set the creation/deletion cost fudge factor to `<percent>`. | |
| 69 | + | `--creation-factor=<percent>`:: | |
| 70 | + | Set the creation/deletion cost fudge factor to _<percent>_. | |
| 71 | 71 | Defaults to 60. Try a larger value if `git range-diff` erroneously | |
| 72 | 72 | considers a large change a total rewrite (deletion of one commit | |
| 73 | 73 | and addition of another), and a smaller one in the reverse case. | |
| 74 | - | See the ``Algorithm`` section below for an explanation of why this is | |
| 74 | + | See the 'Algorithm' section below for an explanation of why this is | |
| 75 | 75 | needed. | |
| 76 | 76 | ||
| 77 | - | --left-only:: | |
| 77 | + | `--left-only`:: | |
| 78 | 78 | Suppress commits that are missing from the first specified range | |
| 79 | - | (or the "left range" when using the `<rev1>...<rev2>` format). | |
| 79 | + | (or the "left range" when using the `<rev1>...<rev2>` form). | |
| 80 | 80 | ||
| 81 | - | --right-only:: | |
| 81 | + | `--right-only`:: | |
| 82 | 82 | Suppress commits that are missing from the second specified range | |
| 83 | - | (or the "right range" when using the `<rev1>...<rev2>` format). | |
| 83 | + | (or the "right range" when using the `<rev1>...<rev2>` form). | |
| 84 | 84 | ||
| 85 | - | --diff-merges=<format>:: | |
| 85 | + | `--diff-merges=<format>`:: | |
| 86 | 86 | Instead of ignoring merge commits, generate diffs for them using the | |
| 87 | 87 | corresponding `--diff-merges=<format>` option of linkgit:git-log[1], | |
| 88 | 88 | and include them in the comparison. | |
| @@ -93,29 +93,30 @@ have produced. In other words, if a merge commit is the result of a | |||
| 93 | 93 | non-conflicting `git merge`, the `remerge` mode will represent it with an empty | |
| 94 | 94 | diff. | |
| 95 | 95 | ||
| 96 | - | --remerge-diff:: | |
| 96 | + | `--remerge-diff`:: | |
| 97 | 97 | Convenience option, equivalent to `--diff-merges=remerge`. | |
| 98 | 98 | ||
| 99 | - | --[no-]notes[=<ref>]:: | |
| 99 | + | `--notes[=<ref>]`:: | |
| 100 | + | `--no-notes`:: | |
| 100 | 101 | This flag is passed to the `git log` program | |
| 101 | 102 | (see linkgit:git-log[1]) that generates the patches. | |
| 102 | 103 | ||
| 103 | - | <range1> <range2>:: | |
| 104 | + | `<range1> <range2>`:: | |
| 104 | 105 | Compare the commits specified by the two ranges, where | |
| 105 | - | `<range1>` is considered an older version of `<range2>`. | |
| 106 | + | _<range1>_ is considered an older version of _<range2>_. | |
| 106 | 107 | ||
| 107 | - | <rev1>...<rev2>:: | |
| 108 | + | `<rev1>...<rev2>`:: | |
| 108 | 109 | Equivalent to passing `<rev2>..<rev1>` and `<rev1>..<rev2>`. | |
| 109 | 110 | ||
| 110 | - | <base> <rev1> <rev2>:: | |
| 111 | + | `<base> <rev1> <rev2>`:: | |
| 111 | 112 | Equivalent to passing `<base>..<rev1>` and `<base>..<rev2>`. | |
| 112 | - | Note that `<base>` does not need to be the exact branch point | |
| 113 | + | Note that _<base>_ does not need to be the exact branch point | |
| 113 | 114 | of the branches. Example: after rebasing a branch `my-topic`, | |
| 114 | 115 | `git range-diff my-topic@{u} my-topic@{1} my-topic` would | |
| 115 | 116 | show the differences introduced by the rebase. | |
| 116 | 117 | ||
| 117 | 118 | `git range-diff` also accepts the regular diff options (see | |
| 118 | - | linkgit:git-diff[1]), most notably the `--color=[<when>]` and | |
| 119 | + | linkgit:git-diff[1]), most notably the `--color[=<when>]` and | |
| 119 | 120 | `--no-color` options. These options are used when generating the "diff | |
| 120 | 121 | between patches", i.e. to compare the author, commit message and diff of | |
| 121 | 122 | corresponding old/new commits. There is currently no means to tweak most of the | |
modified Documentation/git-read-tree.adoc
| @@ -100,7 +100,8 @@ OPTIONS | |||
| 100 | 100 | directories the index file and index output file are | |
| 101 | 101 | located in. | |
| 102 | 102 | ||
| 103 | - | --[no-]recurse-submodules:: | |
| 103 | + | --recurse-submodules:: | |
| 104 | + | --no-recurse-submodules:: | |
| 104 | 105 | Using --recurse-submodules will update the content of all active | |
| 105 | 106 | submodules according to the commit recorded in the superproject by | |
| 106 | 107 | calling read-tree recursively, also setting the submodules' HEAD to be | |
modified Documentation/git-rebase.adoc
| @@ -16,49 +16,12 @@ SYNOPSIS | |||
| 16 | 16 | ||
| 17 | 17 | DESCRIPTION | |
| 18 | 18 | ----------- | |
| 19 | - | If `<branch>` is specified, `git rebase` will perform an automatic | |
| 20 | - | `git switch <branch>` before doing anything else. Otherwise | |
| 21 | - | it remains on the current branch. | |
| 19 | + | Transplant a series of commits onto a different starting point. | |
| 20 | + | You can also use `git rebase` to reorder or combine commits: see INTERACTIVE | |
| 21 | + | MODE below for how to do that. | |
| 22 | 22 | ||
| 23 | - | If `<upstream>` is not specified, the upstream configured in | |
| 24 | - | `branch.<name>.remote` and `branch.<name>.merge` options will be used (see | |
| 25 | - | linkgit:git-config[1] for details) and the `--fork-point` option is | |
| 26 | - | assumed. If you are currently not on any branch or if the current | |
| 27 | - | branch does not have a configured upstream, the rebase will abort. | |
| 28 | - | ||
| 29 | - | All changes made by commits in the current branch but that are not | |
| 30 | - | in `<upstream>` are saved to a temporary area. This is the same set | |
| 31 | - | of commits that would be shown by `git log <upstream>..HEAD`; or by | |
| 32 | - | `git log 'fork_point'..HEAD`, if `--fork-point` is active (see the | |
| 33 | - | description on `--fork-point` below); or by `git log HEAD`, if the | |
| 34 | - | `--root` option is specified. | |
| 35 | - | ||
| 36 | - | The current branch is reset to `<upstream>` or `<newbase>` if the | |
| 37 | - | `--onto` option was supplied. This has the exact same effect as | |
| 38 | - | `git reset --hard <upstream>` (or `<newbase>`). `ORIG_HEAD` is set | |
| 39 | - | to point at the tip of the branch before the reset. | |
| 40 | - | ||
| 41 | - | [NOTE] | |
| 42 | - | `ORIG_HEAD` is not guaranteed to still point to the previous branch tip | |
| 43 | - | at the end of the rebase if other commands that write that pseudo-ref | |
| 44 | - | (e.g. `git reset`) are used during the rebase. The previous branch tip, | |
| 45 | - | however, is accessible using the reflog of the current branch | |
| 46 | - | (i.e. `@{1}`, see linkgit:gitrevisions[7]). | |
| 47 | - | ||
| 48 | - | The commits that were previously saved into the temporary area are | |
| 49 | - | then reapplied to the current branch, one by one, in order. Note that | |
| 50 | - | any commits in `HEAD` which introduce the same textual changes as a commit | |
| 51 | - | in `HEAD..<upstream>` are omitted (i.e., a patch already accepted upstream | |
| 52 | - | with a different commit message or timestamp will be skipped). | |
| 53 | - | ||
| 54 | - | It is possible that a merge failure will prevent this process from being | |
| 55 | - | completely automatic. You will have to resolve any such merge failure | |
| 56 | - | and run `git rebase --continue`. Another option is to bypass the commit | |
| 57 | - | that caused the merge failure with `git rebase --skip`. To check out the | |
| 58 | - | original `<branch>` and remove the `.git/rebase-apply` working files, use | |
| 59 | - | the command `git rebase --abort` instead. | |
| 60 | - | ||
| 61 | - | Assume the following history exists and the current branch is "topic": | |
| 23 | + | For example, imagine that you have been working on the `topic` branch in this | |
| 24 | + | history, and you want to "catch up" to the work done on the `master` branch. | |
| 62 | 25 | ||
| 63 | 26 | ------------ | |
| 64 | 27 | A---B---C topic | |
| @@ -66,13 +29,11 @@ Assume the following history exists and the current branch is "topic": | |||
| 66 | 29 | D---E---F---G master | |
| 67 | 30 | ------------ | |
| 68 | 31 | ||
| 69 | - | From this point, the result of either of the following commands: | |
| 70 | - | ||
| 71 | - | ||
| 72 | - | git rebase master | |
| 73 | - | git rebase master topic | |
| 74 | - | ||
| 75 | - | would be: | |
| 32 | + | You want to transplant the commits you made on `topic` since it diverged from | |
| 33 | + | `master` (i.e. A, B, and C), on top of the current `master`. You can do this | |
| 34 | + | by running `git rebase master` while the `topic` branch is checked out. If you | |
| 35 | + | want to rebase `topic` while on another branch, `git rebase master topic` is a | |
| 36 | + | shortcut for `git checkout topic && git rebase master`. | |
| 76 | 37 | ||
| 77 | 38 | ------------ | |
| 78 | 39 | A'--B'--C' topic | |
| @@ -80,30 +41,56 @@ would be: | |||
| 80 | 41 | D---E---F---G master | |
| 81 | 42 | ------------ | |
| 82 | 43 | ||
| 83 | - | *NOTE:* The latter form is just a short-hand of `git checkout topic` | |
| 84 | - | followed by `git rebase master`. When rebase exits `topic` will | |
| 85 | - | remain the checked-out branch. | |
| 86 | 44 | ||
| 87 | - | If the upstream branch already contains a change you have made (e.g., | |
| 88 | - | because you mailed a patch which was applied upstream), then that commit | |
| 89 | - | will be skipped and warnings will be issued (if the 'merge' backend is | |
| 90 | - | used). For example, running `git rebase master` on the following | |
| 91 | - | history (in which `A'` and `A` introduce the same set of changes, but | |
| 92 | - | have different committer information): | |
| 45 | + | If there is a merge conflict during this process, `git rebase` will stop at the | |
| 46 | + | first problematic commit and leave conflict markers. If this happens, you can do | |
| 47 | + | one of these things: | |
| 93 | 48 | ||
| 94 | - | ------------ | |
| 95 | - | A---B---C topic | |
| 96 | - | / | |
| 97 | - | D---E---A'---F master | |
| 98 | - | ------------ | |
| 49 | + | 1. Resolve the conflict. You can use `git diff` to find the markers (<<<<<<) | |
| 50 | + | and make edits to resolve the conflict. For each file you edit, you need to | |
| 51 | + | tell Git that the conflict has been resolved. You can mark the conflict as | |
| 52 | + | resolved with `git add <filename>`. After resolving all of the conflicts, | |
| 53 | + | you can continue the rebasing process with | |
| 99 | 54 | ||
| 100 | - | will result in: | |
| 55 | + | git rebase --continue | |
| 101 | 56 | ||
| 102 | - | ------------ | |
| 103 | - | B'---C' topic | |
| 104 | - | / | |
| 105 | - | D---E---A'---F master | |
| 106 | - | ------------ | |
| 57 | + | 2. Stop the `git rebase` and return your branch to its original state with | |
| 58 | + | ||
| 59 | + | git rebase --abort | |
| 60 | + | ||
| 61 | + | 3. Skip the commit that caused the merge conflict with | |
| 62 | + | ||
| 63 | + | git rebase --skip | |
| 64 | + | ||
| 65 | + | If you don't specify an `<upstream>` to rebase onto, the upstream configured in | |
| 66 | + | `branch.<name>.remote` and `branch.<name>.merge` options will be used (see | |
| 67 | + | linkgit:git-config[1] for details) and the `--fork-point` option is | |
| 68 | + | assumed. If you are currently not on any branch or if the current | |
| 69 | + | branch does not have a configured upstream, the rebase will abort. | |
| 70 | + | ||
| 71 | + | Here is a simplified description of what `git rebase <upstream>` does: | |
| 72 | + | ||
| 73 | + | 1. Make a list of all commits on your current branch since it branched | |
| 74 | + | off from `<upstream>` that do not have an equivalent commit in | |
| 75 | + | `<upstream>`. | |
| 76 | + | 2. Check out `<upstream>` with the equivalent of | |
| 77 | + | `git checkout --detach <upstream>`. | |
| 78 | + | 3. Replay the commits, one by one, in order. This is similar to running | |
| 79 | + | `git cherry-pick <commit>` for each commit. See REBASING MERGES for how merges | |
| 80 | + | are handled. | |
| 81 | + | 4. Update your branch to point to the final commit with the equivalent | |
| 82 | + | of `git checkout -B <branch>`. | |
| 83 | + | ||
| 84 | + | [NOTE] | |
| 85 | + | When starting the rebase, `ORIG_HEAD` is set to point to the commit at the tip | |
| 86 | + | of the to-be-rebased branch. However, `ORIG_HEAD` is not guaranteed to still | |
| 87 | + | point to that commit at the end of the rebase if other commands that change | |
| 88 | + | `ORIG_HEAD` (like `git reset`) are used during the rebase. The previous branch | |
| 89 | + | tip, however, is accessible using the reflog of the current branch (i.e. `@{1}`, | |
| 90 | + | see linkgit:gitrevisions[7]). | |
| 91 | + | ||
| 92 | + | TRANSPLANTING A TOPIC BRANCH WITH --ONTO | |
| 93 | + | ---------------------------------------- | |
| 107 | 94 | ||
| 108 | 95 | Here is how you would transplant a topic branch based on one | |
| 109 | 96 | branch to another, to pretend that you forked the topic branch | |
| @@ -186,28 +173,6 @@ This is useful if F and G were flawed in some way, or should not be | |||
| 186 | 173 | part of topicA. Note that the argument to `--onto` and the `<upstream>` | |
| 187 | 174 | parameter can be any valid commit-ish. | |
| 188 | 175 | ||
| 189 | - | In case of conflict, `git rebase` will stop at the first problematic commit | |
| 190 | - | and leave conflict markers in the tree. You can use `git diff` to locate | |
| 191 | - | the markers (<<<<<<) and make edits to resolve the conflict. For each | |
| 192 | - | file you edit, you need to tell Git that the conflict has been resolved, | |
| 193 | - | typically this would be done with | |
| 194 | - | ||
| 195 | - | ||
| 196 | - | git add <filename> | |
| 197 | - | ||
| 198 | - | ||
| 199 | - | After resolving the conflict manually and updating the index with the | |
| 200 | - | desired resolution, you can continue the rebasing process with | |
| 201 | - | ||
| 202 | - | ||
| 203 | - | git rebase --continue | |
| 204 | - | ||
| 205 | - | ||
| 206 | - | Alternatively, you can undo the 'git rebase' with | |
| 207 | - | ||
| 208 | - | ||
| 209 | - | git rebase --abort | |
| 210 | - | ||
| 211 | 176 | MODE OPTIONS | |
| 212 | 177 | ------------ | |
| 213 | 178 | ||
| @@ -253,6 +218,8 @@ As a special case, you may use "A\...B" as a shortcut for the | |||
| 253 | 218 | merge base of A and B if there is exactly one merge base. You can | |
| 254 | 219 | leave out at most one of A and B, in which case it defaults to HEAD. | |
| 255 | 220 | ||
| 221 | + | See TRANSPLANTING A TOPIC BRANCH WITH --ONTO above for examples. | |
| 222 | + | ||
| 256 | 223 | --keep-base:: | |
| 257 | 224 | Set the starting point at which to create the new commits to the | |
| 258 | 225 | merge base of `<upstream>` and `<branch>`. Running | |
| @@ -507,6 +474,13 @@ See also INCOMPATIBLE OPTIONS below. | |||
| 507 | 474 | Instead of using the current time as the committer date, use | |
| 508 | 475 | the author date of the commit being rebased as the committer | |
| 509 | 476 | date. This option implies `--force-rebase`. | |
| 477 | + | + | |
| 478 | + | WARNING: The history walking machinery assumes that commits have | |
| 479 | + | non-decreasing commit timestamps. You should consider if you really need | |
| 480 | + | to use this option. Then you should only use this option to override the | |
| 481 | + | committer date when rebasing commits on top of a base which commit is | |
| 482 | + | older (in terms of the commit date) than the oldest commit you are | |
| 483 | + | applying (in terms of the author date). | |
| 510 | 484 | ||
| 511 | 485 | --ignore-date:: | |
| 512 | 486 | --reset-author-date:: | |
| @@ -523,6 +497,13 @@ See also INCOMPATIBLE OPTIONS below. | |||
| 523 | 497 | + | |
| 524 | 498 | See also INCOMPATIBLE OPTIONS below. | |
| 525 | 499 | ||
| 500 | + | --trailer=<trailer>:: | |
| 501 | + | Append the given trailer to every rebased commit message, processed | |
| 502 | + | via linkgit:git-interpret-trailers[1]. This option implies | |
| 503 | + | `--force-rebase`. | |
| 504 | + | + | |
| 505 | + | See also INCOMPATIBLE OPTIONS below. | |
| 506 | + | ||
| 526 | 507 | -i:: | |
| 527 | 508 | --interactive:: | |
| 528 | 509 | Make a list of the commits which are about to be rebased. Let the | |
| @@ -679,6 +660,7 @@ are incompatible with the following options: | |||
| 679 | 660 | * --[no-]reapply-cherry-picks when used without --keep-base | |
| 680 | 661 | * --update-refs | |
| 681 | 662 | * --root when used without --onto | |
| 663 | + | * --trailer | |
| 682 | 664 | ||
| 683 | 665 | In addition, the following pairs of options are incompatible: | |
| 684 | 666 | ||
| @@ -687,7 +669,7 @@ In addition, the following pairs of options are incompatible: | |||
| 687 | 669 | * --fork-point and --root | |
| 688 | 670 | ||
| 689 | 671 | BEHAVIORAL DIFFERENCES | |
| 690 | - | ----------------------- | |
| 672 | + | ---------------------- | |
| 691 | 673 | ||
| 692 | 674 | `git rebase` has two primary backends: 'apply' and 'merge'. (The 'apply' | |
| 693 | 675 | backend used to be known as the 'am' backend, but the name led to | |
modified Documentation/git-reflog.adoc
| @@ -8,16 +8,17 @@ git-reflog - Manage reflog information | |||
| 8 | 8 | ||
| 9 | 9 | SYNOPSIS | |
| 10 | 10 | -------- | |
| 11 | - | [verse] | |
| 12 | - | 'git reflog' [show] [<log-options>] [<ref>] | |
| 13 | - | 'git reflog list' | |
| 14 | - | 'git reflog expire' [--expire=<time>] [--expire-unreachable=<time>] | |
| 11 | + | [synopsis] | |
| 12 | + | git reflog [show] [<log-options>] [<ref>] | |
| 13 | + | git reflog list | |
| 14 | + | git reflog exists <ref> | |
| 15 | + | git reflog write <ref> <old-oid> <new-oid> <message> | |
| 16 | + | git reflog delete [--rewrite] [--updateref] | |
| 17 | + | [--dry-run | -n] [--verbose] <ref>@{<specifier>}... | |
| 18 | + | git reflog drop [--all [--single-worktree] | <refs>...] | |
| 19 | + | git reflog expire [--expire=<time>] [--expire-unreachable=<time>] | |
| 15 | 20 | [--rewrite] [--updateref] [--stale-fix] | |
| 16 | 21 | [--dry-run | -n] [--verbose] [--all [--single-worktree] | <refs>...] | |
| 17 | - | 'git reflog delete' [--rewrite] [--updateref] | |
| 18 | - | [--dry-run | -n] [--verbose] <ref>@{<specifier>}... | |
| 19 | - | 'git reflog drop' [--all [--single-worktree] | <refs>...] | |
| 20 | - | 'git reflog exists' <ref> | |
| 21 | 22 | ||
| 22 | 23 | DESCRIPTION | |
| 23 | 24 | ----------- | |
| @@ -43,11 +44,15 @@ actions, and in addition the `HEAD` reflog records branch switching. | |||
| 43 | 44 | ||
| 44 | 45 | The "list" subcommand lists all refs which have a corresponding reflog. | |
| 45 | 46 | ||
| 46 | - | The "expire" subcommand prunes older reflog entries. Entries older | |
| 47 | - | than `expire` time, or entries older than `expire-unreachable` time | |
| 48 | - | and not reachable from the current tip, are removed from the reflog. | |
| 49 | - | This is typically not used directly by end users -- instead, see | |
| 50 | - | linkgit:git-gc[1]. | |
| 47 | + | The "exists" subcommand checks whether a ref has a reflog. It exits | |
| 48 | + | with zero status if the reflog exists, and non-zero status if it does | |
| 49 | + | not. | |
| 50 | + | ||
| 51 | + | The "write" subcommand writes a single entry to the reflog of a given | |
| 52 | + | reference. This new entry is appended to the reflog and will thus become | |
| 53 | + | the most recent entry. The reference name must be fully qualified. Both the old | |
| 54 | + | and new object IDs must not be abbreviated and must point to existing objects. | |
| 55 | + | The reflog message gets normalized. | |
| 51 | 56 | ||
| 52 | 57 | The "delete" subcommand deletes single entries from the reflog, but | |
| 53 | 58 | not the reflog itself. Its argument must be an _exact_ entry (e.g. "`git | |
| @@ -58,9 +63,11 @@ The "drop" subcommand completely removes the reflog for the specified | |||
| 58 | 63 | references. This is in contrast to "expire" and "delete", both of which | |
| 59 | 64 | can be used to delete reflog entries, but not the reflog itself. | |
| 60 | 65 | ||
| 61 | - | The "exists" subcommand checks whether a ref has a reflog. It exits | |
| 62 | - | with zero status if the reflog exists, and non-zero status if it does | |
| 63 | - | not. | |
| 66 | + | The "expire" subcommand prunes older reflog entries. Entries older | |
| 67 | + | than `expire` time, or entries older than `expire-unreachable` time | |
| 68 | + | and not reachable from the current tip, are removed from the reflog. | |
| 69 | + | This is typically not used directly by end users -- instead, see | |
| 70 | + | linkgit:git-gc[1]. | |
| 64 | 71 | ||
| 65 | 72 | OPTIONS | |
| 66 | 73 | ------- | |
| @@ -71,18 +78,37 @@ Options for `show` | |||
| 71 | 78 | `git reflog show` accepts any of the options accepted by `git log`. | |
| 72 | 79 | ||
| 73 | 80 | ||
| 81 | + | Options for `delete` | |
| 82 | + | ~~~~~~~~~~~~~~~~~~~~ | |
| 83 | + | ||
| 84 | + | `git reflog delete` accepts options `--updateref`, `--rewrite`, `-n`, | |
| 85 | + | `--dry-run`, and `--verbose`, with the same meanings as when they are | |
| 86 | + | used with `expire`. | |
| 87 | + | ||
| 88 | + | Options for `drop` | |
| 89 | + | ~~~~~~~~~~~~~~~~~~ | |
| 90 | + | ||
| 91 | + | `--all`:: | |
| 92 | + | Drop the reflogs of all references from all worktrees. | |
| 93 | + | ||
| 94 | + | `--single-worktree`:: | |
| 95 | + | By default when `--all` is specified, reflogs from all working | |
| 96 | + | trees are dropped. This option limits the processing to reflogs | |
| 97 | + | from the current working tree only. | |
| 98 | + | ||
| 99 | + | ||
| 74 | 100 | Options for `expire` | |
| 75 | 101 | ~~~~~~~~~~~~~~~~~~~~ | |
| 76 | 102 | ||
| 77 | - | --all:: | |
| 103 | + | `--all`:: | |
| 78 | 104 | Process the reflogs of all references. | |
| 79 | 105 | ||
| 80 | - | --single-worktree:: | |
| 106 | + | `--single-worktree`:: | |
| 81 | 107 | By default when `--all` is specified, reflogs from all working | |
| 82 | 108 | trees are processed. This option limits the processing to reflogs | |
| 83 | 109 | from the current working tree only. | |
| 84 | 110 | ||
| 85 | - | --expire=<time>:: | |
| 111 | + | `--expire=<time>`:: | |
| 86 | 112 | Prune entries older than the specified time. If this option is | |
| 87 | 113 | not specified, the expiration time is taken from the | |
| 88 | 114 | configuration setting `gc.reflogExpire`, which in turn | |
| @@ -90,7 +116,7 @@ Options for `expire` | |||
| 90 | 116 | of their age; `--expire=never` turns off pruning of reachable | |
| 91 | 117 | entries (but see `--expire-unreachable`). | |
| 92 | 118 | ||
| 93 | - | --expire-unreachable=<time>:: | |
| 119 | + | `--expire-unreachable=<time>`:: | |
| 94 | 120 | Prune entries older than `<time>` that are not reachable from | |
| 95 | 121 | the current tip of the branch. If this option is not | |
| 96 | 122 | specified, the expiration time is taken from the configuration | |
| @@ -100,17 +126,17 @@ Options for `expire` | |||
| 100 | 126 | turns off early pruning of unreachable entries (but see | |
| 101 | 127 | `--expire`). | |
| 102 | 128 | ||
| 103 | - | --updateref:: | |
| 129 | + | `--updateref`:: | |
| 104 | 130 | Update the reference to the value of the top reflog entry (i.e. | |
| 105 | 131 | <ref>@\{0\}) if the previous top entry was pruned. (This | |
| 106 | 132 | option is ignored for symbolic references.) | |
| 107 | 133 | ||
| 108 | - | --rewrite:: | |
| 134 | + | `--rewrite`:: | |
| 109 | 135 | If a reflog entry's predecessor is pruned, adjust its "old" | |
| 110 | 136 | SHA-1 to be equal to the "new" SHA-1 field of the entry that | |
| 111 | 137 | now precedes it. | |
| 112 | 138 | ||
| 113 | - | --stale-fix:: | |
| 139 | + | `--stale-fix`:: | |
| 114 | 140 | Prune any reflog entries that point to "broken commits". A | |
| 115 | 141 | broken commit is a commit that is not reachable from any of | |
| 116 | 142 | the reference tips and that refers, directly or indirectly, to | |
| @@ -121,33 +147,15 @@ has the same cost as 'git prune'. It is primarily intended to fix | |||
| 121 | 147 | corruption caused by garbage collecting using older versions of Git, | |
| 122 | 148 | which didn't protect objects referred to by reflogs. | |
| 123 | 149 | ||
| 124 | - | -n:: | |
| 125 | - | --dry-run:: | |
| 150 | + | `-n`:: | |
| 151 | + | `--dry-run`:: | |
| 126 | 152 | Do not actually prune any entries; just show what would have | |
| 127 | 153 | been pruned. | |
| 128 | 154 | ||
| 129 | - | --verbose:: | |
| 155 | + | `--verbose`:: | |
| 130 | 156 | Print extra information on screen. | |
| 131 | 157 | ||
| 132 | 158 | ||
| 133 | - | Options for `delete` | |
| 134 | - | ~~~~~~~~~~~~~~~~~~~~ | |
| 135 | - | ||
| 136 | - | `git reflog delete` accepts options `--updateref`, `--rewrite`, `-n`, | |
| 137 | - | `--dry-run`, and `--verbose`, with the same meanings as when they are | |
| 138 | - | used with `expire`. | |
| 139 | - | ||
| 140 | - | Options for `drop` | |
| 141 | - | ~~~~~~~~~~~~~~~~~~ | |
| 142 | - | ||
| 143 | - | --all:: | |
| 144 | - | Drop the reflogs of all references from all worktrees. | |
| 145 | - | ||
| 146 | - | --single-worktree:: | |
| 147 | - | By default when `--all` is specified, reflogs from all working | |
| 148 | - | trees are dropped. This option limits the processing to reflogs | |
| 149 | - | from the current working tree only. | |
| 150 | - | ||
| 151 | 159 | GIT | |
| 152 | 160 | --- | |
| 153 | 161 | Part of the linkgit:git[1] suite | |
modified Documentation/git-refs.adoc
| @@ -11,6 +11,19 @@ SYNOPSIS | |||
| 11 | 11 | [synopsis] | |
| 12 | 12 | git refs migrate --ref-format=<format> [--no-reflog] [--dry-run] | |
| 13 | 13 | git refs verify [--strict] [--verbose] | |
| 14 | + | git refs list [--count=<count>] [--shell|--perl|--python|--tcl] | |
| 15 | + | [(--sort=<key>)...] [--format=<format>] | |
| 16 | + | [--include-root-refs] [--points-at=<object>] | |
| 17 | + | [--merged[=<object>]] [--no-merged[=<object>]] | |
| 18 | + | [--contains[=<object>]] [--no-contains[=<object>]] | |
| 19 | + | [(--exclude=<pattern>)...] [--start-after=<marker>] | |
| 20 | + | [ --stdin | (<pattern>...)] | |
| 21 | + | git refs exists <ref> | |
| 22 | + | git refs optimize [--all] [--no-prune] [--auto] [--include <pattern>] [--exclude <pattern>] | |
| 23 | + | git refs create [--message=<reason>] [--no-deref] [--create-reflog] <ref> <new-value> | |
| 24 | + | git refs delete [--message=<reason>] [--no-deref] <ref> [<old-value>] | |
| 25 | + | git refs update [--message=<reason>] [--no-deref] [--create-reflog] <ref> <new-value> [<old-value>] | |
| 26 | + | git refs rename [--message=<reason>] <old-ref> <new-ref> | |
| 14 | 27 | ||
| 15 | 28 | DESCRIPTION | |
| 16 | 29 | ----------- | |
| @@ -20,57 +33,117 @@ This command provides low-level access to refs. | |||
| 20 | 33 | COMMANDS | |
| 21 | 34 | -------- | |
| 22 | 35 | ||
| 23 | - | migrate:: | |
| 36 | + | `migrate`:: | |
| 24 | 37 | Migrate ref store between different formats. | |
| 38 | + | + | |
| 39 | + | [WARNING] | |
| 40 | + | -- | |
| 41 | + | The ref format migration has several known limitations in its current form: | |
| 42 | + | ||
| 43 | + | * It is not possible to migrate repositories that have worktrees. | |
| 44 | + | ||
| 45 | + | * There is no way to block concurrent writes to the repository during an | |
| 46 | + | ongoing migration. Concurrent writes can lead to an inconsistent migrated | |
| 47 | + | state. Users are expected to block writes on a higher level. If your | |
| 48 | + | repository is registered for scheduled maintenance, it is recommended to | |
| 49 | + | unregister it first with linkgit:git-maintenance[1]. | |
| 50 | + | ||
| 51 | + | These limitations may eventually be lifted. | |
| 52 | + | -- | |
| 25 | 53 | ||
| 26 | - | verify:: | |
| 54 | + | `verify`:: | |
| 27 | 55 | Verify reference database consistency. | |
| 28 | 56 | ||
| 57 | + | list:: | |
| 58 | + | List references in the repository with support for filtering, | |
| 59 | + | formatting, and sorting. This subcommand is an alias for | |
| 60 | + | linkgit:git-for-each-ref[1] and offers identical functionality. | |
| 61 | + | ||
| 62 | + | exists:: | |
| 63 | + | Check whether the given reference exists. Returns an exit code of 0 if | |
| 64 | + | it does, 2 if it is missing, and 1 in case looking up the reference | |
| 65 | + | failed with an error other than the reference being missing. This does | |
| 66 | + | not verify whether the reference resolves to an actual object. | |
| 67 | + | ||
| 68 | + | optimize:: | |
| 69 | + | Optimizes references to improve repository performance and reduce disk | |
| 70 | + | usage. This subcommand is an alias for linkgit:git-pack-refs[1] and | |
| 71 | + | offers identical functionality. | |
| 72 | + | ||
| 73 | + | create:: | |
| 74 | + | Create the given reference, which must not already exist, pointing at | |
| 75 | + | `<new-value>`. | |
| 76 | + | ||
| 77 | + | delete:: | |
| 78 | + | Delete the given reference. This subcommand mirrors `git update-ref -d` | |
| 79 | + | (see linkgit:git-update-ref[1]). When `<old-value>` is given, the | |
| 80 | + | reference is only deleted after verifying that it currently contains | |
| 81 | + | `<old-value>`. | |
| 82 | + | ||
| 83 | + | update:: | |
| 84 | + | Update the given reference to point at `<new-value>`. If `<old-value>` | |
| 85 | + | is given, the reference is only updated after verifying that it | |
| 86 | + | currently contains `<old-value>`. As a special case, an all-zeroes | |
| 87 | + | `<new-value>` deletes the branch, whereas an all-zeroes `<old-value>` | |
| 88 | + | ensures that the branch does not yet exist. | |
| 89 | + | ||
| 90 | + | rename:: | |
| 91 | + | Rename the reference `<oldref>` to `<newref>`. The old reference must | |
| 92 | + | exist and the new reference must not yet exist, and both must have a | |
| 93 | + | well-formed name (see linkgit:git-check-ref-format[1]). | |
| 94 | + | ||
| 29 | 95 | OPTIONS | |
| 30 | 96 | ------- | |
| 31 | 97 | ||
| 32 | - | The following options are specific to 'git refs migrate': | |
| 98 | + | The following options are specific to `git refs migrate`: | |
| 33 | 99 | ||
| 34 | - | --ref-format=<format>:: | |
| 100 | + | `--ref-format=<format>`:: | |
| 35 | 101 | The ref format to migrate the ref store to. Can be one of: | |
| 36 | 102 | + | |
| 37 | 103 | include::ref-storage-format.adoc[] | |
| 38 | 104 | ||
| 39 | - | --dry-run:: | |
| 105 | + | `--dry-run`:: | |
| 40 | 106 | Perform the migration, but do not modify the repository. The migrated | |
| 41 | 107 | refs will be written into a separate directory that can be inspected | |
| 42 | 108 | separately. The name of the directory will be reported on stdout. This | |
| 43 | 109 | can be used to double check that the migration works as expected before | |
| 44 | 110 | performing the actual migration. | |
| 45 | 111 | ||
| 46 | - | --reflog:: | |
| 47 | - | --no-reflog:: | |
| 112 | + | `--reflog`:: | |
| 113 | + | `--no-reflog`:: | |
| 48 | 114 | Choose between migrating the reflog data to the new backend, | |
| 49 | 115 | and discarding them. The default is "--reflog", to migrate. | |
| 50 | 116 | ||
| 51 | - | The following options are specific to 'git refs verify': | |
| 117 | + | The following options are specific to `git refs verify`: | |
| 52 | 118 | ||
| 53 | - | --strict:: | |
| 119 | + | `--strict`:: | |
| 54 | 120 | Enable stricter error checking. This will cause warnings to be | |
| 55 | 121 | reported as errors. See linkgit:git-fsck[1]. | |
| 56 | 122 | ||
| 57 | - | --verbose:: | |
| 123 | + | `--verbose`:: | |
| 58 | 124 | When verifying the reference database consistency, be chatty. | |
| 59 | 125 | ||
| 60 | - | KNOWN LIMITATIONS | |
| 61 | - | ----------------- | |
| 126 | + | The following options are specific to 'git refs list': | |
| 62 | 127 | ||
| 63 | - | The ref format migration has several known limitations in its current form: | |
| 128 | + | include::for-each-ref-options.adoc[] | |
| 64 | 129 | ||
| 65 | - | * It is not possible to migrate repositories that have worktrees. | |
| 130 | + | The following options are specific to 'git refs optimize': | |
| 66 | 131 | ||
| 67 | - | * There is no way to block concurrent writes to the repository during an | |
| 68 | - | ongoing migration. Concurrent writes can lead to an inconsistent migrated | |
| 69 | - | state. Users are expected to block writes on a higher level. If your | |
| 70 | - | repository is registered for scheduled maintenance, it is recommended to | |
| 71 | - | unregister it first with git-maintenance(1). | |
| 132 | + | include::pack-refs-options.adoc[] | |
| 72 | 133 | ||
| 73 | - | These limitations may eventually be lifted. | |
| 134 | + | The following options are specific to commands which write references: | |
| 135 | + | ||
| 136 | + | `--create-reflog`:: | |
| 137 | + | Create a reflog for the reference even if one would not ordinarily be | |
| 138 | + | created. | |
| 139 | + | ||
| 140 | + | `--message=<reason>`:: | |
| 141 | + | Use the given <reason> string for the reflog entry associated with the | |
| 142 | + | update. An empty message is rejected. | |
| 143 | + | ||
| 144 | + | `--no-deref`:: | |
| 145 | + | Operate on <ref> itself rather than the reference it points to via a | |
| 146 | + | symbolic ref. | |
| 74 | 147 | ||
| 75 | 148 | GIT | |
| 76 | 149 | --- | |
modified Documentation/git-remote.adoc
| @@ -8,20 +8,20 @@ git-remote - Manage set of tracked repositories | |||
| 8 | 8 | ||
| 9 | 9 | SYNOPSIS | |
| 10 | 10 | -------- | |
| 11 | - | [verse] | |
| 12 | - | 'git remote' [-v | --verbose] | |
| 13 | - | 'git remote add' [-t <branch>] [-m <master>] [-f] [--[no-]tags] [--mirror=(fetch|push)] <name> <URL> | |
| 14 | - | 'git remote rename' [--[no-]progress] <old> <new> | |
| 15 | - | 'git remote remove' <name> | |
| 16 | - | 'git remote set-head' <name> (-a | --auto | -d | --delete | <branch>) | |
| 17 | - | 'git remote set-branches' [--add] <name> <branch>... | |
| 18 | - | 'git remote get-url' [--push] [--all] <name> | |
| 19 | - | 'git remote set-url' [--push] <name> <newurl> [<oldurl>] | |
| 20 | - | 'git remote set-url --add' [--push] <name> <newurl> | |
| 21 | - | 'git remote set-url --delete' [--push] <name> <URL> | |
| 22 | - | 'git remote' [-v | --verbose] 'show' [-n] <name>... | |
| 23 | - | 'git remote prune' [-n | --dry-run] <name>... | |
| 24 | - | 'git remote' [-v | --verbose] 'update' [-p | --prune] [(<group> | <remote>)...] | |
| 11 | + | [synopsis] | |
| 12 | + | git remote [-v | --verbose] | |
| 13 | + | git remote add [-t <branch>] [-m <master>] [-f] [--[no-]tags] [--mirror=(fetch|push)] <name> <URL> | |
| 14 | + | git remote rename [--[no-]progress] <old> <new> | |
| 15 | + | git remote remove <name> | |
| 16 | + | git remote set-head <name> (-a | --auto | -d | --delete | <branch>) | |
| 17 | + | git remote set-branches [--add] <name> <branch>... | |
| 18 | + | git remote get-url [--push] [--all] <name> | |
| 19 | + | git remote set-url [--push] <name> <newurl> [<oldurl>] | |
| 20 | + | git remote set-url --add [--push] <name> <newurl> | |
| 21 | + | git remote set-url --delete [--push] <name> <URL> | |
| 22 | + | git remote [-v | --verbose] show [-n] <name>... | |
| 23 | + | git remote prune [-n | --dry-run] <name>... | |
| 24 | + | git remote [-v | --verbose] update [-p | --prune] [(<group> | <remote>)...] | |
| 25 | 25 | ||
| 26 | 26 | DESCRIPTION | |
| 27 | 27 | ----------- | |
| @@ -32,8 +32,8 @@ Manage the set of repositories ("remotes") whose branches you track. | |||
| 32 | 32 | OPTIONS | |
| 33 | 33 | ------- | |
| 34 | 34 | ||
| 35 | - | -v:: | |
| 36 | - | --verbose:: | |
| 35 | + | `-v`:: | |
| 36 | + | `--verbose`:: | |
| 37 | 37 | Be a little more verbose and show remote url after name. | |
| 38 | 38 | For promisor remotes, also show which filters (`blob:none` etc.) | |
| 39 | 39 | are configured. | |
| @@ -43,14 +43,14 @@ OPTIONS | |||
| 43 | 43 | COMMANDS | |
| 44 | 44 | -------- | |
| 45 | 45 | ||
| 46 | - | With no arguments, shows a list of existing remotes. Several | |
| 46 | + | With no arguments, show a list of existing remotes. Several | |
| 47 | 47 | subcommands are available to perform operations on the remotes. | |
| 48 | 48 | ||
| 49 | - | 'add':: | |
| 49 | + | `add`:: | |
| 50 | 50 | ||
| 51 | - | Add a remote named <name> for the repository at | |
| 52 | - | <URL>. The command `git fetch <name>` can then be used to create and | |
| 53 | - | update remote-tracking branches <name>/<branch>. | |
| 51 | + | Add a remote named _<name>_ for the repository at | |
| 52 | + | _<URL>_. The command `git fetch <name>` can then be used to create and | |
| 53 | + | update remote-tracking branches `<name>/<branch>`. | |
| 54 | 54 | + | |
| 55 | 55 | With `-f` option, `git fetch <name>` is run immediately after | |
| 56 | 56 | the remote information is set up. | |
| @@ -66,40 +66,40 @@ By default, only tags on fetched branches are imported | |||
| 66 | 66 | + | |
| 67 | 67 | With `-t <branch>` option, instead of the default glob | |
| 68 | 68 | refspec for the remote to track all branches under | |
| 69 | - | the `refs/remotes/<name>/` namespace, a refspec to track only `<branch>` | |
| 69 | + | the `refs/remotes/<name>/` namespace, a refspec to track only _<branch>_ | |
| 70 | 70 | is created. You can give more than one `-t <branch>` to track | |
| 71 | 71 | multiple branches without grabbing all branches. | |
| 72 | 72 | + | |
| 73 | 73 | With `-m <master>` option, a symbolic-ref `refs/remotes/<name>/HEAD` is set | |
| 74 | - | up to point at remote's `<master>` branch. See also the set-head command. | |
| 74 | + | up to point at remote's _<master>_ branch. See also the set-head command. | |
| 75 | 75 | + | |
| 76 | 76 | When a fetch mirror is created with `--mirror=fetch`, the refs will not | |
| 77 | - | be stored in the 'refs/remotes/' namespace, but rather everything in | |
| 78 | - | 'refs/' on the remote will be directly mirrored into 'refs/' in the | |
| 77 | + | be stored in the `refs/remotes/` namespace, but rather everything in | |
| 78 | + | `refs/` on the remote will be directly mirrored into `refs/` in the | |
| 79 | 79 | local repository. This option only makes sense in bare repositories, | |
| 80 | 80 | because a fetch would overwrite any local commits. | |
| 81 | 81 | + | |
| 82 | 82 | When a push mirror is created with `--mirror=push`, then `git push` | |
| 83 | 83 | will always behave as if `--mirror` was passed. | |
| 84 | 84 | ||
| 85 | - | 'rename':: | |
| 85 | + | `rename`:: | |
| 86 | 86 | ||
| 87 | - | Rename the remote named <old> to <new>. All remote-tracking branches and | |
| 87 | + | Rename the remote named _<old>_ to _<new>_. All remote-tracking branches and | |
| 88 | 88 | configuration settings for the remote are updated. | |
| 89 | 89 | + | |
| 90 | - | In case <old> and <new> are the same, and <old> is a file under | |
| 90 | + | In case _<old>_ and _<new>_ are the same, and _<old>_ is a file under | |
| 91 | 91 | `$GIT_DIR/remotes` or `$GIT_DIR/branches`, the remote is converted to | |
| 92 | 92 | the configuration file format. | |
| 93 | 93 | ||
| 94 | - | 'remove':: | |
| 95 | - | 'rm':: | |
| 94 | + | `remove`:: | |
| 95 | + | `rm`:: | |
| 96 | 96 | ||
| 97 | - | Remove the remote named <name>. All remote-tracking branches and | |
| 97 | + | Remove the remote named _<name>_. All remote-tracking branches and | |
| 98 | 98 | configuration settings for the remote are removed. | |
| 99 | 99 | ||
| 100 | - | 'set-head':: | |
| 100 | + | `set-head`:: | |
| 101 | 101 | ||
| 102 | - | Sets or deletes the default branch (i.e. the target of the | |
| 102 | + | Set or delete the default branch (i.e. the target of the | |
| 103 | 103 | symbolic-ref `refs/remotes/<name>/HEAD`) for | |
| 104 | 104 | the named remote. Having a default branch for a remote is not required, | |
| 105 | 105 | but allows the name of the remote to be specified in lieu of a specific | |
| @@ -116,15 +116,15 @@ the symbolic-ref `refs/remotes/origin/HEAD` to `refs/remotes/origin/next`. This | |||
| 116 | 116 | only work if `refs/remotes/origin/next` already exists; if not it must be | |
| 117 | 117 | fetched first. | |
| 118 | 118 | + | |
| 119 | - | Use `<branch>` to set the symbolic-ref `refs/remotes/<name>/HEAD` explicitly. e.g., `git | |
| 119 | + | Use _<branch>_ to set the symbolic-ref `refs/remotes/<name>/HEAD` explicitly. e.g., `git | |
| 120 | 120 | remote set-head origin master` will set the symbolic-ref `refs/remotes/origin/HEAD` to | |
| 121 | 121 | `refs/remotes/origin/master`. This will only work if | |
| 122 | 122 | `refs/remotes/origin/master` already exists; if not it must be fetched first. | |
| 123 | 123 | + | |
| 124 | 124 | ||
| 125 | - | 'set-branches':: | |
| 125 | + | `set-branches`:: | |
| 126 | 126 | ||
| 127 | - | Changes the list of branches tracked by the named remote. | |
| 127 | + | Change the list of branches tracked by the named remote. | |
| 128 | 128 | This can be used to track a subset of the available remote branches | |
| 129 | 129 | after the initial setup for a remote. | |
| 130 | 130 | + | |
| @@ -134,7 +134,7 @@ The named branches will be interpreted as if specified with the | |||
| 134 | 134 | With `--add`, instead of replacing the list of currently tracked | |
| 135 | 135 | branches, adds to that list. | |
| 136 | 136 | ||
| 137 | - | 'get-url':: | |
| 137 | + | `get-url`:: | |
| 138 | 138 | ||
| 139 | 139 | Retrieves the URLs for a remote. Configurations for `insteadOf` and | |
| 140 | 140 | `pushInsteadOf` are expanded here. By default, only the first URL is listed. | |
| @@ -143,18 +143,18 @@ With `--push`, push URLs are queried rather than fetch URLs. | |||
| 143 | 143 | + | |
| 144 | 144 | With `--all`, all URLs for the remote will be listed. | |
| 145 | 145 | ||
| 146 | - | 'set-url':: | |
| 146 | + | `set-url`:: | |
| 147 | 147 | ||
| 148 | - | Changes URLs for the remote. Sets first URL for remote <name> that matches | |
| 149 | - | regex <oldurl> (first URL if no <oldurl> is given) to <newurl>. If | |
| 150 | - | <oldurl> doesn't match any URL, an error occurs and nothing is changed. | |
| 148 | + | Change URLs for the remote. Sets first URL for remote _<name>_ that matches | |
| 149 | + | regex _<oldurl>_ (first URL if no _<oldurl>_ is given) to _<newurl>_. If | |
| 150 | + | _<oldurl>_ doesn't match any URL, an error occurs and nothing is changed. | |
| 151 | 151 | + | |
| 152 | 152 | With `--push`, push URLs are manipulated instead of fetch URLs. | |
| 153 | 153 | + | |
| 154 | 154 | With `--add`, instead of changing existing URLs, new URL is added. | |
| 155 | 155 | + | |
| 156 | 156 | With `--delete`, instead of changing existing URLs, all URLs matching | |
| 157 | - | regex <URL> are deleted for remote <name>. Trying to delete all | |
| 157 | + | regex _<URL>_ are deleted for remote _<name>_. Trying to delete all | |
| 158 | 158 | non-push URLs is an error. | |
| 159 | 159 | + | |
| 160 | 160 | Note that the push URL and the fetch URL, even though they can | |
| @@ -165,17 +165,17 @@ fetch from one place (e.g. your upstream) and push to another (e.g. | |||
| 165 | 165 | your publishing repository), use two separate remotes. | |
| 166 | 166 | ||
| 167 | 167 | ||
| 168 | - | 'show':: | |
| 168 | + | `show`:: | |
| 169 | 169 | ||
| 170 | - | Gives some information about the remote <name>. | |
| 170 | + | Give some information about the remote _<name>_. | |
| 171 | 171 | + | |
| 172 | 172 | With `-n` option, the remote heads are not queried first with | |
| 173 | 173 | `git ls-remote <name>`; cached information is used instead. | |
| 174 | 174 | ||
| 175 | - | 'prune':: | |
| 175 | + | `prune`:: | |
| 176 | 176 | ||
| 177 | - | Deletes stale references associated with <name>. By default, stale | |
| 178 | - | remote-tracking branches under <name> are deleted, but depending on | |
| 177 | + | Delete stale references associated with _<name>_. By default, stale | |
| 178 | + | remote-tracking branches under _<name>_ are deleted, but depending on | |
| 179 | 179 | global configuration and the configuration of the remote we might even | |
| 180 | 180 | prune local tags that haven't been pushed there. Equivalent to `git | |
| 181 | 181 | fetch --prune <name>`, except that no new references will be fetched. | |
| @@ -186,13 +186,13 @@ depending on various configuration. | |||
| 186 | 186 | With `--dry-run` option, report what branches would be pruned, but do not | |
| 187 | 187 | actually prune them. | |
| 188 | 188 | ||
| 189 | - | 'update':: | |
| 189 | + | `update`:: | |
| 190 | 190 | ||
| 191 | 191 | Fetch updates for remotes or remote groups in the repository as defined by | |
| 192 | 192 | `remotes.<group>`. If neither group nor remote is specified on the command line, | |
| 193 | - | the configuration parameter remotes.default will be used; if | |
| 194 | - | remotes.default is not defined, all remotes which do not have the | |
| 195 | - | configuration parameter `remote.<name>.skipDefaultUpdate` set to true will | |
| 193 | + | the configuration parameter `remotes.default` will be used; if | |
| 194 | + | `remotes.default` is not defined, all remotes which do not have the | |
| 195 | + | configuration parameter `remote.<name>.skipDefaultUpdate` set to `true` will | |
| 196 | 196 | be updated. (See linkgit:git-config[1]). | |
| 197 | 197 | + | |
| 198 | 198 | With `--prune` option, run pruning against all the remotes that are updated. | |
| @@ -210,7 +210,7 @@ EXIT STATUS | |||
| 210 | 210 | ||
| 211 | 211 | On success, the exit status is `0`. | |
| 212 | 212 | ||
| 213 | - | When subcommands such as 'add', 'rename', and 'remove' can't find the | |
| 213 | + | When subcommands such as `add`, `rename`, and `remove` can't find the | |
| 214 | 214 | remote in question, the exit status is `2`. When the remote already | |
| 215 | 215 | exists, the exit status is `3`. | |
| 216 | 216 | ||
| @@ -247,7 +247,7 @@ $ git switch -c staging staging/master | |||
| 247 | 247 | ... | |
| 248 | 248 | ------------ | |
| 249 | 249 | ||
| 250 | - | * Imitate 'git clone' but track only selected branches | |
| 250 | + | * Imitate `git clone` but track only selected branches | |
| 251 | 251 | + | |
| 252 | 252 | ------------ | |
| 253 | 253 | $ mkdir project.git | |
modified Documentation/git-repack.adoc
| @@ -11,7 +11,7 @@ SYNOPSIS | |||
| 11 | 11 | [verse] | |
| 12 | 12 | 'git repack' [-a] [-A] [-d] [-f] [-F] [-l] [-n] [-q] [-b] [-m] | |
| 13 | 13 | [--window=<n>] [--depth=<n>] [--threads=<n>] [--keep-pack=<pack-name>] | |
| 14 | - | [--write-midx] [--name-hash-version=<n>] | |
| 14 | + | [--write-midx[=<mode>]] [--name-hash-version=<n>] [--path-walk] | |
| 15 | 15 | ||
| 16 | 16 | DESCRIPTION | |
| 17 | 17 | ----------- | |
| @@ -77,14 +77,14 @@ to the new separate pack will be written. | |||
| 77 | 77 | Only useful with `--cruft -d`. | |
| 78 | 78 | ||
| 79 | 79 | --max-cruft-size=<n>:: | |
| 80 | - | Overrides `--max-pack-size` for cruft packs. Inherits the value of | |
| 80 | + | Override `--max-pack-size` for cruft packs. Inherits the value of | |
| 81 | 81 | `--max-pack-size` (if any) by default. See the documentation for | |
| 82 | 82 | `--max-pack-size` for more details. | |
| 83 | 83 | ||
| 84 | 84 | --combine-cruft-below-size=<n>:: | |
| 85 | 85 | When generating cruft packs without pruning, only repack | |
| 86 | - | existing cruft packs whose size is strictly less than `<n>`, | |
| 87 | - | where `<n>` represents a number of bytes, which can optionally | |
| 86 | + | existing cruft packs whose size is strictly less than `<n>` | |
| 87 | + | bytes, which can optionally | |
| 88 | 88 | be suffixed with "k", "m", or "g". Cruft packs whose size is | |
| 89 | 89 | greater than or equal to `<n>` are left as-is and not repacked. | |
| 90 | 90 | Useful when you want to avoid repacking large cruft pack(s) in | |
| @@ -250,14 +250,55 @@ pack as the preferred pack for object selection by the MIDX (see | |||
| 250 | 250 | linkgit:git-multi-pack-index[1]). | |
| 251 | 251 | ||
| 252 | 252 | -m:: | |
| 253 | - | --write-midx:: | |
| 253 | + | --write-midx[=<mode>]:: | |
| 254 | 254 | Write a multi-pack index (see linkgit:git-multi-pack-index[1]) | |
| 255 | - | containing the non-redundant packs. | |
| 255 | + | containing the non-redundant packs. The following modes are | |
| 256 | + | available: | |
| 257 | + | + | |
| 258 | + | -- | |
| 259 | + | `default`;; | |
| 260 | + | Write a single MIDX covering all packs. This is the | |
| 261 | + | default when `--write-midx` is given without an | |
| 262 | + | explicit mode. | |
| 263 | + | ||
| 264 | + | `incremental`;; | |
| 265 | + | Write an incremental MIDX chain instead of a single | |
| 266 | + | flat MIDX. | |
| 267 | + | + | |
| 268 | + | Without `--geometric`, a new MIDX layer is appended to the existing | |
| 269 | + | chain (or a new chain is started) containing whatever packs were written | |
| 270 | + | by the repack. Existing layers are preserved as-is. | |
| 271 | + | + | |
| 272 | + | When combined with `--geometric`, the incremental mode maintains a chain | |
| 273 | + | of MIDX layers that is compacted over time using a geometric merging | |
| 274 | + | strategy. Each repack creates a new tip layer containing the newly | |
| 275 | + | written pack(s). Adjacent layers are then merged whenever the newer | |
| 276 | + | layer's object count exceeds `1/repack.midxSplitFactor` of the next | |
| 277 | + | deeper layer's count. Layers that do not meet this condition are | |
| 278 | + | retained as-is. | |
| 279 | + | + | |
| 280 | + | The result is that newer (tip) layers tend to contain many small packs | |
| 281 | + | with relatively few objects, while older (deeper) layers contain fewer, | |
| 282 | + | larger packs covering more objects. Because compaction is driven by the | |
| 283 | + | tip of the chain, newer layers are also rewritten more frequently than | |
| 284 | + | older ones, which are only touched when enough objects have accumulated | |
| 285 | + | to justify merging into them. This keeps the total number of layers | |
| 286 | + | logarithmic relative to the total number of objects. | |
| 287 | + | + | |
| 288 | + | Only packs in the tip MIDX layer are considered as candidates for the | |
| 289 | + | geometric repack; packs in deeper layers are left untouched. If the tip | |
| 290 | + | layer contains fewer packs than `repack.midxNewLayerThreshold`, those | |
| 291 | + | packs are excluded from the geometry entirely, and a new layer is | |
| 292 | + | created for any new pack(s) without disturbing the existing chain. | |
| 293 | + | -- | |
| 256 | 294 | ||
| 257 | 295 | --name-hash-version=<n>:: | |
| 258 | 296 | Provide this argument to the underlying `git pack-objects` process. | |
| 259 | 297 | See linkgit:git-pack-objects[1] for full details. | |
| 260 | 298 | ||
| 299 | + | --path-walk:: | |
| 300 | + | Pass the `--path-walk` option to the underlying `git pack-objects` | |
| 301 | + | process. See linkgit:git-pack-objects[1] for full details. | |
| 261 | 302 | ||
| 262 | 303 | CONFIGURATION | |
| 263 | 304 | ------------- | |
modified Documentation/git-replace.adoc
| @@ -145,6 +145,13 @@ commit instead of the replaced commit. | |||
| 145 | 145 | There may be other problems when using 'git rev-list' related to | |
| 146 | 146 | pending objects. | |
| 147 | 147 | ||
| 148 | + | CAVEATS | |
| 149 | + | ------- | |
| 150 | + | ||
| 151 | + | The existence of replace objects or commit grafts turns off reading or | |
| 152 | + | writing to the commit-graph, which can cause performance issues. See | |
| 153 | + | linkgit:git-commit-graph[1]. | |
| 154 | + | ||
| 148 | 155 | SEE ALSO | |
| 149 | 156 | -------- | |
| 150 | 157 | linkgit:git-hash-object[1] | |
modified Documentation/git-replay.adoc
| @@ -9,63 +9,124 @@ git-replay - EXPERIMENTAL: Replay commits on a new base, works with bare repos t | |||
| 9 | 9 | SYNOPSIS | |
| 10 | 10 | -------- | |
| 11 | 11 | [verse] | |
| 12 | - | (EXPERIMENTAL!) 'git replay' ([--contained] --onto <newbase> | --advance <branch>) <revision-range>... | |
| 12 | + | (EXPERIMENTAL!) 'git replay' ([--contained] --onto=<newbase> | --advance=<branch> | --revert=<branch>) | |
| 13 | + | [--ref=<ref>] [--ref-action=<mode>] <revision-range> | |
| 13 | 14 | ||
| 14 | 15 | DESCRIPTION | |
| 15 | 16 | ----------- | |
| 16 | 17 | ||
| 17 | - | Takes ranges of commits and replays them onto a new location. Leaves | |
| 18 | - | the working tree and the index untouched, and updates no references. | |
| 19 | - | The output of this command is meant to be used as input to | |
| 20 | - | `git update-ref --stdin`, which would update the relevant branches | |
| 21 | - | (see the OUTPUT section below). | |
| 18 | + | Takes a range of commits and replays them onto a new location. Leaves | |
| 19 | + | the working tree and the index untouched. By default, updates the | |
| 20 | + | relevant references using an atomic transaction (all refs update or | |
| 21 | + | none). Use `--ref-action=print` to avoid automatic ref updates and | |
| 22 | + | instead get update commands that can be piped to `git update-ref --stdin` | |
| 23 | + | (see the <<output,OUTPUT>> section below). | |
| 22 | 24 | ||
| 23 | 25 | THIS COMMAND IS EXPERIMENTAL. THE BEHAVIOR MAY CHANGE. | |
| 24 | 26 | ||
| 25 | 27 | OPTIONS | |
| 26 | 28 | ------- | |
| 27 | 29 | ||
| 28 | - | --onto <newbase>:: | |
| 30 | + | --onto=<newbase>:: | |
| 29 | 31 | Starting point at which to create the new commits. May be any | |
| 30 | 32 | valid commit, and not just an existing branch name. | |
| 31 | 33 | + | |
| 32 | - | When `--onto` is specified, the update-ref command(s) in the output will | |
| 33 | - | update the branch(es) in the revision range to point at the new | |
| 34 | - | commits, similar to the way how `git rebase --update-refs` updates | |
| 35 | - | multiple branches in the affected range. | |
| 34 | + | When `--onto` is specified, the branch(es) in the revision range will be | |
| 35 | + | updated to point at the new commits, similar to the way `git rebase --update-refs` | |
| 36 | + | updates multiple branches in the affected range. | |
| 36 | 37 | ||
| 37 | - | --advance <branch>:: | |
| 38 | + | --advance=<branch>:: | |
| 38 | 39 | Starting point at which to create the new commits; must be a | |
| 39 | 40 | branch name. | |
| 40 | 41 | + | |
| 41 | - | When `--advance` is specified, the update-ref command(s) in the output | |
| 42 | - | will update the branch passed as an argument to `--advance` to point at | |
| 43 | - | the new commits (in other words, this mimics a cherry-pick operation). | |
| 42 | + | The history is replayed on top of the <branch> and <branch> is updated to | |
| 43 | + | point at the tip of the resulting history. This is different from `--onto`, | |
| 44 | + | which uses the target only as a starting point without updating it. | |
| 44 | 45 | ||
| 45 | - | <revision-range>:: | |
| 46 | - | Range of commits to replay. More than one <revision-range> can | |
| 47 | - | be passed, but in `--advance <branch>` mode, they should have | |
| 48 | - | a single tip, so that it's clear where <branch> should point | |
| 49 | - | to. See "Specifying Ranges" in linkgit:git-rev-parse[1] and the | |
| 50 | - | "Commit Limiting" options below. | |
| 46 | + | --revert=<branch>:: | |
| 47 | + | Starting point at which to create the reverted commits; must be a | |
| 48 | + | branch name. | |
| 49 | + | + | |
| 50 | + | When `--revert` is specified, the commits in the revision range are reverted | |
| 51 | + | (their changes are undone) and the reverted commits are created on top of | |
| 52 | + | <branch>. The <branch> is then updated to point at the new commits. This is | |
| 53 | + | the same as running `git revert <revision-range>` but does not update the | |
| 54 | + | working tree. | |
| 55 | + | + | |
| 56 | + | The commit messages follow `git revert` conventions: they are prefixed with | |
| 57 | + | "Revert" and include "This reverts commit <hash>." When reverting a commit | |
| 58 | + | whose message starts with "Revert", the new message uses "Reapply" instead. | |
| 59 | + | Unlike cherry-pick which preserves the original author, revert commits use | |
| 60 | + | the current user as the author, matching the behavior of `git revert`. | |
| 61 | + | + | |
| 62 | + | This option is mutually exclusive with `--onto` and `--advance`. It is also | |
| 63 | + | incompatible with `--contained` (which is a modifier for `--onto` only). | |
| 64 | + | ||
| 65 | + | --contained:: | |
| 66 | + | Update all branches that point at commits in | |
| 67 | + | <revision-range>. Requires `--onto`. | |
| 68 | + | ||
| 69 | + | --ref=<ref>:: | |
| 70 | + | Override which reference is updated with the result of the replay. | |
| 71 | + | The ref must be fully qualified. | |
| 72 | + | When used with `--onto`, the `<revision-range>` should have a | |
| 73 | + | single tip and only the specified reference is updated instead of | |
| 74 | + | inferring refs from the revision range. | |
| 75 | + | When used with `--advance` or `--revert`, the specified reference is | |
| 76 | + | updated instead of the branch given to those options. | |
| 77 | + | This option is incompatible with `--contained`. | |
| 78 | + | ||
| 79 | + | --ref-action[=<mode>]:: | |
| 80 | + | Control how references are updated. The mode can be: | |
| 81 | + | + | |
| 82 | + | -- | |
| 83 | + | //// | |
| 84 | + | Expanded description list compared to 'replay.refAction'. | |
| 85 | + | //// | |
| 86 | + | `update`;; (default) Update refs directly using an atomic transaction. | |
| 87 | + | All refs are updated or none are (all-or-nothing behavior). | |
| 88 | + | `print`;; Output update-ref commands for pipeline use. This is the | |
| 89 | + | traditional behavior where output can be piped to `git update-ref --stdin`. | |
| 90 | + | -- | |
| 91 | + | + | |
| 92 | + | The default mode can be configured via the `replay.refAction` configuration variable. | |
| 51 | 93 | ||
| 94 | + | <revision-range>:: | |
| 95 | + | Range of commits to replay; see "Specifying Ranges" in | |
| 96 | + | linkgit:git-rev-parse[1]. In `--advance=<branch>` or | |
| 97 | + | `--revert=<branch>` mode, the range should have a single tip, | |
| 98 | + | so that it's clear to which tip the advanced or reverted | |
| 99 | + | <branch> should point. Any commits in the range whose changes | |
| 100 | + | are already present in the branch the commits are being | |
| 101 | + | replayed onto will be dropped. | |
| 102 | + | ||
| 103 | + | :git-replay: 1 | |
| 52 | 104 | include::rev-list-options.adoc[] | |
| 53 | 105 | ||
| 106 | + | [[output]] | |
| 54 | 107 | OUTPUT | |
| 55 | 108 | ------ | |
| 56 | 109 | ||
| 57 | - | When there are no conflicts, the output of this command is usable as | |
| 58 | - | input to `git update-ref --stdin`. It is of the form: | |
| 110 | + | By default, or with `--ref-action=update`, this command produces no output on | |
| 111 | + | success, as refs are updated directly using an atomic transaction. | |
| 112 | + | ||
| 113 | + | When using `--ref-action=print`, the output is usable as input to | |
| 114 | + | `git update-ref --stdin`. It is of the form: | |
| 59 | 115 | ||
| 60 | 116 | update refs/heads/branch1 ${NEW_branch1_HASH} ${OLD_branch1_HASH} | |
| 61 | 117 | update refs/heads/branch2 ${NEW_branch2_HASH} ${OLD_branch2_HASH} | |
| 62 | 118 | update refs/heads/branch3 ${NEW_branch3_HASH} ${OLD_branch3_HASH} | |
| 63 | 119 | ||
| 64 | 120 | where the number of refs updated depends on the arguments passed and | |
| 65 | - | the shape of the history being replayed. When using `--advance`, the | |
| 66 | - | number of refs updated is always one, but for `--onto`, it can be one | |
| 67 | - | or more (rebasing multiple branches simultaneously is supported). | |
| 121 | + | the shape of the history being replayed. When using `--advance` or | |
| 122 | + | `--revert`, the number of refs updated is always one, but for `--onto`, | |
| 123 | + | it can be one or more (rebasing multiple branches simultaneously is | |
| 124 | + | supported). | |
| 68 | 125 | ||
| 126 | + | There is no stderr output on conflicts; see the <<exit-status,EXIT | |
| 127 | + | STATUS>> section below. | |
| 128 | + | ||
| 129 | + | [[exit-status]] | |
| 69 | 130 | EXIT STATUS | |
| 70 | 131 | ----------- | |
| 71 | 132 | ||
| @@ -80,41 +141,45 @@ EXAMPLES | |||
| 80 | 141 | To simply rebase `mybranch` onto `target`: | |
| 81 | 142 | ||
| 82 | 143 | ------------ | |
| 83 | - | $ git replay --onto target origin/main..mybranch | |
| 144 | + | $ git replay --onto=target origin/main..mybranch | |
| 145 | + | ------------ | |
| 146 | + | ||
| 147 | + | The refs are updated atomically and no output is produced on success. | |
| 148 | + | ||
| 149 | + | To see what would be updated without actually updating: | |
| 150 | + | ||
| 151 | + | ------------ | |
| 152 | + | $ git replay --ref-action=print --onto=target origin/main..mybranch | |
| 84 | 153 | update refs/heads/mybranch ${NEW_mybranch_HASH} ${OLD_mybranch_HASH} | |
| 85 | 154 | ------------ | |
| 86 | 155 | ||
| 87 | 156 | To cherry-pick the commits from mybranch onto target: | |
| 88 | 157 | ||
| 89 | 158 | ------------ | |
| 90 | - | $ git replay --advance target origin/main..mybranch | |
| 91 | - | update refs/heads/target ${NEW_target_HASH} ${OLD_target_HASH} | |
| 159 | + | $ git replay --advance=target origin/main..mybranch | |
| 92 | 160 | ------------ | |
| 93 | 161 | ||
| 94 | 162 | Note that the first two examples replay the exact same commits and on | |
| 95 | 163 | top of the exact same new base, they only differ in that the first | |
| 96 | - | provides instructions to make mybranch point at the new commits and | |
| 97 | - | the second provides instructions to make target point at them. | |
| 164 | + | updates mybranch to point at the new commits and the second updates | |
| 165 | + | target to point at them. | |
| 98 | 166 | ||
| 99 | 167 | What if you have a stack of branches, one depending upon another, and | |
| 100 | 168 | you'd really like to rebase the whole set? | |
| 101 | 169 | ||
| 102 | 170 | ------------ | |
| 103 | - | $ git replay --contained --onto origin/main origin/main..tipbranch | |
| 104 | - | update refs/heads/branch1 ${NEW_branch1_HASH} ${OLD_branch1_HASH} | |
| 105 | - | update refs/heads/branch2 ${NEW_branch2_HASH} ${OLD_branch2_HASH} | |
| 106 | - | update refs/heads/tipbranch ${NEW_tipbranch_HASH} ${OLD_tipbranch_HASH} | |
| 171 | + | $ git replay --contained --onto=origin/main origin/main..tipbranch | |
| 107 | 172 | ------------ | |
| 108 | 173 | ||
| 174 | + | All three branches (`branch1`, `branch2`, and `tipbranch`) are updated | |
| 175 | + | atomically. | |
| 176 | + | ||
| 109 | 177 | When calling `git replay`, one does not need to specify a range of | |
| 110 | 178 | commits to replay using the syntax `A..B`; any range expression will | |
| 111 | 179 | do: | |
| 112 | 180 | ||
| 113 | 181 | ------------ | |
| 114 | - | $ git replay --onto origin/main ^base branch1 branch2 branch3 | |
| 115 | - | update refs/heads/branch1 ${NEW_branch1_HASH} ${OLD_branch1_HASH} | |
| 116 | - | update refs/heads/branch2 ${NEW_branch2_HASH} ${OLD_branch2_HASH} | |
| 117 | - | update refs/heads/branch3 ${NEW_branch3_HASH} ${OLD_branch3_HASH} | |
| 182 | + | $ git replay --onto=origin/main ^base branch1 branch2 branch3 | |
| 118 | 183 | ------------ | |
| 119 | 184 | ||
| 120 | 185 | This will simultaneously rebase `branch1`, `branch2`, and `branch3`, | |
| @@ -122,6 +187,36 @@ all commits they have since `base`, playing them on top of | |||
| 122 | 187 | `origin/main`. These three branches may have commits on top of `base` | |
| 123 | 188 | that they have in common, but that does not need to be the case. | |
| 124 | 189 | ||
| 190 | + | To revert commits on a branch: | |
| 191 | + | ||
| 192 | + | ------------ | |
| 193 | + | $ git replay --revert=main topic~2..topic | |
| 194 | + | ------------ | |
| 195 | + | ||
| 196 | + | This reverts the last two commits from `topic`, creating revert commits on | |
| 197 | + | top of `main`, and updates `main` to point at the result. This is useful when | |
| 198 | + | commits from `topic` were previously merged or cherry-picked into `main` and | |
| 199 | + | need to be undone. | |
| 200 | + | ||
| 201 | + | NOTE: For reverting an entire merge request as a single commit (rather than | |
| 202 | + | commit-by-commit), consider using `git merge-tree --merge-base $TIP HEAD $BASE` | |
| 203 | + | which can avoid unnecessary merge conflicts. | |
| 204 | + | ||
| 205 | + | To replay onto a specific commit while updating a different reference: | |
| 206 | + | ||
| 207 | + | ------------ | |
| 208 | + | $ git replay --onto=112233 --ref=refs/heads/mybranch aabbcc..ddeeff | |
| 209 | + | ------------ | |
| 210 | + | ||
| 211 | + | This replays the range `aabbcc..ddeeff` onto commit `112233` and updates | |
| 212 | + | `refs/heads/mybranch` to point at the result. This can be useful when you want | |
| 213 | + | to use bare commit IDs instead of branch names. | |
| 214 | + | ||
| 215 | + | CONFIGURATION | |
| 216 | + | ------------- | |
| 217 | + | :git-replay: 1 | |
| 218 | + | include::config/replay.adoc[] | |
| 219 | + | ||
| 125 | 220 | GIT | |
| 126 | 221 | --- | |
| 127 | 222 | Part of the linkgit:git[1] suite | |
added Documentation/git-repo.adoc mode 100644
| @@ -0,0 +1,150 @@ | |||
| 1 | + | git-repo(1) | |
| 2 | + | =========== | |
| 3 | + | ||
| 4 | + | NAME | |
| 5 | + | ---- | |
| 6 | + | git-repo - Retrieve information about the repository | |
| 7 | + | ||
| 8 | + | SYNOPSIS | |
| 9 | + | -------- | |
| 10 | + | [synopsis] | |
| 11 | + | git repo info [--format=(lines|nul) | -z] [--all | <key>...] | |
| 12 | + | git repo info --keys [--format=(lines|nul) | -z] | |
| 13 | + | git repo structure [--format=(table|lines|nul) | -z] | |
| 14 | + | ||
| 15 | + | DESCRIPTION | |
| 16 | + | ----------- | |
| 17 | + | Retrieve information about the repository. | |
| 18 | + | ||
| 19 | + | THIS COMMAND IS EXPERIMENTAL. THE BEHAVIOR MAY CHANGE. | |
| 20 | + | ||
| 21 | + | COMMANDS | |
| 22 | + | -------- | |
| 23 | + | `info [--format=(lines|nul) | -z] [--all | <key>...]`:: | |
| 24 | + | Retrieve metadata-related information about the current repository. Only | |
| 25 | + | the requested data will be returned based on their keys (see "INFO KEYS" | |
| 26 | + | section below). | |
| 27 | + | + | |
| 28 | + | The values are returned in the same order in which their respective keys were | |
| 29 | + | requested. The `--all` flag requests the values for all the available keys. | |
| 30 | + | + | |
| 31 | + | The output format can be chosen through the flag `--format`. Two formats are | |
| 32 | + | supported: | |
| 33 | + | + | |
| 34 | + | ||
| 35 | + | `lines`::: | |
| 36 | + | Output key-value pairs one per line using the `=` character as | |
| 37 | + | the delimiter between the key and the value. Values containing "unusual" | |
| 38 | + | characters are quoted as explained for the configuration variable | |
| 39 | + | `core.quotePath` (see linkgit:git-config[1]). This is the default. | |
| 40 | + | ||
| 41 | + | `nul`::: | |
| 42 | + | Similar to `lines`, but using a newline character as the delimiter | |
| 43 | + | between the key and the value and using a _NUL_ character after each value. | |
| 44 | + | This format is better suited for being parsed by another applications than | |
| 45 | + | `lines`. Unlike in the `lines` format, the values are never quoted. | |
| 46 | + | + | |
| 47 | + | `-z` is an alias for `--format=nul`. | |
| 48 | + | ||
| 49 | + | `info --keys [--format=(lines|nul) | -z]`:: | |
| 50 | + | List all the available keys, one per line. The output format can be chosen | |
| 51 | + | through the flag `--format`. The following formats are supported: | |
| 52 | + | + | |
| 53 | + | `lines`::: | |
| 54 | + | Output the keys one per line. This is the default. | |
| 55 | + | ||
| 56 | + | `nul`::: | |
| 57 | + | Similar to `lines`, but using a _NUL_ character after each value. | |
| 58 | + | ||
| 59 | + | `structure [--format=(table|lines|nul) | -z]`:: | |
| 60 | + | Retrieve statistics about the current repository structure. The | |
| 61 | + | following kinds of information are reported: | |
| 62 | + | + | |
| 63 | + | * Reference counts categorized by type | |
| 64 | + | * Reachable object counts categorized by type | |
| 65 | + | * Total inflated size of reachable objects by type | |
| 66 | + | * Total disk size of reachable objects by type | |
| 67 | + | * Largest reachable objects in the repository by type | |
| 68 | + | + | |
| 69 | + | The output format can be chosen through the flag `--format`. Three formats are | |
| 70 | + | supported: | |
| 71 | + | + | |
| 72 | + | `table`::: | |
| 73 | + | Outputs repository stats in a human-friendly table. This format may | |
| 74 | + | change and is not intended for machine parsing. This is the default | |
| 75 | + | format. | |
| 76 | + | ||
| 77 | + | `lines`::: | |
| 78 | + | Each line of output contains a key-value pair for a repository stat. | |
| 79 | + | The '=' character is used to delimit between the key and the value. | |
| 80 | + | Values containing "unusual" characters are quoted as explained for the | |
| 81 | + | configuration variable `core.quotePath` (see linkgit:git-config[1]). | |
| 82 | + | ||
| 83 | + | `nul`::: | |
| 84 | + | Similar to `lines`, but uses a _NUL_ character to delimit between | |
| 85 | + | key-value pairs instead of a newline. Also uses a newline character as | |
| 86 | + | the delimiter between the key and value instead of '='. Unlike the | |
| 87 | + | `lines` format, values containing "unusual" characters are never | |
| 88 | + | quoted. | |
| 89 | + | + | |
| 90 | + | `-z` is an alias for `--format=nul`. | |
| 91 | + | ||
| 92 | + | INFO KEYS | |
| 93 | + | --------- | |
| 94 | + | In order to obtain a set of values from `git repo info`, you should provide | |
| 95 | + | the keys that identify them. Here's a list of the available keys and the | |
| 96 | + | values that they return: | |
| 97 | + | ||
| 98 | + | `layout.bare`:: | |
| 99 | + | `true` if this is a bare repository, otherwise `false`. | |
| 100 | + | ||
| 101 | + | `layout.shallow`:: | |
| 102 | + | `true` if this is a shallow repository, otherwise `false`. | |
| 103 | + | ||
| 104 | + | `object.format`:: | |
| 105 | + | The object format (hash algorithm) used in the repository. | |
| 106 | + | ||
| 107 | + | `path.commondir.absolute`:: | |
| 108 | + | The canonical absolute path to the Git repository's common | |
| 109 | + | directory (the shared `.git` directory containing objects, | |
| 110 | + | refs, and global configuration). | |
| 111 | + | ||
| 112 | + | `path.commondir.relative`:: | |
| 113 | + | The path to the Git repository's common directory relative to | |
| 114 | + | the current working directory. | |
| 115 | + | ||
| 116 | + | `path.gitdir.absolute`:: | |
| 117 | + | The canonical absolute path to the Git repository directory (the `.git` directory). | |
| 118 | + | ||
| 119 | + | `path.gitdir.relative`:: | |
| 120 | + | The path to the Git repository directory relative to the current working directory. | |
| 121 | + | ||
| 122 | + | `references.format`:: | |
| 123 | + | The reference storage format. The valid values are: | |
| 124 | + | + | |
| 125 | + | include::ref-storage-format.adoc[] | |
| 126 | + | ||
| 127 | + | EXAMPLES | |
| 128 | + | -------- | |
| 129 | + | ||
| 130 | + | * Retrieves the reference format of the current repository: | |
| 131 | + | + | |
| 132 | + | ------------ | |
| 133 | + | git repo info references.format | |
| 134 | + | ------------ | |
| 135 | + | + | |
| 136 | + | ||
| 137 | + | * Retrieves whether the current repository is bare and whether it is shallow | |
| 138 | + | using the `nul` format: | |
| 139 | + | + | |
| 140 | + | ------------ | |
| 141 | + | git repo info --format=nul layout.bare layout.shallow | |
| 142 | + | ------------ | |
| 143 | + | ||
| 144 | + | SEE ALSO | |
| 145 | + | -------- | |
| 146 | + | linkgit:git-rev-parse[1] | |
| 147 | + | ||
| 148 | + | GIT | |
| 149 | + | --- | |
| 150 | + | Part of the linkgit:git[1] suite | |
modified Documentation/git-request-pull.adoc
| @@ -7,8 +7,8 @@ git-request-pull - Generates a summary of pending changes | |||
| 7 | 7 | ||
| 8 | 8 | SYNOPSIS | |
| 9 | 9 | -------- | |
| 10 | - | [verse] | |
| 11 | - | 'git request-pull' [-p] <start> <URL> [<end>] | |
| 10 | + | [synopsis] | |
| 11 | + | git request-pull [-p] <start> <URL> [<end>] | |
| 12 | 12 | ||
| 13 | 13 | DESCRIPTION | |
| 14 | 14 | ----------- | |
| @@ -19,28 +19,28 @@ begins with the branch description, summarizes | |||
| 19 | 19 | the changes, and indicates from where they can be pulled. | |
| 20 | 20 | ||
| 21 | 21 | The upstream project is expected to have the commit named by | |
| 22 | - | `<start>` and the output asks it to integrate the changes you made | |
| 23 | - | since that commit, up to the commit named by `<end>`, by visiting | |
| 24 | - | the repository named by `<URL>`. | |
| 22 | + | _<start>_ and the output asks it to integrate the changes you made | |
| 23 | + | since that commit, up to the commit named by _<end>_, by visiting | |
| 24 | + | the repository named by _<URL>_. | |
| 25 | 25 | ||
| 26 | 26 | ||
| 27 | 27 | OPTIONS | |
| 28 | 28 | ------- | |
| 29 | - | -p:: | |
| 29 | + | `-p`:: | |
| 30 | 30 | Include patch text in the output. | |
| 31 | 31 | ||
| 32 | - | <start>:: | |
| 32 | + | _<start>_:: | |
| 33 | 33 | Commit to start at. This names a commit that is already in | |
| 34 | 34 | the upstream history. | |
| 35 | 35 | ||
| 36 | - | <URL>:: | |
| 36 | + | _<URL>_:: | |
| 37 | 37 | The repository URL to be pulled from. | |
| 38 | 38 | ||
| 39 | - | <end>:: | |
| 40 | - | Commit to end at (defaults to HEAD). This names the commit | |
| 39 | + | _<end>_:: | |
| 40 | + | Commit to end at (defaults to `HEAD`). This names the commit | |
| 41 | 41 | at the tip of the history you are asking to be pulled. | |
| 42 | 42 | + | |
| 43 | - | When the repository named by `<URL>` has the commit at a tip of a | |
| 43 | + | When the repository named by _<URL>_ has the commit at a tip of a | |
| 44 | 44 | ref that is different from the ref you have locally, you can use the | |
| 45 | 45 | `<local>:<remote>` syntax, to have its local name, a colon `:`, and | |
| 46 | 46 | its remote name. | |
| @@ -54,11 +54,15 @@ the `v1.0` release, and want it to be integrated into the project. | |||
| 54 | 54 | First you push that change to your public repository for others to | |
| 55 | 55 | see: | |
| 56 | 56 | ||
| 57 | - | git push https://git.ko.xz/project master | |
| 57 | + | ---- | |
| 58 | + | git push https://git.ko.xz/project master | |
| 59 | + | ---- | |
| 58 | 60 | ||
| 59 | 61 | Then, you run this command: | |
| 60 | 62 | ||
| 61 | - | git request-pull v1.0 https://git.ko.xz/project master | |
| 63 | + | ---- | |
| 64 | + | git request-pull v1.0 https://git.ko.xz/project master | |
| 65 | + | ---- | |
| 62 | 66 | ||
| 63 | 67 | which will produce a request to the upstream, summarizing the | |
| 64 | 68 | changes between the `v1.0` release and your `master`, to pull it | |
| @@ -67,11 +71,15 @@ from your public repository. | |||
| 67 | 71 | If you pushed your change to a branch whose name is different from | |
| 68 | 72 | the one you have locally, e.g. | |
| 69 | 73 | ||
| 70 | - | git push https://git.ko.xz/project master:for-linus | |
| 74 | + | ---- | |
| 75 | + | git push https://git.ko.xz/project master:for-linus | |
| 76 | + | ---- | |
| 71 | 77 | ||
| 72 | 78 | then you can ask that to be pulled with | |
| 73 | 79 | ||
| 74 | - | git request-pull v1.0 https://git.ko.xz/project master:for-linus | |
| 80 | + | ---- | |
| 81 | + | git request-pull v1.0 https://git.ko.xz/project master:for-linus | |
| 82 | + | ---- | |
| 75 | 83 | ||
| 76 | 84 | ||
| 77 | 85 | GIT | |
modified Documentation/git-rerere.adoc
| @@ -32,7 +32,7 @@ COMMANDS | |||
| 32 | 32 | -------- | |
| 33 | 33 | ||
| 34 | 34 | Normally, 'git rerere' is run without arguments or user-intervention. | |
| 35 | - | However, it has several commands that allow it to interact with | |
| 35 | + | However, it has several commands that allow users to interact with | |
| 36 | 36 | its working state. | |
| 37 | 37 | ||
| 38 | 38 | 'clear':: | |
| @@ -44,7 +44,7 @@ will automatically invoke this command. | |||
| 44 | 44 | 'forget' <pathspec>:: | |
| 45 | 45 | ||
| 46 | 46 | Reset the conflict resolutions which rerere has recorded for the current | |
| 47 | - | conflict in <pathspec>. | |
| 47 | + | conflicts in paths that match <pathspec>. | |
| 48 | 48 | ||
| 49 | 49 | 'diff':: | |
| 50 | 50 | ||
modified Documentation/git-reset.adoc
| @@ -3,86 +3,67 @@ git-reset(1) | |||
| 3 | 3 | ||
| 4 | 4 | NAME | |
| 5 | 5 | ---- | |
| 6 | - | git-reset - Reset current HEAD to the specified state | |
| 6 | + | git-reset - Set `HEAD` or the index to a known state | |
| 7 | 7 | ||
| 8 | 8 | SYNOPSIS | |
| 9 | 9 | -------- | |
| 10 | 10 | [synopsis] | |
| 11 | + | git reset [--soft | --mixed [-N] | --hard | --merge | --keep] [-q] [<commit>] | |
| 11 | 12 | git reset [-q] [<tree-ish>] [--] <pathspec>... | |
| 12 | 13 | git reset [-q] [--pathspec-from-file=<file> [--pathspec-file-nul]] [<tree-ish>] | |
| 13 | 14 | git reset (--patch | -p) [<tree-ish>] [--] [<pathspec>...] | |
| 14 | - | git reset [--soft | --mixed [-N] | --hard | --merge | --keep] [-q] [<commit>] | |
| 15 | 15 | ||
| 16 | 16 | DESCRIPTION | |
| 17 | 17 | ----------- | |
| 18 | - | In the first three forms, copy entries from _<tree-ish>_ to the index. | |
| 19 | - | In the last form, set the current branch head (`HEAD`) to _<commit>_, | |
| 20 | - | optionally modifying index and working tree to match. | |
| 21 | - | The _<tree-ish>_/_<commit>_ defaults to `HEAD` in all forms. | |
| 18 | + | `git reset` does either of the following: | |
| 22 | 19 | ||
| 23 | - | `git reset [-q] [<tree-ish>] [--] <pathspec>...`:: | |
| 24 | - | `git reset [-q] [--pathspec-from-file=<file> [--pathspec-file-nul]] [<tree-ish>]`:: | |
| 25 | - | These forms reset the index entries for all paths that match the | |
| 26 | - | _<pathspec>_ to their state at _<tree-ish>_. (It does not affect | |
| 27 | - | the working tree or the current branch.) | |
| 28 | - | + | |
| 29 | - | This means that `git reset <pathspec>` is the opposite of `git add | |
| 30 | - | <pathspec>`. This command is equivalent to | |
| 31 | - | `git restore [--source=<tree-ish>] --staged <pathspec>...`. | |
| 32 | - | + | |
| 33 | - | After running `git reset <pathspec>` to update the index entry, you can | |
| 34 | - | use linkgit:git-restore[1] to check the contents out of the index to | |
| 35 | - | the working tree. Alternatively, using linkgit:git-restore[1] | |
| 36 | - | and specifying a commit with `--source`, you | |
| 37 | - | can copy the contents of a path out of a commit to the index and to the | |
| 38 | - | working tree in one go. | |
| 39 | - | ||
| 40 | - | `git reset (--patch | -p) [<tree-ish>] [--] [<pathspec>...]`:: | |
| 41 | - | Interactively select hunks in the difference between the index | |
| 42 | - | and _<tree-ish>_ (defaults to `HEAD`). The chosen hunks are applied | |
| 43 | - | in reverse to the index. | |
| 44 | - | + | |
| 45 | - | This means that `git reset -p` is the opposite of `git add -p`, i.e. | |
| 46 | - | you can use it to selectively reset hunks. See the "Interactive Mode" | |
| 47 | - | section of linkgit:git-add[1] to learn how to operate the `--patch` mode. | |
| 20 | + | 1. `git reset [<mode>] <commit>` changes which commit `HEAD` points to. This | |
| 21 | + | makes it possible to undo various Git operations, for example commit, merge, | |
| 22 | + | rebase, and pull. | |
| 23 | + | 2. When you specify files or directories or pass `--patch`, `git reset` updates | |
| 24 | + | the staged version of the specified files. | |
| 48 | 25 | ||
| 49 | 26 | `git reset [<mode>] [<commit>]`:: | |
| 50 | - | This form resets the current branch head to _<commit>_ and | |
| 51 | - | possibly updates the index (resetting it to the tree of _<commit>_) and | |
| 52 | - | the working tree depending on _<mode>_. Before the operation, `ORIG_HEAD` | |
| 53 | - | is set to the tip of the current branch. If _<mode>_ is omitted, | |
| 54 | - | defaults to `--mixed`. The _<mode>_ must be one of the following: | |
| 27 | + | Set the current branch head (`HEAD`) to point at _<commit>_. | |
| 28 | + | Depending on _<mode>_, also update the working directory and/or index | |
| 29 | + | to match the contents of _<commit>_. | |
| 30 | + | _<commit>_ defaults to `HEAD`. | |
| 31 | + | Before the operation, `ORIG_HEAD` is set to the tip of the current branch. | |
| 32 | + | + | |
| 33 | + | The _<mode>_ must be one of the following (default `--mixed`): | |
| 55 | 34 | + | |
| 56 | - | -- | |
| 57 | - | `--soft`:: | |
| 58 | - | Does not touch the index file or the working tree at all (but | |
| 59 | - | resets the head to _<commit>_, just like all modes do). This leaves | |
| 60 | - | all your changed files "Changes to be committed", as `git status` | |
| 61 | - | would put it. | |
| 62 | 35 | ||
| 36 | + | -- | |
| 63 | 37 | `--mixed`:: | |
| 64 | - | Resets the index but not the working tree (i.e., the changed files | |
| 65 | - | are preserved but not marked for commit) and reports what has not | |
| 66 | - | been updated. This is the default action. | |
| 38 | + | Leave your working directory unchanged. | |
| 39 | + | Update the index to match the new `HEAD`, so nothing will be staged. | |
| 67 | 40 | + | |
| 68 | - | If `-N` is specified, removed paths are marked as intent-to-add (see | |
| 41 | + | If `-N` is specified, mark removed paths as intent-to-add (see | |
| 69 | 42 | linkgit:git-add[1]). | |
| 70 | 43 | ||
| 44 | + | `--soft`:: | |
| 45 | + | Leave your working tree files and the index unchanged. | |
| 46 | + | For example, if you have no staged changes, you can use | |
| 47 | + | `git reset --soft HEAD~5; git commit` | |
| 48 | + | to combine the last 5 commits into 1 commit. This works even with | |
| 49 | + | changes in the working tree, which are left untouched, but such usage | |
| 50 | + | can lead to confusion. | |
| 51 | + | ||
| 71 | 52 | `--hard`:: | |
| 72 | - | Resets the index and working tree. Any changes to tracked files in the | |
| 73 | - | working tree since _<commit>_ are discarded. Any untracked files or | |
| 74 | - | directories in the way of writing any tracked files are simply deleted. | |
| 53 | + | Overwrite all files and directories with the version from _<commit>_, | |
| 54 | + | and may overwrite untracked files. Tracked files not in _<commit>_ are | |
| 55 | + | removed so that the working tree matches _<commit>_. | |
| 56 | + | Update the index to match the new `HEAD`, so nothing will be staged. | |
| 75 | 57 | ||
| 76 | 58 | `--merge`:: | |
| 77 | - | Resets the index and updates the files in the working tree that are | |
| 78 | - | different between _<commit>_ and `HEAD`, but keeps those which are | |
| 59 | + | Reset the index and update the files in the working tree that are | |
| 60 | + | different between _<commit>_ and `HEAD`, but keep those which are | |
| 79 | 61 | different between the index and working tree (i.e. which have changes | |
| 80 | 62 | which have not been added). | |
| 63 | + | Mainly exists to reset unmerged index entries, like those left behind by | |
| 64 | + | `git am -3` or `git switch -m` in certain situations. | |
| 81 | 65 | If a file that is different between _<commit>_ and the index has | |
| 82 | 66 | unstaged changes, reset is aborted. | |
| 83 | - | + | |
| 84 | - | In other words, `--merge` does something like a `git read-tree -u -m <commit>`, | |
| 85 | - | but carries forward unmerged index entries. | |
| 86 | 67 | ||
| 87 | 68 | `--keep`:: | |
| 88 | 69 | Resets index entries and updates files in the working tree that are | |
| @@ -90,13 +71,36 @@ but carries forward unmerged index entries. | |||
| 90 | 71 | If a file that is different between _<commit>_ and `HEAD` has local | |
| 91 | 72 | changes, reset is aborted. | |
| 92 | 73 | ||
| 93 | - | `--[no-]recurse-submodules`:: | |
| 74 | + | `--recurse-submodules`:: | |
| 75 | + | `--no-recurse-submodules`:: | |
| 94 | 76 | When the working tree is updated, using `--recurse-submodules` will | |
| 95 | 77 | also recursively reset the working tree of all active submodules | |
| 96 | 78 | according to the commit recorded in the superproject, also setting | |
| 97 | 79 | the submodules' `HEAD` to be detached at that commit. | |
| 98 | 80 | -- | |
| 99 | 81 | ||
| 82 | + | `git reset [-q] [<tree-ish>] [--] <pathspec>...`:: | |
| 83 | + | `git reset [-q] [--pathspec-from-file=<file> [--pathspec-file-nul]] [<tree-ish>]`:: | |
| 84 | + | For all specified files or directories, set the staged version to | |
| 85 | + | the version from the given commit or tree (which defaults to `HEAD`). | |
| 86 | + | + | |
| 87 | + | This means that `git reset <pathspec>` is the opposite of `git add | |
| 88 | + | <pathspec>`: it unstages all changes to the specified file(s) or | |
| 89 | + | directories. This is equivalent to `git restore --staged <pathspec>...`. | |
| 90 | + | + | |
| 91 | + | In this mode, `git reset` updates only the index (without updating the `HEAD` or | |
| 92 | + | working tree files). If you want to update the files as well as the index | |
| 93 | + | entries, use linkgit:git-restore[1]. | |
| 94 | + | ||
| 95 | + | `git reset (--patch | -p) [<tree-ish>] [--] [<pathspec>...]`:: | |
| 96 | + | Interactively select changes from the difference between the index | |
| 97 | + | and the specified commit or tree (which defaults to `HEAD`). | |
| 98 | + | The index is modified using the chosen changes. | |
| 99 | + | + | |
| 100 | + | This means that `git reset -p` is the opposite of `git add -p`, i.e. | |
| 101 | + | you can use it to selectively unstage changes. See the "Interactive Mode" | |
| 102 | + | section of linkgit:git-add[1] to learn how to use the `--patch` option. | |
| 103 | + | ||
| 100 | 104 | See "Reset, restore and revert" in linkgit:git[1] for the differences | |
| 101 | 105 | between the three commands. | |
| 102 | 106 | ||
| @@ -125,6 +129,8 @@ OPTIONS | |||
| 125 | 129 | separated with _NUL_ character and all other characters are taken | |
| 126 | 130 | literally (including newlines and quotes). | |
| 127 | 131 | ||
| 132 | + | include::diff-context-options.adoc[] | |
| 133 | + | ||
| 128 | 134 | `--`:: | |
| 129 | 135 | Do not interpret any more arguments as options. | |
| 130 | 136 | ||
modified Documentation/git-restore.adoc
| @@ -28,8 +28,6 @@ otherwise from the index. Use `--source` to restore from a different commit. | |||
| 28 | 28 | See "Reset, restore and revert" in linkgit:git[1] for the differences | |
| 29 | 29 | between the three commands. | |
| 30 | 30 | ||
| 31 | - | THIS COMMAND IS EXPERIMENTAL. THE BEHAVIOR MAY CHANGE. | |
| 32 | - | ||
| 33 | 31 | OPTIONS | |
| 34 | 32 | ------- | |
| 35 | 33 | `-s <tree>`:: | |
| @@ -43,7 +41,7 @@ given, otherwise from the index. | |||
| 43 | 41 | + | |
| 44 | 42 | As a special case, you may use `"<rev-A>...<rev-B>"` as a shortcut for the | |
| 45 | 43 | merge base of _<rev-A>_ and _<rev-B>_ if there is exactly one merge base. You can | |
| 46 | - | leave out at most one of _<rev-A>__ and _<rev-B>_, in which case it defaults to `HEAD`. | |
| 44 | + | leave out at most one of _<rev-A>_ and _<rev-B>_, in which case it defaults to `HEAD`. | |
| 47 | 45 | ||
| 48 | 46 | `-p`:: | |
| 49 | 47 | `--patch`:: | |
| @@ -52,6 +50,8 @@ leave out at most one of _<rev-A>__ and _<rev-B>_, in which case it defaults to | |||
| 52 | 50 | Mode" section of linkgit:git-add[1] to learn how to operate | |
| 53 | 51 | the `--patch` mode. | |
| 54 | 52 | ||
| 53 | + | include::diff-context-options.adoc[] | |
| 54 | + | ||
| 55 | 55 | `-W`:: | |
| 56 | 56 | `--worktree`:: | |
| 57 | 57 | `-S`:: | |
modified Documentation/git-rev-parse.adoc
| @@ -174,13 +174,13 @@ for another option. | |||
| 174 | 174 | ||
| 175 | 175 | Allow oids to be input from any object format that the current | |
| 176 | 176 | repository supports. | |
| 177 | - | ||
| 178 | - | Specifying "sha1" translates if necessary and returns a sha1 oid. | |
| 179 | - | ||
| 180 | - | Specifying "sha256" translates if necessary and returns a sha256 oid. | |
| 181 | - | ||
| 182 | - | Specifying "storage" translates if necessary and returns an oid in | |
| 183 | - | encoded in the storage hash algorithm. | |
| 177 | + | + | |
| 178 | + | Specifying "sha1" translates if necessary and returns a sha1 oid. | |
| 179 | + | + | |
| 180 | + | Specifying "sha256" translates if necessary and returns a sha256 oid. | |
| 181 | + | + | |
| 182 | + | Specifying "storage" translates if necessary and returns an oid in | |
| 183 | + | encoded in the storage hash algorithm. | |
| 184 | 184 | ||
| 185 | 185 | Options for Objects | |
| 186 | 186 | ~~~~~~~~~~~~~~~~~~~ | |
| @@ -324,11 +324,12 @@ The following options are unaffected by `--path-format`: | |||
| 324 | 324 | path of the current directory relative to the top-level | |
| 325 | 325 | directory. | |
| 326 | 326 | ||
| 327 | - | --show-object-format[=(storage|input|output)]:: | |
| 328 | - | Show the object format (hash algorithm) used for the repository | |
| 329 | - | for storage inside the `.git` directory, input, or output. For | |
| 330 | - | input, multiple algorithms may be printed, space-separated. | |
| 331 | - | If not specified, the default is "storage". | |
| 327 | + | --show-object-format[=(storage|input|output|compat)]:: | |
| 328 | + | Show the object format (hash algorithm) used for the repository for storage | |
| 329 | + | inside the `.git` directory, input, output, or compatibility. For input, | |
| 330 | + | multiple algorithms may be printed, space-separated. If `compat` is | |
| 331 | + | requested and no compatibility algorithm is enabled, prints an empty line. If | |
| 332 | + | not specified, the default is "storage". | |
| 332 | 333 | ||
| 333 | 334 | --show-ref-format:: | |
| 334 | 335 | Show the reference storage format used for the repository. | |
modified Documentation/git-send-email.adoc
| @@ -8,11 +8,11 @@ git-send-email - Send a collection of patches as emails | |||
| 8 | 8 | ||
| 9 | 9 | SYNOPSIS | |
| 10 | 10 | -------- | |
| 11 | - | [verse] | |
| 12 | - | 'git send-email' [<options>] (<file>|<directory>)... | |
| 13 | - | 'git send-email' [<options>] <format-patch-options> | |
| 14 | - | 'git send-email' --dump-aliases | |
| 15 | - | 'git send-email' --translate-aliases | |
| 11 | + | [synopsis] | |
| 12 | + | git send-email [<options>] (<file>|<directory>)... | |
| 13 | + | git send-email [<options>] <format-patch-options> | |
| 14 | + | git send-email --dump-aliases | |
| 15 | + | git send-email --translate-aliases | |
| 16 | 16 | ||
| 17 | 17 | ||
| 18 | 18 | DESCRIPTION | |
| @@ -21,7 +21,7 @@ Takes the patches given on the command line and emails them out. | |||
| 21 | 21 | Patches can be specified as files, directories (which will send all | |
| 22 | 22 | files in the directory), or directly as a revision list. In the | |
| 23 | 23 | last case, any format accepted by linkgit:git-format-patch[1] can | |
| 24 | - | be passed to git send-email, as well as options understood by | |
| 24 | + | be passed to `git send-email`, as well as options understood by | |
| 25 | 25 | linkgit:git-format-patch[1]. | |
| 26 | 26 | ||
| 27 | 27 | The header of the email is configurable via command-line options. If not | |
| @@ -35,11 +35,11 @@ There are two formats accepted for patch files: | |||
| 35 | 35 | This is what linkgit:git-format-patch[1] generates. Most headers and MIME | |
| 36 | 36 | formatting are ignored. | |
| 37 | 37 | ||
| 38 | - | 2. The original format used by Greg Kroah-Hartman's 'send_lots_of_email.pl' | |
| 38 | + | 2. The original format used by Greg Kroah-Hartman's `send_lots_of_email.pl` | |
| 39 | 39 | script | |
| 40 | 40 | + | |
| 41 | - | This format expects the first line of the file to contain the "Cc:" value | |
| 42 | - | and the "Subject:" of the message as the second line. | |
| 41 | + | This format expects the first line of the file to contain the `Cc:` value | |
| 42 | + | and the `Subject:` of the message as the second line. | |
| 43 | 43 | ||
| 44 | 44 | ||
| 45 | 45 | OPTIONS | |
| @@ -48,52 +48,52 @@ OPTIONS | |||
| 48 | 48 | Composing | |
| 49 | 49 | ~~~~~~~~~ | |
| 50 | 50 | ||
| 51 | - | --annotate:: | |
| 51 | + | `--annotate`:: | |
| 52 | 52 | Review and edit each patch you're about to send. Default is the value | |
| 53 | 53 | of `sendemail.annotate`. See the CONFIGURATION section for | |
| 54 | 54 | `sendemail.multiEdit`. | |
| 55 | 55 | ||
| 56 | - | --bcc=<address>,...:: | |
| 57 | - | Specify a "Bcc:" value for each email. Default is the value of | |
| 56 | + | `--bcc=<address>,...`:: | |
| 57 | + | Specify a `Bcc:` value for each email. Default is the value of | |
| 58 | 58 | `sendemail.bcc`. | |
| 59 | 59 | + | |
| 60 | 60 | This option may be specified multiple times. | |
| 61 | 61 | ||
| 62 | - | --cc=<address>,...:: | |
| 63 | - | Specify a starting "Cc:" value for each email. | |
| 62 | + | `--cc=<address>,...`:: | |
| 63 | + | Specify a starting `Cc:` value for each email. | |
| 64 | 64 | Default is the value of `sendemail.cc`. | |
| 65 | 65 | + | |
| 66 | 66 | This option may be specified multiple times. | |
| 67 | 67 | ||
| 68 | - | --compose:: | |
| 68 | + | `--compose`:: | |
| 69 | 69 | Invoke a text editor (see GIT_EDITOR in linkgit:git-var[1]) | |
| 70 | 70 | to edit an introductory message for the patch series. | |
| 71 | 71 | + | |
| 72 | - | When `--compose` is used, git send-email will use the From, To, Cc, Bcc, | |
| 73 | - | Subject, Reply-To, and In-Reply-To headers specified in the message. If | |
| 74 | - | the body of the message (what you type after the headers and a blank | |
| 75 | - | line) only contains blank (or Git: prefixed) lines, the summary won't be | |
| 72 | + | When `--compose` is used, `git send-email` will use the `From`, `To`, `Cc`, | |
| 73 | + | `Bcc`, `Subject`, `Reply-To`, and `In-Reply-To` headers specified in the | |
| 74 | + | message. If the body of the message (what you type after the headers and a | |
| 75 | + | blank line) only contains blank (or `Git:` prefixed) lines, the summary won't be | |
| 76 | 76 | sent, but the headers mentioned above will be used unless they are | |
| 77 | 77 | removed. | |
| 78 | 78 | + | |
| 79 | - | Missing From or In-Reply-To headers will be prompted for. | |
| 79 | + | Missing `From` or `In-Reply-To` headers will be prompted for. | |
| 80 | 80 | + | |
| 81 | 81 | See the CONFIGURATION section for `sendemail.multiEdit`. | |
| 82 | 82 | ||
| 83 | - | --from=<address>:: | |
| 83 | + | `--from=<address>`:: | |
| 84 | 84 | Specify the sender of the emails. If not specified on the command line, | |
| 85 | 85 | the value of the `sendemail.from` configuration option is used. If | |
| 86 | 86 | neither the command-line option nor `sendemail.from` are set, then the | |
| 87 | 87 | user will be prompted for the value. The default for the prompt will be | |
| 88 | - | the value of GIT_AUTHOR_IDENT, or GIT_COMMITTER_IDENT if that is not | |
| 89 | - | set, as returned by "git var -l". | |
| 88 | + | the value of `GIT_AUTHOR_IDENT`, or `GIT_COMMITTER_IDENT` if that is not | |
| 89 | + | set, as returned by `git var -l`. | |
| 90 | 90 | ||
| 91 | - | --reply-to=<address>:: | |
| 91 | + | `--reply-to=<address>`:: | |
| 92 | 92 | Specify the address where replies from recipients should go to. | |
| 93 | 93 | Use this if replies to messages should go to another address than what | |
| 94 | - | is specified with the --from parameter. | |
| 94 | + | is specified with the `--from` parameter. | |
| 95 | 95 | ||
| 96 | - | --in-reply-to=<identifier>:: | |
| 96 | + | `--in-reply-to=<identifier>`:: | |
| 97 | 97 | Make the first mail (or all the mails with `--no-thread`) appear as a | |
| 98 | 98 | reply to the given Message-ID, which avoids breaking threads to | |
| 99 | 99 | provide a new patch series. | |
| @@ -112,108 +112,109 @@ illustration below where `[PATCH v2 0/3]` is in reply to `[PATCH 0/2]`: | |||
| 112 | 112 | [PATCH v2 2/3] New tests | |
| 113 | 113 | [PATCH v2 3/3] Implementation | |
| 114 | 114 | + | |
| 115 | - | Only necessary if --compose is also set. If --compose | |
| 115 | + | Only necessary if `--compose` is also set. If `--compose` | |
| 116 | 116 | is not set, this will be prompted for. | |
| 117 | 117 | ||
| 118 | - | --[no-]outlook-id-fix:: | |
| 118 | + | `--outlook-id-fix`:: | |
| 119 | + | `--no-outlook-id-fix`:: | |
| 119 | 120 | Microsoft Outlook SMTP servers discard the Message-ID sent via email and | |
| 120 | 121 | assign a new random Message-ID, thus breaking threads. | |
| 121 | 122 | + | |
| 122 | - | With `--outlook-id-fix`, 'git send-email' uses a mechanism specific to | |
| 123 | + | With `--outlook-id-fix`, `git send-email` uses a mechanism specific to | |
| 123 | 124 | Outlook servers to learn the Message-ID the server assigned to fix the | |
| 124 | 125 | threading. Use it only when you know that the server reports the | |
| 125 | 126 | rewritten Message-ID the same way as Outlook servers do. | |
| 126 | 127 | + | |
| 127 | 128 | Without this option specified, the fix is done by default when talking | |
| 128 | - | to 'smtp.office365.com' or 'smtp-mail.outlook.com'. Use | |
| 129 | + | to `smtp.office365.com` or `smtp-mail.outlook.com`. Use | |
| 129 | 130 | `--no-outlook-id-fix` to disable even when talking to these two servers. | |
| 130 | 131 | ||
| 131 | - | --subject=<string>:: | |
| 132 | + | `--subject=<string>`:: | |
| 132 | 133 | Specify the initial subject of the email thread. | |
| 133 | - | Only necessary if --compose is also set. If --compose | |
| 134 | + | Only necessary if `--compose` is also set. If `--compose` | |
| 134 | 135 | is not set, this will be prompted for. | |
| 135 | 136 | ||
| 136 | - | --to=<address>,...:: | |
| 137 | + | `--to=<address>,...`:: | |
| 137 | 138 | Specify the primary recipient of the emails generated. Generally, this | |
| 138 | 139 | will be the upstream maintainer of the project involved. Default is the | |
| 139 | 140 | value of the `sendemail.to` configuration value; if that is unspecified, | |
| 140 | - | and --to-cmd is not specified, this will be prompted for. | |
| 141 | + | and `--to-cmd` is not specified, this will be prompted for. | |
| 141 | 142 | + | |
| 142 | 143 | This option may be specified multiple times. | |
| 143 | 144 | ||
| 144 | - | --8bit-encoding=<encoding>:: | |
| 145 | + | `--8bit-encoding=<encoding>`:: | |
| 145 | 146 | When encountering a non-ASCII message or subject that does not | |
| 146 | 147 | declare its encoding, add headers/quoting to indicate it is | |
| 147 | - | encoded in <encoding>. Default is the value of the | |
| 148 | - | 'sendemail.assume8bitEncoding'; if that is unspecified, this | |
| 148 | + | encoded in _<encoding>_. Default is the value of the | |
| 149 | + | `sendemail.assume8bitEncoding`; if that is unspecified, this | |
| 149 | 150 | will be prompted for if any non-ASCII files are encountered. | |
| 150 | 151 | + | |
| 151 | 152 | Note that no attempts whatsoever are made to validate the encoding. | |
| 152 | 153 | ||
| 153 | - | --compose-encoding=<encoding>:: | |
| 154 | + | `--compose-encoding=<encoding>`:: | |
| 154 | 155 | Specify encoding of compose message. Default is the value of the | |
| 155 | - | 'sendemail.composeEncoding'; if that is unspecified, UTF-8 is assumed. | |
| 156 | + | `sendemail.composeEncoding`; if that is unspecified, UTF-8 is assumed. | |
| 156 | 157 | ||
| 157 | - | --transfer-encoding=(7bit|8bit|quoted-printable|base64|auto):: | |
| 158 | + | `--transfer-encoding=(7bit|8bit|quoted-printable|base64|auto)`:: | |
| 158 | 159 | Specify the transfer encoding to be used to send the message over SMTP. | |
| 159 | - | 7bit will fail upon encountering a non-ASCII message. quoted-printable | |
| 160 | + | `7bit` will fail upon encountering a non-ASCII message. `quoted-printable` | |
| 160 | 161 | can be useful when the repository contains files that contain carriage | |
| 161 | - | returns, but makes the raw patch email file (as saved from a MUA) much | |
| 162 | - | harder to inspect manually. base64 is even more fool proof, but also | |
| 163 | - | even more opaque. auto will use 8bit when possible, and quoted-printable | |
| 164 | - | otherwise. | |
| 162 | + | returns, but makes the raw patch email file (as saved from an MUA) much | |
| 163 | + | harder to inspect manually. `base64` is even more fool proof, but also | |
| 164 | + | even more opaque. `auto` will use `8bit` when possible, and | |
| 165 | + | `quoted-printable` otherwise. | |
| 165 | 166 | + | |
| 166 | 167 | Default is the value of the `sendemail.transferEncoding` configuration | |
| 167 | 168 | value; if that is unspecified, default to `auto`. | |
| 168 | 169 | ||
| 169 | - | --xmailer:: | |
| 170 | - | --no-xmailer:: | |
| 171 | - | Add (or prevent adding) the "X-Mailer:" header. By default, | |
| 170 | + | `--xmailer`:: | |
| 171 | + | `--no-xmailer`:: | |
| 172 | + | Add (or prevent adding) the `X-Mailer:` header. By default, | |
| 172 | 173 | the header is added, but it can be turned off by setting the | |
| 173 | 174 | `sendemail.xmailer` configuration variable to `false`. | |
| 174 | 175 | ||
| 175 | 176 | Sending | |
| 176 | 177 | ~~~~~~~ | |
| 177 | 178 | ||
| 178 | - | --envelope-sender=<address>:: | |
| 179 | + | `--envelope-sender=<address>`:: | |
| 179 | 180 | Specify the envelope sender used to send the emails. | |
| 180 | 181 | This is useful if your default address is not the address that is | |
| 181 | - | subscribed to a list. In order to use the 'From' address, set the | |
| 182 | - | value to "auto". If you use the sendmail binary, you must have | |
| 183 | - | suitable privileges for the -f parameter. Default is the value of the | |
| 182 | + | subscribed to a list. In order to use the `From` address, set the | |
| 183 | + | value to `auto`. If you use the `sendmail` binary, you must have | |
| 184 | + | suitable privileges for the `-f` parameter. Default is the value of the | |
| 184 | 185 | `sendemail.envelopeSender` configuration variable; if that is | |
| 185 | 186 | unspecified, choosing the envelope sender is left to your MTA. | |
| 186 | 187 | ||
| 187 | - | --sendmail-cmd=<command>:: | |
| 188 | + | `--sendmail-cmd=<command>`:: | |
| 188 | 189 | Specify a command to run to send the email. The command should | |
| 189 | 190 | be sendmail-like; specifically, it must support the `-i` option. | |
| 190 | 191 | The command will be executed in the shell if necessary. Default | |
| 191 | 192 | is the value of `sendemail.sendmailCmd`. If unspecified, and if | |
| 192 | - | --smtp-server is also unspecified, git-send-email will search | |
| 193 | - | for `sendmail` in `/usr/sbin`, `/usr/lib` and $PATH. | |
| 193 | + | `--smtp-server` is also unspecified, `git send-email` will search | |
| 194 | + | for `sendmail` in `/usr/sbin`, `/usr/lib` and `$PATH`. | |
| 194 | 195 | ||
| 195 | - | --smtp-encryption=<encryption>:: | |
| 196 | + | `--smtp-encryption=<encryption>`:: | |
| 196 | 197 | Specify in what way encrypting begins for the SMTP connection. | |
| 197 | - | Valid values are 'ssl' and 'tls'. Any other value reverts to plain | |
| 198 | + | Valid values are `ssl` and `tls`. Any other value reverts to plain | |
| 198 | 199 | (unencrypted) SMTP, which defaults to port 25. | |
| 199 | 200 | Despite the names, both values will use the same newer version of TLS, | |
| 200 | - | but for historic reasons have these names. 'ssl' refers to "implicit" | |
| 201 | + | but for historic reasons have these names. `ssl` refers to "implicit" | |
| 201 | 202 | encryption (sometimes called SMTPS), that uses port 465 by default. | |
| 202 | - | 'tls' refers to "explicit" encryption (often known as STARTTLS), | |
| 203 | + | `tls` refers to "explicit" encryption (often known as STARTTLS), | |
| 203 | 204 | that uses port 25 by default. Other ports might be used by the SMTP | |
| 204 | 205 | server, which are not the default. Commonly found alternative port for | |
| 205 | - | 'tls' and unencrypted is 587. You need to check your provider's | |
| 206 | + | `tls` and unencrypted is 587. You need to check your provider's | |
| 206 | 207 | documentation or your server configuration to make sure | |
| 207 | 208 | for your own case. Default is the value of `sendemail.smtpEncryption`. | |
| 208 | 209 | ||
| 209 | - | --smtp-domain=<FQDN>:: | |
| 210 | - | Specifies the Fully Qualified Domain Name (FQDN) used in the | |
| 210 | + | `--smtp-domain=<FQDN>`:: | |
| 211 | + | Specify the Fully Qualified Domain Name (FQDN) used in the | |
| 211 | 212 | HELO/EHLO command to the SMTP server. Some servers require the | |
| 212 | - | FQDN to match your IP address. If not set, git send-email attempts | |
| 213 | + | FQDN to match your IP address. If not set, `git send-email` attempts | |
| 213 | 214 | to determine your FQDN automatically. Default is the value of | |
| 214 | 215 | `sendemail.smtpDomain`. | |
| 215 | 216 | ||
| 216 | - | --smtp-auth=<mechanisms>:: | |
| 217 | + | `--smtp-auth=<mechanisms>`:: | |
| 217 | 218 | Whitespace-separated list of allowed SMTP-AUTH mechanisms. This setting | |
| 218 | 219 | forces using only the listed mechanisms. Example: | |
| 219 | 220 | + | |
| @@ -223,12 +224,12 @@ $ git send-email --smtp-auth="PLAIN LOGIN GSSAPI" ... | |||
| 223 | 224 | + | |
| 224 | 225 | If at least one of the specified mechanisms matches the ones advertised by the | |
| 225 | 226 | SMTP server and if it is supported by the utilized SASL library, the mechanism | |
| 226 | - | is used for authentication. If neither 'sendemail.smtpAuth' nor `--smtp-auth` | |
| 227 | + | is used for authentication. If neither `sendemail.smtpAuth` nor `--smtp-auth` | |
| 227 | 228 | is specified, all mechanisms supported by the SASL library can be used. The | |
| 228 | - | special value 'none' maybe specified to completely disable authentication | |
| 229 | - | independently of `--smtp-user` | |
| 229 | + | special value `none` maybe specified to completely disable authentication | |
| 230 | + | independently of `--smtp-user`. | |
| 230 | 231 | ||
| 231 | - | --smtp-pass[=<password>]:: | |
| 232 | + | `--smtp-pass[=<password>]`:: | |
| 232 | 233 | Password for SMTP-AUTH. The argument is optional: If no | |
| 233 | 234 | argument is specified, then the empty string is used as | |
| 234 | 235 | the password. Default is the value of `sendemail.smtpPass`, | |
| @@ -238,16 +239,16 @@ Furthermore, passwords need not be specified in configuration files | |||
| 238 | 239 | or on the command line. If a username has been specified (with | |
| 239 | 240 | `--smtp-user` or a `sendemail.smtpUser`), but no password has been | |
| 240 | 241 | specified (with `--smtp-pass` or `sendemail.smtpPass`), then | |
| 241 | - | a password is obtained using 'git-credential'. | |
| 242 | + | a password is obtained using linkgit:git-credential[1]. | |
| 242 | 243 | ||
| 243 | - | --no-smtp-auth:: | |
| 244 | - | Disable SMTP authentication. Short hand for `--smtp-auth=none` | |
| 244 | + | `--no-smtp-auth`:: | |
| 245 | + | Disable SMTP authentication. Short hand for `--smtp-auth=none`. | |
| 245 | 246 | ||
| 246 | - | --smtp-server=<host>:: | |
| 247 | - | If set, specifies the outgoing SMTP server to use (e.g. | |
| 247 | + | `--smtp-server=<host>`:: | |
| 248 | + | Specify the outgoing SMTP server to use (e.g. | |
| 248 | 249 | `smtp.example.com` or a raw IP address). If unspecified, and if | |
| 249 | 250 | `--sendmail-cmd` is also unspecified, the default is to search | |
| 250 | - | for `sendmail` in `/usr/sbin`, `/usr/lib` and $PATH if such a | |
| 251 | + | for `sendmail` in `/usr/sbin`, `/usr/lib` and `$PATH` if such a | |
| 251 | 252 | program is available, falling back to `localhost` otherwise. | |
| 252 | 253 | + | |
| 253 | 254 | For backward compatibility, this option can also specify a full pathname | |
| @@ -256,250 +257,306 @@ option. This method does not support passing arguments or using plain | |||
| 256 | 257 | command names. For those use cases, consider using `--sendmail-cmd` | |
| 257 | 258 | instead. | |
| 258 | 259 | ||
| 259 | - | --smtp-server-port=<port>:: | |
| 260 | - | Specifies a port different from the default port (SMTP | |
| 260 | + | `--smtp-server-port=<port>`:: | |
| 261 | + | Specify a port different from the default port (SMTP | |
| 261 | 262 | servers typically listen to smtp port 25, but may also listen to | |
| 262 | 263 | submission port 587, or the common SSL smtp port 465); | |
| 263 | - | symbolic port names (e.g. "submission" instead of 587) | |
| 264 | + | symbolic port names (e.g. `submission` instead of 587) | |
| 264 | 265 | are also accepted. The port can also be set with the | |
| 265 | 266 | `sendemail.smtpServerPort` configuration variable. | |
| 266 | 267 | ||
| 267 | - | --smtp-server-option=<option>:: | |
| 268 | - | If set, specifies the outgoing SMTP server option to use. | |
| 268 | + | `--smtp-server-option=<option>`:: | |
| 269 | + | Specify the outgoing SMTP server option to use. | |
| 269 | 270 | Default value can be specified by the `sendemail.smtpServerOption` | |
| 270 | 271 | configuration option. | |
| 271 | 272 | + | |
| 272 | - | The --smtp-server-option option must be repeated for each option you want | |
| 273 | + | The `--smtp-server-option` option must be repeated for each option you want | |
| 273 | 274 | to pass to the server. Likewise, different lines in the configuration files | |
| 274 | 275 | must be used for each option. | |
| 275 | 276 | ||
| 276 | - | --smtp-ssl:: | |
| 277 | - | Legacy alias for '--smtp-encryption ssl'. | |
| 277 | + | `--smtp-ssl`:: | |
| 278 | + | Legacy alias for `--smtp-encryption ssl`. | |
| 278 | 279 | ||
| 279 | - | --smtp-ssl-cert-path:: | |
| 280 | + | `--smtp-ssl-cert-path <path>`:: | |
| 280 | 281 | Path to a store of trusted CA certificates for SMTP SSL/TLS | |
| 281 | 282 | certificate validation (either a directory that has been processed | |
| 282 | - | by 'c_rehash', or a single file containing one or more PEM format | |
| 283 | - | certificates concatenated together: see verify(1) -CAfile and | |
| 284 | - | -CApath for more information on these). Set it to an empty string | |
| 285 | - | to disable certificate verification. Defaults to the value of the | |
| 286 | - | `sendemail.smtpSSLCertPath` configuration variable, if set, or the | |
| 287 | - | backing SSL library's compiled-in default otherwise (which should | |
| 288 | - | be the best choice on most platforms). | |
| 289 | - | ||
| 290 | - | --smtp-user=<user>:: | |
| 283 | + | by `c_rehash`, or a single file containing one or more PEM format | |
| 284 | + | certificates concatenated together: see the description of the | |
| 285 | + | `-CAfile <file>` and the `-CApath <dir>` options of | |
| 286 | + | https://docs.openssl.org/master/man1/openssl-verify/ | |
| 287 | + | [OpenSSL's verify(1) manual page] for more information on these). | |
| 288 | + | Set it to an empty string to disable certificate verification. | |
| 289 | + | Defaults to the value of the `sendemail.smtpSSLCertPath` configuration | |
| 290 | + | variable, if set, or the backing SSL library's compiled-in default | |
| 291 | + | otherwise (which should be the best choice on most platforms). | |
| 292 | + | ||
| 293 | + | `--smtp-ssl-client-cert <path>`:: | |
| 294 | + | Path to the client certificate file to present if requested by the | |
| 295 | + | server. This option is required when the server is set up to verify | |
| 296 | + | client certificates. If the corresponding private key is not included in | |
| 297 | + | the file, it must be supplied using the `sendemail.smtpSSLClientKey` | |
| 298 | + | configuration variable or the `--smtp-ssl-client-key` option. Defaults | |
| 299 | + | to the value of the `sendemail.smtpSSLClientCert` configuration | |
| 300 | + | variable, if set. | |
| 301 | + | ||
| 302 | + | `--smtp-ssl-client-key <path>`:: | |
| 303 | + | Path to the client private key file that corresponds to the client | |
| 304 | + | certificate. To avoid misconfiguration, this option must be used in | |
| 305 | + | conjunction with the `sendemail.smtpSSLClientKey` configuration variable | |
| 306 | + | or the `--smtp-ssl-client-cert` option. If the client key is included in | |
| 307 | + | the client certificate, the choice of private key depends on the format | |
| 308 | + | of the certificate. Visit https://metacpan.org/pod/IO::Socket::SSL for | |
| 309 | + | more details. Defaults to the value of the `sendemail.smtpSSLClientKey` | |
| 310 | + | configuration variable, if set. | |
| 311 | + | ||
| 312 | + | `--smtp-user=<user>`:: | |
| 291 | 313 | Username for SMTP-AUTH. Default is the value of `sendemail.smtpUser`; | |
| 292 | 314 | if a username is not specified (with `--smtp-user` or `sendemail.smtpUser`), | |
| 293 | 315 | then authentication is not attempted. | |
| 294 | 316 | ||
| 295 | - | --smtp-debug=(0|1):: | |
| 317 | + | `--smtp-debug=(0|1)`:: | |
| 296 | 318 | Enable (1) or disable (0) debug output. If enabled, SMTP | |
| 297 | 319 | commands and replies will be printed. Useful to debug TLS | |
| 298 | 320 | connection and authentication problems. | |
| 299 | 321 | ||
| 300 | - | --batch-size=<num>:: | |
| 301 | - | Some email servers (e.g. smtp.163.com) limit the number emails to be | |
| 322 | + | `--imap-sent-folder=<folder>`:: | |
| 323 | + | Some email providers (e.g. iCloud) do not send a copy of the emails sent | |
| 324 | + | using SMTP to the `Sent` folder or similar in your mailbox. Use this option | |
| 325 | + | to use `git imap-send` to send a copy of the emails to the folder specified | |
| 326 | + | using this option. You can run `git imap-send --list` to get a list of | |
| 327 | + | valid folder names, including the correct name of the `Sent` folder in | |
| 328 | + | your mailbox. You can also use this option to send emails to a dedicated | |
| 329 | + | IMAP folder of your choice. | |
| 330 | + | + | |
| 331 | + | This feature requires setting up `git imap-send`. See linkgit:git-imap-send[1] | |
| 332 | + | for instructions. | |
| 333 | + | ||
| 334 | + | `--use-imap-only`:: | |
| 335 | + | `--no-use-imap-only`:: | |
| 336 | + | If this is set, all emails will only be copied to the IMAP folder specified | |
| 337 | + | with `--imap-sent-folder` or `sendemail.imapSentFolder` and will not be sent | |
| 338 | + | to the recipients. Useful if you just want to create a draft of the emails | |
| 339 | + | and use another email client to send them. | |
| 340 | + | If disabled with `--no-use-imap-only`, the emails will be sent like usual. | |
| 341 | + | Disabled by default, but the `sendemail.useImapOnly` configuration | |
| 342 | + | variable can be used to enable it. | |
| 343 | + | + | |
| 344 | + | This feature requires setting up `git imap-send`. See linkgit:git-imap-send[1] | |
| 345 | + | for instructions. | |
| 346 | + | ||
| 347 | + | `--batch-size=<num>`:: | |
| 348 | + | Some email servers (e.g. `smtp.163.com`) limit the number of emails to be | |
| 302 | 349 | sent per session (connection) and this will lead to a failure when | |
| 303 | 350 | sending many messages. With this option, send-email will disconnect after | |
| 304 | - | sending $<num> messages and wait for a few seconds (see --relogin-delay) | |
| 305 | - | and reconnect, to work around such a limit. You may want to | |
| 306 | - | use some form of credential helper to avoid having to retype | |
| 307 | - | your password every time this happens. Defaults to the | |
| 351 | + | sending _<num>_ messages and wait for a few seconds | |
| 352 | + | (see `--relogin-delay`) and reconnect, to work around such a limit. | |
| 353 | + | You may want to use some form of credential helper to avoid having to | |
| 354 | + | retype your password every time this happens. Defaults to the | |
| 308 | 355 | `sendemail.smtpBatchSize` configuration variable. | |
| 309 | 356 | ||
| 310 | - | --relogin-delay=<int>:: | |
| 311 | - | Waiting $<int> seconds before reconnecting to SMTP server. Used together | |
| 312 | - | with --batch-size option. Defaults to the `sendemail.smtpReloginDelay` | |
| 357 | + | `--relogin-delay=<int>`:: | |
| 358 | + | Waiting _<int>_ seconds before reconnecting to SMTP server. Used together | |
| 359 | + | with `--batch-size` option. Defaults to the `sendemail.smtpReloginDelay` | |
| 313 | 360 | configuration variable. | |
| 314 | 361 | ||
| 315 | 362 | Automating | |
| 316 | 363 | ~~~~~~~~~~ | |
| 317 | 364 | ||
| 318 | - | --no-to:: | |
| 319 | - | --no-cc:: | |
| 320 | - | --no-bcc:: | |
| 321 | - | Clears any list of "To:", "Cc:", "Bcc:" addresses previously | |
| 365 | + | `--no-to`:: | |
| 366 | + | `--no-cc`:: | |
| 367 | + | `--no-bcc`:: | |
| 368 | + | Clear any list of `To:`, `Cc:`, `Bcc:` addresses previously | |
| 322 | 369 | set via config. | |
| 323 | 370 | ||
| 324 | - | --no-identity:: | |
| 325 | - | Clears the previously read value of `sendemail.identity` set | |
| 371 | + | `--no-identity`:: | |
| 372 | + | Clear the previously read value of `sendemail.identity` set | |
| 326 | 373 | via config, if any. | |
| 327 | 374 | ||
| 328 | - | --to-cmd=<command>:: | |
| 375 | + | `--to-cmd=<command>`:: | |
| 329 | 376 | Specify a command to execute once per patch file which | |
| 330 | - | should generate patch file specific "To:" entries. | |
| 377 | + | should generate patch file specific `To:` entries. | |
| 331 | 378 | Output of this command must be single email address per line. | |
| 332 | - | Default is the value of 'sendemail.toCmd' configuration value. | |
| 379 | + | Default is the value of `sendemail.toCmd` configuration value. | |
| 333 | 380 | ||
| 334 | - | --cc-cmd=<command>:: | |
| 381 | + | `--cc-cmd=<command>`:: | |
| 335 | 382 | Specify a command to execute once per patch file which | |
| 336 | - | should generate patch file specific "Cc:" entries. | |
| 383 | + | should generate patch file specific `Cc:` entries. | |
| 337 | 384 | Output of this command must be single email address per line. | |
| 338 | 385 | Default is the value of `sendemail.ccCmd` configuration value. | |
| 339 | 386 | ||
| 340 | - | --header-cmd=<command>:: | |
| 387 | + | `--header-cmd=<command>`:: | |
| 341 | 388 | Specify a command that is executed once per outgoing message | |
| 342 | 389 | and output RFC 2822 style header lines to be inserted into | |
| 343 | 390 | them. When the `sendemail.headerCmd` configuration variable is | |
| 344 | - | set, its value is always used. When --header-cmd is provided | |
| 391 | + | set, its value is always used. When `--header-cmd` is provided | |
| 345 | 392 | at the command line, its value takes precedence over the | |
| 346 | 393 | `sendemail.headerCmd` configuration variable. | |
| 347 | 394 | ||
| 348 | - | --no-header-cmd:: | |
| 395 | + | `--no-header-cmd`:: | |
| 349 | 396 | Disable any header command in use. | |
| 350 | 397 | ||
| 351 | - | --[no-]chain-reply-to:: | |
| 398 | + | `--chain-reply-to`:: | |
| 399 | + | `--no-chain-reply-to`:: | |
| 352 | 400 | If this is set, each email will be sent as a reply to the previous | |
| 353 | - | email sent. If disabled with "--no-chain-reply-to", all emails after | |
| 401 | + | email sent. If disabled with `--no-chain-reply-to`, all emails after | |
| 354 | 402 | the first will be sent as replies to the first email sent. When using | |
| 355 | 403 | this, it is recommended that the first file given be an overview of the | |
| 356 | 404 | entire patch series. Disabled by default, but the `sendemail.chainReplyTo` | |
| 357 | 405 | configuration variable can be used to enable it. | |
| 358 | 406 | ||
| 359 | - | --identity=<identity>:: | |
| 407 | + | `--identity=<identity>`:: | |
| 360 | 408 | A configuration identity. When given, causes values in the | |
| 361 | - | 'sendemail.<identity>' subsection to take precedence over | |
| 362 | - | values in the 'sendemail' section. The default identity is | |
| 409 | + | `sendemail.<identity>` subsection to take precedence over | |
| 410 | + | values in the `sendemail` section. The default identity is | |
| 363 | 411 | the value of `sendemail.identity`. | |
| 364 | 412 | ||
| 365 | - | --[no-]signed-off-by-cc:: | |
| 366 | - | If this is set, add emails found in the `Signed-off-by` trailer or Cc: lines to the | |
| 367 | - | cc list. Default is the value of `sendemail.signedOffByCc` configuration | |
| 368 | - | value; if that is unspecified, default to --signed-off-by-cc. | |
| 413 | + | `--signed-off-by-cc`:: | |
| 414 | + | `--no-signed-off-by-cc`:: | |
| 415 | + | If this is set, add emails found in the `Signed-off-by` trailer or `Cc:` | |
| 416 | + | lines to the cc list. Default is the value of `sendemail.signedOffByCc` | |
| 417 | + | configuration value; if that is unspecified, default to | |
| 418 | + | `--signed-off-by-cc`. | |
| 369 | 419 | ||
| 370 | - | --[no-]cc-cover:: | |
| 371 | - | If this is set, emails found in Cc: headers in the first patch of | |
| 420 | + | `--cc-cover`:: | |
| 421 | + | `--no-cc-cover`:: | |
| 422 | + | If this is set, emails found in `Cc:` headers in the first patch of | |
| 372 | 423 | the series (typically the cover letter) are added to the cc list | |
| 373 | - | for each email set. Default is the value of 'sendemail.ccCover' | |
| 374 | - | configuration value; if that is unspecified, default to --no-cc-cover. | |
| 424 | + | for each email set. Default is the value of `sendemail.ccCover` | |
| 425 | + | configuration value; if that is unspecified, default to `--no-cc-cover`. | |
| 375 | 426 | ||
| 376 | - | --[no-]to-cover:: | |
| 377 | - | If this is set, emails found in To: headers in the first patch of | |
| 427 | + | `--to-cover`:: | |
| 428 | + | `--no-to-cover`:: | |
| 429 | + | If this is set, emails found in `To:` headers in the first patch of | |
| 378 | 430 | the series (typically the cover letter) are added to the to list | |
| 379 | - | for each email set. Default is the value of 'sendemail.toCover' | |
| 380 | - | configuration value; if that is unspecified, default to --no-to-cover. | |
| 431 | + | for each email set. Default is the value of `sendemail.toCover` | |
| 432 | + | configuration value; if that is unspecified, default to `--no-to-cover`. | |
| 381 | 433 | ||
| 382 | - | --suppress-cc=<category>:: | |
| 434 | + | `--suppress-cc=<category>`:: | |
| 383 | 435 | Specify an additional category of recipients to suppress the | |
| 384 | 436 | auto-cc of: | |
| 385 | 437 | + | |
| 386 | 438 | -- | |
| 387 | - | - 'author' will avoid including the patch author. | |
| 388 | - | - 'self' will avoid including the sender. | |
| 389 | - | - 'cc' will avoid including anyone mentioned in Cc lines in the patch header | |
| 390 | - | except for self (use 'self' for that). | |
| 391 | - | - 'bodycc' will avoid including anyone mentioned in Cc lines in the | |
| 392 | - | patch body (commit message) except for self (use 'self' for that). | |
| 393 | - | - 'sob' will avoid including anyone mentioned in the Signed-off-by trailers except | |
| 394 | - | for self (use 'self' for that). | |
| 395 | - | - 'misc-by' will avoid including anyone mentioned in Acked-by, | |
| 439 | + | - `author` will avoid including the patch author. | |
| 440 | + | - `self` will avoid including the sender. | |
| 441 | + | - `cc` will avoid including anyone mentioned in Cc lines in the patch header | |
| 442 | + | except for self (use `self` for that). | |
| 443 | + | - `bodycc` will avoid including anyone mentioned in Cc lines in the | |
| 444 | + | patch body (commit message) except for self (use `self` for that). | |
| 445 | + | - `sob` will avoid including anyone mentioned in the Signed-off-by trailers except | |
| 446 | + | for self (use `self` for that). | |
| 447 | + | - `misc-by` will avoid including anyone mentioned in Acked-by, | |
| 396 | 448 | Reviewed-by, Tested-by and other "-by" lines in the patch body, | |
| 397 | - | except Signed-off-by (use 'sob' for that). | |
| 398 | - | - 'cccmd' will avoid running the --cc-cmd. | |
| 399 | - | - 'body' is equivalent to 'sob' + 'bodycc' + 'misc-by'. | |
| 400 | - | - 'all' will suppress all auto cc values. | |
| 449 | + | except Signed-off-by (use `sob` for that). | |
| 450 | + | - `cccmd` will avoid running the --cc-cmd. | |
| 451 | + | - `body` is equivalent to `sob` + `bodycc` + `misc-by`. | |
| 452 | + | - `all` will suppress all auto cc values. | |
| 401 | 453 | -- | |
| 402 | 454 | + | |
| 403 | 455 | Default is the value of `sendemail.suppressCc` configuration value; if | |
| 404 | - | that is unspecified, default to 'self' if --suppress-from is | |
| 405 | - | specified, as well as 'body' if --no-signed-off-cc is specified. | |
| 456 | + | that is unspecified, default to `self` if `--suppress-from` is | |
| 457 | + | specified, as well as `body` if `--no-signed-off-by-cc` is specified. | |
| 406 | 458 | ||
| 407 | - | --[no-]suppress-from:: | |
| 408 | - | If this is set, do not add the From: address to the cc: list. | |
| 459 | + | `--suppress-from`:: | |
| 460 | + | `--no-suppress-from`:: | |
| 461 | + | If this is set, do not add the `From:` address to the `Cc:` list. | |
| 409 | 462 | Default is the value of `sendemail.suppressFrom` configuration | |
| 410 | - | value; if that is unspecified, default to --no-suppress-from. | |
| 463 | + | value; if that is unspecified, default to `--no-suppress-from`. | |
| 411 | 464 | ||
| 412 | - | --[no-]thread:: | |
| 413 | - | If this is set, the In-Reply-To and References headers will be | |
| 465 | + | `--thread`:: | |
| 466 | + | `--no-thread`:: | |
| 467 | + | If this is set, the `In-Reply-To` and `References` headers will be | |
| 414 | 468 | added to each email sent. Whether each mail refers to the | |
| 415 | - | previous email (`deep` threading per 'git format-patch' | |
| 469 | + | previous email (`deep` threading per `git format-patch` | |
| 416 | 470 | wording) or to the first email (`shallow` threading) is | |
| 417 | - | governed by "--[no-]chain-reply-to". | |
| 471 | + | governed by `--[no-]chain-reply-to`. | |
| 418 | 472 | + | |
| 419 | - | If disabled with "--no-thread", those headers will not be added | |
| 420 | - | (unless specified with --in-reply-to). Default is the value of the | |
| 473 | + | If disabled with `--no-thread`, those headers will not be added | |
| 474 | + | (unless specified with `--in-reply-to`). Default is the value of the | |
| 421 | 475 | `sendemail.thread` configuration value; if that is unspecified, | |
| 422 | - | default to --thread. | |
| 476 | + | default to `--thread`. | |
| 423 | 477 | + | |
| 424 | 478 | It is up to the user to ensure that no In-Reply-To header already | |
| 425 | - | exists when 'git send-email' is asked to add it (especially note that | |
| 426 | - | 'git format-patch' can be configured to do the threading itself). | |
| 479 | + | exists when `git send-email` is asked to add it (especially note that | |
| 480 | + | `git format-patch` can be configured to do the threading itself). | |
| 427 | 481 | Failure to do so may not produce the expected result in the | |
| 428 | 482 | recipient's MUA. | |
| 429 | 483 | ||
| 430 | - | --[no-]mailmap:: | |
| 484 | + | `--mailmap`:: | |
| 485 | + | `--no-mailmap`:: | |
| 431 | 486 | Use the mailmap file (see linkgit:gitmailmap[5]) to map all | |
| 432 | 487 | addresses to their canonical real name and email address. Additional | |
| 433 | - | mailmap data specific to git-send-email may be provided using the | |
| 488 | + | mailmap data specific to `git send-email` may be provided using the | |
| 434 | 489 | `sendemail.mailmap.file` or `sendemail.mailmap.blob` configuration | |
| 435 | 490 | values. Defaults to `sendemail.mailmap`. | |
| 436 | 491 | ||
| 437 | 492 | Administering | |
| 438 | 493 | ~~~~~~~~~~~~~ | |
| 439 | 494 | ||
| 440 | - | --confirm=<mode>:: | |
| 495 | + | `--confirm=<mode>`:: | |
| 441 | 496 | Confirm just before sending: | |
| 442 | 497 | + | |
| 443 | 498 | -- | |
| 444 | - | - 'always' will always confirm before sending | |
| 445 | - | - 'never' will never confirm before sending | |
| 446 | - | - 'cc' will confirm before sending when send-email has automatically | |
| 447 | - | added addresses from the patch to the Cc list | |
| 448 | - | - 'compose' will confirm before sending the first message when using --compose. | |
| 449 | - | - 'auto' is equivalent to 'cc' + 'compose' | |
| 499 | + | - `always` will always confirm before sending. | |
| 500 | + | - `never` will never confirm before sending. | |
| 501 | + | - `cc` will confirm before sending when send-email has automatically | |
| 502 | + | added addresses from the patch to the Cc list. | |
| 503 | + | - `compose` will confirm before sending the first message when using --compose. | |
| 504 | + | - `auto` is equivalent to `cc` + `compose`. | |
| 450 | 505 | -- | |
| 451 | 506 | + | |
| 452 | 507 | Default is the value of `sendemail.confirm` configuration value; if that | |
| 453 | - | is unspecified, default to 'auto' unless any of the suppress options | |
| 454 | - | have been specified, in which case default to 'compose'. | |
| 508 | + | is unspecified, default to `auto` unless any of the suppress options | |
| 509 | + | have been specified, in which case default to `compose`. | |
| 455 | 510 | ||
| 456 | - | --dry-run:: | |
| 511 | + | `--dry-run`:: | |
| 457 | 512 | Do everything except actually send the emails. | |
| 458 | 513 | ||
| 459 | - | --[no-]format-patch:: | |
| 514 | + | `--format-patch`:: | |
| 515 | + | `--no-format-patch`:: | |
| 460 | 516 | When an argument may be understood either as a reference or as a file name, | |
| 461 | 517 | choose to understand it as a format-patch argument (`--format-patch`) | |
| 462 | 518 | or as a file name (`--no-format-patch`). By default, when such a conflict | |
| 463 | - | occurs, git send-email will fail. | |
| 519 | + | occurs, `git send-email` will fail. | |
| 464 | 520 | ||
| 465 | - | --quiet:: | |
| 466 | - | Make git-send-email less verbose. One line per email should be | |
| 521 | + | `--quiet`:: | |
| 522 | + | Make `git send-email` less verbose. One line per email should be | |
| 467 | 523 | all that is output. | |
| 468 | 524 | ||
| 469 | - | --[no-]validate:: | |
| 525 | + | `--validate`:: | |
| 526 | + | `--no-validate`:: | |
| 470 | 527 | Perform sanity checks on patches. | |
| 471 | 528 | Currently, validation means the following: | |
| 472 | 529 | + | |
| 473 | 530 | -- | |
| 474 | - | * Invoke the sendemail-validate hook if present (see linkgit:githooks[5]). | |
| 475 | - | * Warn of patches that contain lines longer than | |
| 476 | - | 998 characters unless a suitable transfer encoding | |
| 477 | - | ('auto', 'base64', or 'quoted-printable') is used; | |
| 478 | - | this is due to SMTP limits as described by | |
| 479 | - | https://www.ietf.org/rfc/rfc5322.txt. | |
| 531 | + | * Invoke the sendemail-validate hook if present (see linkgit:githooks[5]). | |
| 532 | + | * Warn of patches that contain lines longer than | |
| 533 | + | 998 characters unless a suitable transfer encoding | |
| 534 | + | (`auto`, `base64`, or `quoted-printable`) is used; | |
| 535 | + | this is due to SMTP limits as described by | |
| 536 | + | https://www.ietf.org/rfc/rfc5322.txt. | |
| 480 | 537 | -- | |
| 481 | 538 | + | |
| 482 | 539 | Default is the value of `sendemail.validate`; if this is not set, | |
| 483 | 540 | default to `--validate`. | |
| 484 | 541 | ||
| 485 | - | --force:: | |
| 542 | + | `--force`:: | |
| 486 | 543 | Send emails even if safety checks would prevent it. | |
| 487 | 544 | ||
| 488 | 545 | ||
| 489 | 546 | Information | |
| 490 | 547 | ~~~~~~~~~~~ | |
| 491 | 548 | ||
| 492 | - | --dump-aliases:: | |
| 549 | + | `--dump-aliases`:: | |
| 493 | 550 | Instead of the normal operation, dump the shorthand alias names from | |
| 494 | 551 | the configured alias file(s), one per line in alphabetical order. Note | |
| 495 | 552 | that this only includes the alias name and not its expanded email addresses. | |
| 496 | - | See 'sendemail.aliasesFile' for more information about aliases. | |
| 553 | + | See `sendemail.aliasesFile` for more information about aliases. | |
| 497 | 554 | ||
| 498 | - | --translate-aliases:: | |
| 555 | + | `--translate-aliases`:: | |
| 499 | 556 | Instead of the normal operation, read from standard input and | |
| 500 | 557 | interpret each line as an email alias. Translate it according to the | |
| 501 | 558 | configured alias file(s). Output each translated name and email | |
| 502 | - | address to standard output, one per line. See 'sendemail.aliasFile' | |
| 559 | + | address to standard output, one per line. See `sendemail.aliasFile` | |
| 503 | 560 | for more information about aliases. | |
| 504 | 561 | ||
| 505 | 562 | CONFIGURATION | |
| @@ -518,36 +575,43 @@ edit `~/.gitconfig` to specify your account settings: | |||
| 518 | 575 | ||
| 519 | 576 | ---- | |
| 520 | 577 | [sendemail] | |
| 521 | - | smtpEncryption = tls | |
| 578 | + | smtpEncryption = ssl | |
| 522 | 579 | smtpServer = smtp.gmail.com | |
| 523 | 580 | smtpUser = yourname@gmail.com | |
| 524 | - | smtpServerPort = 587 | |
| 581 | + | smtpServerPort = 465 | |
| 525 | 582 | ---- | |
| 526 | 583 | ||
| 584 | + | Gmail does not allow using your regular password for `git send-email`. | |
| 527 | 585 | If you have multi-factor authentication set up on your Gmail account, you can | |
| 528 | - | generate an app-specific password for use with 'git send-email'. Visit | |
| 586 | + | generate an app-specific password for use with `git send-email`. Visit | |
| 529 | 587 | https://security.google.com/settings/security/apppasswords to create it. | |
| 530 | 588 | ||
| 531 | - | You can also use OAuth2.0 authentication with Gmail. `OAUTHBEARER` and | |
| 532 | - | `XOAUTH2` are common methods used for this type of authentication. Gmail | |
| 533 | - | supports both of them. As an example, if you want to use `OAUTHBEARER`, edit | |
| 534 | - | your `~/.gitconfig` file and add `smtpAuth = OAUTHBEARER` to your account | |
| 535 | - | settings: | |
| 589 | + | Alternatively, instead of using an app-specific password, you can use | |
| 590 | + | OAuth2.0 authentication with Gmail. OAuth2.0 is more secure than | |
| 591 | + | app-specific passwords, and works regardless of whether you have multi-factor | |
| 592 | + | authentication set up. `OAUTHBEARER` and `XOAUTH2` are common mechanisms used | |
| 593 | + | for this type of authentication. Gmail supports both of them. As an example, | |
| 594 | + | if you want to use `OAUTHBEARER`, edit your `~/.gitconfig` file and add | |
| 595 | + | `smtpAuth = OAUTHBEARER` to your account settings: | |
| 536 | 596 | ||
| 537 | 597 | ---- | |
| 538 | 598 | [sendemail] | |
| 539 | - | smtpEncryption = tls | |
| 599 | + | smtpEncryption = ssl | |
| 540 | 600 | smtpServer = smtp.gmail.com | |
| 541 | 601 | smtpUser = yourname@gmail.com | |
| 542 | - | smtpServerPort = 587 | |
| 602 | + | smtpServerPort = 465 | |
| 543 | 603 | smtpAuth = OAUTHBEARER | |
| 544 | 604 | ---- | |
| 545 | 605 | ||
| 606 | + | Another alternative is using a tool developed by Google known as | |
| 607 | + | https://github.com/google/gmail-oauth2-tools/tree/master/go/sendgmail[sendgmail] | |
| 608 | + | to send emails using `git send-email`. | |
| 609 | + | ||
| 546 | 610 | Use Microsoft Outlook as the SMTP Server | |
| 547 | 611 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
| 548 | 612 | Unlike Gmail, Microsoft Outlook no longer supports app-specific passwords. | |
| 549 | 613 | Therefore, OAuth2.0 authentication must be used for Outlook. Also, it only | |
| 550 | - | supports `XOAUTH2` authentication method. | |
| 614 | + | supports `XOAUTH2` authentication mechanism. | |
| 551 | 615 | ||
| 552 | 616 | Edit `~/.gitconfig` to specify your account settings for Outlook and use its | |
| 553 | 617 | SMTP server with `git send-email`: | |
| @@ -579,8 +643,7 @@ next time. | |||
| 579 | 643 | ||
| 580 | 644 | If you are using OAuth2.0 authentication, you need to use an access token in | |
| 581 | 645 | place of a password when prompted. Various OAuth2.0 token generators are | |
| 582 | - | available online. Community maintained credential helpers for Gmail and Outlook | |
| 583 | - | are also available: | |
| 646 | + | available online. Community maintained credential helpers are also available: | |
| 584 | 647 | ||
| 585 | 648 | - https://github.com/AdityaGarg8/git-credential-email[git-credential-gmail] | |
| 586 | 649 | (cross platform, dedicated helper for authenticating Gmail accounts) | |
| @@ -588,19 +651,74 @@ are also available: | |||
| 588 | 651 | - https://github.com/AdityaGarg8/git-credential-email[git-credential-outlook] | |
| 589 | 652 | (cross platform, dedicated helper for authenticating Microsoft Outlook accounts) | |
| 590 | 653 | ||
| 654 | + | - https://github.com/AdityaGarg8/git-credential-email[git-credential-yahoo] | |
| 655 | + | (cross platform, dedicated helper for authenticating Yahoo accounts) | |
| 656 | + | ||
| 657 | + | - https://github.com/AdityaGarg8/git-credential-email[git-credential-aol] | |
| 658 | + | (cross platform, dedicated helper for authenticating AOL accounts) | |
| 659 | + | ||
| 591 | 660 | You can also see linkgit:gitcredentials[7] for more OAuth based authentication | |
| 592 | 661 | helpers. | |
| 593 | 662 | ||
| 663 | + | Proton Mail does not provide an SMTP server to send emails. If you are a paid | |
| 664 | + | customer of Proton Mail, you can use | |
| 665 | + | https://proton.me/mail/bridge[Proton Mail Bridge] | |
| 666 | + | officially provided by Proton Mail to create a local SMTP server for sending | |
| 667 | + | emails. For both free and paid users, community maintained projects like | |
| 668 | + | https://github.com/AdityaGarg8/git-credential-email[git-protonmail] can be | |
| 669 | + | used. | |
| 670 | + | ||
| 594 | 671 | Note: the following core Perl modules that may be installed with your | |
| 595 | 672 | distribution of Perl are required: | |
| 596 | - | MIME::Base64, MIME::QuotedPrint, Net::Domain and Net::SMTP. | |
| 673 | + | ||
| 674 | + | https://metacpan.org/pod/MIME::Base64[MIME::Base64], | |
| 675 | + | https://metacpan.org/pod/MIME::QuotedPrint[MIME::QuotedPrint], | |
| 676 | + | https://metacpan.org/pod/Net::Domain[Net::Domain] and | |
| 677 | + | https://metacpan.org/pod/Net::SMTP[Net::SMTP]. | |
| 678 | + | ||
| 597 | 679 | These additional Perl modules are also required: | |
| 598 | - | Authen::SASL and Mail::Address. | |
| 599 | 680 | ||
| 681 | + | https://metacpan.org/pod/Authen::SASL[Authen::SASL] and | |
| 682 | + | https://metacpan.org/pod/Mail::Address[Mail::Address]. | |
| 683 | + | ||
| 684 | + | Exploiting the `sendmailCmd` option of `git send-email` | |
| 685 | + | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
| 686 | + | ||
| 687 | + | Apart from sending emails via an SMTP server, `git send-email` can also send | |
| 688 | + | emails through any application that supports sendmail-like commands. You can | |
| 689 | + | read documentation of `--sendmail-cmd=<command>` above for more information. | |
| 690 | + | This ability can be very useful if you want to use another application as an | |
| 691 | + | SMTP client for `git send-email`, or if your email provider uses proprietary | |
| 692 | + | APIs instead of SMTP to send emails. | |
| 693 | + | ||
| 694 | + | As an example, lets see how to configure https://marlam.de/msmtp/[msmtp], a | |
| 695 | + | popular SMTP client found in many Linux distributions. Edit `~/.gitconfig` | |
| 696 | + | to instruct `git-send-email` to use it for sending emails. | |
| 697 | + | ||
| 698 | + | ---- | |
| 699 | + | [sendemail] | |
| 700 | + | sendmailCmd = /usr/bin/msmtp # Change this to the path where msmtp is installed | |
| 701 | + | ---- | |
| 702 | + | ||
| 703 | + | Links of a few such community maintained helpers are: | |
| 704 | + | ||
| 705 | + | - https://marlam.de/msmtp/[msmtp] | |
| 706 | + | (popular SMTP client with many features, available for Linux and macOS) | |
| 707 | + | ||
| 708 | + | - https://github.com/AdityaGarg8/git-credential-email[git-protonmail] | |
| 709 | + | (cross platform client that can send emails using the ProtonMail API) | |
| 710 | + | ||
| 711 | + | - https://github.com/AdityaGarg8/git-credential-email[git-msgraph] | |
| 712 | + | (cross platform client that can send emails using the Microsoft Graph API) | |
| 713 | + | ||
| 714 | + | CAVEATS | |
| 715 | + | ------- | |
| 716 | + | ||
| 717 | + | include::format-patch-caveats.adoc[] | |
| 600 | 718 | ||
| 601 | 719 | SEE ALSO | |
| 602 | 720 | -------- | |
| 603 | - | linkgit:git-format-patch[1], linkgit:git-imap-send[1], mbox(5) | |
| 721 | + | linkgit:git-format-patch[1], linkgit:git-imap-send[1], `mbox`(5) | |
| 604 | 722 | ||
| 605 | 723 | GIT | |
| 606 | 724 | --- | |
modified Documentation/git-send-pack.adoc
| @@ -71,7 +71,8 @@ be in a separate packet, and the list must end with a flush packet. | |||
| 71 | 71 | fails to update then the entire push will fail without changing any | |
| 72 | 72 | refs. | |
| 73 | 73 | ||
| 74 | - | --[no-]signed:: | |
| 74 | + | --signed:: | |
| 75 | + | --no-signed:: | |
| 75 | 76 | --signed=(true|false|if-asked):: | |
| 76 | 77 | GPG-sign the push request to update refs on the receiving | |
| 77 | 78 | side, to allow it to be checked by the hooks and/or be | |
modified Documentation/git-shortlog.adoc
| @@ -3,70 +3,67 @@ git-shortlog(1) | |||
| 3 | 3 | ||
| 4 | 4 | NAME | |
| 5 | 5 | ---- | |
| 6 | - | git-shortlog - Summarize 'git log' output | |
| 6 | + | git-shortlog - Summarize `git log` output | |
| 7 | 7 | ||
| 8 | 8 | SYNOPSIS | |
| 9 | 9 | -------- | |
| 10 | - | [verse] | |
| 11 | - | 'git shortlog' [<options>] [<revision-range>] [[--] <path>...] | |
| 12 | - | git log --pretty=short | 'git shortlog' [<options>] | |
| 10 | + | [synopsis] | |
| 11 | + | git shortlog [<options>] [<revision-range>] [[--] <path>...] | |
| 12 | + | git log --pretty=short | git shortlog [<options>] | |
| 13 | 13 | ||
| 14 | 14 | DESCRIPTION | |
| 15 | 15 | ----------- | |
| 16 | - | Summarizes 'git log' output in a format suitable for inclusion | |
| 16 | + | Summarizes `git log` output in a format suitable for inclusion | |
| 17 | 17 | in release announcements. Each commit will be grouped by author and title. | |
| 18 | 18 | ||
| 19 | 19 | Additionally, "[PATCH]" will be stripped from the commit description. | |
| 20 | 20 | ||
| 21 | 21 | If no revisions are passed on the command line and either standard input | |
| 22 | - | is not a terminal or there is no current branch, 'git shortlog' will | |
| 22 | + | is not a terminal or there is no current branch, `git shortlog` will | |
| 23 | 23 | output a summary of the log read from standard input, without | |
| 24 | 24 | reference to the current repository. | |
| 25 | 25 | ||
| 26 | 26 | OPTIONS | |
| 27 | 27 | ------- | |
| 28 | 28 | ||
| 29 | - | -n:: | |
| 30 | - | --numbered:: | |
| 29 | + | `-n`:: | |
| 30 | + | `--numbered`:: | |
| 31 | 31 | Sort output according to the number of commits per author instead | |
| 32 | 32 | of author alphabetic order. | |
| 33 | 33 | ||
| 34 | - | -s:: | |
| 35 | - | --summary:: | |
| 34 | + | `-s`:: | |
| 35 | + | `--summary`:: | |
| 36 | 36 | Suppress commit description and provide a commit count summary only. | |
| 37 | 37 | ||
| 38 | - | -e:: | |
| 39 | - | --email:: | |
| 38 | + | `-e`:: | |
| 39 | + | `--email`:: | |
| 40 | 40 | Show the email address of each author. | |
| 41 | 41 | ||
| 42 | - | --format[=<format>]:: | |
| 42 | + | `--format[=<format>]`:: | |
| 43 | 43 | Instead of the commit subject, use some other information to | |
| 44 | - | describe each commit. '<format>' can be any string accepted | |
| 45 | - | by the `--format` option of 'git log', such as '* [%h] %s'. | |
| 46 | - | (See the "PRETTY FORMATS" section of linkgit:git-log[1].) | |
| 47 | - | ||
| 48 | - | Each pretty-printed commit will be rewrapped before it is shown. | |
| 44 | + | describe each commit. _<format>_ can be any string accepted | |
| 45 | + | by the `--format` option of `git log`, such as '* [%h] %s'. | |
| 46 | + | (See the 'PRETTY FORMATS' section of linkgit:git-log[1].) | |
| 47 | + | + | |
| 48 | + | Each pretty-printed commit will be rewrapped before it is shown. | |
| 49 | 49 | ||
| 50 | - | --date=<format>:: | |
| 50 | + | `--date=<format>`:: | |
| 51 | 51 | Show dates formatted according to the given date string. (See | |
| 52 | - | the `--date` option in the "Commit Formatting" section of | |
| 52 | + | the `--date` option in the 'Commit Formatting' section of | |
| 53 | 53 | linkgit:git-log[1]). Useful with `--group=format:<format>`. | |
| 54 | 54 | ||
| 55 | - | --group=<type>:: | |
| 56 | - | Group commits based on `<type>`. If no `--group` option is | |
| 57 | - | specified, the default is `author`. `<type>` is one of: | |
| 55 | + | `--group=<type>`:: | |
| 56 | + | Group commits based on _<type>_. If no `--group` option is | |
| 57 | + | specified, the default is `author`. _<type>_ is one of: | |
| 58 | 58 | + | |
| 59 | 59 | -- | |
| 60 | 60 | - `author`, commits are grouped by author | |
| 61 | 61 | - `committer`, commits are grouped by committer (the same as `-c`) | |
| 62 | - | - `trailer:<field>`, the `<field>` is interpreted as a case-insensitive | |
| 62 | + | - `trailer:<field>`, the _<field>_ is interpreted as a case-insensitive | |
| 63 | 63 | commit message trailer (see linkgit:git-interpret-trailers[1]). For | |
| 64 | 64 | example, if your project uses `Reviewed-by` trailers, you might want | |
| 65 | 65 | to see who has been reviewing with | |
| 66 | 66 | `git shortlog -ns --group=trailer:reviewed-by`. | |
| 67 | - | - `format:<format>`, any string accepted by the `--format` option of | |
| 68 | - | 'git log'. (See the "PRETTY FORMATS" section of | |
| 69 | - | linkgit:git-log[1].) | |
| 70 | 67 | + | |
| 71 | 68 | Note that commits that do not include the trailer will not be counted. | |
| 72 | 69 | Likewise, commits with multiple trailers (e.g., multiple signoffs) may | |
| @@ -77,6 +74,10 @@ Shortlog will attempt to parse each trailer value as a `name <email>` | |||
| 77 | 74 | identity. If successful, the mailmap is applied and the email is omitted | |
| 78 | 75 | unless the `--email` option is specified. If the value cannot be parsed | |
| 79 | 76 | as an identity, it will be taken literally and completely. | |
| 77 | + | ||
| 78 | + | - `format:<format>`, any string accepted by the `--format` option of | |
| 79 | + | `git log`. (See the 'PRETTY FORMATS' section of | |
| 80 | + | linkgit:git-log[1].) | |
| 80 | 81 | -- | |
| 81 | 82 | + | |
| 82 | 83 | If `--group` is specified multiple times, commits are counted under each | |
| @@ -84,11 +85,11 @@ value (but again, only once per unique value in that commit). For | |||
| 84 | 85 | example, `git shortlog --group=author --group=trailer:co-authored-by` | |
| 85 | 86 | counts both authors and co-authors. | |
| 86 | 87 | ||
| 87 | - | -c:: | |
| 88 | - | --committer:: | |
| 88 | + | `-c`:: | |
| 89 | + | `--committer`:: | |
| 89 | 90 | This is an alias for `--group=committer`. | |
| 90 | 91 | ||
| 91 | - | -w[<width>[,<indent1>[,<indent2>]]]:: | |
| 92 | + | `-w[<width>[,<indent1>[,<indent2>]]]`:: | |
| 92 | 93 | Linewrap the output by wrapping each line at `width`. The first | |
| 93 | 94 | line of each entry is indented by `indent1` spaces, and the second | |
| 94 | 95 | and subsequent lines are indented by `indent2` spaces. `width`, | |
| @@ -97,16 +98,16 @@ counts both authors and co-authors. | |||
| 97 | 98 | If width is `0` (zero) then indent the lines of the output without wrapping | |
| 98 | 99 | them. | |
| 99 | 100 | ||
| 100 | - | <revision-range>:: | |
| 101 | + | `<revision-range>`:: | |
| 101 | 102 | Show only commits in the specified revision range. When no | |
| 102 | - | <revision-range> is specified, it defaults to `HEAD` (i.e. the | |
| 103 | + | _<revision-range>_ is specified, it defaults to `HEAD` (i.e. the | |
| 103 | 104 | whole history leading to the current commit). `origin..HEAD` | |
| 104 | 105 | specifies all the commits reachable from the current commit | |
| 105 | 106 | (i.e. `HEAD`), but not from `origin`. For a complete list of | |
| 106 | - | ways to spell <revision-range>, see the "Specifying Ranges" | |
| 107 | + | ways to spell _<revision-range>_, see the 'Specifying Ranges' | |
| 107 | 108 | section of linkgit:gitrevisions[7]. | |
| 108 | 109 | ||
| 109 | - | [--] <path>...:: | |
| 110 | + | `[--] <path>...`:: | |
| 110 | 111 | Consider only commits that are enough to explain how the files | |
| 111 | 112 | that match the specified paths came to be. | |
| 112 | 113 | + | |
modified Documentation/git-show.adoc
| @@ -8,8 +8,8 @@ git-show - Show various types of objects | |||
| 8 | 8 | ||
| 9 | 9 | SYNOPSIS | |
| 10 | 10 | -------- | |
| 11 | - | [verse] | |
| 12 | - | 'git show' [<options>] [<object>...] | |
| 11 | + | [synopsis] | |
| 12 | + | git show [<options>] [<object>...] | |
| 13 | 13 | ||
| 14 | 14 | DESCRIPTION | |
| 15 | 15 | ----------- | |
| @@ -17,16 +17,16 @@ Shows one or more objects (blobs, trees, tags and commits). | |||
| 17 | 17 | ||
| 18 | 18 | For commits it shows the log message and textual diff. It also | |
| 19 | 19 | presents the merge commit in a special format as produced by | |
| 20 | - | 'git diff-tree --cc'. | |
| 20 | + | `git diff-tree --cc`. | |
| 21 | 21 | ||
| 22 | 22 | For tags, it shows the tag message and the referenced objects. | |
| 23 | 23 | ||
| 24 | - | For trees, it shows the names (equivalent to 'git ls-tree' | |
| 25 | - | with --name-only). | |
| 24 | + | For trees, it shows the names (equivalent to `git ls-tree` | |
| 25 | + | with `--name-only`). | |
| 26 | 26 | ||
| 27 | 27 | For plain blobs, it shows the plain contents. | |
| 28 | 28 | ||
| 29 | - | Some options that 'git log' command understands can be used to | |
| 29 | + | Some options that `git log` command understands can be used to | |
| 30 | 30 | control how the changes the commit introduces are shown. | |
| 31 | 31 | ||
| 32 | 32 | This manual page describes only the most frequently used options. | |
| @@ -34,8 +34,8 @@ This manual page describes only the most frequently used options. | |||
| 34 | 34 | ||
| 35 | 35 | OPTIONS | |
| 36 | 36 | ------- | |
| 37 | - | <object>...:: | |
| 38 | - | The names of objects to show (defaults to 'HEAD'). | |
| 37 | + | `<object>...`:: | |
| 38 | + | The names of objects to show (defaults to `HEAD`). | |
| 39 | 39 | For a more complete list of ways to spell object names, see | |
| 40 | 40 | "SPECIFYING REVISIONS" section in linkgit:gitrevisions[7]. | |
| 41 | 41 | ||
modified Documentation/git-sparse-checkout.adoc
| @@ -9,7 +9,7 @@ git-sparse-checkout - Reduce your working tree to a subset of tracked files | |||
| 9 | 9 | SYNOPSIS | |
| 10 | 10 | -------- | |
| 11 | 11 | [verse] | |
| 12 | - | 'git sparse-checkout' (init | list | set | add | reapply | disable | check-rules) [<options>] | |
| 12 | + | 'git sparse-checkout' (init | list | set | add | reapply | disable | check-rules | clean) [<options>] | |
| 13 | 13 | ||
| 14 | 14 | ||
| 15 | 15 | DESCRIPTION | |
| @@ -111,6 +111,37 @@ flags, with the same meaning as the flags from the `set` command, in order | |||
| 111 | 111 | to change which sparsity mode you are using without needing to also respecify | |
| 112 | 112 | all sparsity paths. | |
| 113 | 113 | ||
| 114 | + | 'clean':: | |
| 115 | + | Opportunistically remove files outside of the sparse-checkout | |
| 116 | + | definition. This command requires cone mode to use recursive | |
| 117 | + | directory matches to determine which files should be removed. A | |
| 118 | + | file is considered for removal if it is contained within a tracked | |
| 119 | + | directory that is outside of the sparse-checkout definition. | |
| 120 | + | + | |
| 121 | + | Some special cases, such as merge conflicts or modified files outside of | |
| 122 | + | the sparse-checkout definition could lead to keeping files that would | |
| 123 | + | otherwise be removed. Resolve conflicts, stage modifications, and use | |
| 124 | + | `git sparse-checkout reapply` in conjunction with `git sparse-checkout | |
| 125 | + | clean` to resolve these cases. | |
| 126 | + | + | |
| 127 | + | This command can be used to be sure the sparse index works efficiently, | |
| 128 | + | though it does not require enabling the sparse index feature via the | |
| 129 | + | `index.sparse=true` configuration. | |
| 130 | + | + | |
| 131 | + | To prevent accidental deletion of worktree files, the `clean` subcommand | |
| 132 | + | will not delete any files without the `-f` or `--force` option, unless | |
| 133 | + | the `clean.requireForce` config option is set to `false`. | |
| 134 | + | + | |
| 135 | + | The `--dry-run` option will list the directories that would be removed | |
| 136 | + | without deleting them. Running in this mode can be helpful to predict the | |
| 137 | + | behavior of the clean command or to determine which kinds of files are left | |
| 138 | + | in the sparse directories. | |
| 139 | + | + | |
| 140 | + | The `--verbose` option will list every file within the directories that | |
| 141 | + | are considered for removal. This option is helpful to determine if those | |
| 142 | + | files are actually important or perhaps to explain why the directory is | |
| 143 | + | still present despite the current sparse-checkout. | |
| 144 | + | ||
| 114 | 145 | 'disable':: | |
| 115 | 146 | Disable the `core.sparseCheckout` config setting, and restore the | |
| 116 | 147 | working directory to include all files. | |
| @@ -264,34 +295,50 @@ patterns in non-cone mode has a number of shortcomings: | |||
| 264 | 295 | inconsistent. | |
| 265 | 296 | ||
| 266 | 297 | * It has edge cases where the "right" behavior is unclear. Two examples: | |
| 267 | - | ||
| 268 | - | First, two users are in a subdirectory, and the first runs | |
| 269 | - | git sparse-checkout set '/toplevel-dir/*.c' | |
| 270 | - | while the second runs | |
| 271 | - | git sparse-checkout set relative-dir | |
| 272 | - | Should those arguments be transliterated into | |
| 273 | - | current/subdirectory/toplevel-dir/*.c | |
| 274 | - | and | |
| 275 | - | current/subdirectory/relative-dir | |
| 276 | - | before inserting into the sparse-checkout file? The user who typed | |
| 277 | - | the first command is probably aware that arguments to set/add are | |
| 278 | - | supposed to be patterns in non-cone mode, and probably would not be | |
| 279 | - | happy with such a transliteration. However, many gitignore-style | |
| 280 | - | patterns are just paths, which might be what the user who typed the | |
| 281 | - | second command was thinking, and they'd be upset if their argument | |
| 282 | - | wasn't transliterated. | |
| 283 | - | ||
| 284 | - | Second, what should bash-completion complete on for set/add commands | |
| 285 | - | for non-cone users? If it suggests paths, is it exacerbating the | |
| 286 | - | problem above? Also, if it suggests paths, what if the user has a | |
| 287 | - | file or directory that begins with either a '!' or '#' or has a '*', | |
| 288 | - | '\', '?', '[', or ']' in its name? And if it suggests paths, will | |
| 289 | - | it complete "/pro" to "/proc" (in the root filesystem) rather than to | |
| 290 | - | "/progress.txt" in the current directory? (Note that users are | |
| 291 | - | likely to want to start paths with a leading '/' in non-cone mode, | |
| 292 | - | for the same reason that .gitignore files often have one.) | |
| 293 | - | Completing on files or directories might give nasty surprises in | |
| 294 | - | all these cases. | |
| 298 | + | + | |
| 299 | + | First, two users are in a subdirectory, and the first runs | |
| 300 | + | + | |
| 301 | + | ---- | |
| 302 | + | git sparse-checkout set '/toplevel-dir/*.c' | |
| 303 | + | ---- | |
| 304 | + | + | |
| 305 | + | while the second runs | |
| 306 | + | + | |
| 307 | + | ---- | |
| 308 | + | git sparse-checkout set relative-dir | |
| 309 | + | ---- | |
| 310 | + | + | |
| 311 | + | Should those arguments be transliterated into | |
| 312 | + | + | |
| 313 | + | ---- | |
| 314 | + | current/subdirectory/toplevel-dir/*.c | |
| 315 | + | ---- | |
| 316 | + | + | |
| 317 | + | and | |
| 318 | + | + | |
| 319 | + | ---- | |
| 320 | + | current/subdirectory/relative-dir | |
| 321 | + | ---- | |
| 322 | + | + | |
| 323 | + | before inserting into the sparse-checkout file? The user who typed | |
| 324 | + | the first command is probably aware that arguments to set/add are | |
| 325 | + | supposed to be patterns in non-cone mode, and probably would not be | |
| 326 | + | happy with such a transliteration. However, many gitignore-style | |
| 327 | + | patterns are just paths, which might be what the user who typed the | |
| 328 | + | second command was thinking, and they'd be upset if their argument | |
| 329 | + | wasn't transliterated. | |
| 330 | + | + | |
| 331 | + | Second, what should bash-completion complete on for set/add commands | |
| 332 | + | for non-cone users? If it suggests paths, is it exacerbating the | |
| 333 | + | problem above? Also, if it suggests paths, what if the user has a | |
| 334 | + | file or directory that begins with either a '!' or '#' or has a '*', | |
| 335 | + | '\', '?', '[', or ']' in its name? And if it suggests paths, will | |
| 336 | + | it complete "/pro" to "/proc" (in the root filesystem) rather than to | |
| 337 | + | "/progress.txt" in the current directory? (Note that users are | |
| 338 | + | likely to want to start paths with a leading '/' in non-cone mode, | |
| 339 | + | for the same reason that .gitignore files often have one.) | |
| 340 | + | Completing on files or directories might give nasty surprises in | |
| 341 | + | all these cases. | |
| 295 | 342 | ||
| 296 | 343 | * The excessive flexibility made other extensions essentially | |
| 297 | 344 | impractical. `--sparse-index` is likely impossible in non-cone | |
modified Documentation/git-stage.adoc
| @@ -8,8 +8,8 @@ git-stage - Add file contents to the staging area | |||
| 8 | 8 | ||
| 9 | 9 | SYNOPSIS | |
| 10 | 10 | -------- | |
| 11 | - | [verse] | |
| 12 | - | 'git stage' <arg>... | |
| 11 | + | [synopsis] | |
| 12 | + | git stage <arg>... | |
| 13 | 13 | ||
| 14 | 14 | ||
| 15 | 15 | DESCRIPTION | |
modified Documentation/git-stash.adoc
| @@ -7,22 +7,24 @@ git-stash - Stash the changes in a dirty working directory away | |||
| 7 | 7 | ||
| 8 | 8 | SYNOPSIS | |
| 9 | 9 | -------- | |
| 10 | - | [verse] | |
| 11 | - | 'git stash' list [<log-options>] | |
| 12 | - | 'git stash' show [-u | --include-untracked | --only-untracked] [<diff-options>] [<stash>] | |
| 13 | - | 'git stash' drop [-q | --quiet] [<stash>] | |
| 14 | - | 'git stash' pop [--index] [-q | --quiet] [<stash>] | |
| 15 | - | 'git stash' apply [--index] [-q | --quiet] [<stash>] | |
| 16 | - | 'git stash' branch <branchname> [<stash>] | |
| 17 | - | 'git stash' [push [-p | --patch] [-S | --staged] [-k | --[no-]keep-index] [-q | --quiet] | |
| 10 | + | [synopsis] | |
| 11 | + | git stash list [<log-options>] | |
| 12 | + | git stash show [-u | --include-untracked | --only-untracked] [<diff-options>] [<stash>] | |
| 13 | + | git stash drop [-q | --quiet] [<stash>] | |
| 14 | + | git stash pop [--index] [-q | --quiet] [<stash>] | |
| 15 | + | git stash apply [--index] [-q | --quiet] [--label-ours=<label>] [--label-theirs=<label>] [--label-base=<label>] [<stash>] | |
| 16 | + | git stash branch <branchname> [<stash>] | |
| 17 | + | git stash [push] [-p | --patch] [-S | --staged] [-k | --[no-]keep-index] [-q | --quiet] | |
| 18 | 18 | [-u | --include-untracked] [-a | --all] [(-m | --message) <message>] | |
| 19 | 19 | [--pathspec-from-file=<file> [--pathspec-file-nul]] | |
| 20 | - | [--] [<pathspec>...]] | |
| 21 | - | 'git stash' save [-p | --patch] [-S | --staged] [-k | --[no-]keep-index] [-q | --quiet] | |
| 22 | - | [-u | --include-untracked] [-a | --all] [<message>] | |
| 23 | - | 'git stash' clear | |
| 24 | - | 'git stash' create [<message>] | |
| 25 | - | 'git stash' store [(-m | --message) <message>] [-q | --quiet] <commit> | |
| 20 | + | [--] [<pathspec>...] | |
| 21 | + | git stash save [-p | --patch] [-S | --staged] [-k | --[no-]keep-index] [-q | --quiet] | |
| 22 | + | [-u | --include-untracked] [-a | --all] [<message>] | |
| 23 | + | git stash clear | |
| 24 | + | git stash create [<message>] | |
| 25 | + | git stash store [(-m | --message) <message>] [-q | --quiet] <commit> | |
| 26 | + | git stash export (--print | --to-ref <ref>) [<stash>...] | |
| 27 | + | git stash import <commit> | |
| 26 | 28 | ||
| 27 | 29 | DESCRIPTION | |
| 28 | 30 | ----------- | |
| @@ -36,7 +38,7 @@ The modifications stashed away by this command can be listed with | |||
| 36 | 38 | `git stash list`, inspected with `git stash show`, and restored | |
| 37 | 39 | (potentially on top of a different commit) with `git stash apply`. | |
| 38 | 40 | Calling `git stash` without any arguments is equivalent to `git stash push`. | |
| 39 | - | A stash is by default listed as "WIP on 'branchname' ...", but | |
| 41 | + | A stash is by default listed as "WIP on '<branchname>' ...", but | |
| 40 | 42 | you can give a more descriptive message on the command line when | |
| 41 | 43 | you create one. | |
| 42 | 44 | ||
| @@ -45,32 +47,30 @@ stashes are found in the reflog of this reference and can be named using | |||
| 45 | 47 | the usual reflog syntax (e.g. `stash@{0}` is the most recently | |
| 46 | 48 | created stash, `stash@{1}` is the one before it, `stash@{2.hours.ago}` | |
| 47 | 49 | is also possible). Stashes may also be referenced by specifying just the | |
| 48 | - | stash index (e.g. the integer `n` is equivalent to `stash@{n}`). | |
| 50 | + | stash index (e.g. the integer `<n>` is equivalent to `stash@{<n>}`). | |
| 49 | 51 | ||
| 50 | 52 | COMMANDS | |
| 51 | 53 | -------- | |
| 52 | 54 | ||
| 53 | - | push [-p|--patch] [-S|--staged] [-k|--[no-]keep-index] [-u|--include-untracked] [-a|--all] [-q|--quiet] [(-m|--message) <message>] [--pathspec-from-file=<file> [--pathspec-file-nul]] [--] [<pathspec>...]:: | |
| 55 | + | `push [-p | --patch] [-S | --staged] [-k | --[no-]keep-index] [-u | --include-untracked] [ -a | --all] [-q | --quiet] [(-m|--message) <message>] [--pathspec-from-file=<file> [--pathspec-file-nul]] [--] [<pathspec>...]`:: | |
| 54 | 56 | ||
| 55 | 57 | Save your local modifications to a new 'stash entry' and roll them | |
| 56 | - | back to HEAD (in the working tree and in the index). | |
| 57 | - | The <message> part is optional and gives | |
| 58 | + | back to `HEAD` (in the working tree and in the index). | |
| 59 | + | The _<message>_ part is optional and gives | |
| 58 | 60 | the description along with the stashed state. | |
| 59 | 61 | + | |
| 60 | 62 | For quickly making a snapshot, you can omit "push". In this mode, | |
| 61 | - | non-option arguments are not allowed to prevent a misspelled | |
| 62 | - | subcommand from making an unwanted stash entry. The two exceptions to this | |
| 63 | - | are `stash -p` which acts as alias for `stash push -p` and pathspec elements, | |
| 64 | - | which are allowed after a double hyphen `--` for disambiguation. | |
| 63 | + | pathspec elements are only allowed after a double hyphen `--` | |
| 64 | + | to prevent a misspelled subcommand from making an unwanted stash entry. | |
| 65 | 65 | ||
| 66 | - | save [-p|--patch] [-S|--staged] [-k|--[no-]keep-index] [-u|--include-untracked] [-a|--all] [-q|--quiet] [<message>]:: | |
| 66 | + | `save [-p | --patch] [-S | --staged] [-k | --[no-]keep-index] [-u | --include-untracked] [-a | --all] [-q | --quiet] [<message>]`:: | |
| 67 | 67 | ||
| 68 | 68 | This option is deprecated in favour of 'git stash push'. It | |
| 69 | 69 | differs from "stash push" in that it cannot take pathspec. | |
| 70 | 70 | Instead, all non-option arguments are concatenated to form the stash | |
| 71 | 71 | message. | |
| 72 | 72 | ||
| 73 | - | list [<log-options>]:: | |
| 73 | + | `list [<log-options>]`:: | |
| 74 | 74 | ||
| 75 | 75 | List the stash entries that you currently have. Each 'stash entry' is | |
| 76 | 76 | listed with its name (e.g. `stash@{0}` is the latest entry, `stash@{1}` is | |
| @@ -86,7 +86,7 @@ stash@{1}: On master: 9cc0589... Add git-stash | |||
| 86 | 86 | The command takes options applicable to the 'git log' | |
| 87 | 87 | command to control what is shown and how. See linkgit:git-log[1]. | |
| 88 | 88 | ||
| 89 | - | show [-u|--include-untracked|--only-untracked] [<diff-options>] [<stash>]:: | |
| 89 | + | `show [-u | --include-untracked | --only-untracked] [<diff-options>] [<stash>]`:: | |
| 90 | 90 | ||
| 91 | 91 | Show the changes recorded in the stash entry as a diff between the | |
| 92 | 92 | stashed contents and the commit back when the stash entry was first | |
| @@ -94,12 +94,12 @@ show [-u|--include-untracked|--only-untracked] [<diff-options>] [<stash>]:: | |||
| 94 | 94 | By default, the command shows the diffstat, but it will accept any | |
| 95 | 95 | format known to 'git diff' (e.g., `git stash show -p stash@{1}` | |
| 96 | 96 | to view the second most recent entry in patch form). | |
| 97 | - | If no `<diff-option>` is provided, the default behavior will be given | |
| 97 | + | If no _<diff-option>_ is provided, the default behavior will be given | |
| 98 | 98 | by the `stash.showStat`, and `stash.showPatch` config variables. You | |
| 99 | 99 | can also use `stash.showIncludeUntracked` to set whether | |
| 100 | 100 | `--include-untracked` is enabled by default. | |
| 101 | 101 | ||
| 102 | - | pop [--index] [-q|--quiet] [<stash>]:: | |
| 102 | + | `pop [--index] [-q | --quiet] [<stash>]`:: | |
| 103 | 103 | ||
| 104 | 104 | Remove a single stashed state from the stash list and apply it | |
| 105 | 105 | on top of the current working tree state, i.e., do the inverse | |
| @@ -110,19 +110,19 @@ Applying the state can fail with conflicts; in this case, it is not | |||
| 110 | 110 | removed from the stash list. You need to resolve the conflicts by hand | |
| 111 | 111 | and call `git stash drop` manually afterwards. | |
| 112 | 112 | ||
| 113 | - | apply [--index] [-q|--quiet] [<stash>]:: | |
| 113 | + | `apply [--index] [-q | --quiet] [<stash>]`:: | |
| 114 | 114 | ||
| 115 | 115 | Like `pop`, but do not remove the state from the stash list. Unlike `pop`, | |
| 116 | 116 | `<stash>` may be any commit that looks like a commit created by | |
| 117 | 117 | `stash push` or `stash create`. | |
| 118 | 118 | ||
| 119 | - | branch <branchname> [<stash>]:: | |
| 119 | + | `branch <branchname> [<stash>]`:: | |
| 120 | 120 | ||
| 121 | - | Creates and checks out a new branch named `<branchname>` starting from | |
| 122 | - | the commit at which the `<stash>` was originally created, applies the | |
| 123 | - | changes recorded in `<stash>` to the new working tree and index. | |
| 124 | - | If that succeeds, and `<stash>` is a reference of the form | |
| 125 | - | `stash@{<revision>}`, it then drops the `<stash>`. | |
| 121 | + | Creates and checks out a new branch named _<branchname>_ starting from | |
| 122 | + | the commit at which the _<stash>_ was originally created, applies the | |
| 123 | + | changes recorded in _<stash>_ to the new working tree and index. | |
| 124 | + | If that succeeds, and _<stash>_ is a reference of the form | |
| 125 | + | `stash@{<revision>}`, it then drops the _<stash>_. | |
| 126 | 126 | + | |
| 127 | 127 | This is useful if the branch on which you ran `git stash push` has | |
| 128 | 128 | changed enough that `git stash apply` fails due to conflicts. Since | |
| @@ -130,42 +130,51 @@ the stash entry is applied on top of the commit that was HEAD at the | |||
| 130 | 130 | time `git stash` was run, it restores the originally stashed state | |
| 131 | 131 | with no conflicts. | |
| 132 | 132 | ||
| 133 | - | clear:: | |
| 133 | + | `clear`:: | |
| 134 | 134 | Remove all the stash entries. Note that those entries will then | |
| 135 | 135 | be subject to pruning, and may be impossible to recover (see | |
| 136 | - | 'Examples' below for a possible strategy). | |
| 137 | - | ||
| 138 | - | drop [-q|--quiet] [<stash>]:: | |
| 136 | + | 'EXAMPLES' below for a possible strategy). | |
| 139 | 137 | ||
| 138 | + | `drop [-q | --quiet] [<stash>]`:: | |
| 140 | 139 | Remove a single stash entry from the list of stash entries. | |
| 141 | 140 | ||
| 142 | - | create:: | |
| 143 | - | ||
| 141 | + | `create`:: | |
| 144 | 142 | Create a stash entry (which is a regular commit object) and | |
| 145 | 143 | return its object name, without storing it anywhere in the ref | |
| 146 | 144 | namespace. | |
| 147 | 145 | This is intended to be useful for scripts. It is probably not | |
| 148 | 146 | the command you want to use; see "push" above. | |
| 149 | 147 | ||
| 150 | - | store:: | |
| 148 | + | `store`:: | |
| 151 | 149 | ||
| 152 | 150 | Store a given stash created via 'git stash create' (which is a | |
| 153 | 151 | dangling merge commit) in the stash ref, updating the stash | |
| 154 | 152 | reflog. This is intended to be useful for scripts. It is | |
| 155 | 153 | probably not the command you want to use; see "push" above. | |
| 156 | 154 | ||
| 155 | + | `export ( --print | --to-ref <ref> ) [<stash>...]`:: | |
| 156 | + | ||
| 157 | + | Export the specified stashes, or all of them if none are specified, to | |
| 158 | + | a chain of commits which can be transferred using the normal fetch and | |
| 159 | + | push mechanisms, then imported using the `import` subcommand. | |
| 160 | + | ||
| 161 | + | `import <commit>`:: | |
| 162 | + | Import the specified stashes from the specified commit, which must have been | |
| 163 | + | created by `export`, and add them to the list of stashes. To replace the | |
| 164 | + | existing stashes, use `clear` first. | |
| 165 | + | ||
| 157 | 166 | OPTIONS | |
| 158 | 167 | ------- | |
| 159 | - | -a:: | |
| 160 | - | --all:: | |
| 168 | + | `-a`:: | |
| 169 | + | `--all`:: | |
| 161 | 170 | This option is only valid for `push` and `save` commands. | |
| 162 | 171 | + | |
| 163 | 172 | All ignored and untracked files are also stashed and then cleaned | |
| 164 | 173 | up with `git clean`. | |
| 165 | 174 | ||
| 166 | - | -u:: | |
| 167 | - | --include-untracked:: | |
| 168 | - | --no-include-untracked:: | |
| 175 | + | `-u`:: | |
| 176 | + | `--include-untracked`:: | |
| 177 | + | `--no-include-untracked`:: | |
| 169 | 178 | When used with the `push` and `save` commands, | |
| 170 | 179 | all untracked files are also stashed and then cleaned up with | |
| 171 | 180 | `git clean`. | |
| @@ -173,12 +182,12 @@ up with `git clean`. | |||
| 173 | 182 | When used with the `show` command, show the untracked files in the stash | |
| 174 | 183 | entry as part of the diff. | |
| 175 | 184 | ||
| 176 | - | --only-untracked:: | |
| 185 | + | `--only-untracked`:: | |
| 177 | 186 | This option is only valid for the `show` command. | |
| 178 | 187 | + | |
| 179 | 188 | Show only the untracked files in the stash entry as part of the diff. | |
| 180 | 189 | ||
| 181 | - | --index:: | |
| 190 | + | `--index`:: | |
| 182 | 191 | This option is only valid for `pop` and `apply` commands. | |
| 183 | 192 | + | |
| 184 | 193 | Tries to reinstate not only the working tree's changes, but also | |
| @@ -186,15 +195,24 @@ the index's ones. However, this can fail, when you have conflicts | |||
| 186 | 195 | (which are stored in the index, where you therefore can no longer | |
| 187 | 196 | apply the changes as they were originally). | |
| 188 | 197 | ||
| 189 | - | -k:: | |
| 190 | - | --keep-index:: | |
| 191 | - | --no-keep-index:: | |
| 198 | + | `--label-ours=<label>`:: | |
| 199 | + | `--label-theirs=<label>`:: | |
| 200 | + | `--label-base=<label>`:: | |
| 201 | + | These options are only valid for the `apply` command. | |
| 202 | + | + | |
| 203 | + | Use the given labels in conflict markers instead of the default | |
| 204 | + | "Updated upstream", "Stashed changes", and "Stash base". | |
| 205 | + | `--label-base` only has an effect with merge.conflictStyle=diff3. | |
| 206 | + | ||
| 207 | + | `-k`:: | |
| 208 | + | `--keep-index`:: | |
| 209 | + | `--no-keep-index`:: | |
| 192 | 210 | This option is only valid for `push` and `save` commands. | |
| 193 | 211 | + | |
| 194 | 212 | All changes already added to the index are left intact. | |
| 195 | 213 | ||
| 196 | - | -p:: | |
| 197 | - | --patch:: | |
| 214 | + | `-p`:: | |
| 215 | + | `--patch`:: | |
| 198 | 216 | This option is only valid for `push` and `save` commands. | |
| 199 | 217 | + | |
| 200 | 218 | Interactively select hunks from the diff between HEAD and the | |
| @@ -208,8 +226,10 @@ to learn how to operate the `--patch` mode. | |||
| 208 | 226 | The `--patch` option implies `--keep-index`. You can use | |
| 209 | 227 | `--no-keep-index` to override this. | |
| 210 | 228 | ||
| 211 | - | -S:: | |
| 212 | - | --staged:: | |
| 229 | + | include::diff-context-options.adoc[] | |
| 230 | + | ||
| 231 | + | `-S`:: | |
| 232 | + | `--staged`:: | |
| 213 | 233 | This option is only valid for `push` and `save` commands. | |
| 214 | 234 | + | |
| 215 | 235 | Stash only the changes that are currently staged. This is similar to | |
| @@ -218,36 +238,49 @@ of current branch. | |||
| 218 | 238 | + | |
| 219 | 239 | The `--patch` option has priority over this one. | |
| 220 | 240 | ||
| 221 | - | --pathspec-from-file=<file>:: | |
| 241 | + | `--pathspec-from-file=<file>`:: | |
| 222 | 242 | This option is only valid for `push` command. | |
| 223 | 243 | + | |
| 224 | - | Pathspec is passed in `<file>` instead of commandline args. If | |
| 225 | - | `<file>` is exactly `-` then standard input is used. Pathspec | |
| 244 | + | Pathspec is passed in _<file>_ instead of commandline args. If | |
| 245 | + | _<file>_ is exactly `-` then standard input is used. Pathspec | |
| 226 | 246 | elements are separated by LF or CR/LF. Pathspec elements can be | |
| 227 | 247 | quoted as explained for the configuration variable `core.quotePath` | |
| 228 | 248 | (see linkgit:git-config[1]). See also `--pathspec-file-nul` and | |
| 229 | 249 | global `--literal-pathspecs`. | |
| 230 | 250 | ||
| 231 | - | --pathspec-file-nul:: | |
| 251 | + | `--pathspec-file-nul`:: | |
| 232 | 252 | This option is only valid for `push` command. | |
| 233 | 253 | + | |
| 234 | 254 | Only meaningful with `--pathspec-from-file`. Pathspec elements are | |
| 235 | 255 | separated with NUL character and all other characters are taken | |
| 236 | 256 | literally (including newlines and quotes). | |
| 237 | 257 | ||
| 238 | - | -q:: | |
| 239 | - | --quiet:: | |
| 258 | + | `-q`:: | |
| 259 | + | `--quiet`:: | |
| 240 | 260 | This option is only valid for `apply`, `drop`, `pop`, `push`, | |
| 241 | 261 | `save`, `store` commands. | |
| 242 | 262 | + | |
| 243 | 263 | Quiet, suppress feedback messages. | |
| 244 | 264 | ||
| 245 | - | \--:: | |
| 265 | + | `--print`:: | |
| 266 | + | This option is only valid for the `export` command. | |
| 267 | + | + | |
| 268 | + | Create the chain of commits representing the exported stashes without | |
| 269 | + | storing it anywhere in the ref namespace and print the object ID to | |
| 270 | + | standard output. This is designed for scripts. | |
| 271 | + | ||
| 272 | + | `--to-ref`:: | |
| 273 | + | This option is only valid for the `export` command. | |
| 274 | + | + | |
| 275 | + | Create the chain of commits representing the exported stashes and store | |
| 276 | + | it to the specified ref. | |
| 277 | + | ||
| 278 | + | `--`:: | |
| 246 | 279 | This option is only valid for `push` command. | |
| 247 | 280 | + | |
| 248 | 281 | Separates pathspec from options for disambiguation purposes. | |
| 249 | 282 | ||
| 250 | - | <pathspec>...:: | |
| 283 | + | `<pathspec>...`:: | |
| 251 | 284 | This option is only valid for `push` command. | |
| 252 | 285 | + | |
| 253 | 286 | The new stash entry records the modified states only for the files | |
| @@ -257,11 +290,11 @@ too, leaving files that do not match the pathspec intact. | |||
| 257 | 290 | + | |
| 258 | 291 | For more details, see the 'pathspec' entry in linkgit:gitglossary[7]. | |
| 259 | 292 | ||
| 260 | - | <stash>:: | |
| 293 | + | _<stash>_:: | |
| 261 | 294 | This option is only valid for `apply`, `branch`, `drop`, `pop`, | |
| 262 | - | `show` commands. | |
| 295 | + | `show`, and `export` commands. | |
| 263 | 296 | + | |
| 264 | - | A reference of the form `stash@{<revision>}`. When no `<stash>` is | |
| 297 | + | A reference of the form `stash@{<revision>}`. When no _<stash>_ is | |
| 265 | 298 | given, the latest stash is assumed (that is, `stash@{0}`). | |
| 266 | 299 | ||
| 267 | 300 | DISCUSSION | |
| @@ -390,6 +423,7 @@ CONFIGURATION | |||
| 390 | 423 | ||
| 391 | 424 | include::includes/cmd-config-section-all.adoc[] | |
| 392 | 425 | ||
| 426 | + | :git-stash: 1 | |
| 393 | 427 | include::config/stash.adoc[] | |
| 394 | 428 | ||
| 395 | 429 | ||
modified Documentation/git-status.adoc
| @@ -8,8 +8,9 @@ git-status - Show the working tree status | |||
| 8 | 8 | ||
| 9 | 9 | SYNOPSIS | |
| 10 | 10 | -------- | |
| 11 | - | [verse] | |
| 12 | - | 'git status' [<options>] [--] [<pathspec>...] | |
| 11 | + | ||
| 12 | + | [synopsis] | |
| 13 | + | git status [<options>] [--] [<pathspec>...] | |
| 13 | 14 | ||
| 14 | 15 | DESCRIPTION | |
| 15 | 16 | ----------- | |
| @@ -18,57 +19,57 @@ current HEAD commit, paths that have differences between the working | |||
| 18 | 19 | tree and the index file, and paths in the working tree that are not | |
| 19 | 20 | tracked by Git (and are not ignored by linkgit:gitignore[5]). The first | |
| 20 | 21 | are what you _would_ commit by running `git commit`; the second and | |
| 21 | - | third are what you _could_ commit by running 'git add' before running | |
| 22 | + | third are what you _could_ commit by running `git add` before running | |
| 22 | 23 | `git commit`. | |
| 23 | 24 | ||
| 24 | 25 | OPTIONS | |
| 25 | 26 | ------- | |
| 26 | 27 | ||
| 27 | - | -s:: | |
| 28 | - | --short:: | |
| 28 | + | `-s`:: | |
| 29 | + | `--short`:: | |
| 29 | 30 | Give the output in the short-format. | |
| 30 | 31 | ||
| 31 | - | -b:: | |
| 32 | - | --branch:: | |
| 32 | + | `-b`:: | |
| 33 | + | `--branch`:: | |
| 33 | 34 | Show the branch and tracking info even in short-format. | |
| 34 | 35 | ||
| 35 | - | --show-stash:: | |
| 36 | + | `--show-stash`:: | |
| 36 | 37 | Show the number of entries currently stashed away. | |
| 37 | 38 | ||
| 38 | - | --porcelain[=<version>]:: | |
| 39 | + | `--porcelain[=<version>]`:: | |
| 39 | 40 | Give the output in an easy-to-parse format for scripts. | |
| 40 | 41 | This is similar to the short output, but will remain stable | |
| 41 | 42 | across Git versions and regardless of user configuration. See | |
| 42 | 43 | below for details. | |
| 43 | 44 | + | |
| 44 | - | The version parameter is used to specify the format version. | |
| 45 | - | This is optional and defaults to the original version 'v1' format. | |
| 45 | + | The _<version>_ parameter is used to specify the format version. | |
| 46 | + | This is optional and defaults to the original version `v1` format. | |
| 46 | 47 | ||
| 47 | - | --long:: | |
| 48 | + | `--long`:: | |
| 48 | 49 | Give the output in the long-format. This is the default. | |
| 49 | 50 | ||
| 50 | - | -v:: | |
| 51 | - | --verbose:: | |
| 51 | + | `-v`:: | |
| 52 | + | `--verbose`:: | |
| 52 | 53 | In addition to the names of files that have been changed, also | |
| 53 | 54 | show the textual changes that are staged to be committed | |
| 54 | 55 | (i.e., like the output of `git diff --cached`). If `-v` is specified | |
| 55 | 56 | twice, then also show the changes in the working tree that | |
| 56 | 57 | have not yet been staged (i.e., like the output of `git diff`). | |
| 57 | 58 | ||
| 58 | - | -u[<mode>]:: | |
| 59 | - | --untracked-files[=<mode>]:: | |
| 59 | + | `-u[<mode>]`:: | |
| 60 | + | `--untracked-files[=<mode>]`:: | |
| 60 | 61 | Show untracked files. | |
| 61 | 62 | + | |
| 62 | 63 | -- | |
| 63 | 64 | The mode parameter is used to specify the handling of untracked files. | |
| 64 | - | It is optional: it defaults to 'all', and if specified, it must be | |
| 65 | + | It is optional: it defaults to `all`, and if specified, it must be | |
| 65 | 66 | stuck to the option (e.g. `-uno`, but not `-u no`). | |
| 66 | 67 | ||
| 67 | 68 | The possible options are: | |
| 68 | 69 | ||
| 69 | - | - 'no' - Show no untracked files. | |
| 70 | - | - 'normal' - Shows untracked files and directories. | |
| 71 | - | - 'all' - Also shows individual files in untracked directories. | |
| 70 | + | `no`:: Show no untracked files. | |
| 71 | + | `normal`:: Show untracked files and directories. | |
| 72 | + | `all`:: Also show individual files in untracked directories. | |
| 72 | 73 | ||
| 73 | 74 | When `-u` option is not used, untracked files and directories are | |
| 74 | 75 | shown (i.e. the same as specifying `normal`), to help you avoid | |
| @@ -82,76 +83,78 @@ return more quickly without showing untracked files. | |||
| 82 | 83 | All usual spellings for Boolean value `true` are taken as `normal` | |
| 83 | 84 | and `false` as `no`. | |
| 84 | 85 | ||
| 85 | - | The default can be changed using the status.showUntrackedFiles | |
| 86 | + | The default can be changed using the `status.showUntrackedFiles` | |
| 86 | 87 | configuration variable documented in linkgit:git-config[1]. | |
| 87 | 88 | -- | |
| 88 | 89 | ||
| 89 | - | --ignore-submodules[=<when>]:: | |
| 90 | - | Ignore changes to submodules when looking for changes. <when> can be | |
| 91 | - | either "none", "untracked", "dirty" or "all", which is the default. | |
| 92 | - | Using "none" will consider the submodule modified when it either contains | |
| 90 | + | `--ignore-submodules[=<when>]`:: | |
| 91 | + | Ignore changes to submodules when looking for changes. _<when>_ can be | |
| 92 | + | either `none`, `untracked`, `dirty` or `all`, which is the default. | |
| 93 | + | `none`;; will consider the submodule modified when it either contains | |
| 93 | 94 | untracked or modified files or its HEAD differs from the commit recorded | |
| 94 | 95 | in the superproject and can be used to override any settings of the | |
| 95 | - | 'ignore' option in linkgit:git-config[1] or linkgit:gitmodules[5]. When | |
| 96 | - | "untracked" is used submodules are not considered dirty when they only | |
| 96 | + | `ignore` option in linkgit:git-config[1] or linkgit:gitmodules[5]. | |
| 97 | + | `untracked`;; submodules are not considered dirty when they only | |
| 97 | 98 | contain untracked content (but they are still scanned for modified | |
| 98 | - | content). Using "dirty" ignores all changes to the work tree of submodules, | |
| 99 | + | content). | |
| 100 | + | `dirty`;; ignore all changes to the work tree of submodules, | |
| 99 | 101 | only changes to the commits stored in the superproject are shown (this was | |
| 100 | - | the behavior before 1.7.0). Using "all" hides all changes to submodules | |
| 102 | + | the behavior before 1.7.0). | |
| 103 | + | `all`;; hide all changes to submodules | |
| 101 | 104 | (and suppresses the output of submodule summaries when the config option | |
| 102 | 105 | `status.submoduleSummary` is set). | |
| 103 | 106 | ||
| 104 | - | --ignored[=<mode>]:: | |
| 107 | + | `--ignored[=<mode>]`:: | |
| 105 | 108 | Show ignored files as well. | |
| 106 | 109 | + | |
| 107 | 110 | -- | |
| 108 | 111 | The mode parameter is used to specify the handling of ignored files. | |
| 109 | - | It is optional: it defaults to 'traditional'. | |
| 112 | + | It is optional: it defaults to `traditional`. | |
| 110 | 113 | ||
| 111 | 114 | The possible options are: | |
| 112 | 115 | ||
| 113 | - | - 'traditional' - Shows ignored files and directories, unless | |
| 114 | - | --untracked-files=all is specified, in which case | |
| 115 | - | individual files in ignored directories are | |
| 116 | - | displayed. | |
| 117 | - | - 'no' - Show no ignored files. | |
| 118 | - | - 'matching' - Shows ignored files and directories matching an | |
| 119 | - | ignore pattern. | |
| 120 | - | ||
| 121 | - | When 'matching' mode is specified, paths that explicitly match an | |
| 116 | + | `traditional`:: Show ignored files and directories, unless | |
| 117 | + | `--untracked-files=all` is specified, in which case | |
| 118 | + | individual files in ignored directories are | |
| 119 | + | displayed. | |
| 120 | + | `no`:: Show no ignored files. | |
| 121 | + | `matching`:: Show ignored files and directories matching an | |
| 122 | + | ignore pattern. | |
| 123 | + | + | |
| 124 | + | Paths that explicitly match an | |
| 122 | 125 | ignored pattern are shown. If a directory matches an ignore pattern, | |
| 123 | 126 | then it is shown, but not paths contained in the ignored directory. If | |
| 124 | 127 | a directory does not match an ignore pattern, but all contents are | |
| 125 | 128 | ignored, then the directory is not shown, but all contents are shown. | |
| 126 | 129 | -- | |
| 127 | 130 | ||
| 128 | - | -z:: | |
| 129 | - | Terminate entries with NUL, instead of LF. This implies | |
| 131 | + | `-z`:: | |
| 132 | + | Terminate entries with _NUL_, instead of _LF_. This implies | |
| 130 | 133 | the `--porcelain=v1` output format if no other format is given. | |
| 131 | 134 | ||
| 132 | - | --column[=<options>]:: | |
| 133 | - | --no-column:: | |
| 135 | + | `--column[=<options>]`:: | |
| 136 | + | `--no-column`:: | |
| 134 | 137 | Display untracked files in columns. See configuration variable | |
| 135 | 138 | `column.status` for option syntax. `--column` and `--no-column` | |
| 136 | - | without options are equivalent to 'always' and 'never' | |
| 139 | + | without options are equivalent to `always` and `never` | |
| 137 | 140 | respectively. | |
| 138 | 141 | ||
| 139 | - | --ahead-behind:: | |
| 140 | - | --no-ahead-behind:: | |
| 142 | + | `--ahead-behind`:: | |
| 143 | + | `--no-ahead-behind`:: | |
| 141 | 144 | Display or do not display detailed ahead/behind counts for the | |
| 142 | - | branch relative to its upstream branch. Defaults to true. | |
| 145 | + | branch relative to its upstream branch. Defaults to `true`. | |
| 143 | 146 | ||
| 144 | - | --renames:: | |
| 145 | - | --no-renames:: | |
| 147 | + | `--renames`:: | |
| 148 | + | `--no-renames`:: | |
| 146 | 149 | Turn on/off rename detection regardless of user configuration. | |
| 147 | 150 | See also linkgit:git-diff[1] `--no-renames`. | |
| 148 | 151 | ||
| 149 | - | --find-renames[=<n>]:: | |
| 152 | + | `--find-renames[=<n>]`:: | |
| 150 | 153 | Turn on rename detection, optionally setting the similarity | |
| 151 | 154 | threshold. | |
| 152 | 155 | See also linkgit:git-diff[1] `--find-renames`. | |
| 153 | 156 | ||
| 154 | - | <pathspec>...:: | |
| 157 | + | `<pathspec>...`:: | |
| 155 | 158 | See the 'pathspec' entry in linkgit:gitglossary[7]. | |
| 156 | 159 | ||
| 157 | 160 | OUTPUT | |
| @@ -173,12 +176,12 @@ Short Format | |||
| 173 | 176 | In the short-format, the status of each path is shown as one of these | |
| 174 | 177 | forms | |
| 175 | 178 | ||
| 176 | - | XY PATH | |
| 177 | - | XY ORIG_PATH -> PATH | |
| 179 | + | <xy> <path> | |
| 180 | + | <xy> <orig-path> -> <path> | |
| 178 | 181 | ||
| 179 | - | where `ORIG_PATH` is where the renamed/copied contents came | |
| 180 | - | from. `ORIG_PATH` is only shown when the entry is renamed or | |
| 181 | - | copied. The `XY` is a two-letter status code. | |
| 182 | + | where _<orig-path>_ is where the renamed/copied contents came | |
| 183 | + | from. _<orig-path>_ is only shown when the entry is renamed or | |
| 184 | + | copied. The _<xy>_ is a two-letter status code `XY`. | |
| 182 | 185 | ||
| 183 | 186 | The fields (including the `->`) are separated from each other by a | |
| 184 | 187 | single space. If a filename contains whitespace or other nonprintable | |
| @@ -187,7 +190,7 @@ literal: surrounded by ASCII double quote (34) characters, and with | |||
| 187 | 190 | interior special characters backslash-escaped. | |
| 188 | 191 | ||
| 189 | 192 | There are three different types of states that are shown using this format, and | |
| 190 | - | each one uses the `XY` syntax differently: | |
| 193 | + | each one uses the _<xy>_ syntax differently: | |
| 191 | 194 | ||
| 192 | 195 | * When a merge is occurring and the merge was successful, or outside of a merge | |
| 193 | 196 | situation, `X` shows the status of the index and `Y` shows the status of the | |
| @@ -207,60 +210,59 @@ In the following table, these three classes are shown in separate sections, and | |||
| 207 | 210 | these characters are used for `X` and `Y` fields for the first two sections that | |
| 208 | 211 | show tracked paths: | |
| 209 | 212 | ||
| 210 | - | * ' ' = unmodified | |
| 211 | - | * 'M' = modified | |
| 212 | - | * 'T' = file type changed (regular file, symbolic link or submodule) | |
| 213 | - | * 'A' = added | |
| 214 | - | * 'D' = deleted | |
| 215 | - | * 'R' = renamed | |
| 216 | - | * 'C' = copied (if config option status.renames is set to "copies") | |
| 217 | - | * 'U' = updated but unmerged | |
| 218 | - | ||
| 219 | - | .... | |
| 220 | - | X Y Meaning | |
| 221 | - | ------------------------------------------------- | |
| 222 | - | [AMD] not updated | |
| 223 | - | M [ MTD] updated in index | |
| 224 | - | T [ MTD] type changed in index | |
| 225 | - | A [ MTD] added to index | |
| 226 | - | D deleted from index | |
| 227 | - | R [ MTD] renamed in index | |
| 228 | - | C [ MTD] copied in index | |
| 229 | - | [MTARC] index and work tree matches | |
| 230 | - | [ MTARC] M work tree changed since index | |
| 231 | - | [ MTARC] T type changed in work tree since index | |
| 232 | - | [ MTARC] D deleted in work tree | |
| 233 | - | R renamed in work tree | |
| 234 | - | C copied in work tree | |
| 235 | - | ------------------------------------------------- | |
| 236 | - | D D unmerged, both deleted | |
| 237 | - | A U unmerged, added by us | |
| 238 | - | U D unmerged, deleted by them | |
| 239 | - | U A unmerged, added by them | |
| 240 | - | D U unmerged, deleted by us | |
| 241 | - | A A unmerged, both added | |
| 242 | - | U U unmerged, both modified | |
| 243 | - | ------------------------------------------------- | |
| 244 | - | ? ? untracked | |
| 245 | - | ! ! ignored | |
| 246 | - | ------------------------------------------------- | |
| 247 | - | .... | |
| 213 | + | ' ':: unmodified | |
| 214 | + | `M`:: modified | |
| 215 | + | `T`:: file type changed (regular file, symbolic link or submodule) | |
| 216 | + | `A`:: added | |
| 217 | + | `D`:: deleted | |
| 218 | + | `R`:: renamed | |
| 219 | + | `C`:: copied (if config option status.renames is set to "copies") | |
| 220 | + | `U`:: updated but unmerged | |
| 221 | + | ||
| 222 | + | [cols="^1m,^1m,<2",options="header"] | |
| 223 | + | |=== | |
| 224 | + | |X | Y |Meaning | |
| 225 | + | | |[AMD] |not updated | |
| 226 | + | |M |[ MTD] |updated in index | |
| 227 | + | |T |[ MTD] |type changed in index | |
| 228 | + | |A |[ MTD] |added to index | |
| 229 | + | |D | |deleted from index | |
| 230 | + | |R |[ MTD] |renamed in index | |
| 231 | + | |C |[ MTD] |copied in index | |
| 232 | + | |[MTARC] | |index and work tree matches | |
| 233 | + | |[ MTARC] |M |work tree changed since index | |
| 234 | + | |[ MTARC] |T |type changed in work tree since index | |
| 235 | + | |[ MTARC] |D |deleted in work tree | |
| 236 | + | | |R |renamed in work tree | |
| 237 | + | | |C |copied in work tree | |
| 238 | + | |D |D |unmerged, both deleted | |
| 239 | + | |A |U |unmerged, added by us | |
| 240 | + | |U |D |unmerged, deleted by them | |
| 241 | + | |U |A |unmerged, added by them | |
| 242 | + | |D |U |unmerged, deleted by us | |
| 243 | + | |A |A |unmerged, both added | |
| 244 | + | |U |U |unmerged, both modified | |
| 245 | + | |? |? |untracked | |
| 246 | + | |! |! |ignored | |
| 247 | + | |=== | |
| 248 | 248 | ||
| 249 | 249 | Submodules have more state and instead report | |
| 250 | 250 | ||
| 251 | - | * 'M' = the submodule has a different HEAD than recorded in the index | |
| 252 | - | * 'm' = the submodule has modified content | |
| 253 | - | * '?' = the submodule has untracked files | |
| 251 | + | `M`:: the submodule has a different HEAD than recorded in the index | |
| 252 | + | `m`:: the submodule has modified content | |
| 253 | + | `?`:: the submodule has untracked files | |
| 254 | 254 | ||
| 255 | 255 | This is since modified content or untracked files in a submodule cannot be added | |
| 256 | 256 | via `git add` in the superproject to prepare a commit. | |
| 257 | 257 | ||
| 258 | - | 'm' and '?' are applied recursively. For example if a nested submodule | |
| 259 | - | in a submodule contains an untracked file, this is reported as '?' as well. | |
| 258 | + | `m` and `?` are applied recursively. For example if a nested submodule | |
| 259 | + | in a submodule contains an untracked file, this is reported as `?` as well. | |
| 260 | + | ||
| 261 | + | If `-b` is used the short-format status is preceded by a line | |
| 260 | 262 | ||
| 261 | - | If -b is used the short-format status is preceded by a line | |
| 263 | + | [synopsis] | |
| 264 | + | {empty}## <branchname> <tracking-info> | |
| 262 | 265 | ||
| 263 | - | ## branchname tracking info | |
| 264 | 266 | ||
| 265 | 267 | Porcelain Format Version 1 | |
| 266 | 268 | ~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
| @@ -271,16 +273,16 @@ based on user configuration. This makes it ideal for parsing by scripts. | |||
| 271 | 273 | The description of the short format above also describes the porcelain | |
| 272 | 274 | format, with a few exceptions: | |
| 273 | 275 | ||
| 274 | - | 1. The user's color.status configuration is not respected; color will | |
| 276 | + | 1. The user's `color.status` configuration is not respected; color will | |
| 275 | 277 | always be off. | |
| 276 | 278 | ||
| 277 | - | 2. The user's status.relativePaths configuration is not respected; paths | |
| 279 | + | 2. The user's `status.relativePaths` configuration is not respected; paths | |
| 278 | 280 | shown will always be relative to the repository root. | |
| 279 | 281 | ||
| 280 | - | There is also an alternate -z format recommended for machine parsing. In | |
| 282 | + | There is also an alternate `-z` format recommended for machine parsing. In | |
| 281 | 283 | that format, the status field is the same, but some other things | |
| 282 | - | change. First, the '\->' is omitted from rename entries and the field | |
| 283 | - | order is reversed (e.g 'from \-> to' becomes 'to from'). Second, a NUL | |
| 284 | + | change. First, the `->` is omitted from rename entries and the field | |
| 285 | + | order is reversed (e.g `from -> to` becomes `to from`). Second, a _NUL_ | |
| 284 | 286 | (ASCII 0) follows each filename, replacing space as a field separator | |
| 285 | 287 | and the terminating newline (but a space still separates the status | |
| 286 | 288 | field from the first filename). Third, filenames containing special | |
| @@ -296,7 +298,7 @@ Version 2 format adds more detailed information about the state of | |||
| 296 | 298 | the worktree and changed items. Version 2 also defines an extensible | |
| 297 | 299 | set of easy to parse optional headers. | |
| 298 | 300 | ||
| 299 | - | Header lines start with "#" and are added in response to specific | |
| 301 | + | Header lines start with `#` and are added in response to specific | |
| 300 | 302 | command line arguments. Parsers should ignore headers they | |
| 301 | 303 | don't recognize. | |
| 302 | 304 | ||
| @@ -306,16 +308,15 @@ Branch Headers | |||
| 306 | 308 | If `--branch` is given, a series of header lines are printed with | |
| 307 | 309 | information about the current branch. | |
| 308 | 310 | ||
| 309 | - | .... | |
| 310 | - | Line Notes | |
| 311 | - | ------------------------------------------------------------ | |
| 312 | - | # branch.oid <commit> | (initial) Current commit. | |
| 313 | - | # branch.head <branch> | (detached) Current branch. | |
| 314 | - | # branch.upstream <upstream-branch> If upstream is set. | |
| 315 | - | # branch.ab +<ahead> -<behind> If upstream is set and | |
| 316 | - | the commit is present. | |
| 317 | - | ------------------------------------------------------------ | |
| 318 | - | .... | |
| 311 | + | [cols="<1,<1",options="header"] | |
| 312 | + | |=== | |
| 313 | + | |Line |Notes | |
| 314 | + | |`# branch.oid <commit> \| (initial)` |Current commit. | |
| 315 | + | |`# branch.head <branch> \| (detached)` |Current branch. | |
| 316 | + | |`# branch.upstream <upstream-branch>` |If upstream is set. | |
| 317 | + | |`# branch.ab +<ahead> -<behind>` |If upstream is set and | |
| 318 | + | the commit is present. | |
| 319 | + | |=== | |
| 319 | 320 | ||
| 320 | 321 | Stash Information | |
| 321 | 322 | ^^^^^^^^^^^^^^^^^ | |
| @@ -336,66 +337,73 @@ line types in any order. | |||
| 336 | 337 | ||
| 337 | 338 | Ordinary changed entries have the following format: | |
| 338 | 339 | ||
| 339 | - | 1 <XY> <sub> <mH> <mI> <mW> <hH> <hI> <path> | |
| 340 | + | [synopsis] | |
| 341 | + | 1 <XY> <sub> <mH> <mI> <mW> <hH> <hI> <path> | |
| 340 | 342 | ||
| 341 | 343 | Renamed or copied entries have the following format: | |
| 342 | 344 | ||
| 343 | - | 2 <XY> <sub> <mH> <mI> <mW> <hH> <hI> <X><score> <path><sep><origPath> | |
| 344 | - | ||
| 345 | - | .... | |
| 346 | - | Field Meaning | |
| 347 | - | -------------------------------------------------------- | |
| 348 | - | <XY> A 2 character field containing the staged and | |
| 349 | - | unstaged XY values described in the short format, | |
| 350 | - | with unchanged indicated by a "." rather than | |
| 351 | - | a space. | |
| 352 | - | <sub> A 4 character field describing the submodule state. | |
| 353 | - | "N..." when the entry is not a submodule. | |
| 354 | - | "S<c><m><u>" when the entry is a submodule. | |
| 355 | - | <c> is "C" if the commit changed; otherwise ".". | |
| 356 | - | <m> is "M" if it has tracked changes; otherwise ".". | |
| 357 | - | <u> is "U" if there are untracked changes; otherwise ".". | |
| 358 | - | <mH> The octal file mode in HEAD. | |
| 359 | - | <mI> The octal file mode in the index. | |
| 360 | - | <mW> The octal file mode in the worktree. | |
| 361 | - | <hH> The object name in HEAD. | |
| 362 | - | <hI> The object name in the index. | |
| 363 | - | <X><score> The rename or copy score (denoting the percentage | |
| 364 | - | of similarity between the source and target of the | |
| 365 | - | move or copy). For example "R100" or "C75". | |
| 366 | - | <path> The pathname. In a renamed/copied entry, this | |
| 367 | - | is the target path. | |
| 368 | - | <sep> When the `-z` option is used, the 2 pathnames are separated | |
| 369 | - | with a NUL (ASCII 0x00) byte; otherwise, a tab (ASCII 0x09) | |
| 370 | - | byte separates them. | |
| 371 | - | <origPath> The pathname in the commit at HEAD or in the index. | |
| 372 | - | This is only present in a renamed/copied entry, and | |
| 373 | - | tells where the renamed/copied contents came from. | |
| 374 | - | -------------------------------------------------------- | |
| 375 | - | .... | |
| 345 | + | [synopsis] | |
| 346 | + | 2 <XY> <sub> <mH> <mI> <mW> <hH> <hI> <X><score> <path><sep><origPath> | |
| 347 | + | ||
| 348 | + | [cols="<1,<1a",options="header"] | |
| 349 | + | |=== | |
| 350 | + | |Field | Meaning | |
| 351 | + | ||
| 352 | + | |_<XY>_ | |
| 353 | + | |A 2 character field containing the staged and | |
| 354 | + | unstaged XY values described in the short format, | |
| 355 | + | with unchanged indicated by a "." rather than | |
| 356 | + | a space. | |
| 357 | + | |_<sub>_ | |
| 358 | + | |A 4 character field describing the submodule state. | |
| 359 | + | "N..." when the entry is not a submodule. | |
| 360 | + | `S<c><m><u>` when the entry is a submodule. | |
| 361 | + | ||
| 362 | + | * _<c>_ is "C" if the commit changed; otherwise ".". | |
| 363 | + | * _<m>_ is "M" if it has tracked changes; otherwise ".". | |
| 364 | + | * _<u>_ is "U" if there are untracked changes; otherwise ".". | |
| 365 | + | |_<mH>_ |The octal file mode in HEAD. | |
| 366 | + | |_<mI>_ |The octal file mode in the index. | |
| 367 | + | |_<mW>_ |The octal file mode in the worktree. | |
| 368 | + | |_<hH>_ |The object name in HEAD. | |
| 369 | + | |_<hI>_ |The object name in the index. | |
| 370 | + | |_<X><score>_ |The rename or copy score (denoting the percentage | |
| 371 | + | of similarity between the source and target of the | |
| 372 | + | move or copy). For example "R100" or "C75". | |
| 373 | + | |_<path>_ | |
| 374 | + | |The pathname. In a renamed/copied entry, this is the target path. | |
| 375 | + | |_<sep>_ | |
| 376 | + | |When the `-z` option is used, the 2 pathnames are separated | |
| 377 | + | with a _NUL_ (ASCII 0x00) byte; otherwise, a _TAB_ (ASCII 0x09) | |
| 378 | + | byte separates them. | |
| 379 | + | |_<origPath>_ | |
| 380 | + | |The pathname in the commit at HEAD or in the index. | |
| 381 | + | This is only present in a renamed/copied entry, and | |
| 382 | + | tells where the renamed/copied contents came from. | |
| 383 | + | |=== | |
| 376 | 384 | ||
| 377 | 385 | Unmerged entries have the following format; the first character is | |
| 378 | 386 | a "u" to distinguish from ordinary changed entries. | |
| 379 | 387 | ||
| 380 | - | u <XY> <sub> <m1> <m2> <m3> <mW> <h1> <h2> <h3> <path> | |
| 388 | + | [synopsis] | |
| 389 | + | u <XY> <sub> <m1> <m2> <m3> <mW> <h1> <h2> <h3> <path> | |
| 381 | 390 | ||
| 382 | - | .... | |
| 383 | - | Field Meaning | |
| 384 | - | -------------------------------------------------------- | |
| 385 | - | <XY> A 2 character field describing the conflict type | |
| 391 | + | [cols="<1,<1a",options="header"] | |
| 392 | + | |=== | |
| 393 | + | |Field |Meaning | |
| 394 | + | |_<XY>_ |A 2 character field describing the conflict type | |
| 386 | 395 | as described in the short format. | |
| 387 | - | <sub> A 4 character field describing the submodule state | |
| 396 | + | |_<sub>_ |A 4 character field describing the submodule state | |
| 388 | 397 | as described above. | |
| 389 | - | <m1> The octal file mode in stage 1. | |
| 390 | - | <m2> The octal file mode in stage 2. | |
| 391 | - | <m3> The octal file mode in stage 3. | |
| 392 | - | <mW> The octal file mode in the worktree. | |
| 393 | - | <h1> The object name in stage 1. | |
| 394 | - | <h2> The object name in stage 2. | |
| 395 | - | <h3> The object name in stage 3. | |
| 396 | - | <path> The pathname. | |
| 397 | - | -------------------------------------------------------- | |
| 398 | - | .... | |
| 398 | + | |_<m1>_ |The octal file mode in stage 1. | |
| 399 | + | |_<m2>_ |The octal file mode in stage 2. | |
| 400 | + | |_<m3>_ |The octal file mode in stage 3. | |
| 401 | + | |_<mW>_ |The octal file mode in the worktree. | |
| 402 | + | |_<h1>_ |The object name in stage 1. | |
| 403 | + | |_<h2>_ |The object name in stage 2. | |
| 404 | + | |_<h3>_ |The object name in stage 3. | |
| 405 | + | |_<path>_ |The pathname. | |
| 406 | + | |=== | |
| 399 | 407 | ||
| 400 | 408 | Other Items | |
| 401 | 409 | ^^^^^^^^^^^ | |
| @@ -416,7 +424,7 @@ Pathname Format Notes and -z | |||
| 416 | 424 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
| 417 | 425 | ||
| 418 | 426 | When the `-z` option is given, pathnames are printed as is and | |
| 419 | - | without any quoting and lines are terminated with a NUL (ASCII 0x00) | |
| 427 | + | without any quoting and lines are terminated with a _NUL_ (ASCII 0x00) | |
| 420 | 428 | byte. | |
| 421 | 429 | ||
| 422 | 430 | Without the `-z` option, pathnames with "unusual" characters are | |
| @@ -439,11 +447,11 @@ directory. | |||
| 439 | 447 | If `status.submoduleSummary` is set to a non zero number or true (identical | |
| 440 | 448 | to -1 or an unlimited number), the submodule summary will be enabled for | |
| 441 | 449 | the long format and a summary of commits for modified submodules will be | |
| 442 | - | shown (see --summary-limit option of linkgit:git-submodule[1]). Please note | |
| 450 | + | shown (see `--summary-limit` option of linkgit:git-submodule[1]). Please note | |
| 443 | 451 | that the summary output from the status command will be suppressed for all | |
| 444 | - | submodules when `diff.ignoreSubmodules` is set to 'all' or only for those | |
| 452 | + | submodules when `diff.ignoreSubmodules` is set to `all` or only for those | |
| 445 | 453 | submodules where `submodule.<name>.ignore=all`. To also view the summary for | |
| 446 | - | ignored submodules you can either use the --ignore-submodules=dirty command | |
| 454 | + | ignored submodules you can either use the `--ignore-submodules=dirty` command | |
| 447 | 455 | line option or the 'git submodule summary' command, which shows a similar | |
| 448 | 456 | output but does not honor these settings. | |
| 449 | 457 | ||
| @@ -484,7 +492,7 @@ results, so it could be faster on subsequent runs. | |||
| 484 | 492 | setting this variable to `false` disables the warning message | |
| 485 | 493 | given when enumerating untracked files takes more than 2 | |
| 486 | 494 | seconds. In a large project, it may take longer and the user | |
| 487 | - | may have already accepted the trade off (e.g. using "-uno" may | |
| 495 | + | may have already accepted the trade off (e.g. using `-uno` may | |
| 488 | 496 | not be an acceptable option for the user), in which case, there | |
| 489 | 497 | is no point issuing the warning message, and in such a case, | |
| 490 | 498 | disabling the warning may be the best. | |
modified Documentation/git-submodule.adoc
| @@ -8,19 +8,19 @@ git-submodule - Initialize, update or inspect submodules | |||
| 8 | 8 | ||
| 9 | 9 | SYNOPSIS | |
| 10 | 10 | -------- | |
| 11 | - | [verse] | |
| 12 | - | 'git submodule' [--quiet] [--cached] | |
| 13 | - | 'git submodule' [--quiet] add [<options>] [--] <repository> [<path>] | |
| 14 | - | 'git submodule' [--quiet] status [--cached] [--recursive] [--] [<path>...] | |
| 15 | - | 'git submodule' [--quiet] init [--] [<path>...] | |
| 16 | - | 'git submodule' [--quiet] deinit [-f|--force] (--all|[--] <path>...) | |
| 17 | - | 'git submodule' [--quiet] update [<options>] [--] [<path>...] | |
| 18 | - | 'git submodule' [--quiet] set-branch [<options>] [--] <path> | |
| 19 | - | 'git submodule' [--quiet] set-url [--] <path> <newurl> | |
| 20 | - | 'git submodule' [--quiet] summary [<options>] [--] [<path>...] | |
| 21 | - | 'git submodule' [--quiet] foreach [--recursive] <command> | |
| 22 | - | 'git submodule' [--quiet] sync [--recursive] [--] [<path>...] | |
| 23 | - | 'git submodule' [--quiet] absorbgitdirs [--] [<path>...] | |
| 11 | + | [synopsis] | |
| 12 | + | git submodule [--quiet] [--cached] | |
| 13 | + | git submodule [--quiet] add [<options>] [--] <repository> [<path>] | |
| 14 | + | git submodule [--quiet] status [--cached] [--recursive] [--] [<path>...] | |
| 15 | + | git submodule [--quiet] init [--] [<path>...] | |
| 16 | + | git submodule [--quiet] deinit [-f|--force] (--all|[--] <path>...) | |
| 17 | + | git submodule [--quiet] update [<options>] [--] [<path>...] | |
| 18 | + | git submodule [--quiet] set-branch [<options>] [--] <path> | |
| 19 | + | git submodule [--quiet] set-url [--] <path> <newurl> | |
| 20 | + | git submodule [--quiet] summary [<options>] [--] [<path>...] | |
| 21 | + | git submodule [--quiet] foreach [--recursive] <command> | |
| 22 | + | git submodule [--quiet] sync [--recursive] [--] [<path>...] | |
| 23 | + | git submodule [--quiet] absorbgitdirs [--] [<path>...] | |
| 24 | 24 | ||
| 25 | 25 | ||
| 26 | 26 | DESCRIPTION | |
| @@ -34,34 +34,34 @@ COMMANDS | |||
| 34 | 34 | With no arguments, shows the status of existing submodules. Several | |
| 35 | 35 | subcommands are available to perform operations on the submodules. | |
| 36 | 36 | ||
| 37 | - | add [-b <branch>] [-f|--force] [--name <name>] [--reference <repository>] [--ref-format <format>] [--depth <depth>] [--] <repository> [<path>]:: | |
| 37 | + | `add [-b <branch>] [-f | --force] [--name <name>] [--reference <repository>] [--ref-format <format>] [--depth <depth>] [--] <repository> [<path>]`:: | |
| 38 | 38 | Add the given repository as a submodule at the given path | |
| 39 | 39 | to the changeset to be committed next to the current | |
| 40 | 40 | project: the current project is termed the "superproject". | |
| 41 | 41 | + | |
| 42 | - | <repository> is the URL of the new submodule's origin repository. | |
| 43 | - | This may be either an absolute URL, or (if it begins with ./ | |
| 44 | - | or ../), the location relative to the superproject's default remote | |
| 45 | - | repository (Please note that to specify a repository 'foo.git' | |
| 46 | - | which is located right next to a superproject 'bar.git', you'll | |
| 42 | + | _<repository>_ is the URL of the new submodule's `origin` repository. | |
| 43 | + | This may be either an absolute URL, or (if it begins with `./` | |
| 44 | + | or `../`), the location relative to the superproject's default remote | |
| 45 | + | repository (Please note that to specify a repository `foo.git` | |
| 46 | + | which is located right next to a superproject `bar.git`, you'll | |
| 47 | 47 | have to use `../foo.git` instead of `./foo.git` - as one might expect | |
| 48 | 48 | when following the rules for relative URLs - because the evaluation | |
| 49 | 49 | of relative URLs in Git is identical to that of relative directories). | |
| 50 | 50 | + | |
| 51 | 51 | The default remote is the remote of the remote-tracking branch | |
| 52 | 52 | of the current branch. If no such remote-tracking branch exists or | |
| 53 | - | the HEAD is detached, "origin" is assumed to be the default remote. | |
| 53 | + | the `HEAD` is detached, `origin` is assumed to be the default remote. | |
| 54 | 54 | If the superproject doesn't have a default remote configured | |
| 55 | 55 | the superproject is its own authoritative upstream and the current | |
| 56 | 56 | working directory is used instead. | |
| 57 | 57 | + | |
| 58 | - | The optional argument <path> is the relative location for the cloned | |
| 59 | - | submodule to exist in the superproject. If <path> is not given, the | |
| 60 | - | canonical part of the source repository is used ("repo" for | |
| 61 | - | "/path/to/repo.git" and "foo" for "host.xz:foo/.git"). If <path> | |
| 58 | + | The optional argument _<path>_ is the relative location for the cloned | |
| 59 | + | submodule to exist in the superproject. If _<path>_ is not given, the | |
| 60 | + | canonical part of the source repository is used (`repo` for | |
| 61 | + | `/path/to/repo.git` and `foo` for `host.xz:foo/.git`). If _<path>_ | |
| 62 | 62 | exists and is already a valid Git repository, then it is staged | |
| 63 | - | for commit without cloning. The <path> is also used as the submodule's | |
| 64 | - | logical name in its configuration entries unless `--name` is used | |
| 63 | + | for commit without cloning. The _<path>_ is also used as the submodule's | |
| 64 | + | logical name in its configuration entries unless `--name <name>` is used | |
| 65 | 65 | to specify a logical name. | |
| 66 | 66 | + | |
| 67 | 67 | The given URL is recorded into `.gitmodules` for use by subsequent users | |
| @@ -75,10 +75,10 @@ URL in `.gitmodules`. | |||
| 75 | 75 | If `--ref-format <format>` is specified, the ref storage format of newly | |
| 76 | 76 | cloned submodules will be set accordingly. | |
| 77 | 77 | ||
| 78 | - | status [--cached] [--recursive] [--] [<path>...]:: | |
| 78 | + | `status [--cached] [--recursive] [--] [<path>...]`:: | |
| 79 | 79 | Show the status of the submodules. This will print the SHA-1 of the | |
| 80 | 80 | currently checked out commit for each submodule, along with the | |
| 81 | - | submodule path and the output of 'git describe' for the | |
| 81 | + | submodule path and the output of linkgit:git-describe[1] for the | |
| 82 | 82 | SHA-1. Each SHA-1 will possibly be prefixed with `-` if the submodule is | |
| 83 | 83 | not initialized, `+` if the currently checked out submodule commit | |
| 84 | 84 | does not match the SHA-1 found in the index of the containing | |
| @@ -91,11 +91,11 @@ If `--recursive` is specified, this command will recurse into nested | |||
| 91 | 91 | submodules, and show their status as well. | |
| 92 | 92 | + | |
| 93 | 93 | If you are only interested in changes of the currently initialized | |
| 94 | - | submodules with respect to the commit recorded in the index or the HEAD, | |
| 94 | + | submodules with respect to the commit recorded in the index or the `HEAD`, | |
| 95 | 95 | linkgit:git-status[1] and linkgit:git-diff[1] will provide that information | |
| 96 | 96 | too (and can also report changes to a submodule's work tree). | |
| 97 | 97 | ||
| 98 | - | init [--] [<path>...]:: | |
| 98 | + | `init [--] [<path>...]`:: | |
| 99 | 99 | Initialize the submodules recorded in the index (which were | |
| 100 | 100 | added and committed elsewhere) by setting `submodule.$name.url` | |
| 101 | 101 | in `.git/config`, using the same setting from `.gitmodules` as | |
| @@ -103,7 +103,7 @@ init [--] [<path>...]:: | |||
| 103 | 103 | the default remote. If there is no default remote, the current | |
| 104 | 104 | repository will be assumed to be upstream. | |
| 105 | 105 | + | |
| 106 | - | Optional <path> arguments limit which submodules will be initialized. | |
| 106 | + | Optional _<path>_ arguments limit which submodules will be initialized. | |
| 107 | 107 | If no path is specified and submodule.active has been configured, submodules | |
| 108 | 108 | configured to be active will be initialized, otherwise all submodules are | |
| 109 | 109 | initialized. | |
| @@ -116,12 +116,12 @@ that is set to a custom command is *not* copied for security reasons. | |||
| 116 | 116 | You can then customize the submodule clone URLs in `.git/config` | |
| 117 | 117 | for your local setup and proceed to `git submodule update`; | |
| 118 | 118 | you can also just use `git submodule update --init` without | |
| 119 | - | the explicit 'init' step if you do not intend to customize | |
| 119 | + | the explicit `init` step if you do not intend to customize | |
| 120 | 120 | any submodule locations. | |
| 121 | 121 | + | |
| 122 | 122 | See the add subcommand for the definition of default remote. | |
| 123 | 123 | ||
| 124 | - | deinit [-f|--force] (--all|[--] <path>...):: | |
| 124 | + | `deinit [-f | --force] (--all|[--] <path>...)`:: | |
| 125 | 125 | Unregister the given submodules, i.e. remove the whole | |
| 126 | 126 | `submodule.$name` section from .git/config together with their work | |
| 127 | 127 | tree. Further calls to `git submodule update`, `git submodule foreach` | |
| @@ -139,7 +139,7 @@ If you really want to remove a submodule from the repository and commit | |||
| 139 | 139 | that use linkgit:git-rm[1] instead. See linkgit:gitsubmodules[7] for removal | |
| 140 | 140 | options. | |
| 141 | 141 | ||
| 142 | - | update [--init] [--remote] [-N|--no-fetch] [--[no-]recommend-shallow] [-f|--force] [--checkout|--rebase|--merge] [--reference <repository>] [--ref-format <format>] [--depth <depth>] [--recursive] [--jobs <n>] [--[no-]single-branch] [--filter <filter-spec>] [--] [<path>...]:: | |
| 142 | + | `update [--init] [--remote] [-N | --no-fetch] [--[no-]recommend-shallow] [-f | --force] [--checkout | --rebase | --merge] [--reference=<repository>] [--ref-format=<format>] [--depth=<depth>] [--recursive] [--jobs <n>] [--[no-]single-branch] [--filter=<filter-spec>] [--] [<path>...]`:: | |
| 143 | 143 | + | |
| 144 | 144 | -- | |
| 145 | 145 | Update the registered submodules to match what the superproject | |
| @@ -148,38 +148,38 @@ in submodules and updating the working tree of | |||
| 148 | 148 | the submodules. The "updating" can be done in several ways depending | |
| 149 | 149 | on command line options and the value of `submodule.<name>.update` | |
| 150 | 150 | configuration variable. The command line option takes precedence over | |
| 151 | - | the configuration variable. If neither is given, a 'checkout' is performed. | |
| 151 | + | the configuration variable. If neither is given, a `checkout` is performed. | |
| 152 | 152 | (note: what is in `.gitmodules` file is irrelevant at this point; | |
| 153 | 153 | see `git submodule init` above for how `.gitmodules` is used). | |
| 154 | - | The 'update' procedures supported both from the command line as well as | |
| 154 | + | The `update` procedures supported both from the command line as well as | |
| 155 | 155 | through the `submodule.<name>.update` configuration are: | |
| 156 | 156 | ||
| 157 | - | checkout;; the commit recorded in the superproject will be | |
| 158 | - | checked out in the submodule on a detached HEAD. | |
| 157 | + | `checkout`;; the commit recorded in the superproject will be | |
| 158 | + | checked out in the submodule on a detached `HEAD`. | |
| 159 | 159 | + | |
| 160 | 160 | If `--force` is specified, the submodule will be checked out (using | |
| 161 | 161 | `git checkout --force`), even if the commit specified | |
| 162 | 162 | in the index of the containing repository already matches the commit | |
| 163 | 163 | checked out in the submodule. | |
| 164 | 164 | ||
| 165 | - | rebase;; the current branch of the submodule will be rebased | |
| 166 | - | onto the commit recorded in the superproject. | |
| 165 | + | `rebase`;; the current branch of the submodule will be rebased | |
| 166 | + | onto the commit recorded in the superproject. | |
| 167 | 167 | ||
| 168 | - | merge;; the commit recorded in the superproject will be merged | |
| 169 | - | into the current branch in the submodule. | |
| 168 | + | `merge`;; the commit recorded in the superproject will be merged | |
| 169 | + | into the current branch in the submodule. | |
| 170 | 170 | ||
| 171 | 171 | The following update procedures have additional limitations: | |
| 172 | 172 | ||
| 173 | - | custom command;; mechanism for running arbitrary commands with the | |
| 174 | - | commit ID as an argument. Specifically, if the | |
| 175 | - | `submodule.<name>.update` configuration variable is set to | |
| 176 | - | `!custom command`, the object name of the commit recorded in the | |
| 177 | - | superproject for the submodule is appended to the `custom command` | |
| 178 | - | string and executed. Note that this mechanism is not supported in | |
| 179 | - | the `.gitmodules` file or on the command line. | |
| 173 | + | `!<custom-command>`;; mechanism for running arbitrary commands with the | |
| 174 | + | commit ID as an argument. Specifically, if the | |
| 175 | + | `submodule.<name>.update` configuration variable is set to | |
| 176 | + | `!<custom-command>`, the object name of the commit recorded in the | |
| 177 | + | superproject for the submodule is appended to the _<custom-command>_ | |
| 178 | + | string and executed. Note that this mechanism is not supported in | |
| 179 | + | the `.gitmodules` file or on the command line. | |
| 180 | 180 | ||
| 181 | - | none;; the submodule is not updated. This update procedure is not | |
| 182 | - | allowed on the command line. | |
| 181 | + | `none`;; the submodule is not updated. This update procedure is not | |
| 182 | + | allowed on the command line. | |
| 183 | 183 | ||
| 184 | 184 | If the submodule is not yet initialized, and you just want to use the | |
| 185 | 185 | setting as stored in `.gitmodules`, you can automatically initialize the | |
| @@ -195,20 +195,20 @@ If `--filter <filter-spec>` is specified, the given partial clone filter will be | |||
| 195 | 195 | applied to the submodule. See linkgit:git-rev-list[1] for details on filter | |
| 196 | 196 | specifications. | |
| 197 | 197 | -- | |
| 198 | - | set-branch (-b|--branch) <branch> [--] <path>:: | |
| 199 | - | set-branch (-d|--default) [--] <path>:: | |
| 200 | - | Sets the default remote tracking branch for the submodule. The | |
| 198 | + | `set-branch (-b|--branch) <branch> [--] <path>`:: | |
| 199 | + | `set-branch (-d|--default) [--] <path>`:: | |
| 200 | + | Set the default remote tracking branch for the submodule. The | |
| 201 | 201 | `--branch` option allows the remote branch to be specified. The | |
| 202 | - | `--default` option removes the submodule.<name>.branch configuration | |
| 203 | - | key, which causes the tracking branch to default to the remote 'HEAD'. | |
| 202 | + | `--default` option removes the `submodule.<name>.branch` configuration | |
| 203 | + | key, which causes the tracking branch to default to the remote `HEAD`. | |
| 204 | 204 | ||
| 205 | - | set-url [--] <path> <newurl>:: | |
| 206 | - | Sets the URL of the specified submodule to <newurl>. Then, it will | |
| 205 | + | `set-url [--] <path> <newurl>`:: | |
| 206 | + | Set the URL of the specified submodule to _<newurl>_. Then, it will | |
| 207 | 207 | automatically synchronize the submodule's new remote URL | |
| 208 | 208 | configuration. | |
| 209 | 209 | ||
| 210 | - | summary [--cached|--files] [(-n|--summary-limit) <n>] [commit] [--] [<path>...]:: | |
| 211 | - | Show commit summary between the given commit (defaults to HEAD) and | |
| 210 | + | `summary [--cached | --files] [(-n|--summary-limit) <n>] [commit] [--] [<path>...]`:: | |
| 211 | + | Show commit summary between the given commit (defaults to `HEAD`) and | |
| 212 | 212 | working tree/index. For a submodule in question, a series of commits | |
| 213 | 213 | in the submodule between the given super project commit and the | |
| 214 | 214 | index or working tree (switched by `--cached`) are shown. If the option | |
| @@ -220,27 +220,31 @@ summary [--cached|--files] [(-n|--summary-limit) <n>] [commit] [--] [<path>...]: | |||
| 220 | 220 | Using the `--submodule=log` option with linkgit:git-diff[1] will provide that | |
| 221 | 221 | information too. | |
| 222 | 222 | ||
| 223 | - | foreach [--recursive] <command>:: | |
| 224 | - | Evaluates an arbitrary shell command in each checked out submodule. | |
| 225 | - | The command has access to the variables $name, $sm_path, $displaypath, | |
| 226 | - | $sha1 and $toplevel: | |
| 227 | - | $name is the name of the relevant submodule section in `.gitmodules`, | |
| 228 | - | $sm_path is the path of the submodule as recorded in the immediate | |
| 229 | - | superproject, $displaypath contains the relative path from the | |
| 230 | - | current working directory to the submodules root directory, | |
| 231 | - | $sha1 is the commit as recorded in the immediate | |
| 232 | - | superproject, and $toplevel is the absolute path to the top-level | |
| 233 | - | of the immediate superproject. | |
| 234 | - | Note that to avoid conflicts with '$PATH' on Windows, the '$path' | |
| 235 | - | variable is now a deprecated synonym of '$sm_path' variable. | |
| 236 | - | Any submodules defined in the superproject but not checked out are | |
| 237 | - | ignored by this command. Unless given `--quiet`, foreach prints the name | |
| 238 | - | of each submodule before evaluating the command. | |
| 239 | - | If `--recursive` is given, submodules are traversed recursively (i.e. | |
| 240 | - | the given shell command is evaluated in nested submodules as well). | |
| 241 | - | A non-zero return from the command in any submodule causes | |
| 242 | - | the processing to terminate. This can be overridden by adding '|| :' | |
| 243 | - | to the end of the command. | |
| 223 | + | `foreach [--recursive] <command>`:: | |
| 224 | + | Evaluate an arbitrary shell _<command>_ in each checked out submodule. | |
| 225 | + | The command has access to the variables `$name`, `$sm_path`, `$displaypath`, | |
| 226 | + | `$sha1` and `$toplevel`: | |
| 227 | + | + | |
| 228 | + | -- | |
| 229 | + | `$name`;; the name of the relevant submodule section in `.gitmodules` | |
| 230 | + | `$sm_path`;; the path of the submodule as recorded in the immediate | |
| 231 | + | superproject | |
| 232 | + | `$displaypath`;; the relative path from the | |
| 233 | + | current working directory to the submodules root directory | |
| 234 | + | `$sha1`;; the commit as recorded in the immediate superproject | |
| 235 | + | `$toplevel`;; the absolute path to the top-level of the immediate superproject. | |
| 236 | + | -- | |
| 237 | + | + | |
| 238 | + | Note that to avoid conflicts with `$PATH` on Windows, the `$path` | |
| 239 | + | variable is now a deprecated synonym of `$sm_path` variable. | |
| 240 | + | Any submodules defined in the superproject but not checked out are | |
| 241 | + | ignored by this command. Unless given `--quiet`, foreach prints the name | |
| 242 | + | of each submodule before evaluating the command. | |
| 243 | + | If `--recursive` is given, submodules are traversed recursively (i.e. | |
| 244 | + | the given shell command is evaluated in nested submodules as well). | |
| 245 | + | A non-zero return from the command in any submodule causes | |
| 246 | + | the processing to terminate. This can be overridden by adding ++||:++ | |
| 247 | + | to the end of the command. | |
| 244 | 248 | + | |
| 245 | 249 | As an example, the command below will show the path and currently | |
| 246 | 250 | checked out commit for each submodule: | |
| @@ -249,26 +253,26 @@ checked out commit for each submodule: | |||
| 249 | 253 | git submodule foreach 'echo $sm_path `git rev-parse HEAD`' | |
| 250 | 254 | -------------- | |
| 251 | 255 | ||
| 252 | - | sync [--recursive] [--] [<path>...]:: | |
| 253 | - | Synchronizes submodules' remote URL configuration setting | |
| 256 | + | `sync [--recursive] [--] [<path>...]`:: | |
| 257 | + | Synchronize submodules' remote URL configuration setting | |
| 254 | 258 | to the value specified in `.gitmodules`. It will only affect those | |
| 255 | - | submodules which already have a URL entry in .git/config (that is the | |
| 259 | + | submodules which already have a URL entry in `.git/config` (that is the | |
| 256 | 260 | case when they are initialized or freshly added). This is useful when | |
| 257 | 261 | submodule URLs change upstream and you need to update your local | |
| 258 | 262 | repositories accordingly. | |
| 259 | 263 | + | |
| 260 | 264 | `git submodule sync` synchronizes all submodules while | |
| 261 | - | `git submodule sync -- A` synchronizes submodule "A" only. | |
| 265 | + | `git submodule sync -- A` synchronizes submodule `A` only. | |
| 262 | 266 | + | |
| 263 | 267 | If `--recursive` is specified, this command will recurse into the | |
| 264 | 268 | registered submodules, and sync any nested submodules within. | |
| 265 | 269 | ||
| 266 | - | absorbgitdirs:: | |
| 270 | + | `absorbgitdirs`:: | |
| 267 | 271 | If a git directory of a submodule is inside the submodule, | |
| 268 | 272 | move the git directory of the submodule into its superproject's | |
| 269 | 273 | `$GIT_DIR/modules` path and then connect the git directory and | |
| 270 | 274 | its working directory by setting the `core.worktree` and adding | |
| 271 | - | a .git file pointing to the git directory embedded in the | |
| 275 | + | a `.git` file pointing to the git directory embedded in the | |
| 272 | 276 | superprojects git directory. | |
| 273 | 277 | + | |
| 274 | 278 | A repository that was cloned independently and later added as a submodule or | |
| @@ -279,65 +283,70 @@ This command is recursive by default. | |||
| 279 | 283 | ||
| 280 | 284 | OPTIONS | |
| 281 | 285 | ------- | |
| 282 | - | -q:: | |
| 283 | - | --quiet:: | |
| 286 | + | `-q`:: | |
| 287 | + | `--quiet`:: | |
| 284 | 288 | Only print error messages. | |
| 285 | 289 | ||
| 286 | - | --progress:: | |
| 287 | - | This option is only valid for add and update commands. | |
| 288 | - | Progress status is reported on the standard error stream | |
| 289 | - | by default when it is attached to a terminal, unless -q | |
| 290 | + | `--progress`:: | |
| 291 | + | Report progress status on the standard error stream | |
| 292 | + | by default when it is attached to a terminal, unless `-q` | |
| 290 | 293 | is specified. This flag forces progress status even if the | |
| 291 | - | standard error stream is not directed to a terminal. | |
| 294 | + | standard error stream is not directed to a terminal. It is | |
| 295 | + | only valid for `add` and `update` commands. | |
| 292 | 296 | ||
| 293 | - | --all:: | |
| 294 | - | This option is only valid for the deinit command. Unregister all | |
| 295 | - | submodules in the working tree. | |
| 297 | + | `--all`:: | |
| 298 | + | Unregister all submodules in the working tree. This option is only | |
| 299 | + | valid for the `deinit` command. | |
| 296 | 300 | ||
| 297 | - | -b <branch>:: | |
| 298 | - | --branch <branch>:: | |
| 301 | + | `-b<branch>`:: | |
| 302 | + | `--branch=<branch>`:: | |
| 299 | 303 | Branch of repository to add as submodule. | |
| 300 | 304 | The name of the branch is recorded as `submodule.<name>.branch` in | |
| 301 | 305 | `.gitmodules` for `update --remote`. A special value of `.` is used to | |
| 302 | 306 | indicate that the name of the branch in the submodule should be the | |
| 303 | 307 | same name as the current branch in the current repository. If the | |
| 304 | - | option is not specified, it defaults to the remote 'HEAD'. | |
| 305 | - | ||
| 306 | - | -f:: | |
| 307 | - | --force:: | |
| 308 | - | This option is only valid for add, deinit and update commands. | |
| 309 | - | When running add, allow adding an otherwise ignored submodule path. | |
| 310 | - | When running deinit the submodule working trees will be removed even | |
| 311 | - | if they contain local changes. | |
| 312 | - | When running update (only effective with the checkout procedure), | |
| 313 | - | throw away local changes in submodules when switching to a | |
| 314 | - | different commit; and always run a checkout operation in the | |
| 315 | - | submodule, even if the commit listed in the index of the | |
| 316 | - | containing repository matches the commit checked out in the | |
| 317 | - | submodule. | |
| 318 | - | ||
| 319 | - | --cached:: | |
| 320 | - | This option is only valid for status and summary commands. These | |
| 321 | - | commands typically use the commit found in the submodule HEAD, but | |
| 322 | - | with this option, the commit stored in the index is used instead. | |
| 323 | - | ||
| 324 | - | --files:: | |
| 325 | - | This option is only valid for the summary command. This command | |
| 326 | - | compares the commit in the index with that in the submodule HEAD | |
| 327 | - | when this option is used. | |
| 328 | - | ||
| 329 | - | -n:: | |
| 330 | - | --summary-limit:: | |
| 331 | - | This option is only valid for the summary command. | |
| 332 | - | Limit the summary size (number of commits shown in total). | |
| 308 | + | option is not specified, it defaults to the remote `HEAD`. | |
| 309 | + | ||
| 310 | + | `-f`:: | |
| 311 | + | `--force`:: | |
| 312 | + | Force the command to proceed, even if it would otherwise fail. | |
| 313 | + | This option is only valid for `add`, `deinit` and `update` commands. | |
| 314 | + | `add`;; allow adding an otherwise ignored submodule path. | |
| 315 | + | This option is also used to bypass a check that the submodule's name | |
| 316 | + | is not already in use. By default, `git submodule add` will fail if | |
| 317 | + | the proposed name (which is derived from the path) is already registered | |
| 318 | + | for another submodule in the repository. Using `--force` allows the command | |
| 319 | + | to proceed by automatically generating a unique name by appending a number | |
| 320 | + | to the conflicting name (e.g., if a submodule named 'child' exists, it will | |
| 321 | + | try 'child1', and so on). | |
| 322 | + | `deinit`;; the submodule working trees will be removed even | |
| 323 | + | if they contain local changes. | |
| 324 | + | `update`;; (only effective with the checkout procedure), | |
| 325 | + | throw away local changes in submodules when switching to a | |
| 326 | + | different commit; and always run a checkout operation in the | |
| 327 | + | submodule, even if the commit listed in the index of the | |
| 328 | + | containing repository matches the commit checked out in the | |
| 329 | + | submodule. | |
| 330 | + | ||
| 331 | + | `--cached`:: | |
| 332 | + | Use the index to determine the commit instead of the `HEAD`. | |
| 333 | + | This option is only valid for `status` and `summary` commands. | |
| 334 | + | ||
| 335 | + | `--files`:: | |
| 336 | + | Make the `summary` command compare the commit in the index with that in | |
| 337 | + | the submodule `HEAD`. | |
| 338 | + | ||
| 339 | + | `-n<n>`:: | |
| 340 | + | `--summary-limit=<n>`:: | |
| 341 | + | Limit the `summary` size (number of commits shown in total) to _<n>_. | |
| 333 | 342 | Giving 0 will disable the summary; a negative number means unlimited | |
| 334 | 343 | (the default). This limit only applies to modified submodules. The | |
| 335 | 344 | size is always limited to 1 for added/deleted/typechanged submodules. | |
| 336 | 345 | ||
| 337 | - | --remote:: | |
| 338 | - | This option is only valid for the update command. Instead of using | |
| 339 | - | the superproject's recorded SHA-1 to update the submodule, use the | |
| 340 | - | status of the submodule's remote-tracking branch. The remote used | |
| 346 | + | `--remote`:: | |
| 347 | + | Instead of using the superproject's recorded SHA-1 to update the | |
| 348 | + | submodule, use the status of the submodule's remote-tracking branch. | |
| 349 | + | This option is only valid for the `update` command. The remote used | |
| 341 | 350 | is branch's remote (`branch.<name>.remote`), defaulting to `origin`. | |
| 342 | 351 | The remote branch used defaults to the remote `HEAD`, but the branch | |
| 343 | 352 | name may be overridden by setting the `submodule.<name>.branch` | |
| @@ -356,7 +365,7 @@ SHA-1. If you don't want to fetch, you should use `submodule update | |||
| 356 | 365 | --remote --no-fetch`. | |
| 357 | 366 | + | |
| 358 | 367 | Use this option to integrate changes from the upstream subproject with | |
| 359 | - | your submodule's current HEAD. Alternatively, you can run `git pull` | |
| 368 | + | your submodule's current `HEAD`. Alternatively, you can run `git pull` | |
| 360 | 369 | from the submodule, which is equivalent except for the remote branch | |
| 361 | 370 | name: `update --remote` uses the default upstream repository and | |
| 362 | 371 | `submodule.<name>.branch`, while `git pull` uses the submodule's | |
| @@ -365,103 +374,106 @@ to distribute the default upstream branch with the superproject and | |||
| 365 | 374 | `branch.<name>.merge` if you want a more native feel while working in | |
| 366 | 375 | the submodule itself. | |
| 367 | 376 | ||
| 368 | - | -N:: | |
| 369 | - | --no-fetch:: | |
| 370 | - | This option is only valid for the update command. | |
| 377 | + | `-N`:: | |
| 378 | + | `--no-fetch`:: | |
| 371 | 379 | Don't fetch new objects from the remote site. | |
| 380 | + | This option is only valid for the `update` command. | |
| 372 | 381 | ||
| 373 | - | --checkout:: | |
| 374 | - | This option is only valid for the update command. | |
| 375 | - | Checkout the commit recorded in the superproject on a detached HEAD | |
| 376 | - | in the submodule. This is the default behavior, the main use of | |
| 377 | - | this option is to override `submodule.$name.update` when set to | |
| 382 | + | `--checkout`:: | |
| 383 | + | Checkout the commit recorded in the superproject on a detached `HEAD` | |
| 384 | + | in the submodule. This option is only valid for the `update` command. | |
| 385 | + | This is the default behavior, the main use of | |
| 386 | + | this option is to override `submodule.<name>.update` when set to | |
| 378 | 387 | a value other than `checkout`. | |
| 379 | - | If the key `submodule.$name.update` is either not explicitly set or | |
| 388 | + | If the key `submodule.<name>.update` is either not explicitly set or | |
| 380 | 389 | set to `checkout`, this option is implicit. | |
| 381 | 390 | ||
| 382 | - | --merge:: | |
| 383 | - | This option is only valid for the update command. | |
| 391 | + | `--merge`:: | |
| 384 | 392 | Merge the commit recorded in the superproject into the current branch | |
| 385 | - | of the submodule. If this option is given, the submodule's HEAD will | |
| 393 | + | of the submodule. This option is only valid for the `update` command. | |
| 394 | + | If this option is given, the submodule's `HEAD` will | |
| 386 | 395 | not be detached. If a merge failure prevents this process, you will | |
| 387 | 396 | have to resolve the resulting conflicts within the submodule with the | |
| 388 | 397 | usual conflict resolution tools. | |
| 389 | - | If the key `submodule.$name.update` is set to `merge`, this option is | |
| 398 | + | If the key `submodule.<name>.update` is set to `merge`, this option is | |
| 390 | 399 | implicit. | |
| 391 | 400 | ||
| 392 | - | --rebase:: | |
| 393 | - | This option is only valid for the update command. | |
| 394 | - | Rebase the current branch onto the commit recorded in the | |
| 395 | - | superproject. If this option is given, the submodule's HEAD will not | |
| 401 | + | `--rebase`:: | |
| 402 | + | Rebase the current branch onto the commit recorded in the superproject. | |
| 403 | + | This option is only valid for the `update` command. The submodule's `HEAD` will not | |
| 396 | 404 | be detached. If a merge failure prevents this process, you will have | |
| 397 | 405 | to resolve these failures with linkgit:git-rebase[1]. | |
| 398 | - | If the key `submodule.$name.update` is set to `rebase`, this option is | |
| 406 | + | If the key `submodule.<name>.update` is set to `rebase`, this option is | |
| 399 | 407 | implicit. | |
| 400 | 408 | ||
| 401 | - | --init:: | |
| 402 | - | This option is only valid for the update command. | |
| 403 | - | Initialize all submodules for which "git submodule init" has not been | |
| 404 | - | called so far before updating. | |
| 409 | + | `--init`:: | |
| 410 | + | Initialize all submodules for which `git submodule init` has not been | |
| 411 | + | called so far before updating. This option is only valid for the `update` | |
| 412 | + | command. | |
| 413 | + | ||
| 405 | 414 | ||
| 406 | - | --name:: | |
| 407 | - | This option is only valid for the add command. It sets the submodule's | |
| 408 | - | name to the given string instead of defaulting to its path. The name | |
| 409 | - | must be valid as a directory name and may not end with a '/'. | |
| 415 | + | `--name=<name>`:: | |
| 416 | + | Set the submodule's name to the given string instead of defaulting to its path. _<name>_ | |
| 417 | + | must be valid as a directory name and may not end with a `/`. | |
| 410 | 418 | ||
| 411 | - | --reference <repository>:: | |
| 412 | - | This option is only valid for add and update commands. These | |
| 413 | - | commands sometimes need to clone a remote repository. In this case, | |
| 419 | + | `--reference=<repository>`:: | |
| 420 | + | Pass the local _<repository>_ as a reference when cloning the submodule. | |
| 421 | + | This option is only valid for `add` and `update` commands. | |
| 422 | + | These commands sometimes need to clone a remote repository. In this case, | |
| 414 | 423 | this option will be passed to the linkgit:git-clone[1] command. | |
| 415 | 424 | + | |
| 416 | - | *NOTE*: Do *not* use this option unless you have read the note | |
| 425 | + | NOTE: Do *not* use this option unless you have read the note | |
| 417 | 426 | for linkgit:git-clone[1]'s `--reference`, `--shared`, and `--dissociate` | |
| 418 | 427 | options carefully. | |
| 419 | 428 | ||
| 420 | - | --dissociate:: | |
| 421 | - | This option is only valid for add and update commands. These | |
| 422 | - | commands sometimes need to clone a remote repository. In this case, | |
| 429 | + | `--dissociate`:: | |
| 430 | + | After using a reference repository to clone from, do not rely on it anymore. | |
| 431 | + | This option is only valid for `add` and `update` commands. | |
| 432 | + | These commands sometimes need to clone a remote repository. In this case, | |
| 423 | 433 | this option will be passed to the linkgit:git-clone[1] command. | |
| 424 | 434 | + | |
| 425 | - | *NOTE*: see the NOTE for the `--reference` option. | |
| 435 | + | NOTE: See the NOTE above for the `--reference` option. | |
| 426 | 436 | ||
| 427 | - | --recursive:: | |
| 428 | - | This option is only valid for foreach, update, status and sync commands. | |
| 429 | - | Traverse submodules recursively. The operation is performed not | |
| 437 | + | `--recursive`:: | |
| 438 | + | Traverse submodules recursively. This option is only valid for `foreach`, | |
| 439 | + | `update`, `status` and `sync` commands. The operation is performed not | |
| 430 | 440 | only in the submodules of the current repo, but also | |
| 431 | 441 | in any nested submodules inside those submodules (and so on). | |
| 432 | 442 | ||
| 433 | - | --depth:: | |
| 434 | - | This option is valid for add and update commands. Create a 'shallow' | |
| 435 | - | clone with a history truncated to the specified number of revisions. | |
| 436 | - | See linkgit:git-clone[1] | |
| 443 | + | `--depth=<depth>`:: | |
| 444 | + | Create a 'shallow' clone with a history truncated to the _<depth>_ revisions. | |
| 445 | + | This option is valid for `add` and `update` commands. See linkgit:git-clone[1] | |
| 437 | 446 | ||
| 438 | - | --[no-]recommend-shallow:: | |
| 439 | - | This option is only valid for the update command. | |
| 447 | + | `--recommend-shallow`:: | |
| 448 | + | `--no-recommend-shallow`:: | |
| 449 | + | Recommend or not shallow cloning of submodules. | |
| 450 | + | This option is only valid for the `update` command. | |
| 440 | 451 | The initial clone of a submodule will use the recommended | |
| 441 | 452 | `submodule.<name>.shallow` as provided by the `.gitmodules` file | |
| 442 | 453 | by default. To ignore the suggestions use `--no-recommend-shallow`. | |
| 443 | 454 | ||
| 444 | - | -j <n>:: | |
| 445 | - | --jobs <n>:: | |
| 446 | - | This option is only valid for the update command. | |
| 447 | - | Clone new submodules in parallel with as many jobs. | |
| 455 | + | `-j<n>`:: | |
| 456 | + | `--jobs=<n>`:: | |
| 457 | + | Clone new submodules in parallel with _<n>_ jobs. | |
| 458 | + | This option is only valid for the `update` command. | |
| 448 | 459 | Defaults to the `submodule.fetchJobs` option. | |
| 449 | 460 | ||
| 450 | - | --[no-]single-branch:: | |
| 451 | - | This option is only valid for the update command. | |
| 452 | - | Clone only one branch during update: HEAD or one specified by --branch. | |
| 461 | + | `--single-branch`:: | |
| 462 | + | `--no-single-branch`:: | |
| 463 | + | Clone only one branch during update: `HEAD` or one specified by `--branch`. | |
| 464 | + | This option is only valid for the `update` command. | |
| 453 | 465 | ||
| 454 | - | <path>...:: | |
| 466 | + | `<path>...`:: | |
| 455 | 467 | Paths to submodule(s). When specified this will restrict the command | |
| 456 | 468 | to only operate on the submodules found at the specified paths. | |
| 457 | - | (This argument is required with add). | |
| 469 | + | (This argument is required with `add`). | |
| 458 | 470 | ||
| 459 | 471 | FILES | |
| 460 | 472 | ----- | |
| 461 | 473 | When initializing submodules, a `.gitmodules` file in the top-level directory | |
| 462 | - | of the containing repository is used to find the url of each submodule. | |
| 474 | + | of the containing repository is used to find the URL of each submodule. | |
| 463 | 475 | This file should be formatted in the same way as `$GIT_DIR/config`. The key | |
| 464 | - | to each submodule url is "submodule.$name.url". See linkgit:gitmodules[5] | |
| 476 | + | to each submodule URL is `submodule.<name>.url`. See linkgit:gitmodules[5] | |
| 465 | 477 | for details. | |
| 466 | 478 | ||
| 467 | 479 | SEE ALSO | |
modified Documentation/git-svn.adoc
| @@ -439,7 +439,7 @@ Any other arguments are passed directly to 'git log' | |||
| 439 | 439 | 'show-ignore':: | |
| 440 | 440 | Recursively finds and lists the svn:ignore and svn:global-ignores | |
| 441 | 441 | properties on directories. The output is suitable for appending to | |
| 442 | - | the $GIT_DIR/info/exclude file. | |
| 442 | + | the $GIT_COMMON_DIR/info/exclude file. | |
| 443 | 443 | ||
| 444 | 444 | 'mkdirs':: | |
| 445 | 445 | Attempts to recreate empty directories that core Git cannot track | |
| @@ -1012,9 +1012,11 @@ branch. | |||
| 1012 | 1012 | ||
| 1013 | 1013 | If you do merge, note the following rule: 'git svn dcommit' will | |
| 1014 | 1014 | attempt to commit on top of the SVN commit named in | |
| 1015 | + | ||
| 1015 | 1016 | ------------------------------------------------------------------------ | |
| 1016 | 1017 | git log --grep=^git-svn-id: --first-parent -1 | |
| 1017 | 1018 | ------------------------------------------------------------------------ | |
| 1019 | + | ||
| 1018 | 1020 | You 'must' therefore ensure that the most recent commit of the branch | |
| 1019 | 1021 | you want to dcommit to is the 'first' parent of the merge. Chaos will | |
| 1020 | 1022 | ensue otherwise, especially if the first parent is an older commit on | |
modified Documentation/git-switch.adoc
| @@ -29,8 +29,6 @@ Switching branches does not require a clean index and working tree | |||
| 29 | 29 | however if the operation leads to loss of local changes, unless told | |
| 30 | 30 | otherwise with `--discard-changes` or `--merge`. | |
| 31 | 31 | ||
| 32 | - | THIS COMMAND IS EXPERIMENTAL. THE BEHAVIOR MAY CHANGE. | |
| 33 | - | ||
| 34 | 32 | OPTIONS | |
| 35 | 33 | ------- | |
| 36 | 34 | _<branch>_:: | |
| @@ -125,18 +123,19 @@ variable. | |||
| 125 | 123 | ||
| 126 | 124 | `-m`:: | |
| 127 | 125 | `--merge`:: | |
| 128 | - | If you have local modifications to one or more files that are | |
| 129 | - | different between the current branch and the branch to which | |
| 130 | - | you are switching, the command refuses to switch branches in | |
| 131 | - | order to preserve your modifications in context. However, | |
| 132 | - | with this option, a three-way merge between the current | |
| 133 | - | branch, your working tree contents, and the new branch is | |
| 134 | - | done, and you will be on the new branch. | |
| 135 | - | + | |
| 136 | - | When a merge conflict happens, the index entries for conflicting | |
| 137 | - | paths are left unmerged, and you need to resolve the conflicts | |
| 138 | - | and mark the resolved paths with `git add` (or `git rm` if the merge | |
| 139 | - | should result in deletion of the path). | |
| 126 | + | If you have local modifications to one or more files that | |
| 127 | + | are different between the current branch and the branch to | |
| 128 | + | which you are switching, the command normally refuses to | |
| 129 | + | switch branches in order to preserve your modifications in | |
| 130 | + | context. However, with this option, the conflicting local | |
| 131 | + | changes are automatically stashed before the switch and | |
| 132 | + | reapplied afterwards. If the local changes do not overlap | |
| 133 | + | with the differences between branches, the switch proceeds | |
| 134 | + | without stashing. If reapplying the stash results in | |
| 135 | + | conflicts, the entry is saved to the stash list. Resolve | |
| 136 | + | the conflicts and run `git stash drop` when done, or clear | |
| 137 | + | the working tree (e.g. with `git reset --hard`) before | |
| 138 | + | running `git stash pop` later to re-apply your changes. | |
| 140 | 139 | ||
| 141 | 140 | `--conflict=<style>`:: | |
| 142 | 141 | The same as `--merge` option above, but changes the way the | |
| @@ -219,15 +218,18 @@ $ git switch mytopic | |||
| 219 | 218 | error: You have local changes to 'frotz'; not switching branches. | |
| 220 | 219 | ------------ | |
| 221 | 220 | ||
| 222 | - | You can give the `-m` flag to the command, which would try a three-way | |
| 223 | - | merge: | |
| 221 | + | You can give the `-m` flag to the command, which will carry your local | |
| 222 | + | changes to the new branch: | |
| 224 | 223 | ||
| 225 | 224 | ------------ | |
| 226 | 225 | $ git switch -m mytopic | |
| 227 | - | Auto-merging frotz | |
| 226 | + | Applied autostash. | |
| 227 | + | Switched to branch 'mytopic' | |
| 228 | + | The following paths have local changes: | |
| 229 | + | M frotz | |
| 228 | 230 | ------------ | |
| 229 | 231 | ||
| 230 | - | After this three-way merge, the local modifications are _not_ | |
| 232 | + | After the switch, the local modifications are reapplied and are _not_ | |
| 231 | 233 | registered in your index file, so `git diff` would show you what | |
| 232 | 234 | changes you made since the tip of the new branch. | |
| 233 | 235 | ||
modified Documentation/git-tag.adoc
| @@ -3,26 +3,26 @@ git-tag(1) | |||
| 3 | 3 | ||
| 4 | 4 | NAME | |
| 5 | 5 | ---- | |
| 6 | - | git-tag - Create, list, delete or verify a tag object signed with GPG | |
| 6 | + | git-tag - Create, list, delete or verify tags | |
| 7 | 7 | ||
| 8 | 8 | ||
| 9 | 9 | SYNOPSIS | |
| 10 | 10 | -------- | |
| 11 | - | [verse] | |
| 12 | - | 'git tag' [-a | -s | -u <key-id>] [-f] [-m <msg> | -F <file>] [-e] | |
| 11 | + | [synopsis] | |
| 12 | + | git tag [-a | -s | -u <key-id>] [-f] [-m <msg> | -F <file>] [-e] | |
| 13 | 13 | [(--trailer <token>[(=|:)<value>])...] | |
| 14 | 14 | <tagname> [<commit> | <object>] | |
| 15 | - | 'git tag' -d <tagname>... | |
| 16 | - | 'git tag' [-n[<num>]] -l [--contains <commit>] [--no-contains <commit>] | |
| 15 | + | git tag -d <tagname>... | |
| 16 | + | git tag [-n[<num>]] -l [--contains <commit>] [--no-contains <commit>] | |
| 17 | 17 | [--points-at <object>] [--column[=<options>] | --no-column] | |
| 18 | 18 | [--create-reflog] [--sort=<key>] [--format=<format>] | |
| 19 | 19 | [--merged <commit>] [--no-merged <commit>] [<pattern>...] | |
| 20 | - | 'git tag' -v [--format=<format>] <tagname>... | |
| 20 | + | git tag -v [--format=<format>] <tagname>... | |
| 21 | 21 | ||
| 22 | 22 | DESCRIPTION | |
| 23 | 23 | ----------- | |
| 24 | 24 | ||
| 25 | - | Add a tag reference in `refs/tags/`, unless `-d/-l/-v` is given | |
| 25 | + | Add a tag reference in `refs/tags/`, unless `-d`/`-l`/`-v` is given | |
| 26 | 26 | to delete, list or verify tags. | |
| 27 | 27 | ||
| 28 | 28 | Unless `-f` is given, the named tag must not yet exist. | |
| @@ -38,15 +38,17 @@ and `-a`, `-s`, and `-u <key-id>` are absent, `-a` is implied. | |||
| 38 | 38 | Otherwise, a tag reference that points directly at the given object | |
| 39 | 39 | (i.e., a lightweight tag) is created. | |
| 40 | 40 | ||
| 41 | - | A GnuPG signed tag object will be created when `-s` or `-u | |
| 42 | - | <key-id>` is used. When `-u <key-id>` is not used, the | |
| 43 | - | committer identity for the current user is used to find the | |
| 44 | - | GnuPG key for signing. The configuration variable `gpg.program` | |
| 45 | - | is used to specify custom GnuPG binary. | |
| 41 | + | A cryptographically signed tag object will be created when `-s` or | |
| 42 | + | `-u <key-id>` is used. The signing backend (GPG, X.509, SSH, etc.) is | |
| 43 | + | controlled by the `gpg.format` configuration variable, defaulting to | |
| 44 | + | OpenPGP. When `-u <key-id>` is not used, the committer identity for | |
| 45 | + | the current user is used to find the key for signing. The | |
| 46 | + | configuration variable `gpg.program` is used to specify a custom | |
| 47 | + | signing binary. | |
| 46 | 48 | ||
| 47 | 49 | Tag objects (created with `-a`, `-s`, or `-u`) are called "annotated" | |
| 48 | 50 | tags; they contain a creation date, the tagger name and e-mail, a | |
| 49 | - | tagging message, and an optional GnuPG signature. Whereas a | |
| 51 | + | tagging message, and an optional cryptographic signature. Whereas a | |
| 50 | 52 | "lightweight" tag is simply a name for an object (usually a commit | |
| 51 | 53 | object). | |
| 52 | 54 | ||
| @@ -58,129 +60,134 @@ lightweight tags by default. | |||
| 58 | 60 | ||
| 59 | 61 | OPTIONS | |
| 60 | 62 | ------- | |
| 61 | - | -a:: | |
| 62 | - | --annotate:: | |
| 63 | + | `-a`:: | |
| 64 | + | `--annotate`:: | |
| 63 | 65 | Make an unsigned, annotated tag object | |
| 64 | 66 | ||
| 65 | - | -s:: | |
| 66 | - | --sign:: | |
| 67 | - | Make a GPG-signed tag, using the default e-mail address's key. | |
| 68 | - | The default behavior of tag GPG-signing is controlled by `tag.gpgSign` | |
| 69 | - | configuration variable if it exists, or disabled otherwise. | |
| 70 | - | See linkgit:git-config[1]. | |
| 67 | + | `-s`:: | |
| 68 | + | `--sign`:: | |
| 69 | + | Make a cryptographically signed tag, using the default signing | |
| 70 | + | key. The signing backend used depends on the `gpg.format` | |
| 71 | + | configuration variable. The default key is determined by the | |
| 72 | + | backend. For GPG, it's based on the committer's email address, | |
| 73 | + | while for SSH it may be a specific key file or agent | |
| 74 | + | identity. See linkgit:git-config[1]. | |
| 71 | 75 | ||
| 72 | - | --no-sign:: | |
| 76 | + | `--no-sign`:: | |
| 73 | 77 | Override `tag.gpgSign` configuration variable that is | |
| 74 | 78 | set to force each and every tag to be signed. | |
| 75 | 79 | ||
| 76 | - | -u <key-id>:: | |
| 77 | - | --local-user=<key-id>:: | |
| 78 | - | Make a GPG-signed tag, using the given key. | |
| 80 | + | `-u <key-id>`:: | |
| 81 | + | `--local-user=<key-id>`:: | |
| 82 | + | Make a cryptographically signed tag using the given key. The | |
| 83 | + | format of the <key-id> and the backend used depend on the | |
| 84 | + | `gpg.format` configuration variable. See | |
| 85 | + | linkgit:git-config[1]. | |
| 79 | 86 | ||
| 80 | - | -f:: | |
| 81 | - | --force:: | |
| 87 | + | `-f`:: | |
| 88 | + | `--force`:: | |
| 82 | 89 | Replace an existing tag with the given name (instead of failing) | |
| 83 | 90 | ||
| 84 | - | -d:: | |
| 85 | - | --delete:: | |
| 91 | + | `-d`:: | |
| 92 | + | `--delete`:: | |
| 86 | 93 | Delete existing tags with the given names. | |
| 87 | 94 | ||
| 88 | - | -v:: | |
| 89 | - | --verify:: | |
| 90 | - | Verify the GPG signature of the given tag names. | |
| 95 | + | `-v`:: | |
| 96 | + | `--verify`:: | |
| 97 | + | Verify the cryptographic signature of the given tags. | |
| 91 | 98 | ||
| 92 | - | -n<num>:: | |
| 93 | - | <num> specifies how many lines from the annotation, if any, | |
| 94 | - | are printed when using -l. Implies `--list`. | |
| 99 | + | `-n<num>`:: | |
| 100 | + | _<num>_ specifies how many lines from the annotation, if any, | |
| 101 | + | are printed when using `-l`. Implies `--list`. | |
| 95 | 102 | + | |
| 96 | 103 | The default is not to print any annotation lines. | |
| 97 | 104 | If no number is given to `-n`, only the first line is printed. | |
| 98 | 105 | If the tag is not annotated, the commit message is displayed instead. | |
| 99 | 106 | ||
| 100 | - | -l:: | |
| 101 | - | --list:: | |
| 107 | + | `-l`:: | |
| 108 | + | `--list`:: | |
| 102 | 109 | List tags. With optional `<pattern>...`, e.g. `git tag --list | |
| 103 | 110 | 'v-*'`, list only the tags that match the pattern(s). | |
| 104 | 111 | + | |
| 105 | - | Running "git tag" without arguments also lists all tags. The pattern | |
| 106 | - | is a shell wildcard (i.e., matched using fnmatch(3)). Multiple | |
| 112 | + | Running `git tag` without arguments also lists all tags. The pattern | |
| 113 | + | is a shell wildcard (i.e., matched using `fnmatch`(3)). Multiple | |
| 107 | 114 | patterns may be given; if any of them matches, the tag is shown. | |
| 108 | 115 | + | |
| 109 | 116 | This option is implicitly supplied if any other list-like option such | |
| 110 | 117 | as `--contains` is provided. See the documentation for each of those | |
| 111 | 118 | options for details. | |
| 112 | 119 | ||
| 113 | - | --sort=<key>:: | |
| 120 | + | `--sort=<key>`:: | |
| 114 | 121 | Sort based on the key given. Prefix `-` to sort in | |
| 115 | - | descending order of the value. You may use the --sort=<key> option | |
| 116 | - | multiple times, in which case the last key becomes the primary | |
| 117 | - | key. Also supports "version:refname" or "v:refname" (tag | |
| 118 | - | names are treated as versions). The "version:refname" sort | |
| 119 | - | order can also be affected by the "versionsort.suffix" | |
| 122 | + | descending order of the value. You may use the `--sort=<key>` option | |
| 123 | + | multiple times, in which case the last _<key>_ becomes the primary | |
| 124 | + | key. Also supports "`version:refname`" or "`v:refname`" (tag | |
| 125 | + | names are treated as versions). The "`version:refname`" sort | |
| 126 | + | order can also be affected by the "`versionsort.suffix`" | |
| 120 | 127 | configuration variable. | |
| 121 | 128 | The keys supported are the same as those in `git for-each-ref`. | |
| 122 | 129 | Sort order defaults to the value configured for the `tag.sort` | |
| 123 | 130 | variable if it exists, or lexicographic order otherwise. See | |
| 124 | 131 | linkgit:git-config[1]. | |
| 125 | 132 | ||
| 126 | - | --color[=<when>]:: | |
| 133 | + | `--color[=<when>]`:: | |
| 127 | 134 | Respect any colors specified in the `--format` option. The | |
| 128 | - | `<when>` field must be one of `always`, `never`, or `auto` (if | |
| 129 | - | `<when>` is absent, behave as if `always` was given). | |
| 135 | + | _<when>_ field must be one of `always`, `never`, or `auto` (if | |
| 136 | + | _<when>_ is absent, behave as if `always` was given). | |
| 130 | 137 | ||
| 131 | - | -i:: | |
| 132 | - | --ignore-case:: | |
| 138 | + | `-i`:: | |
| 139 | + | `--ignore-case`:: | |
| 133 | 140 | Sorting and filtering tags are case insensitive. | |
| 134 | 141 | ||
| 135 | - | --omit-empty:: | |
| 142 | + | `--omit-empty`:: | |
| 136 | 143 | Do not print a newline after formatted refs where the format expands | |
| 137 | 144 | to the empty string. | |
| 138 | 145 | ||
| 139 | - | --column[=<options>]:: | |
| 140 | - | --no-column:: | |
| 146 | + | `--column[=<options>]`:: | |
| 147 | + | `--no-column`:: | |
| 141 | 148 | Display tag listing in columns. See configuration variable | |
| 142 | 149 | `column.tag` for option syntax. `--column` and `--no-column` | |
| 143 | - | without options are equivalent to 'always' and 'never' respectively. | |
| 150 | + | without options are equivalent to `always` and `never` respectively. | |
| 144 | 151 | + | |
| 145 | 152 | This option is only applicable when listing tags without annotation lines. | |
| 146 | 153 | ||
| 147 | - | --contains [<commit>]:: | |
| 148 | - | Only list tags which contain the specified commit (HEAD if not | |
| 154 | + | `--contains [<commit>]`:: | |
| 155 | + | Only list tags which contain _<commit>_ (`HEAD` if not | |
| 149 | 156 | specified). Implies `--list`. | |
| 150 | 157 | ||
| 151 | - | --no-contains [<commit>]:: | |
| 152 | - | Only list tags which don't contain the specified commit (HEAD if | |
| 158 | + | `--no-contains [<commit>]`:: | |
| 159 | + | Only list tags which don't contain _<commit>_ (`HEAD` if | |
| 153 | 160 | not specified). Implies `--list`. | |
| 154 | 161 | ||
| 155 | - | --merged [<commit>]:: | |
| 156 | - | Only list tags whose commits are reachable from the specified | |
| 157 | - | commit (`HEAD` if not specified). | |
| 162 | + | `--merged [<commit>]`:: | |
| 163 | + | Only list tags whose commits are reachable from | |
| 164 | + | _<commit>_ (`HEAD` if not specified). | |
| 158 | 165 | ||
| 159 | - | --no-merged [<commit>]:: | |
| 160 | - | Only list tags whose commits are not reachable from the specified | |
| 161 | - | commit (`HEAD` if not specified). | |
| 166 | + | `--no-merged [<commit>]`:: | |
| 167 | + | Only list tags whose commits are not reachable from | |
| 168 | + | _<commit>_ (`HEAD` if not specified). | |
| 162 | 169 | ||
| 163 | - | --points-at <object>:: | |
| 164 | - | Only list tags of the given object (HEAD if not | |
| 170 | + | `--points-at [<object>]`:: | |
| 171 | + | Only list tags of _<object>_ (`HEAD` if not | |
| 165 | 172 | specified). Implies `--list`. | |
| 166 | 173 | ||
| 167 | - | -m <msg>:: | |
| 168 | - | --message=<msg>:: | |
| 169 | - | Use the given tag message (instead of prompting). | |
| 174 | + | `-m <msg>`:: | |
| 175 | + | `--message=<msg>`:: | |
| 176 | + | Use _<msg>_ (instead of prompting). | |
| 170 | 177 | If multiple `-m` options are given, their values are | |
| 171 | 178 | concatenated as separate paragraphs. | |
| 172 | 179 | Implies `-a` if none of `-a`, `-s`, or `-u <key-id>` | |
| 173 | 180 | is given. | |
| 174 | 181 | ||
| 175 | - | -F <file>:: | |
| 176 | - | --file=<file>:: | |
| 177 | - | Take the tag message from the given file. Use '-' to | |
| 182 | + | `-F <file>`:: | |
| 183 | + | `--file=<file>`:: | |
| 184 | + | Take the tag message from _<file>_. Use `-` to | |
| 178 | 185 | read the message from the standard input. | |
| 179 | 186 | Implies `-a` if none of `-a`, `-s`, or `-u <key-id>` | |
| 180 | 187 | is given. | |
| 181 | 188 | ||
| 182 | - | --trailer <token>[(=|:)<value>]:: | |
| 183 | - | Specify a (<token>, <value>) pair that should be applied as a | |
| 189 | + | `--trailer <token>[(=|:)<value>]`:: | |
| 190 | + | Specify a (_<token>_, _<value>_) pair that should be applied as a | |
| 184 | 191 | trailer. (e.g. `git tag --trailer "Custom-Key: value"` | |
| 185 | 192 | will add a "Custom-Key" trailer to the tag message.) | |
| 186 | 193 | The `trailer.*` configuration variables | |
| @@ -190,58 +197,68 @@ This option is only applicable when listing tags without annotation lines. | |||
| 190 | 197 | The trailers can be extracted in `git tag --list`, using | |
| 191 | 198 | `--format="%(trailers)"` placeholder. | |
| 192 | 199 | ||
| 193 | - | -e:: | |
| 194 | - | --edit:: | |
| 195 | - | The message taken from file with `-F` and command line with | |
| 196 | - | `-m` are usually used as the tag message unmodified. | |
| 197 | - | This option lets you further edit the message taken from these sources. | |
| 200 | + | `-e`:: | |
| 201 | + | `--edit`:: | |
| 202 | + | Let further edit the message taken from file with `-F` and command line with | |
| 203 | + | `-m`. | |
| 198 | 204 | ||
| 199 | - | --cleanup=<mode>:: | |
| 200 | - | This option sets how the tag message is cleaned up. | |
| 201 | - | The '<mode>' can be one of 'verbatim', 'whitespace' and 'strip'. The | |
| 202 | - | 'strip' mode is default. The 'verbatim' mode does not change message at | |
| 203 | - | all, 'whitespace' removes just leading/trailing whitespace lines and | |
| 204 | - | 'strip' removes both whitespace and commentary. | |
| 205 | + | `--cleanup=<mode>`:: | |
| 206 | + | Set how the tag message is cleaned up. | |
| 207 | + | The _<mode>_ can be one of `verbatim`, `whitespace` and `strip`. The | |
| 208 | + | `strip` mode is default. The `verbatim` mode does not change message at | |
| 209 | + | all, `whitespace` removes just leading/trailing whitespace lines and | |
| 210 | + | `strip` removes both whitespace and commentary. | |
| 205 | 211 | ||
| 206 | - | --create-reflog:: | |
| 212 | + | `--create-reflog`:: | |
| 207 | 213 | Create a reflog for the tag. To globally enable reflogs for tags, see | |
| 208 | 214 | `core.logAllRefUpdates` in linkgit:git-config[1]. | |
| 209 | 215 | The negated form `--no-create-reflog` only overrides an earlier | |
| 210 | 216 | `--create-reflog`, but currently does not negate the setting of | |
| 211 | 217 | `core.logAllRefUpdates`. | |
| 212 | 218 | ||
| 213 | - | --format=<format>:: | |
| 219 | + | `--format=<format>`:: | |
| 214 | 220 | A string that interpolates `%(fieldname)` from a tag ref being shown | |
| 215 | 221 | and the object it points at. The format is the same as | |
| 216 | 222 | that of linkgit:git-for-each-ref[1]. When unspecified, | |
| 217 | 223 | defaults to `%(refname:strip=2)`. | |
| 218 | 224 | ||
| 219 | - | <tagname>:: | |
| 225 | + | _<tagname>_:: | |
| 220 | 226 | The name of the tag to create, delete, or describe. | |
| 221 | 227 | The new tag name must pass all checks defined by | |
| 222 | 228 | linkgit:git-check-ref-format[1]. Some of these checks | |
| 223 | 229 | may restrict the characters allowed in a tag name. | |
| 224 | 230 | ||
| 225 | - | <commit>:: | |
| 226 | - | <object>:: | |
| 231 | + | _<commit>_:: | |
| 232 | + | _<object>_:: | |
| 227 | 233 | The object that the new tag will refer to, usually a commit. | |
| 228 | - | Defaults to HEAD. | |
| 234 | + | Defaults to `HEAD`. | |
| 229 | 235 | ||
| 230 | 236 | CONFIGURATION | |
| 231 | 237 | ------------- | |
| 232 | - | By default, 'git tag' in sign-with-default mode (-s) will use your | |
| 238 | + | By default, `git tag` in sign-with-default mode (`-s`) will use your | |
| 233 | 239 | committer identity (of the form `Your Name <your@email.address>`) to | |
| 234 | 240 | find a key. If you want to use a different default key, you can specify | |
| 235 | 241 | it in the repository configuration as follows: | |
| 236 | 242 | ||
| 237 | 243 | ------------------------------------- | |
| 238 | 244 | [user] | |
| 239 | - | signingKey = <gpg-key-id> | |
| 245 | + | signingKey = <key-id> | |
| 240 | 246 | ------------------------------------- | |
| 241 | 247 | ||
| 248 | + | The signing backend can be chosen via the `gpg.format` configuration | |
| 249 | + | variable, which defaults to `openpgp`. See linkgit:git-config[1] | |
| 250 | + | for a list of other supported formats. | |
| 251 | + | ||
| 252 | + | The path to the program used for each signing backend can be specified | |
| 253 | + | with the `gpg.<format>.program` configuration variable. For the | |
| 254 | + | `openpgp` backend, `gpg.program` can be used as a synonym for | |
| 255 | + | `gpg.openpgp.program`. See linkgit:git-config[1] for details. | |
| 256 | + | ||
| 242 | 257 | `pager.tag` is only respected when listing tags, i.e., when `-l` is | |
| 243 | 258 | used or implied. The default is to use a pager. | |
| 244 | - | See linkgit:git-config[1]. | |
| 259 | + | ||
| 260 | + | See linkgit:git-config[1] for more details and other configuration | |
| 261 | + | variables. | |
| 245 | 262 | ||
| 246 | 263 | DISCUSSION | |
| 247 | 264 | ---------- | |
| @@ -252,7 +269,7 @@ On Re-tagging | |||
| 252 | 269 | What should you do when you tag a wrong commit and you would | |
| 253 | 270 | want to re-tag? | |
| 254 | 271 | ||
| 255 | - | If you never pushed anything out, just re-tag it. Use "-f" to | |
| 272 | + | If you never pushed anything out, just re-tag it. Use `-f` to | |
| 256 | 273 | replace the old one. And you're done. | |
| 257 | 274 | ||
| 258 | 275 | But if you have pushed things out (or others could just read | |
| @@ -268,12 +285,12 @@ the old tag. In that case you can do one of two things: | |||
| 268 | 285 | ||
| 269 | 286 | . The insane thing. | |
| 270 | 287 | You really want to call the new version "X" too, 'even though' | |
| 271 | - | others have already seen the old one. So just use 'git tag -f' | |
| 288 | + | others have already seen the old one. So just use `git tag -f` | |
| 272 | 289 | again, as if you hadn't already published the old one. | |
| 273 | 290 | ||
| 274 | 291 | However, Git does *not* (and it should not) change tags behind | |
| 275 | 292 | users back. So if somebody already got the old tag, doing a | |
| 276 | - | 'git pull' on your tree shouldn't just make them overwrite the old | |
| 293 | + | `git pull` on your tree shouldn't just make them overwrite the old | |
| 277 | 294 | one. | |
| 278 | 295 | ||
| 279 | 296 | If somebody got a release tag from you, you cannot just change | |
| @@ -325,7 +342,7 @@ private anchor point tags from the other person. | |||
| 325 | 342 | ||
| 326 | 343 | Often, "please pull" messages on the mailing list just provide | |
| 327 | 344 | two pieces of information: a repo URL and a branch name; this | |
| 328 | - | is designed to be easily cut&pasted at the end of a 'git fetch' | |
| 345 | + | is designed to be easily cut&pasted at the end of a `git fetch` | |
| 329 | 346 | command line: | |
| 330 | 347 | ||
| 331 | 348 | ------------ | |
| @@ -403,6 +420,14 @@ FILES | |||
| 403 | 420 | user in an editor session will be available in this file, but | |
| 404 | 421 | may be overwritten by the next invocation of `git tag`. | |
| 405 | 422 | ||
| 423 | + | CONFIGURATION | |
| 424 | + | ------------- | |
| 425 | + | ||
| 426 | + | include::includes/cmd-config-section-all.adoc[] | |
| 427 | + | ||
| 428 | + | :git-tag: 1 | |
| 429 | + | include::config/tag.adoc[] | |
| 430 | + | ||
| 406 | 431 | NOTES | |
| 407 | 432 | ----- | |
| 408 | 433 | ||
modified Documentation/git-update-index.adoc
| @@ -86,7 +86,8 @@ OPTIONS | |||
| 86 | 86 | --chmod=(+|-)x:: | |
| 87 | 87 | Set the execute permissions on the updated files. | |
| 88 | 88 | ||
| 89 | - | --[no-]assume-unchanged:: | |
| 89 | + | --assume-unchanged:: | |
| 90 | + | --no-assume-unchanged:: | |
| 90 | 91 | When this flag is specified, the object names recorded | |
| 91 | 92 | for the paths are not updated. Instead, this option | |
| 92 | 93 | sets/unsets the "assume unchanged" bit for the | |
| @@ -108,18 +109,21 @@ you will need to handle the situation manually. | |||
| 108 | 109 | Like `--refresh`, but checks stat information unconditionally, | |
| 109 | 110 | without regard to the "assume unchanged" setting. | |
| 110 | 111 | ||
| 111 | - | --[no-]skip-worktree:: | |
| 112 | + | --skip-worktree:: | |
| 113 | + | --no-skip-worktree:: | |
| 112 | 114 | When one of these flags is specified, the object names recorded | |
| 113 | 115 | for the paths are not updated. Instead, these options | |
| 114 | 116 | set and unset the "skip-worktree" bit for the paths. See | |
| 115 | 117 | section "Skip-worktree bit" below for more information. | |
| 116 | 118 | ||
| 117 | 119 | ||
| 118 | - | --[no-]ignore-skip-worktree-entries:: | |
| 120 | + | --ignore-skip-worktree-entries:: | |
| 121 | + | --no-ignore-skip-worktree-entries:: | |
| 119 | 122 | Do not remove skip-worktree (AKA "index-only") entries even when | |
| 120 | 123 | the `--remove` option was specified. | |
| 121 | 124 | ||
| 122 | - | --[no-]fsmonitor-valid:: | |
| 125 | + | --fsmonitor-valid:: | |
| 126 | + | --no-fsmonitor-valid:: | |
| 123 | 127 | When one of these flags is specified, the object names recorded | |
| 124 | 128 | for the paths are not updated. Instead, these options | |
| 125 | 129 | set and unset the "fsmonitor valid" bit for the paths. See | |
modified Documentation/git-update-ref.adoc
| @@ -119,7 +119,7 @@ verify:: | |||
| 119 | 119 | Verify <ref> against <old-oid> but do not change it. If | |
| 120 | 120 | <old-oid> is zero or missing, the ref must not exist. | |
| 121 | 121 | ||
| 122 | - | symref-create: | |
| 122 | + | symref-create:: | |
| 123 | 123 | Create symbolic ref <ref> with <new-target> after verifying that | |
| 124 | 124 | it does not exist. | |
| 125 | 125 | ||
modified Documentation/git-upload-pack.adoc
| @@ -25,7 +25,8 @@ repository. For push operations, see 'git send-pack'. | |||
| 25 | 25 | OPTIONS | |
| 26 | 26 | ------- | |
| 27 | 27 | ||
| 28 | - | --[no-]strict:: | |
| 28 | + | --strict:: | |
| 29 | + | --no-strict:: | |
| 29 | 30 | Do not try <directory>/.git/ if <directory> is not a Git directory. | |
| 30 | 31 | ||
| 31 | 32 | --timeout=<n>:: | |
added Documentation/git-url-parse.adoc mode 100644
| @@ -0,0 +1,80 @@ | |||
| 1 | + | git-url-parse(1) | |
| 2 | + | ================ | |
| 3 | + | ||
| 4 | + | NAME | |
| 5 | + | ---- | |
| 6 | + | git-url-parse - Parse and extract git URL components | |
| 7 | + | ||
| 8 | + | SYNOPSIS | |
| 9 | + | -------- | |
| 10 | + | [synopsis] | |
| 11 | + | git url-parse [-c <component>] [--] <url>... | |
| 12 | + | ||
| 13 | + | DESCRIPTION | |
| 14 | + | ----------- | |
| 15 | + | ||
| 16 | + | Git supports many ways to specify URLs, some of them non-standard. | |
| 17 | + | For example, git supports the scp style [user@]host:[path] format. | |
| 18 | + | This command eases interoperability with git URLs by enabling the | |
| 19 | + | parsing and extraction of the components of all git URLs. | |
| 20 | + | ||
| 21 | + | Any syntactically valid URL is parsed, even if the scheme is not one | |
| 22 | + | git supports for fetching or pushing. | |
| 23 | + | ||
| 24 | + | OPTIONS | |
| 25 | + | ------- | |
| 26 | + | ||
| 27 | + | `-c <component>`:: | |
| 28 | + | `--component <component>`:: | |
| 29 | + | Extract the _<component>_ component from the given Git URLs. | |
| 30 | + | _<component>_ can be one of: | |
| 31 | + | `scheme`, `user`, `password`, `host`, `port`, `path`. | |
| 32 | + | ||
| 33 | + | OUTPUT | |
| 34 | + | ------ | |
| 35 | + | ||
| 36 | + | When `--component` is given, the requested component of each URL | |
| 37 | + | is printed on its own line, in the order the URLs were given. If | |
| 38 | + | the URL has no such component (for example, a port in a URL that | |
| 39 | + | does not specify one), an empty line is printed in its place. | |
| 40 | + | ||
| 41 | + | When `--component` is not given, no output is produced. The exit | |
| 42 | + | status is zero if every URL parses successfully and non-zero | |
| 43 | + | otherwise, allowing the command to be used purely as a validator. | |
| 44 | + | ||
| 45 | + | EXAMPLES | |
| 46 | + | -------- | |
| 47 | + | ||
| 48 | + | * Print the host name: | |
| 49 | + | + | |
| 50 | + | ------------ | |
| 51 | + | $ git url-parse --component host https://example.com/user/repo | |
| 52 | + | example.com | |
| 53 | + | ------------ | |
| 54 | + | ||
| 55 | + | * Print the path: | |
| 56 | + | + | |
| 57 | + | ------------ | |
| 58 | + | $ git url-parse --component path https://example.com/user/repo | |
| 59 | + | /user/repo | |
| 60 | + | $ git url-parse --component path example.com:~user/repo | |
| 61 | + | ~user/repo | |
| 62 | + | $ git url-parse --component path example.com:user/repo | |
| 63 | + | /user/repo | |
| 64 | + | ------------ | |
| 65 | + | ||
| 66 | + | * Validate URLs without outputting anything: | |
| 67 | + | + | |
| 68 | + | ------------ | |
| 69 | + | $ git url-parse https://example.com/user/repo example.com:~user/repo | |
| 70 | + | ------------ | |
| 71 | + | ||
| 72 | + | SEE ALSO | |
| 73 | + | -------- | |
| 74 | + | linkgit:git-clone[1], | |
| 75 | + | linkgit:git-fetch[1], | |
| 76 | + | linkgit:git-config[1] | |
| 77 | + | ||
| 78 | + | GIT | |
| 79 | + | --- | |
| 80 | + | Part of the linkgit:git[1] suite | |
modified Documentation/git-var.adoc
| @@ -22,7 +22,7 @@ OPTIONS | |||
| 22 | 22 | Display the logical variables. In addition, all the | |
| 23 | 23 | variables of the Git configuration file .git/config are listed | |
| 24 | 24 | as well. (However, the configuration variables listing functionality | |
| 25 | - | is deprecated in favor of `git config -l`.) | |
| 25 | + | is deprecated in favor of `git config list`.) | |
| 26 | 26 | ||
| 27 | 27 | EXAMPLES | |
| 28 | 28 | -------- | |
modified Documentation/git-whatchanged.adoc
| @@ -8,8 +8,14 @@ git-whatchanged - Show logs with differences each commit introduces | |||
| 8 | 8 | ||
| 9 | 9 | SYNOPSIS | |
| 10 | 10 | -------- | |
| 11 | - | [verse] | |
| 12 | - | 'git whatchanged' <option>... | |
| 11 | + | [synopsis] | |
| 12 | + | git whatchanged <option>... | |
| 13 | + | ||
| 14 | + | WARNING | |
| 15 | + | ------- | |
| 16 | + | `git whatchanged` has been deprecated and is scheduled for removal in | |
| 17 | + | a future version of Git, as it is merely `git log` with different | |
| 18 | + | defaults. | |
| 13 | 19 | ||
| 14 | 20 | DESCRIPTION | |
| 15 | 21 | ----------- | |
| @@ -18,7 +24,11 @@ Shows commit logs and diff output each commit introduces. | |||
| 18 | 24 | ||
| 19 | 25 | New users are encouraged to use linkgit:git-log[1] instead. The | |
| 20 | 26 | `whatchanged` command is essentially the same as linkgit:git-log[1] | |
| 21 | - | but defaults to showing the raw format diff output and skipping merges. | |
| 27 | + | but defaults to showing the raw format diff output and skipping merges: | |
| 28 | + | ||
| 29 | + | ---- | |
| 30 | + | git log --raw --no-merges | |
| 31 | + | ---- | |
| 22 | 32 | ||
| 23 | 33 | The command is primarily kept for historical reasons; fingers of | |
| 24 | 34 | many people who learned Git long before `git log` was invented by | |
modified Documentation/git-worktree.adoc
| @@ -8,16 +8,16 @@ git-worktree - Manage multiple working trees | |||
| 8 | 8 | ||
| 9 | 9 | SYNOPSIS | |
| 10 | 10 | -------- | |
| 11 | - | [verse] | |
| 12 | - | 'git worktree add' [-f] [--detach] [--checkout] [--lock [--reason <string>]] | |
| 13 | - | [--orphan] [(-b | -B) <new-branch>] <path> [<commit-ish>] | |
| 14 | - | 'git worktree list' [-v | --porcelain [-z]] | |
| 15 | - | 'git worktree lock' [--reason <string>] <worktree> | |
| 16 | - | 'git worktree move' <worktree> <new-path> | |
| 17 | - | 'git worktree prune' [-n] [-v] [--expire <expire>] | |
| 18 | - | 'git worktree remove' [-f] <worktree> | |
| 19 | - | 'git worktree repair' [<path>...] | |
| 20 | - | 'git worktree unlock' <worktree> | |
| 11 | + | [synopsis] | |
| 12 | + | git worktree add [-f] [--detach] [--checkout] [--lock [--reason <string>]] | |
| 13 | + | [--orphan] [(-b | -B) <new-branch>] <path> [<commit-ish>] | |
| 14 | + | git worktree list [-v | --porcelain [-z]] | |
| 15 | + | git worktree lock [--reason <string>] <worktree> | |
| 16 | + | git worktree move <worktree> <new-path> | |
| 17 | + | git worktree prune [-n] [-v] [--expire <expire>] | |
| 18 | + | git worktree remove [-f] <worktree> | |
| 19 | + | git worktree repair [<path>...] | |
| 20 | + | git worktree unlock <worktree> | |
| 21 | 21 | ||
| 22 | 22 | DESCRIPTION | |
| 23 | 23 | ----------- | |
| @@ -37,7 +37,7 @@ zero or more linked worktrees. When you are done with a linked worktree, | |||
| 37 | 37 | remove it with `git worktree remove`. | |
| 38 | 38 | ||
| 39 | 39 | In its simplest form, `git worktree add <path>` automatically creates a | |
| 40 | - | new branch whose name is the final component of `<path>`, which is | |
| 40 | + | new branch whose name is the final component of _<path>_, which is | |
| 41 | 41 | convenient if you plan to work on a new topic. For instance, `git | |
| 42 | 42 | worktree add ../hotfix` creates new branch `hotfix` and checks it out at | |
| 43 | 43 | path `../hotfix`. To instead work on an existing branch in a new worktree, | |
| @@ -63,16 +63,16 @@ locked. | |||
| 63 | 63 | ||
| 64 | 64 | COMMANDS | |
| 65 | 65 | -------- | |
| 66 | - | add <path> [<commit-ish>]:: | |
| 66 | + | `add <path> [<commit-ish>]`:: | |
| 67 | 67 | ||
| 68 | - | Create a worktree at `<path>` and checkout `<commit-ish>` into it. The new worktree | |
| 68 | + | Create a worktree at _<path>_ and checkout _<commit-ish>_ into it. The new worktree | |
| 69 | 69 | is linked to the current repository, sharing everything except per-worktree | |
| 70 | - | files such as `HEAD`, `index`, etc. As a convenience, `<commit-ish>` may | |
| 70 | + | files such as `HEAD`, `index`, etc. As a convenience, _<commit-ish>_ may | |
| 71 | 71 | be a bare "`-`", which is synonymous with `@{-1}`. | |
| 72 | 72 | + | |
| 73 | - | If `<commit-ish>` is a branch name (call it `<branch>`) and is not found, | |
| 73 | + | If _<commit-ish>_ is a branch name (call it _<branch>_) and is not found, | |
| 74 | 74 | and neither `-b` nor `-B` nor `--detach` are used, but there does | |
| 75 | - | exist a tracking branch in exactly one remote (call it `<remote>`) | |
| 75 | + | exist a tracking branch in exactly one remote (call it _<remote>_) | |
| 76 | 76 | with a matching name, treat as equivalent to: | |
| 77 | 77 | + | |
| 78 | 78 | ------------ | |
| @@ -81,32 +81,32 @@ $ git worktree add --track -b <branch> <path> <remote>/<branch> | |||
| 81 | 81 | + | |
| 82 | 82 | If the branch exists in multiple remotes and one of them is named by | |
| 83 | 83 | the `checkout.defaultRemote` configuration variable, we'll use that | |
| 84 | - | one for the purposes of disambiguation, even if the `<branch>` isn't | |
| 84 | + | one for the purposes of disambiguation, even if the _<branch>_ isn't | |
| 85 | 85 | unique across all remotes. Set it to | |
| 86 | 86 | e.g. `checkout.defaultRemote=origin` to always checkout remote | |
| 87 | - | branches from there if `<branch>` is ambiguous but exists on the | |
| 87 | + | branches from there if _<branch>_ is ambiguous but exists on the | |
| 88 | 88 | `origin` remote. See also `checkout.defaultRemote` in | |
| 89 | 89 | linkgit:git-config[1]. | |
| 90 | 90 | + | |
| 91 | - | If `<commit-ish>` is omitted and neither `-b` nor `-B` nor `--detach` used, | |
| 91 | + | If _<commit-ish>_ is omitted and neither `-b` nor `-B` nor `--detach` used, | |
| 92 | 92 | then, as a convenience, the new worktree is associated with a branch (call | |
| 93 | - | it `<branch>`) named after `$(basename <path>)`. If `<branch>` doesn't | |
| 93 | + | it _<branch>_) named after `$(basename <path>)`. If _<branch>_ doesn't | |
| 94 | 94 | exist, a new branch based on `HEAD` is automatically created as if | |
| 95 | - | `-b <branch>` was given. If `<branch>` does exist, it will be checked out | |
| 95 | + | `-b <branch>` was given. If _<branch>_ does exist, it will be checked out | |
| 96 | 96 | in the new worktree, if it's not checked out anywhere else, otherwise the | |
| 97 | 97 | command will refuse to create the worktree (unless `--force` is used). | |
| 98 | 98 | + | |
| 99 | - | If `<commit-ish>` is omitted, neither `--detach`, or `--orphan` is | |
| 99 | + | If _<commit-ish>_ is omitted, neither `--detach`, or `--orphan` is | |
| 100 | 100 | used, and there are no valid local branches (or remote branches if | |
| 101 | 101 | `--guess-remote` is specified) then, as a convenience, the new worktree is | |
| 102 | - | associated with a new unborn branch named `<branch>` (after | |
| 102 | + | associated with a new unborn branch named _<branch>_ (after | |
| 103 | 103 | `$(basename <path>)` if neither `-b` or `-B` is used) as if `--orphan` was | |
| 104 | 104 | passed to the command. In the event the repository has a remote and | |
| 105 | 105 | `--guess-remote` is used, but no remote or local branches exist, then the | |
| 106 | 106 | command fails with a warning reminding the user to fetch from their remote | |
| 107 | - | first (or override by using `-f/--force`). | |
| 107 | + | first (or override by using `-f`/`--force`). | |
| 108 | 108 | ||
| 109 | - | list:: | |
| 109 | + | `list`:: | |
| 110 | 110 | ||
| 111 | 111 | List details of each worktree. The main worktree is listed first, | |
| 112 | 112 | followed by each of the linked worktrees. The output details include | |
| @@ -115,32 +115,38 @@ branch currently checked out (or "detached HEAD" if none), "locked" if | |||
| 115 | 115 | the worktree is locked, "prunable" if the worktree can be pruned by the | |
| 116 | 116 | `prune` command. | |
| 117 | 117 | ||
| 118 | - | lock:: | |
| 118 | + | `lock`:: | |
| 119 | 119 | ||
| 120 | 120 | If a worktree is on a portable device or network share which is not always | |
| 121 | 121 | mounted, lock it to prevent its administrative files from being pruned | |
| 122 | 122 | automatically. This also prevents it from being moved or deleted. | |
| 123 | 123 | Optionally, specify a reason for the lock with `--reason`. | |
| 124 | 124 | ||
| 125 | - | move:: | |
| 125 | + | `move`:: | |
| 126 | 126 | ||
| 127 | 127 | Move a worktree to a new location. Note that the main worktree or linked | |
| 128 | 128 | worktrees containing submodules cannot be moved with this command. (The | |
| 129 | 129 | `git worktree repair` command, however, can reestablish the connection | |
| 130 | 130 | with linked worktrees if you move the main worktree manually.) | |
| 131 | 131 | ||
| 132 | - | prune:: | |
| 132 | + | `prune`:: | |
| 133 | 133 | ||
| 134 | - | Prune worktree information in `$GIT_DIR/worktrees`. | |
| 134 | + | Remove worktree information in `$GIT_DIR/worktrees` for worktrees | |
| 135 | + | whose working trees are missing. Useful after manually removing | |
| 136 | + | a working tree that is no longer needed (but use "git worktree | |
| 137 | + | remove" next time you want to do so). Also, if you _moved_ a | |
| 138 | + | working tree elsewhere causing the worktree information to become | |
| 139 | + | dangling, see "git worktree repair" to reconnect the worktree to | |
| 140 | + | the new working tree location. | |
| 135 | 141 | ||
| 136 | - | remove:: | |
| 142 | + | `remove`:: | |
| 137 | 143 | ||
| 138 | 144 | Remove a worktree. Only clean worktrees (no untracked files and no | |
| 139 | 145 | modification in tracked files) can be removed. Unclean worktrees or ones | |
| 140 | 146 | with submodules can be removed with `--force`. The main worktree cannot be | |
| 141 | 147 | removed. | |
| 142 | 148 | ||
| 143 | - | repair [<path>...]:: | |
| 149 | + | `repair [<path>...]`:: | |
| 144 | 150 | ||
| 145 | 151 | Repair worktree administrative files, if possible, if they have become | |
| 146 | 152 | corrupted or outdated due to external factors. | |
| @@ -154,69 +160,72 @@ Similarly, if the working tree for a linked worktree is moved without | |||
| 154 | 160 | using `git worktree move`, the main worktree (or bare repository) will be | |
| 155 | 161 | unable to locate it. Running `repair` within the recently-moved worktree | |
| 156 | 162 | will reestablish the connection. If multiple linked worktrees are moved, | |
| 157 | - | running `repair` from any worktree with each tree's new `<path>` as an | |
| 163 | + | running `repair` from any worktree with each tree's new _<path>_ as an | |
| 158 | 164 | argument, will reestablish the connection to all the specified paths. | |
| 159 | 165 | + | |
| 160 | 166 | If both the main worktree and linked worktrees have been moved or copied manually, | |
| 161 | - | then running `repair` in the main worktree and specifying the new `<path>` | |
| 167 | + | then running `repair` in the main worktree and specifying the new _<path>_ | |
| 162 | 168 | of each linked worktree will reestablish all connections in both | |
| 163 | 169 | directions. | |
| 164 | 170 | ||
| 165 | - | unlock:: | |
| 171 | + | `unlock`:: | |
| 166 | 172 | ||
| 167 | 173 | Unlock a worktree, allowing it to be pruned, moved or deleted. | |
| 168 | 174 | ||
| 169 | 175 | OPTIONS | |
| 170 | 176 | ------- | |
| 171 | 177 | ||
| 172 | - | -f:: | |
| 173 | - | --force:: | |
| 178 | + | `-f`:: | |
| 179 | + | `--force`:: | |
| 174 | 180 | By default, `add` refuses to create a new worktree when | |
| 175 | - | `<commit-ish>` is a branch name and is already checked out by | |
| 176 | - | another worktree, or if `<path>` is already assigned to some | |
| 177 | - | worktree but is missing (for instance, if `<path>` was deleted | |
| 181 | + | _<commit-ish>_ is a branch name and is already checked out by | |
| 182 | + | another worktree, or if _<path>_ is already assigned to some | |
| 183 | + | worktree but is missing (for instance, if _<path>_ was deleted | |
| 178 | 184 | manually). This option overrides these safeguards. To add a missing but | |
| 179 | 185 | locked worktree path, specify `--force` twice. | |
| 180 | 186 | + | |
| 181 | 187 | `move` refuses to move a locked worktree unless `--force` is specified | |
| 182 | 188 | twice. If the destination is already assigned to some other worktree but is | |
| 183 | - | missing (for instance, if `<new-path>` was deleted manually), then `--force` | |
| 189 | + | missing (for instance, if _<new-path>_ was deleted manually), then `--force` | |
| 184 | 190 | allows the move to proceed; use `--force` twice if the destination is locked. | |
| 185 | 191 | + | |
| 186 | 192 | `remove` refuses to remove an unclean worktree unless `--force` is used. | |
| 187 | 193 | To remove a locked worktree, specify `--force` twice. | |
| 188 | 194 | ||
| 189 | - | -b <new-branch>:: | |
| 190 | - | -B <new-branch>:: | |
| 191 | - | With `add`, create a new branch named `<new-branch>` starting at | |
| 192 | - | `<commit-ish>`, and check out `<new-branch>` into the new worktree. | |
| 193 | - | If `<commit-ish>` is omitted, it defaults to `HEAD`. | |
| 195 | + | `-b <new-branch>`:: | |
| 196 | + | `-B <new-branch>`:: | |
| 197 | + | With `add`, create a new branch named _<new-branch>_ starting at | |
| 198 | + | _<commit-ish>_, and check out _<new-branch>_ into the new worktree. | |
| 199 | + | If _<commit-ish>_ is omitted, it defaults to `HEAD`. | |
| 194 | 200 | By default, `-b` refuses to create a new branch if it already | |
| 195 | - | exists. `-B` overrides this safeguard, resetting `<new-branch>` to | |
| 196 | - | `<commit-ish>`. | |
| 201 | + | exists. `-B` overrides this safeguard, resetting _<new-branch>_ to | |
| 202 | + | _<commit-ish>_. | |
| 197 | 203 | ||
| 198 | - | -d:: | |
| 199 | - | --detach:: | |
| 204 | + | `-d`:: | |
| 205 | + | `--detach`:: | |
| 200 | 206 | With `add`, detach `HEAD` in the new worktree. See "DETACHED HEAD" | |
| 201 | 207 | in linkgit:git-checkout[1]. | |
| 202 | 208 | ||
| 203 | - | --[no-]checkout:: | |
| 204 | - | By default, `add` checks out `<commit-ish>`, however, `--no-checkout` can | |
| 209 | + | `--checkout`:: | |
| 210 | + | `--no-checkout`:: | |
| 211 | + | By default, `add` checks out _<commit-ish>_, however, `--no-checkout` can | |
| 205 | 212 | be used to suppress checkout in order to make customizations, | |
| 206 | 213 | such as configuring sparse-checkout. See "Sparse checkout" | |
| 207 | 214 | in linkgit:git-read-tree[1]. | |
| 208 | 215 | ||
| 209 | - | --[no-]guess-remote:: | |
| 210 | - | With `worktree add <path>`, without `<commit-ish>`, instead | |
| 216 | + | `--guess-remote`:: | |
| 217 | + | `--no-guess-remote`:: | |
| 218 | + | With `worktree add <path>`, without _<commit-ish>_, instead | |
| 211 | 219 | of creating a new branch from `HEAD`, if there exists a tracking | |
| 212 | - | branch in exactly one remote matching the basename of `<path>`, | |
| 220 | + | branch in exactly one remote matching the basename of _<path>_, | |
| 213 | 221 | base the new branch on the remote-tracking branch, and mark | |
| 214 | 222 | the remote-tracking branch as "upstream" from the new branch. | |
| 215 | 223 | + | |
| 216 | 224 | This can also be set up as the default behaviour by using the | |
| 217 | 225 | `worktree.guessRemote` config option. | |
| 218 | 226 | ||
| 219 | - | --[no-]relative-paths:: | |
| 227 | + | `--relative-paths`:: | |
| 228 | + | `--no-relative-paths`:: | |
| 220 | 229 | Link worktrees using relative paths or absolute paths (default). | |
| 221 | 230 | Overrides the `worktree.useRelativePaths` config option, see | |
| 222 | 231 | linkgit:git-config[1]. | |
| @@ -224,59 +233,60 @@ This can also be set up as the default behaviour by using the | |||
| 224 | 233 | With `repair`, the linking files will be updated if there's an absolute/relative | |
| 225 | 234 | mismatch, even if the links are correct. | |
| 226 | 235 | ||
| 227 | - | --[no-]track:: | |
| 228 | - | When creating a new branch, if `<commit-ish>` is a branch, | |
| 236 | + | `--track`:: | |
| 237 | + | `--no-track`:: | |
| 238 | + | When creating a new branch, if _<commit-ish>_ is a branch, | |
| 229 | 239 | mark it as "upstream" from the new branch. This is the | |
| 230 | - | default if `<commit-ish>` is a remote-tracking branch. See | |
| 240 | + | default if _<commit-ish>_ is a remote-tracking branch. See | |
| 231 | 241 | `--track` in linkgit:git-branch[1] for details. | |
| 232 | 242 | ||
| 233 | - | --lock:: | |
| 243 | + | `--lock`:: | |
| 234 | 244 | Keep the worktree locked after creation. This is the | |
| 235 | 245 | equivalent of `git worktree lock` after `git worktree add`, | |
| 236 | 246 | but without a race condition. | |
| 237 | 247 | ||
| 238 | - | -n:: | |
| 239 | - | --dry-run:: | |
| 248 | + | `-n`:: | |
| 249 | + | `--dry-run`:: | |
| 240 | 250 | With `prune`, do not remove anything; just report what it would | |
| 241 | 251 | remove. | |
| 242 | 252 | ||
| 243 | - | --orphan:: | |
| 253 | + | `--orphan`:: | |
| 244 | 254 | With `add`, make the new worktree and index empty, associating | |
| 245 | - | the worktree with a new unborn branch named `<new-branch>`. | |
| 255 | + | the worktree with a new unborn branch named _<new-branch>_. | |
| 246 | 256 | ||
| 247 | - | --porcelain:: | |
| 257 | + | `--porcelain`:: | |
| 248 | 258 | With `list`, output in an easy-to-parse format for scripts. | |
| 249 | 259 | This format will remain stable across Git versions and regardless of user | |
| 250 | 260 | configuration. It is recommended to combine this with `-z`. | |
| 251 | 261 | See below for details. | |
| 252 | 262 | ||
| 253 | - | -z:: | |
| 254 | - | Terminate each line with a NUL rather than a newline when | |
| 263 | + | `-z`:: | |
| 264 | + | Terminate each line with a _NUL_ rather than a newline when | |
| 255 | 265 | `--porcelain` is specified with `list`. This makes it possible | |
| 256 | 266 | to parse the output when a worktree path contains a newline | |
| 257 | 267 | character. | |
| 258 | 268 | ||
| 259 | - | -q:: | |
| 260 | - | --quiet:: | |
| 269 | + | `-q`:: | |
| 270 | + | `--quiet`:: | |
| 261 | 271 | With `add`, suppress feedback messages. | |
| 262 | 272 | ||
| 263 | - | -v:: | |
| 264 | - | --verbose:: | |
| 273 | + | `-v`:: | |
| 274 | + | `--verbose`:: | |
| 265 | 275 | With `prune`, report all removals. | |
| 266 | 276 | + | |
| 267 | 277 | With `list`, output additional information about worktrees (see below). | |
| 268 | 278 | ||
| 269 | - | --expire <time>:: | |
| 270 | - | With `prune`, only expire unused worktrees older than `<time>`. | |
| 279 | + | `--expire <time>`:: | |
| 280 | + | With `prune`, only prune missing worktrees if older than _<time>_. | |
| 271 | 281 | + | |
| 272 | 282 | With `list`, annotate missing worktrees as prunable if they are older than | |
| 273 | - | `<time>`. | |
| 283 | + | _<time>_. | |
| 274 | 284 | ||
| 275 | - | --reason <string>:: | |
| 285 | + | `--reason <string>`:: | |
| 276 | 286 | With `lock` or with `add --lock`, an explanation why the worktree | |
| 277 | 287 | is locked. | |
| 278 | 288 | ||
| 279 | - | <worktree>:: | |
| 289 | + | _<worktree>_:: | |
| 280 | 290 | Worktrees can be identified by path, either relative or absolute. | |
| 281 | 291 | + | |
| 282 | 292 | If the last path components in the worktree's path is unique among | |
| @@ -518,6 +528,13 @@ $ popd | |||
| 518 | 528 | $ git worktree remove ../temp | |
| 519 | 529 | ------------ | |
| 520 | 530 | ||
| 531 | + | CONFIGURATION | |
| 532 | + | ------------- | |
| 533 | + | ||
| 534 | + | include::includes/cmd-config-section-all.adoc[] | |
| 535 | + | ||
| 536 | + | include::config/worktree.adoc[] | |
| 537 | + | ||
| 521 | 538 | BUGS | |
| 522 | 539 | ---- | |
| 523 | 540 | Multiple checkout in general is still experimental, and the support | |
modified Documentation/git.adoc
| @@ -219,7 +219,8 @@ If you just want to run git as if it was started in `<path>` then use | |||
| 219 | 219 | List commands by group. This is an internal/experimental | |
| 220 | 220 | option and may change or be removed in the future. Supported | |
| 221 | 221 | groups are: builtins, parseopt (builtin commands that use | |
| 222 | - | parse-options), main (all commands in libexec directory), | |
| 222 | + | parse-options), deprecated (deprecated builtins), | |
| 223 | + | main (all commands in libexec directory), | |
| 223 | 224 | others (all other commands in `$PATH` that have git- prefix), | |
| 224 | 225 | list-<category> (see categories in command-list.txt), | |
| 225 | 226 | nohelpers (exclude helper commands), alias and config | |
| @@ -234,7 +235,10 @@ GIT COMMANDS | |||
| 234 | 235 | ------------ | |
| 235 | 236 | ||
| 236 | 237 | We divide Git into high level ("porcelain") commands and low level | |
| 237 | - | ("plumbing") commands. | |
| 238 | + | ("plumbing") commands. For defining command aliases, see | |
| 239 | + | linkgit:git-config[1] and look for descriptions of `alias.*`. | |
| 240 | + | For installing custom "git" subcommands, see the description for | |
| 241 | + | the 'PATH' environment variable in this manual. | |
| 238 | 242 | ||
| 239 | 243 | High-level commands (porcelain) | |
| 240 | 244 | ------------------------------- | |
| @@ -486,6 +490,14 @@ System | |||
| 486 | 490 | `$HOMEDRIVE$HOMEPATH` if both `$HOMEDRIVE` and `$HOMEPATH` exist; | |
| 487 | 491 | otherwise `$USERPROFILE` if `$USERPROFILE` exists. | |
| 488 | 492 | ||
| 493 | + | `PATH`:: | |
| 494 | + | When a user runs 'git <command>' that is not part of the core Git programs | |
| 495 | + | (installed in GIT_EXEC_PATH), 'git-<command>' that is runnable by the user | |
| 496 | + | in a directory on `$PATH` is invoked. Argument passed after the command | |
| 497 | + | name are passed as-is to the program. To execute `git <foo>`, `git` finds | |
| 498 | + | command `<foo>` (either a core Git program found in 'GIT_EXEC_PATH', or a | |
| 499 | + | custom one in a directory on 'PATH'), before trying `foo` as an alias. | |
| 500 | + | ||
| 489 | 501 | The Git Repository | |
| 490 | 502 | ~~~~~~~~~~~~~~~~~~ | |
| 491 | 503 | These environment variables apply to 'all' core Git commands. Nb: it | |
| @@ -583,6 +595,11 @@ double-quotes and respecting backslash escapes. E.g., the value | |||
| 583 | 595 | repositories will be set to this value. The default is "files". | |
| 584 | 596 | See `--ref-format` in linkgit:git-init[1]. | |
| 585 | 597 | ||
| 598 | + | `GIT_REFERENCE_BACKEND`:: | |
| 599 | + | Specify which reference backend to be used along with its URI. | |
| 600 | + | See `extensions.refStorage` option in linkgit:git-config[1] for more | |
| 601 | + | details. Overrides the config variable when used. | |
| 602 | + | ||
| 586 | 603 | Git Commits | |
| 587 | 604 | ~~~~~~~~~~~ | |
| 588 | 605 | `GIT_AUTHOR_NAME`:: | |
| @@ -684,7 +701,7 @@ other | |||
| 684 | 701 | ||
| 685 | 702 | `GIT_PROGRESS_DELAY`:: | |
| 686 | 703 | A number controlling how many seconds to delay before showing | |
| 687 | - | optional progress indicators. Defaults to 2. | |
| 704 | + | optional progress indicators. Defaults to 1. | |
| 688 | 705 | ||
| 689 | 706 | `GIT_EDITOR`:: | |
| 690 | 707 | This environment variable overrides `$EDITOR` and `$VISUAL`. | |
modified Documentation/gitattributes.adoc
| @@ -911,7 +911,10 @@ patterns are available: | |||
| 911 | 911 | ||
| 912 | 912 | - `rust` suitable for source code in the Rust language. | |
| 913 | 913 | ||
| 914 | - | - `scheme` suitable for source code in the Scheme language. | |
| 914 | + | - `scheme` suitable for source code in most Lisp dialects, | |
| 915 | + | including Scheme, Emacs Lisp, Common Lisp, and Clojure. | |
| 916 | + | ||
| 917 | + | - `swift` suitable for source code in the Swift language. | |
| 915 | 918 | ||
| 916 | 919 | - `tex` suitable for source code for LaTeX documents. | |
| 917 | 920 | ||
modified Documentation/gitcli.adoc
| @@ -216,6 +216,20 @@ $ git describe --abbrev=10 HEAD # correct | |||
| 216 | 216 | $ git describe --abbrev 10 HEAD # NOT WHAT YOU MEANT | |
| 217 | 217 | ---------------------------- | |
| 218 | 218 | ||
| 219 | + | ||
| 220 | + | Magic filename options | |
| 221 | + | ~~~~~~~~~~~~~~~~~~~~~~ | |
| 222 | + | Options that take a filename allow a prefix `:(optional)`. For example: | |
| 223 | + | ||
| 224 | + | ---------------------------- | |
| 225 | + | git commit -F :(optional)COMMIT_EDITMSG | |
| 226 | + | # if COMMIT_EDITMSG does not exist, the above is equivalent to | |
| 227 | + | git commit | |
| 228 | + | ---------------------------- | |
| 229 | + | ||
| 230 | + | Like with configuration values, if the named file is missing Git behaves as if | |
| 231 | + | the option was not given at all. See "Values" in linkgit:git-config[1]. | |
| 232 | + | ||
| 219 | 233 | NOTES ON FREQUENTLY CONFUSED OPTIONS | |
| 220 | 234 | ------------------------------------ | |
| 221 | 235 | ||
modified Documentation/gitcredentials.adoc
| @@ -133,10 +133,6 @@ Popular helpers with OAuth support include: | |||
| 133 | 133 | ||
| 134 | 134 | - https://github.com/hickford/git-credential-oauth[git-credential-oauth] (cross platform, included in many Linux distributions) | |
| 135 | 135 | ||
| 136 | - | - https://github.com/AdityaGarg8/git-credential-email[git-credential-gmail] (cross platform, dedicated helper to authenticate Gmail accounts for linkgit:git-send-email[1]) | |
| 137 | - | ||
| 138 | - | - https://github.com/AdityaGarg8/git-credential-email[git-credential-outlook] (cross platform, dedicated helper to authenticate Microsoft Outlook accounts for linkgit:git-send-email[1]) | |
| 139 | - | ||
| 140 | 136 | CREDENTIAL CONTEXTS | |
| 141 | 137 | ------------------- | |
| 142 | 138 | ||
| @@ -154,9 +150,8 @@ pattern in the config file. For example, if you have this in your config file: | |||
| 154 | 150 | username = foo | |
| 155 | 151 | -------------------------------------- | |
| 156 | 152 | ||
| 157 | - | then we will match: both protocols are the same, both hosts are the same, and | |
| 158 | - | the "pattern" URL does not care about the path component at all. However, this | |
| 159 | - | context would not match: | |
| 153 | + | then we will match: both protocols are the same and both hosts are the same. | |
| 154 | + | However, this context would not match: | |
| 160 | 155 | ||
| 161 | 156 | -------------------------------------- | |
| 162 | 157 | [credential "https://kernel.org"] | |
| @@ -170,11 +165,11 @@ match: Git compares the protocols exactly. However, you may use wildcards in | |||
| 170 | 165 | the domain name and other pattern matching techniques as with the `http.<URL>.*` | |
| 171 | 166 | options. | |
| 172 | 167 | ||
| 173 | - | If the "pattern" URL does include a path component, then this too must match | |
| 174 | - | exactly: the context `https://example.com/bar/baz.git` will match a config | |
| 175 | - | entry for `https://example.com/bar/baz.git` (in addition to matching the config | |
| 176 | - | entry for `https://example.com`) but will not match a config entry for | |
| 177 | - | `https://example.com/bar`. | |
| 168 | + | If the "pattern" URL does include a path component, then this must match | |
| 169 | + | as a prefix path: the context `https://example.com/bar` will match a config | |
| 170 | + | entry for `https://example.com/bar/baz.git` but will not match a config entry for | |
| 171 | + | `https://example.com/other/repo.git` or `https://example.com/barry/repo.git` | |
| 172 | + | (even though it is a string prefix). | |
| 178 | 173 | ||
| 179 | 174 | ||
| 180 | 175 | CONFIGURATION OPTIONS | |
modified Documentation/gitcvs-migration.adoc
| @@ -49,8 +49,7 @@ them first before running git pull. | |||
| 49 | 49 | ================================ | |
| 50 | 50 | The 'pull' command knows where to get updates from because of certain | |
| 51 | 51 | configuration variables that were set by the first 'git clone' | |
| 52 | - | command; see `git config -l` and the linkgit:git-config[1] man | |
| 53 | - | page for details. | |
| 52 | + | command; see the subcommand `list` in linkgit:git-config[1] for details. | |
| 54 | 53 | ================================ | |
| 55 | 54 | ||
| 56 | 55 | You can update the shared repository with your changes by first committing | |
added Documentation/gitdatamodel.adoc mode 100644
| @@ -0,0 +1,305 @@ | |||
| 1 | + | gitdatamodel(7) | |
| 2 | + | =============== | |
| 3 | + | ||
| 4 | + | NAME | |
| 5 | + | ---- | |
| 6 | + | gitdatamodel - Git's core data model | |
| 7 | + | ||
| 8 | + | SYNOPSIS | |
| 9 | + | -------- | |
| 10 | + | gitdatamodel | |
| 11 | + | ||
| 12 | + | DESCRIPTION | |
| 13 | + | ----------- | |
| 14 | + | ||
| 15 | + | It's not necessary to understand Git's data model to use Git, but it's | |
| 16 | + | very helpful when reading Git's documentation so that you know what it | |
| 17 | + | means when the documentation says "object", "reference" or "index". | |
| 18 | + | ||
| 19 | + | Git's core operations use 4 kinds of data: | |
| 20 | + | ||
| 21 | + | 1. <<objects,Objects>>: commits, trees, blobs, and tag objects | |
| 22 | + | 2. <<references,References>>: branches, tags, | |
| 23 | + | remote-tracking branches, etc | |
| 24 | + | 3. <<index,The index>>, also known as the staging area | |
| 25 | + | 4. <<reflogs,Reflogs>>: logs of changes to references ("ref log") | |
| 26 | + | ||
| 27 | + | [[objects]] | |
| 28 | + | OBJECTS | |
| 29 | + | ------- | |
| 30 | + | ||
| 31 | + | All of the commits and files in a Git repository are stored as "Git objects". | |
| 32 | + | Git objects never change after they're created, and every object has an ID, | |
| 33 | + | like `1b61de420a21a2f1aaef93e38ecd0e45e8bc9f0a`. | |
| 34 | + | ||
| 35 | + | This means that if you have an object's ID, you can always recover its | |
| 36 | + | exact contents as long as the object hasn't been deleted. | |
| 37 | + | ||
| 38 | + | Every object has: | |
| 39 | + | ||
| 40 | + | [[object-id]] | |
| 41 | + | 1. an *ID* (aka "object name"), which is a cryptographic hash of its | |
| 42 | + | type and contents. | |
| 43 | + | It's fast to look up a Git object using its ID. | |
| 44 | + | This is usually represented in hexadecimal, like | |
| 45 | + | `1b61de420a21a2f1aaef93e38ecd0e45e8bc9f0a`. | |
| 46 | + | 2. a *type*. There are 4 types of objects: | |
| 47 | + | <<commit,commits>>, <<tree,trees>>, <<blob,blobs>>, | |
| 48 | + | and <<tag-object,tag objects>>. | |
| 49 | + | 3. *contents*. The structure of the contents depends on the type. | |
| 50 | + | ||
| 51 | + | Here's how each type of object is structured: | |
| 52 | + | ||
| 53 | + | [[commit]] | |
| 54 | + | commit:: | |
| 55 | + | A commit contains these required fields | |
| 56 | + | (though there are other optional fields): | |
| 57 | + | + | |
| 58 | + | 1. The full directory structure of all the files in that version of the | |
| 59 | + | repository and each file's contents, stored as the *<<tree,tree>>* ID | |
| 60 | + | of the commit's top-level directory | |
| 61 | + | 2. Its *parent commit ID(s)*. The first commit in a repository has 0 parents, | |
| 62 | + | regular commits have 1 parent, merge commits have 2 or more parents | |
| 63 | + | 3. An *author* and the time the commit was authored | |
| 64 | + | 4. A *committer* and the time the commit was committed | |
| 65 | + | 5. A *commit message* | |
| 66 | + | + | |
| 67 | + | Here's how an example commit is stored: | |
| 68 | + | + | |
| 69 | + | ---- | |
| 70 | + | tree 1b61de420a21a2f1aaef93e38ecd0e45e8bc9f0a | |
| 71 | + | parent 4ccb6d7b8869a86aae2e84c56523f8705b50c647 | |
| 72 | + | author Maya <maya@example.com> 1759173425 -0400 | |
| 73 | + | committer Maya <maya@example.com> 1759173425 -0400 | |
| 74 | + | ||
| 75 | + | Add README | |
| 76 | + | ---- | |
| 77 | + | + | |
| 78 | + | Like all other objects, commits can never be changed after they're created. | |
| 79 | + | For example, "amending" a commit with `git commit --amend` creates a new | |
| 80 | + | commit with the same parent. | |
| 81 | + | + | |
| 82 | + | Git does not store the diff for a commit: when you ask Git to show | |
| 83 | + | the commit with linkgit:git-show[1], it calculates the diff from its | |
| 84 | + | parent on the fly. | |
| 85 | + | ||
| 86 | + | [[tree]] | |
| 87 | + | tree:: | |
| 88 | + | A tree is how Git represents a directory. | |
| 89 | + | It can contain files or other trees (which are subdirectories). | |
| 90 | + | It lists, for each item in the tree: | |
| 91 | + | + | |
| 92 | + | 1. The *filename*, for example `hello.py` | |
| 93 | + | 2. The *file type*, which must be one of these five types: | |
| 94 | + | - *regular file* | |
| 95 | + | - *executable file* | |
| 96 | + | - *symbolic link* | |
| 97 | + | - *directory* | |
| 98 | + | - *gitlink* (for use with submodules) | |
| 99 | + | 3. The <<object-id,*object ID*>> with the contents of the file, directory, | |
| 100 | + | or gitlink. | |
| 101 | + | + | |
| 102 | + | For example, this is how a tree containing one directory (`src`) and one file | |
| 103 | + | (`README.md`) is stored: | |
| 104 | + | + | |
| 105 | + | ---- | |
| 106 | + | 100644 blob 8728a858d9d21a8c78488c8b4e70e531b659141f README.md | |
| 107 | + | 040000 tree 89b1d2e0495f66d6929f4ff76ff1bb07fc41947d src | |
| 108 | + | ---- | |
| 109 | + | ||
| 110 | + | NOTE: In the output above, Git displays the file type of each tree entry | |
| 111 | + | using a format that's loosely modelled on Unix file modes (`100644` is | |
| 112 | + | "regular file", `100755` is "executable file", `120000` is "symbolic | |
| 113 | + | link", `040000` is "directory", and `160000` is "gitlink"). It also | |
| 114 | + | displays the object's type: `blob` for files and symlinks, `tree` for | |
| 115 | + | directories, and `commit` for gitlinks. | |
| 116 | + | ||
| 117 | + | [[blob]] | |
| 118 | + | blob:: | |
| 119 | + | A blob object contains a file's contents. | |
| 120 | + | + | |
| 121 | + | When you make a commit, Git stores the full contents of each file that | |
| 122 | + | you changed as a blob. | |
| 123 | + | For example, if you have a commit that changes 2 files in a repository | |
| 124 | + | with 1000 files, that commit will create 2 new blobs, and use the | |
| 125 | + | previous blob ID for the other 998 files. | |
| 126 | + | This means that commits can use relatively little disk space even in a | |
| 127 | + | very large repository. | |
| 128 | + | ||
| 129 | + | [[tag-object]] | |
| 130 | + | tag object:: | |
| 131 | + | Tag objects contain these required fields | |
| 132 | + | (though there are other optional fields): | |
| 133 | + | + | |
| 134 | + | 1. The *ID* of the object it references | |
| 135 | + | 2. The *type* of the object it references | |
| 136 | + | 3. The *tagger* and tag date | |
| 137 | + | 4. A *tag message*, similar to a commit message | |
| 138 | + | ||
| 139 | + | Here's how an example tag object is stored: | |
| 140 | + | ||
| 141 | + | ---- | |
| 142 | + | object 750b4ead9c87ceb3ddb7a390e6c7074521797fb3 | |
| 143 | + | type commit | |
| 144 | + | tag v1.0.0 | |
| 145 | + | tagger Maya <maya@example.com> 1759927359 -0400 | |
| 146 | + | ||
| 147 | + | Release version 1.0.0 | |
| 148 | + | ---- | |
| 149 | + | ||
| 150 | + | NOTE: All of the examples in this section were generated with | |
| 151 | + | `git cat-file -p <object-id>`. | |
| 152 | + | ||
| 153 | + | [[references]] | |
| 154 | + | REFERENCES | |
| 155 | + | ---------- | |
| 156 | + | ||
| 157 | + | References are a way to give a name to a commit. | |
| 158 | + | It's easier to remember "the changes I'm working on are on the `turtle` | |
| 159 | + | branch" than "the changes are in commit bb69721404348e". | |
| 160 | + | Git often uses "ref" as shorthand for "reference". | |
| 161 | + | ||
| 162 | + | References can either refer to: | |
| 163 | + | ||
| 164 | + | 1. An object ID, usually a <<commit,commit>> ID | |
| 165 | + | 2. Another reference. This is called a "symbolic reference" | |
| 166 | + | ||
| 167 | + | References are stored in a hierarchy, and Git handles references | |
| 168 | + | differently based on where they are in the hierarchy. | |
| 169 | + | Most references are under `refs/`. Here are the main types: | |
| 170 | + | ||
| 171 | + | [[branch]] | |
| 172 | + | branches: `refs/heads/<name>`:: | |
| 173 | + | A branch refers to a commit ID. | |
| 174 | + | That commit is the latest commit on the branch. | |
| 175 | + | + | |
| 176 | + | To get the history of commits on a branch, Git will start at the commit | |
| 177 | + | ID the branch references, and then look at the commit's parent(s), | |
| 178 | + | the parent's parent, etc. | |
| 179 | + | ||
| 180 | + | [[tag]] | |
| 181 | + | tags: `refs/tags/<name>`:: | |
| 182 | + | A tag refers to a commit ID, tag object ID, or other object ID. | |
| 183 | + | There are two types of tags: | |
| 184 | + | 1. "Annotated tags", which reference a <<tag-object,tag object>> ID | |
| 185 | + | which contains a tag message | |
| 186 | + | 2. "Lightweight tags", which reference a commit, blob, or tree ID | |
| 187 | + | directly | |
| 188 | + | + | |
| 189 | + | Even though branches and tags both refer to a commit ID, Git | |
| 190 | + | treats them very differently. | |
| 191 | + | Branches are expected to change over time: when you make a commit, Git | |
| 192 | + | will update your <<HEAD,current branch>> to point to the new commit. | |
| 193 | + | Tags are usually not changed after they're created. | |
| 194 | + | ||
| 195 | + | [[HEAD]] | |
| 196 | + | HEAD: `HEAD`:: | |
| 197 | + | `HEAD` is where Git stores your current <<branch,branch>>, | |
| 198 | + | if there is a current branch. `HEAD` can either be: | |
| 199 | + | + | |
| 200 | + | 1. A symbolic reference to your current branch, for example `ref: | |
| 201 | + | refs/heads/main` if your current branch is `main`. | |
| 202 | + | 2. A direct reference to a commit ID. In this case there is no current branch. | |
| 203 | + | This is called "detached HEAD state", see the DETACHED HEAD section | |
| 204 | + | of linkgit:git-checkout[1] for more. | |
| 205 | + | ||
| 206 | + | [[remote-tracking-branch]] | |
| 207 | + | remote-tracking branches: `refs/remotes/<remote>/<branch>`:: | |
| 208 | + | A remote-tracking branch refers to a commit ID. | |
| 209 | + | It's how Git stores the last-known state of a branch in a remote | |
| 210 | + | repository. `git fetch` updates remote-tracking branches. When | |
| 211 | + | `git status` says "you're up to date with origin/main", it's looking at | |
| 212 | + | this. | |
| 213 | + | + | |
| 214 | + | `refs/remotes/<remote>/HEAD` is a symbolic reference to the remote's | |
| 215 | + | default branch. This is the branch that `git clone` checks out by default. | |
| 216 | + | ||
| 217 | + | [[other-refs]] | |
| 218 | + | Other references:: | |
| 219 | + | Git tools may create references anywhere under `refs/`. | |
| 220 | + | For example, linkgit:git-stash[1], linkgit:git-bisect[1], | |
| 221 | + | and linkgit:git-notes[1] all create their own references | |
| 222 | + | in `refs/stash`, `refs/bisect`, etc. | |
| 223 | + | Third-party Git tools may also create their own references. | |
| 224 | + | + | |
| 225 | + | Git may also create references other than `HEAD` at the base of the | |
| 226 | + | hierarchy, like `ORIG_HEAD`. | |
| 227 | + | ||
| 228 | + | NOTE: Git may delete objects that aren't "reachable" from any reference | |
| 229 | + | or <<reflogs,reflog>>. | |
| 230 | + | An object is "reachable" if we can find it by following tags to whatever | |
| 231 | + | they tag, commits to their parents or trees, and trees to the trees or | |
| 232 | + | blobs that they contain. | |
| 233 | + | For example, if you amend a commit with `git commit --amend`, | |
| 234 | + | there will no longer be a branch that points at the old commit. | |
| 235 | + | The old commit is recorded in the current branch's <<reflogs,reflog>>, | |
| 236 | + | so it is still "reachable", but when the reflog entry expires it may | |
| 237 | + | become unreachable and get deleted. | |
| 238 | + | Reachable objects will never be deleted. | |
| 239 | + | ||
| 240 | + | [[index]] | |
| 241 | + | THE INDEX | |
| 242 | + | --------- | |
| 243 | + | The index, also known as the "staging area", is a list of files and | |
| 244 | + | the contents of each file, stored as a <<blob,blob>>. | |
| 245 | + | You can add files to the index or update the contents of a file in the | |
| 246 | + | index with linkgit:git-add[1]. This is called "staging" the file for commit. | |
| 247 | + | ||
| 248 | + | Unlike a <<tree,tree>>, the index is a flat list of files. | |
| 249 | + | When you commit, Git converts the list of files in the index to a | |
| 250 | + | directory <<tree,tree>> and uses that tree in the new <<commit,commit>>. | |
| 251 | + | ||
| 252 | + | Each index entry has 4 fields: | |
| 253 | + | ||
| 254 | + | 1. The *file type*, which must be one of: | |
| 255 | + | - *regular file* | |
| 256 | + | - *executable file* | |
| 257 | + | - *symbolic link* | |
| 258 | + | - *gitlink* (for use with submodules) | |
| 259 | + | 2. The *<<blob,blob>>* ID of the file, | |
| 260 | + | or (rarely) the *<<commit,commit>>* ID of the submodule | |
| 261 | + | 3. The *stage number*, either 0, 1, 2, or 3. This is normally 0, but if | |
| 262 | + | there's a merge conflict there can be multiple versions of the same | |
| 263 | + | filename in the index. | |
| 264 | + | 4. The *file path*, for example `src/hello.py` | |
| 265 | + | ||
| 266 | + | It's extremely uncommon to look at the index directly: normally you'd | |
| 267 | + | run `git status` to see a list of changes between the index and <<HEAD,HEAD>>. | |
| 268 | + | But you can use `git ls-files --stage` to see the index. | |
| 269 | + | Here's the output of `git ls-files --stage` in a repository with 2 files: | |
| 270 | + | ||
| 271 | + | ---- | |
| 272 | + | 100644 8728a858d9d21a8c78488c8b4e70e531b659141f 0 README.md | |
| 273 | + | 100644 665c637a360874ce43bf74018768a96d2d4d219a 0 src/hello.py | |
| 274 | + | ---- | |
| 275 | + | ||
| 276 | + | [[reflogs]] | |
| 277 | + | REFLOGS | |
| 278 | + | ------- | |
| 279 | + | ||
| 280 | + | Every time a branch, remote-tracking branch, or HEAD is updated, Git | |
| 281 | + | updates a log called a "reflog" for that <<references,reference>>. | |
| 282 | + | This means that if you make a mistake and "lose" a commit, you can | |
| 283 | + | generally recover the commit ID by running `git reflog <reference>`. | |
| 284 | + | ||
| 285 | + | A reflog is a list of log entries. Each entry has: | |
| 286 | + | ||
| 287 | + | 1. The *commit ID* | |
| 288 | + | 2. *Timestamp* when the change was made | |
| 289 | + | 3. *Log message*, for example `pull: Fast-forward` | |
| 290 | + | ||
| 291 | + | Reflogs only log changes made in your local repository. | |
| 292 | + | They are not shared with remotes. | |
| 293 | + | ||
| 294 | + | You can view a reflog with `git reflog <reference>`. | |
| 295 | + | For example, here's the reflog for a `main` branch which has changed twice: | |
| 296 | + | ||
| 297 | + | ---- | |
| 298 | + | $ git reflog main --date=iso --no-decorate | |
| 299 | + | 750b4ea main@{2025-09-29 15:17:05 -0400}: commit: Add README | |
| 300 | + | 4ccb6d7 main@{2025-09-29 15:16:48 -0400}: commit (initial): Initial commit | |
| 301 | + | ---- | |
| 302 | + | ||
| 303 | + | GIT | |
| 304 | + | --- | |
| 305 | + | Part of the linkgit:git[1] suite | |
modified Documentation/gitfaq.adoc
| @@ -83,6 +83,25 @@ Windows would be the configuration `"C:\Program Files\Vim\gvim.exe" --nofork`, | |||
| 83 | 83 | which quotes the filename with spaces and specifies the `--nofork` option to | |
| 84 | 84 | avoid backgrounding the process. | |
| 85 | 85 | ||
| 86 | + | [[sign-off]] | |
| 87 | + | Why not have `commit.signoff` and other configuration variables?:: | |
| 88 | + | Git intentionally does not (and will not) provide a | |
| 89 | + | configuration variable, such as `commit.signoff`, to | |
| 90 | + | automatically add `--signoff` by default. The reason is to | |
| 91 | + | protect the legal and intentional significance of a sign-off. | |
| 92 | + | If there were more automated and widely publicized ways for | |
| 93 | + | sign-offs to be appended, it would become easier for someone | |
| 94 | + | to argue later that a "Signed-off-by" trailer was just added | |
| 95 | + | out of habit or by automation, without the committer's full | |
| 96 | + | awareness or intent to certify their agreement with the | |
| 97 | + | Developer Certificate of Origin (DCO) or a similar statement. | |
| 98 | + | This could undermine the sign-off’s credibility in legal or | |
| 99 | + | contractual situations. | |
| 100 | + | + | |
| 101 | + | There exists `format.signoff`, but that is a historical mistake, and | |
| 102 | + | it is not an excuse to add more mistakes of the same kind on top. | |
| 103 | + | ||
| 104 | + | ||
| 86 | 105 | Credentials | |
| 87 | 106 | ----------- | |
| 88 | 107 | ||
| @@ -214,14 +233,30 @@ of refs, such that both sides end up with different commits on a branch that | |||
| 214 | 233 | the other doesn't have. This can result in important objects becoming | |
| 215 | 234 | unreferenced and possibly pruned by `git gc`, causing data loss. | |
| 216 | 235 | + | |
| 217 | - | Therefore, it's better to push your work to either the other system or a central | |
| 218 | - | server using the normal push and pull mechanism. However, this doesn't always | |
| 219 | - | preserve important data, like stashes, so some people prefer to share a working | |
| 220 | - | tree across systems. | |
| 221 | - | + | |
| 222 | - | If you do this, the recommended approach is to use `rsync -a --delete-after` | |
| 223 | - | (ideally with an encrypted connection such as with `ssh`) on the root of | |
| 224 | - | repository. You should ensure several things when you do this: | |
| 236 | + | Therefore, it's better to push your work to either the other system or a | |
| 237 | + | central server using the normal push and pull mechanism. In Git 2.51, Git | |
| 238 | + | learned to import and export stashes, so it's possible to synchronize the state | |
| 239 | + | of the working tree by stashing it with `git stash`, then exporting either all | |
| 240 | + | stashes with `git stash export --to-ref refs/heads/stashes` (assuming you want | |
| 241 | + | to export to the `stashes` branch) or selecting stashes by adding their numbers | |
| 242 | + | to the end of that command. It's also possible to include untracked files by | |
| 243 | + | using the `--include-untracked` argument when stashing the data in the first | |
| 244 | + | place, but be careful not to do this if any of these contain sensitive | |
| 245 | + | information. | |
| 246 | + | + | |
| 247 | + | You can then push the `stashes` branch (or whatever branch you've exported to), | |
| 248 | + | fetch them to the local system (such as with `git fetch origin | |
| 249 | + | +stashes:stashes`), and import the stashes on the other system with `git stash | |
| 250 | + | import stashes` (again, changing the name as necessary). Applying the changes | |
| 251 | + | to the working tree can be done with `git stash pop` or `git stash apply`. | |
| 252 | + | This is the approach that is most robust and most likely to avoid unintended | |
| 253 | + | problems. | |
| 254 | + | + | |
| 255 | + | Having said that, there are some cases where people nevertheless prefer to | |
| 256 | + | share a working tree across systems. If you do this, the recommended approach | |
| 257 | + | is to use `rsync -a --delete-after` (ideally with an encrypted connection such | |
| 258 | + | as with `ssh`) on the root of repository. You should ensure several things | |
| 259 | + | when you do this: | |
| 225 | 260 | + | |
| 226 | 261 | * If you have additional worktrees or a separate Git directory, they must be | |
| 227 | 262 | synced at the same time as the main working tree and repository. | |
| @@ -232,10 +267,11 @@ repository. You should ensure several things when you do this: | |||
| 232 | 267 | any sort are taking place on it, including background operations like `git | |
| 233 | 268 | gc` and operations invoked by your editor). | |
| 234 | 269 | + | |
| 235 | - | Be aware that even with these recommendations, syncing in this way has some risk | |
| 236 | - | since it bypasses Git's normal integrity checking for repositories, so having | |
| 237 | - | backups is advised. You may also wish to do a `git fsck` to verify the | |
| 238 | - | integrity of your data on the destination system after syncing. | |
| 270 | + | Be aware that even with these recommendations, syncing working trees in this | |
| 271 | + | way has some risk since it bypasses Git's normal integrity checking for | |
| 272 | + | repositories, so having backups is advised. You may also wish to do a `git | |
| 273 | + | fsck` to verify the integrity of your data on the destination system after | |
| 274 | + | syncing. | |
| 239 | 275 | ||
| 240 | 276 | Common Issues | |
| 241 | 277 | ------------- | |
modified Documentation/gitformat-index.adoc
| @@ -291,14 +291,14 @@ Git index format | |||
| 291 | 291 | sequence in variable width encoding. Each string describes the | |
| 292 | 292 | environment where the cache can be used. | |
| 293 | 293 | ||
| 294 | - | - Stat data of $GIT_DIR/info/exclude. See "Index entry" section from | |
| 294 | + | - Stat data of $GIT_COMMON_DIR/info/exclude. See "Index entry" section from | |
| 295 | 295 | ctime field until "file size". | |
| 296 | 296 | ||
| 297 | 297 | - Stat data of core.excludesFile | |
| 298 | 298 | ||
| 299 | 299 | - 32-bit dir_flags (see struct dir_struct) | |
| 300 | 300 | ||
| 301 | - | - Hash of $GIT_DIR/info/exclude. A null hash means the file | |
| 301 | + | - Hash of $GIT_COMMON_DIR/info/exclude. A null hash means the file | |
| 302 | 302 | does not exist. | |
| 303 | 303 | ||
| 304 | 304 | - Hash of core.excludesFile. A null hash means the file does | |
added Documentation/gitformat-loose.adoc mode 100644
| @@ -0,0 +1,131 @@ | |||
| 1 | + | gitformat-loose(5) | |
| 2 | + | ================== | |
| 3 | + | ||
| 4 | + | NAME | |
| 5 | + | ---- | |
| 6 | + | gitformat-loose - Git loose object format | |
| 7 | + | ||
| 8 | + | ||
| 9 | + | SYNOPSIS | |
| 10 | + | -------- | |
| 11 | + | [verse] | |
| 12 | + | $GIT_DIR/objects/[0-9a-f][0-9a-f]/* | |
| 13 | + | $GIT_DIR/objects/object-map/map-*.map | |
| 14 | + | ||
| 15 | + | DESCRIPTION | |
| 16 | + | ----------- | |
| 17 | + | ||
| 18 | + | Loose objects are how Git stores individual objects, where every object is | |
| 19 | + | written as a separate file. | |
| 20 | + | ||
| 21 | + | Over the lifetime of a repository, objects are usually written as loose objects | |
| 22 | + | initially. Eventually, these loose objects will be compacted into packfiles | |
| 23 | + | via repository maintenance to improve disk space usage and speed up the lookup | |
| 24 | + | of these objects. | |
| 25 | + | ||
| 26 | + | == Loose objects | |
| 27 | + | ||
| 28 | + | Each loose object contains a prefix, followed immediately by the data of the | |
| 29 | + | object. The prefix contains `<type> <size>\0`. `<type>` is one of `blob`, | |
| 30 | + | `tree`, `commit`, or `tag` and `size` is the size of the data (without the | |
| 31 | + | prefix) as a decimal integer expressed in ASCII. | |
| 32 | + | ||
| 33 | + | The entire contents, prefix and data concatenated, is then compressed with zlib | |
| 34 | + | and the compressed data is stored in the file. The object ID of the object is | |
| 35 | + | the SHA-1 or SHA-256 (as appropriate) hash of the uncompressed data. | |
| 36 | + | ||
| 37 | + | The file for the loose object is stored under the `objects` directory, with the | |
| 38 | + | first two hex characters of the object ID being the directory and the remaining | |
| 39 | + | characters being the file name. This is done to shard the data and avoid too | |
| 40 | + | many files being in one directory, since some file systems perform poorly with | |
| 41 | + | many items in a directory. | |
| 42 | + | ||
| 43 | + | As an example, the empty tree contains the data (when uncompressed) `tree 0\0` | |
| 44 | + | and, in a SHA-256 repository, would have the object ID | |
| 45 | + | `6ef19b41225c5369f1c104d45d8d85efa9b057b53b14b4b9b939dd74decc5321` and would be | |
| 46 | + | stored under | |
| 47 | + | `$GIT_DIR/objects/6e/f19b41225c5369f1c104d45d8d85efa9b057b53b14b4b9b939dd74decc5321`. | |
| 48 | + | ||
| 49 | + | Similarly, a blob containing the contents `abc` would have the uncompressed | |
| 50 | + | data of `blob 3\0abc`. | |
| 51 | + | ||
| 52 | + | == Loose object mapping | |
| 53 | + | ||
| 54 | + | When the `compatObjectFormat` option is used, Git needs to store a mapping | |
| 55 | + | between the repository's main algorithm and the compatibility algorithm for | |
| 56 | + | loose objects as well as some auxiliary information. | |
| 57 | + | ||
| 58 | + | The mapping consists of a set of files under `$GIT_DIR/objects/object-map` | |
| 59 | + | ending in `.map`. The portion of the filename before the extension is that of | |
| 60 | + | the main hash checksum (that is, the one specified in | |
| 61 | + | `extensions.objectformat`) in hex format. | |
| 62 | + | ||
| 63 | + | `git gc` will repack existing entries into one file, removing any unnecessary | |
| 64 | + | objects, such as obsolete shallow entries or loose objects that have been | |
| 65 | + | packed. | |
| 66 | + | ||
| 67 | + | The file format is as follows. All values are in network byte order and all | |
| 68 | + | 4-byte and 8-byte values must be 4-byte aligned in the file, so the NUL padding | |
| 69 | + | may be required in some cases. Git always uses the smallest number of NUL | |
| 70 | + | bytes (including zero) that is required for the padding in order to make | |
| 71 | + | writing files deterministic. | |
| 72 | + | ||
| 73 | + | - A header appears at the beginning and consists of the following: | |
| 74 | + | * A 4-byte mapping signature: `LMAP` | |
| 75 | + | * 4-byte version number: 1 | |
| 76 | + | * 4-byte length of the header section (including reserved entries but | |
| 77 | + | excluding any NUL padding). | |
| 78 | + | * 4-byte number of objects declared in this map file. | |
| 79 | + | * 4-byte number of object formats declared in this map file. | |
| 80 | + | * For each object format: | |
| 81 | + | ** 4-byte format identifier (e.g., `sha1` for SHA-1) | |
| 82 | + | ** 4-byte length in bytes of shortened object names (that is, prefixes of | |
| 83 | + | the full object names). This is the shortest possible length needed to | |
| 84 | + | make names in the shortened object name table unambiguous. | |
| 85 | + | ** 8-byte integer, recording where tables relating to this format | |
| 86 | + | are stored in this index file, as an offset from the beginning. | |
| 87 | + | * 8-byte offset to the trailer from the beginning of this file. | |
| 88 | + | * The remainder of the header section is reserved for future use. | |
| 89 | + | Readers must ignore unrecognized data here. | |
| 90 | + | - Zero or more NUL bytes. These are used to improve the alignment of the | |
| 91 | + | 4-byte quantities below. | |
| 92 | + | - Tables for the first object format: | |
| 93 | + | * A sorted table of shortened object names. These are prefixes of the names | |
| 94 | + | of all objects in this file, packed together to reduce the cache footprint | |
| 95 | + | of the binary search for a specific object name. | |
| 96 | + | * A sorted table of full object names. | |
| 97 | + | * A table of 4-byte metadata values. | |
| 98 | + | - Zero or more NUL bytes. | |
| 99 | + | - Tables for subsequent object formats: | |
| 100 | + | * A sorted table of shortened object names. These are prefixes of the names | |
| 101 | + | of all objects in this file, packed together without offset values to | |
| 102 | + | reduce the cache footprint of the binary search for a specific object name. | |
| 103 | + | * A table of full object names in the order specified by the first object format. | |
| 104 | + | * A table of 4-byte values mapping object name order to the order of the | |
| 105 | + | first object format. For an object in the table of sorted shortened object | |
| 106 | + | names, the value at the corresponding index in this table is the index in | |
| 107 | + | the previous table for that same object. | |
| 108 | + | * Zero or more NUL bytes. | |
| 109 | + | - The trailer consists of the following: | |
| 110 | + | * Hash checksum of all of the above using the main hash. | |
| 111 | + | ||
| 112 | + | The lower six bits of each metadata table contain a type field indicating the | |
| 113 | + | reason that this object is stored: | |
| 114 | + | ||
| 115 | + | 0:: | |
| 116 | + | Reserved. | |
| 117 | + | 1:: | |
| 118 | + | This object is stored as a loose object in the repository. | |
| 119 | + | 2:: | |
| 120 | + | This object is a shallow entry. The mapping refers to a shallow value | |
| 121 | + | returned by a remote server. | |
| 122 | + | 3:: | |
| 123 | + | This object is a submodule entry. The mapping refers to the commit stored | |
| 124 | + | representing a submodule. | |
| 125 | + | ||
| 126 | + | Other data may be stored in this field in the future. Bits that are not used | |
| 127 | + | must be zero. | |
| 128 | + | ||
| 129 | + | GIT | |
| 130 | + | --- | |
| 131 | + | Part of the linkgit:git[1] suite | |
modified Documentation/gitformat-pack.adoc
| @@ -32,6 +32,10 @@ In a repository using the traditional SHA-1, pack checksums, index checksums, | |||
| 32 | 32 | and object IDs (object names) mentioned below are all computed using SHA-1. | |
| 33 | 33 | Similarly, in SHA-256 repositories, these values are computed using SHA-256. | |
| 34 | 34 | ||
| 35 | + | CRC32 checksums are always computed over the entire packed object, including | |
| 36 | + | the header (n-byte type and length); the base object name or offset, if any; | |
| 37 | + | and the entire compressed object. The CRC32 algorithm used is that of zlib. | |
| 38 | + | ||
| 35 | 39 | == pack-*.pack files have the following format: | |
| 36 | 40 | ||
| 37 | 41 | - A header appears at the beginning and consists of the following: | |
| @@ -80,6 +84,16 @@ Valid object types are: | |||
| 80 | 84 | ||
| 81 | 85 | Type 5 is reserved for future expansion. Type 0 is invalid. | |
| 82 | 86 | ||
| 87 | + | === Object encoding | |
| 88 | + | ||
| 89 | + | Unlike loose objects, packed objects do not have a prefix containing the type, | |
| 90 | + | size, and a NUL byte. These are not necessary because they can be determined by | |
| 91 | + | the n-byte type and length that prefixes the data and so they are omitted from | |
| 92 | + | the compressed and deltified data. | |
| 93 | + | ||
| 94 | + | The computation of the object ID still uses this prefix by reconstructing it | |
| 95 | + | from the type and length as needed. | |
| 96 | + | ||
| 83 | 97 | === Size encoding | |
| 84 | 98 | ||
| 85 | 99 | This document uses the following "size encoding" of non-negative | |
| @@ -92,6 +106,11 @@ values are more significant. | |||
| 92 | 106 | This size encoding should not be confused with the "offset encoding", | |
| 93 | 107 | which is also used in this document. | |
| 94 | 108 | ||
| 109 | + | When encoding the size of an undeltified object in a pack, the size is that of | |
| 110 | + | the uncompressed raw object. For deltified objects, it is the size of the | |
| 111 | + | uncompressed delta. The base object name or offset is not included in the size | |
| 112 | + | computation. | |
| 113 | + | ||
| 95 | 114 | === Deltified representation | |
| 96 | 115 | ||
| 97 | 116 | Conceptually there are only four object types: commit, tree, tag and | |
| @@ -355,7 +374,9 @@ HEADER: | |||
| 355 | 374 | The signature is: {'M', 'I', 'D', 'X'} | |
| 356 | 375 | ||
| 357 | 376 | 1-byte version number: | |
| 358 | - | Git only writes or recognizes version 1. | |
| 377 | + | Git writes the version specified by the "midx.version" | |
| 378 | + | configuration option, which defaults to 2. It recognizes | |
| 379 | + | both versions 1 and 2. | |
| 359 | 380 | ||
| 360 | 381 | 1-byte Object Id Version | |
| 361 | 382 | We infer the length of object IDs (OIDs) from this value: | |
| @@ -394,7 +415,9 @@ CHUNK DATA: | |||
| 394 | 415 | strings. There is no extra padding between the filenames, | |
| 395 | 416 | and they are listed in lexicographic order. The chunk itself | |
| 396 | 417 | is padded at the end with between 0 and 3 NUL bytes to make the | |
| 397 | - | chunk size a multiple of 4 bytes. | |
| 418 | + | chunk size a multiple of 4 bytes. Version 1 MIDXs are required to | |
| 419 | + | list their packs in lexicographic order, but version 2 MIDXs may | |
| 420 | + | list their packs in any arbitrary order. | |
| 398 | 421 | ||
| 399 | 422 | Bitmapped Packfiles (ID: {'B', 'T', 'M', 'P'}) | |
| 400 | 423 | Stores a table of two 4-byte unsigned integers in network order. | |
modified Documentation/githooks.adoc
| @@ -103,17 +103,14 @@ invoked before obtaining the proposed commit log message and | |||
| 103 | 103 | making a commit. Exiting with a non-zero status from this script | |
| 104 | 104 | causes the `git commit` command to abort before creating a commit. | |
| 105 | 105 | ||
| 106 | - | The default 'pre-commit' hook, when enabled, catches introduction | |
| 107 | - | of lines with trailing whitespaces and aborts the commit when | |
| 108 | - | such a line is found. | |
| 109 | - | ||
| 110 | 106 | All the `git commit` hooks are invoked with the environment | |
| 111 | 107 | variable `GIT_EDITOR=:` if the command will not bring up an editor | |
| 112 | 108 | to modify the commit message. | |
| 113 | 109 | ||
| 114 | - | The default 'pre-commit' hook, when enabled--and with the | |
| 115 | - | `hooks.allownonascii` config option unset or set to false--prevents | |
| 116 | - | the use of non-ASCII filenames. | |
| 110 | + | The default 'pre-commit' hook, when enabled, prevents the introduction | |
| 111 | + | of non-ASCII filenames and lines with trailing whitespace. The non-ASCII | |
| 112 | + | check can be turned off by setting the `hooks.allownonascii` config | |
| 113 | + | option to `true`. | |
| 117 | 114 | ||
| 118 | 115 | pre-merge-commit | |
| 119 | 116 | ~~~~~~~~~~~~~~~~ | |
| @@ -487,13 +484,16 @@ reference-transaction | |||
| 487 | 484 | ~~~~~~~~~~~~~~~~~~~~~ | |
| 488 | 485 | ||
| 489 | 486 | This hook is invoked by any Git command that performs reference | |
| 490 | - | updates. It executes whenever a reference transaction is prepared, | |
| 491 | - | committed or aborted and may thus get called multiple times. The hook | |
| 492 | - | also supports symbolic reference updates. | |
| 487 | + | updates. It executes whenever a reference transaction is preparing, | |
| 488 | + | prepared, committed or aborted and may thus get called multiple times. | |
| 489 | + | The hook also supports symbolic reference updates. | |
| 493 | 490 | ||
| 494 | 491 | The hook takes exactly one argument, which is the current state the | |
| 495 | 492 | given reference transaction is in: | |
| 496 | 493 | ||
| 494 | + | - "preparing": All reference updates have been queued to the | |
| 495 | + | transaction but references are not yet locked on disk. | |
| 496 | + | ||
| 497 | 497 | - "prepared": All reference updates have been queued to the | |
| 498 | 498 | transaction and references were locked on disk. | |
| 499 | 499 | ||
| @@ -514,16 +514,18 @@ ref and `<ref-name>` is the full name of the ref. When force updating | |||
| 514 | 514 | the reference regardless of its current value or when the reference is | |
| 515 | 515 | to be created anew, `<old-value>` is the all-zeroes object name. To | |
| 516 | 516 | distinguish these cases, you can inspect the current value of | |
| 517 | - | `<ref-name>` via `git rev-parse`. | |
| 517 | + | `<ref-name>` via `git rev-parse`. During the "preparing" state, symbolic | |
| 518 | + | references are not resolved: `<ref-name>` will reflect the symbolic reference | |
| 519 | + | itself rather than the object it points to. | |
| 518 | 520 | ||
| 519 | 521 | For symbolic reference updates the `<old_value>` and `<new-value>` | |
| 520 | 522 | fields could denote references instead of objects. A reference will be | |
| 521 | 523 | denoted with a 'ref:' prefix, like `ref:<ref-target>`. | |
| 522 | 524 | ||
| 523 | 525 | The exit status of the hook is ignored for any state except for the | |
| 524 | - | "prepared" state. In the "prepared" state, a non-zero exit status will | |
| 525 | - | cause the transaction to be aborted. The hook will not be called with | |
| 526 | - | "aborted" state in that case. | |
| 526 | + | "preparing" and "prepared" states. In these states, a non-zero exit | |
| 527 | + | status will cause the transaction to be aborted. The hook will not be | |
| 528 | + | called with "aborted" state in that case. | |
| 527 | 529 | ||
| 528 | 530 | push-to-checkout | |
| 529 | 531 | ~~~~~~~~~~~~~~~~ | |
modified Documentation/gitignore.adoc
| @@ -7,7 +7,7 @@ gitignore - Specifies intentionally untracked files to ignore | |||
| 7 | 7 | ||
| 8 | 8 | SYNOPSIS | |
| 9 | 9 | -------- | |
| 10 | - | $XDG_CONFIG_HOME/git/ignore, $GIT_DIR/info/exclude, .gitignore | |
| 10 | + | $XDG_CONFIG_HOME/git/ignore, $GIT_COMMON_DIR/info/exclude, .gitignore | |
| 11 | 11 | ||
| 12 | 12 | DESCRIPTION | |
| 13 | 13 | ----------- | |
| @@ -34,7 +34,7 @@ precedence, the last matching pattern decides the outcome): | |||
| 34 | 34 | includes such `.gitignore` files in its repository, containing patterns for | |
| 35 | 35 | files generated as part of the project build. | |
| 36 | 36 | ||
| 37 | - | * Patterns read from `$GIT_DIR/info/exclude`. | |
| 37 | + | * Patterns read from `$GIT_COMMON_DIR/info/exclude`. | |
| 38 | 38 | ||
| 39 | 39 | * Patterns read from the file specified by the configuration | |
| 40 | 40 | variable `core.excludesFile`. | |
| @@ -50,7 +50,7 @@ be used. | |||
| 50 | 50 | specific to a particular repository but which do not need to be shared | |
| 51 | 51 | with other related repositories (e.g., auxiliary files that live inside | |
| 52 | 52 | the repository but are specific to one user's workflow) should go into | |
| 53 | - | the `$GIT_DIR/info/exclude` file. | |
| 53 | + | the `$GIT_COMMON_DIR/info/exclude` file. | |
| 54 | 54 | ||
| 55 | 55 | * Patterns which a user wants Git to | |
| 56 | 56 | ignore in all situations (e.g., backup or temporary files generated by | |
| @@ -96,6 +96,11 @@ PATTERN FORMAT | |||
| 96 | 96 | particular `.gitignore` file itself. Otherwise the pattern may also | |
| 97 | 97 | match at any level below the `.gitignore` level. | |
| 98 | 98 | ||
| 99 | + | - Patterns read from exclude sources that are outside the working tree, | |
| 100 | + | such as $GIT_COMMON_DIR/info/exclude and core.excludesFile, are treated as if | |
| 101 | + | they are specified at the root of the working tree, i.e. a leading "/" | |
| 102 | + | in such patterns anchors the match at the root of the repository. | |
| 103 | + | ||
| 99 | 104 | - If there is a separator at the end of the pattern then the pattern | |
| 100 | 105 | will only match directories, otherwise the pattern can match both | |
| 101 | 106 | files and directories. | |
| @@ -111,6 +116,11 @@ PATTERN FORMAT | |||
| 111 | 116 | one of the characters in a range. See fnmatch(3) and the | |
| 112 | 117 | FNM_PATHNAME flag for a more detailed description. | |
| 113 | 118 | ||
| 119 | + | - A backslash ("`\`") can be used to escape any character. E.g., "`\*`" | |
| 120 | + | matches a literal asterisk (and "`\a`" matches "`a`", even though | |
| 121 | + | there is no need for escaping there). As with fnmatch(3), a backslash | |
| 122 | + | at the end of a pattern is an invalid pattern that never matches. | |
| 123 | + | ||
| 114 | 124 | Two consecutive asterisks ("`**`") in patterns matched against | |
| 115 | 125 | full pathname may have special meaning: | |
| 116 | 126 | ||
| @@ -136,8 +146,8 @@ CONFIGURATION | |||
| 136 | 146 | ||
| 137 | 147 | The optional configuration variable `core.excludesFile` indicates a path to a | |
| 138 | 148 | file containing patterns of file names to exclude, similar to | |
| 139 | - | `$GIT_DIR/info/exclude`. Patterns in the exclude file are used in addition to | |
| 140 | - | those in `$GIT_DIR/info/exclude`. | |
| 149 | + | `$GIT_COMMON_DIR/info/exclude`. Patterns in the exclude file are used in | |
| 150 | + | addition to those in `$GIT_COMMON_DIR/info/exclude`. | |
| 141 | 151 | ||
| 142 | 152 | NOTES | |
| 143 | 153 | ----- | |
modified Documentation/gitk.adoc
| @@ -163,16 +163,16 @@ used by default. If '$XDG_CONFIG_HOME' is not set it defaults to | |||
| 163 | 163 | ||
| 164 | 164 | History | |
| 165 | 165 | ------- | |
| 166 | - | Gitk was the first graphical repository browser. It's written in | |
| 167 | - | tcl/tk. | |
| 166 | + | Gitk was the first graphical repository browser, written by | |
| 167 | + | Paul Mackerras in Tcl/Tk. | |
| 168 | 168 | ||
| 169 | 169 | 'gitk' is actually maintained as an independent project, but stable | |
| 170 | 170 | versions are distributed as part of the Git suite for the convenience | |
| 171 | 171 | of end users. | |
| 172 | 172 | ||
| 173 | - | gitk-git/ comes from Paul Mackerras's gitk project: | |
| 173 | + | `gitk-git/` comes from Johannes Sixt's gitk project: | |
| 174 | 174 | ||
| 175 | - | git://ozlabs.org/~paulus/gitk | |
| 175 | + | https://github.com/j6t/gitk | |
| 176 | 176 | ||
| 177 | 177 | SEE ALSO | |
| 178 | 178 | -------- | |
modified Documentation/gitmodules.adoc
| @@ -70,7 +70,10 @@ submodule.<name>.ignore:: | |||
| 70 | 70 | -- | |
| 71 | 71 | all;; The submodule will never be considered modified (but will | |
| 72 | 72 | nonetheless show up in the output of status and commit when it has | |
| 73 | - | been staged). | |
| 73 | + | been staged). Adding a submodule with `(new commits)` can be | |
| 74 | + | overridden using `git add --force <submodule.path>`. | |
| 75 | + | This setting affects `status`, `update-index`, `diff` and `log` | |
| 76 | + | (due to underlying `diff`). | |
| 74 | 77 | ||
| 75 | 78 | dirty;; All changes to the submodule's work tree will be ignored, only | |
| 76 | 79 | committed differences between the `HEAD` of the submodule and its | |
modified Documentation/gitpacking.adoc
| @@ -150,7 +150,7 @@ with a configuration like so: | |||
| 150 | 150 | pattern = "refs/" | |
| 151 | 151 | threshold = now | |
| 152 | 152 | stableThreshold = never | |
| 153 | - | sampleRate = 100 | |
| 153 | + | sampleRate = 1 | |
| 154 | 154 | maxMerges = 64 | |
| 155 | 155 | ---- | |
| 156 | 156 | ||
| @@ -177,7 +177,7 @@ like: | |||
| 177 | 177 | pattern = "refs/virtual/([0-9]+)/(heads|tags)/" | |
| 178 | 178 | threshold = now | |
| 179 | 179 | stableThreshold = never | |
| 180 | - | sampleRate = 100 | |
| 180 | + | sampleRate = 1 | |
| 181 | 181 | maxMerges = 64 | |
| 182 | 182 | ---- | |
| 183 | 183 | ||
modified Documentation/gitprotocol-http.adoc
| @@ -318,7 +318,7 @@ Extra Parameter. | |||
| 318 | 318 | ||
| 319 | 319 | ||
| 320 | 320 | Smart Service git-upload-pack | |
| 321 | - | ------------------------------ | |
| 321 | + | ----------------------------- | |
| 322 | 322 | This service reads from the repository pointed to by `$GIT_URL`. | |
| 323 | 323 | ||
| 324 | 324 | Clients MUST first perform ref discovery with | |
| @@ -443,7 +443,8 @@ If no "want" objects are received, send an error: | |||
| 443 | 443 | TODO: Define error if no "want" lines are requested. | |
| 444 | 444 | ||
| 445 | 445 | If any "want" object is not reachable, send an error: | |
| 446 | - | TODO: Define error if an invalid "want" is requested. | |
| 446 | + | When a Git server receives an invalid or malformed `want` line, it | |
| 447 | + | responds with an error message that includes the offending object name. | |
| 447 | 448 | ||
| 448 | 449 | Create an empty list, `s_common`. | |
| 449 | 450 | ||
modified Documentation/gitprotocol-pack.adoc
| @@ -47,7 +47,9 @@ process defined in this protocol is terminated. | |||
| 47 | 47 | Transports | |
| 48 | 48 | ---------- | |
| 49 | 49 | There are three transports over which the packfile protocol is | |
| 50 | - | initiated. The Git transport is a simple, unauthenticated server that | |
| 50 | + | initiated. | |
| 51 | + | ||
| 52 | + | The Git transport is a simple, unauthenticated server that | |
| 51 | 53 | takes the command (almost always 'upload-pack', though Git | |
| 52 | 54 | servers can be configured to be globally writable, in which 'receive- | |
| 53 | 55 | pack' initiation is also allowed) with which the client wishes to | |
| @@ -65,7 +67,7 @@ Extra Parameters | |||
| 65 | 67 | ---------------- | |
| 66 | 68 | ||
| 67 | 69 | The protocol provides a mechanism in which clients can send additional | |
| 68 | - | information in its first message to the server. These are called "Extra | |
| 70 | + | information in their first message to the server. These are called "Extra | |
| 69 | 71 | Parameters", and are supported by the Git, SSH, and HTTP protocols. | |
| 70 | 72 | ||
| 71 | 73 | Each Extra Parameter takes the form of `<key>=<value>` or `<key>`. | |
| @@ -115,7 +117,7 @@ process on the server side over the Git protocol is this: | |||
| 115 | 117 | SSH Transport | |
| 116 | 118 | ------------- | |
| 117 | 119 | ||
| 118 | - | Initiating the upload-pack or receive-pack processes over SSH is | |
| 120 | + | Initiating the 'upload-pack' or 'receive-pack' processes over SSH is | |
| 119 | 121 | executing the binary on the server via SSH remote execution. | |
| 120 | 122 | It is basically equivalent to running this: | |
| 121 | 123 | ||
| @@ -129,7 +131,7 @@ two commands, or even just one of them. | |||
| 129 | 131 | ||
| 130 | 132 | In an ssh:// format URI, it's absolute in the URI, so the '/' after | |
| 131 | 133 | the host name (or port number) is sent as an argument, which is then | |
| 132 | - | read by the remote git-upload-pack exactly as is, so it's effectively | |
| 134 | + | read by the remote 'git-upload-pack' exactly as is, so it's effectively | |
| 133 | 135 | an absolute path in the remote filesystem. | |
| 134 | 136 | ||
| 135 | 137 | git clone ssh://user@example.com/project.git | |
| @@ -161,7 +163,7 @@ supports passing environment variables as an argument. | |||
| 161 | 163 | ||
| 162 | 164 | A few things to remember here: | |
| 163 | 165 | ||
| 164 | - | - The "command name" is spelled with dash (e.g. git-upload-pack), but | |
| 166 | + | - The "command name" is spelled with dash (e.g. 'git-upload-pack'), but | |
| 165 | 167 | this can be overridden by the client; | |
| 166 | 168 | ||
| 167 | 169 | - The repository path is always quoted with single quotes. | |
| @@ -277,7 +279,7 @@ out of what the server said it could do with the first 'want' line. | |||
| 277 | 279 | filter-request = PKT-LINE("filter" SP filter-spec) | |
| 278 | 280 | ---- | |
| 279 | 281 | ||
| 280 | - | Clients MUST send all the obj-ids it wants from the reference | |
| 282 | + | Clients MUST send all the obj-ids they want from the reference | |
| 281 | 283 | discovery phase as 'want' lines. Clients MUST send at least one | |
| 282 | 284 | 'want' command in the request body. Clients MUST NOT mention an | |
| 283 | 285 | obj-id in a 'want' command which did not appear in the response | |
| @@ -375,10 +377,10 @@ In multi_ack_detailed mode: | |||
| 375 | 377 | ||
| 376 | 378 | Without either multi_ack or multi_ack_detailed: | |
| 377 | 379 | ||
| 378 | - | * upload-pack sends "ACK obj-id" on the first common object it finds. | |
| 380 | + | * 'upload-pack' sends "ACK obj-id" on the first common object it finds. | |
| 379 | 381 | After that it says nothing until the client gives it a "done". | |
| 380 | 382 | ||
| 381 | - | * upload-pack sends "NAK" on a flush-pkt if no common object | |
| 383 | + | * 'upload-pack' sends "NAK" on a flush-pkt if no common object | |
| 382 | 384 | has been found yet. If one has been found, and thus an ACK | |
| 383 | 385 | was already sent, it's silent on the flush-pkt. | |
| 384 | 386 | ||
modified Documentation/gitprotocol-v2.adoc
| @@ -54,7 +54,7 @@ In general a client can request to speak protocol v2 by sending | |||
| 54 | 54 | `version=2` through the respective side-channel for the transport being | |
| 55 | 55 | used which inevitably sets `GIT_PROTOCOL`. More information can be | |
| 56 | 56 | found in linkgit:gitprotocol-pack[5] and linkgit:gitprotocol-http[5], as well as the | |
| 57 | - | `GIT_PROTOCOL` definition in `git.txt`. In all cases the | |
| 57 | + | `GIT_PROTOCOL` definition in linkgit:git[1]. In all cases the | |
| 58 | 58 | response from the server is the capability advertisement. | |
| 59 | 59 | ||
| 60 | 60 | Git Transport | |
| @@ -99,7 +99,7 @@ Uses the `--http-backend-info-refs` option to | |||
| 99 | 99 | linkgit:git-upload-pack[1]. | |
| 100 | 100 | ||
| 101 | 101 | The server may need to be configured to pass this header's contents via | |
| 102 | - | the `GIT_PROTOCOL` variable. See the discussion in `git-http-backend.txt`. | |
| 102 | + | the `GIT_PROTOCOL` variable. See the discussion in linkgit:git-http-backend[1]. | |
| 103 | 103 | ||
| 104 | 104 | Capability Advertisement | |
| 105 | 105 | ------------------------ | |
| @@ -558,31 +558,46 @@ object-info | |||
| 558 | 558 | ||
| 559 | 559 | `object-info` is the command to retrieve information about one or more objects. | |
| 560 | 560 | Its main purpose is to allow a client to make decisions based on this | |
| 561 | - | information without having to fully fetch objects. Object size is the only | |
| 562 | - | information that is currently supported. | |
| 561 | + | information without having to fully fetch objects. Currently only object size | |
| 562 | + | and type are supported. | |
| 563 | 563 | ||
| 564 | 564 | An `object-info` request takes the following arguments: | |
| 565 | 565 | ||
| 566 | 566 | size | |
| 567 | 567 | Requests size information to be returned for each listed object id. | |
| 568 | 568 | ||
| 569 | + | type | |
| 570 | + | Requests type information to be returned for each listed object id. | |
| 571 | + | ||
| 569 | 572 | oid <oid> | |
| 570 | 573 | Indicates to the server an object which the client wants to obtain | |
| 571 | - | information for. | |
| 574 | + | information for. They must be full OIDs. | |
| 572 | 575 | ||
| 573 | - | The response of `object-info` is a list of the requested object ids | |
| 574 | - | and associated requested information, each separated by a single space. | |
| 576 | + | The response of `object-info` consists of one pkt-line per requested attribute, | |
| 577 | + | echoing the attributes the server will report, followed by one pkt-line per | |
| 578 | + | requested object id with its information, each field separated by a single | |
| 579 | + | space. | |
| 575 | 580 | ||
| 576 | 581 | output = info flush-pkt | |
| 577 | 582 | ||
| 578 | - | info = PKT-LINE(attrs) LF) | |
| 579 | - | *PKT-LINE(obj-info LF) | |
| 583 | + | info = *PKT-LINE(attr LF) | |
| 584 | + | *PKT-LINE(obj-info LF) | |
| 585 | + | ||
| 586 | + | attr = "size" | "type" | |
| 587 | + | ||
| 588 | + | obj-size = 1*DIGIT | |
| 589 | + | ||
| 590 | + | obj-type = "blob" | "tree" | "commit" | "tag" | |
| 580 | 591 | ||
| 581 | - | attrs = attr | attrs SP attrs | |
| 592 | + | obj-val = obj-size | obj-type | |
| 582 | 593 | ||
| 583 | - | attr = "size" | |
| 594 | + | obj-info = obj-id [SP [obj-val *(SP obj-val)]] | |
| 584 | 595 | ||
| 585 | - | obj-info = obj-id SP obj-size | |
| 596 | + | The values in `obj-info` appear in the same order as the corresponding `attr` | |
| 597 | + | lines, with exactly one value per requested attribute. | |
| 598 | + | ||
| 599 | + | If the server does not recognize the OID, the response will be `<oid> SP` | |
| 600 | + | regardless of the number of attributes requested. | |
| 586 | 601 | ||
| 587 | 602 | bundle-uri | |
| 588 | 603 | ~~~~~~~~~~ | |
| @@ -659,7 +674,7 @@ use by the client, MUST indicate prerequisites (in any) with standard | |||
| 659 | 674 | applicable. | |
| 660 | 675 | + | |
| 661 | 676 | The advertised URI may alternatively contain a plaintext file that `git | |
| 662 | - | config --list` would accept (with the `--file` option). The key-value | |
| 677 | + | config list` would accept (with the `--file` option). The key-value | |
| 663 | 678 | pairs in this list are in the `bundle.*` namespace (see | |
| 664 | 679 | linkgit:git-config[1]). | |
| 665 | 680 | ||
| @@ -785,33 +800,75 @@ retrieving the header from a bundle at the indicated URI, and thus | |||
| 785 | 800 | save themselves and the server(s) the request(s) needed to inspect the | |
| 786 | 801 | headers of that bundle or bundles. | |
| 787 | 802 | ||
| 788 | - | promisor-remote=<pr-infos> | |
| 789 | - | ~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
| 803 | + | promisor-remote=<pr-info> | |
| 804 | + | ~~~~~~~~~~~~~~~~~~~~~~~~~ | |
| 790 | 805 | ||
| 791 | 806 | The server may advertise some promisor remotes it is using or knows | |
| 792 | 807 | about to a client which may want to use them as its promisor remotes, | |
| 793 | - | instead of this repository. In this case <pr-infos> should be of the | |
| 808 | + | instead of this repository. In this case <pr-info> should be of the | |
| 794 | 809 | form: | |
| 795 | 810 | ||
| 796 | - | pr-infos = pr-info | pr-infos ";" pr-info | |
| 811 | + | pr-info = pr-fields | pr-info ";" pr-fields | |
| 812 | + | ||
| 813 | + | pr-fields = pr-field | pr-fields "," pr-field | |
| 814 | + | ||
| 815 | + | pr-field = field-name "=" field-value | |
| 797 | 816 | ||
| 798 | - | pr-info = "name=" pr-name | "name=" pr-name "," "url=" pr-url | |
| 817 | + | where all the `field-name` and `field-value` in a given `pr-fields` | |
| 818 | + | are field names and values related to a single promisor remote. A | |
| 819 | + | given `field-name` MUST NOT appear more than once in given | |
| 820 | + | `pr-fields`. | |
| 799 | 821 | ||
| 800 | - | where `pr-name` is the urlencoded name of a promisor remote, and | |
| 801 | - | `pr-url` the urlencoded URL of that promisor remote. | |
| 822 | + | The server MUST advertise at least the "name" and "url" field names | |
| 823 | + | along with the associated field values, which are the name of a valid | |
| 824 | + | remote and its URL, in each `pr-fields`. The "name" and "url" fields | |
| 825 | + | MUST appear first in each pr-fields, in that order. | |
| 802 | 826 | ||
| 803 | - | In this case, if the client decides to use one or more promisor | |
| 804 | - | remotes the server advertised, it can reply with | |
| 805 | - | "promisor-remote=<pr-names>" where <pr-names> should be of the form: | |
| 827 | + | After these mandatory fields, the server MAY advertise the following | |
| 828 | + | optional fields in any order: | |
| 829 | + | ||
| 830 | + | `partialCloneFilter`:: The filter specification for the remote. It | |
| 831 | + | corresponds to the "remote.<name>.partialCloneFilter" config setting. | |
| 832 | + | Clients can use this to determine if the remote's filtering strategy | |
| 833 | + | is compatible with their needs (e.g., checking if both use | |
| 834 | + | "blob:none"). Additionally they can use this through the | |
| 835 | + | `--filter=auto` option in linkgit:git-clone[1]. With that option, the | |
| 836 | + | filter specification of the clone will be automatically computed by | |
| 837 | + | combining the filter specifications of the promisor remotes the client | |
| 838 | + | accepts. | |
| 839 | + | ||
| 840 | + | `token`:: An authentication token that clients can use when | |
| 841 | + | connecting to the remote. It corresponds to the "remote.<name>.token" | |
| 842 | + | config setting. | |
| 843 | + | ||
| 844 | + | No other fields are defined by the protocol at this time. Field names | |
| 845 | + | are case-sensitive and MUST be transmitted exactly as specified | |
| 846 | + | above. Clients MUST ignore fields they don't recognize to allow for | |
| 847 | + | future protocol extensions. | |
| 848 | + | ||
| 849 | + | The client can use information transmitted through these fields to | |
| 850 | + | decide if it accepts the advertised promisor remote. Also, the client | |
| 851 | + | can be configured to store the values of these fields or use them | |
| 852 | + | to automatically configure the repository (see "promisor.storeFields" | |
| 853 | + | in linkgit:git-config[1] and `--filter=auto` in linkgit:git-clone[1]). | |
| 854 | + | ||
| 855 | + | Field values MUST be urlencoded. | |
| 856 | + | ||
| 857 | + | If the client decides to use one or more promisor remotes the server | |
| 858 | + | advertised, it can reply with "promisor-remote=<pr-names>" where | |
| 859 | + | <pr-names> should be of the form: | |
| 806 | 860 | ||
| 807 | 861 | pr-names = pr-name | pr-names ";" pr-name | |
| 808 | 862 | ||
| 809 | 863 | where `pr-name` is the urlencoded name of a promisor remote the server | |
| 810 | 864 | advertised and the client accepts. | |
| 811 | 865 | ||
| 812 | - | Note that, everywhere in this document, `pr-name` MUST be a valid | |
| 813 | - | remote name, and the ';' and ',' characters MUST be encoded if they | |
| 814 | - | appear in `pr-name` or `pr-url`. | |
| 866 | + | The promisor remotes that the client accepted will be tried before the | |
| 867 | + | other configured promisor remotes when the client attempts to fetch | |
| 868 | + | missing objects. | |
| 869 | + | ||
| 870 | + | Note that, everywhere in this document, the ';' and ',' characters | |
| 871 | + | MUST be encoded if they appear in `pr-name` or `field-value`. | |
| 815 | 872 | ||
| 816 | 873 | If the server doesn't know any promisor remote that could be good for | |
| 817 | 874 | a client to use, or prefers a client not to use any promisor remote it | |
| @@ -822,10 +879,13 @@ In this case, or if the client doesn't want to use any promisor remote | |||
| 822 | 879 | the server advertised, the client shouldn't advertise the | |
| 823 | 880 | "promisor-remote" capability at all in its reply. | |
| 824 | 881 | ||
| 825 | - | The "promisor.advertise" and "promisor.acceptFromServer" configuration | |
| 826 | - | options can be used on the server and client side to control what they | |
| 827 | - | advertise or accept respectively. See the documentation of these | |
| 828 | - | configuration options for more information. | |
| 882 | + | On the server side, the "promisor.advertise" and "promisor.sendFields" | |
| 883 | + | configuration options can be used to control what it advertises. On | |
| 884 | + | the client side, the "promisor.acceptFromServer" and | |
| 885 | + | "promisor.acceptFromServerUrl" configuration options can be used to | |
| 886 | + | control what it accepts, and the "promisor.storeFields" option, to | |
| 887 | + | control what it stores. See the documentation of these configuration | |
| 888 | + | options in linkgit:git-config[1] for more information. | |
| 829 | 889 | ||
| 830 | 890 | Note that in the future it would be nice if the "promisor-remote" | |
| 831 | 891 | protocol capability could be used by the server, when responding to | |
modified Documentation/gitremote-helpers.adoc
| @@ -498,7 +498,7 @@ set by Git if the remote helper has the 'option' capability. | |||
| 498 | 498 | ask for the tag specifically. Some helpers may be able to | |
| 499 | 499 | use this option to avoid a second network connection. | |
| 500 | 500 | ||
| 501 | - | 'option dry-run' {'true'|'false'}: | |
| 501 | + | 'option dry-run' {'true'|'false'}:: | |
| 502 | 502 | If true, pretend the operation completed successfully, | |
| 503 | 503 | but don't actually change any repository data. For most | |
| 504 | 504 | helpers this only applies to the 'push', if supported. | |
modified Documentation/gitsubmodules.adoc
| @@ -8,6 +8,7 @@ gitsubmodules - Mounting one repository inside another | |||
| 8 | 8 | SYNOPSIS | |
| 9 | 9 | -------- | |
| 10 | 10 | .gitmodules, $GIT_DIR/config | |
| 11 | + | ||
| 11 | 12 | ------------------ | |
| 12 | 13 | git submodule | |
| 13 | 14 | git <command> --recurse-submodules | |
| @@ -240,7 +241,7 @@ Workflow for a third party library | |||
| 240 | 241 | ||
| 241 | 242 | ||
| 242 | 243 | Workflow for an artificially split repo | |
| 243 | - | -------------------------------------- | |
| 244 | + | --------------------------------------- | |
| 244 | 245 | ||
| 245 | 246 | # Enable recursion for relevant commands, such that | |
| 246 | 247 | # regular commands recurse into submodules by default | |
modified Documentation/gittutorial.adoc
| @@ -432,7 +432,7 @@ bob$ git config --get remote.origin.url | |||
| 432 | 432 | ------------------------------------- | |
| 433 | 433 | ||
| 434 | 434 | (The complete configuration created by `git clone` is visible using | |
| 435 | - | `git config -l`, and the linkgit:git-config[1] man page | |
| 435 | + | `git config list`, and the linkgit:git-config[1] man page | |
| 436 | 436 | explains the meaning of each option.) | |
| 437 | 437 | ||
| 438 | 438 | Git also keeps a pristine copy of Alice's `master` branch under the | |
modified Documentation/gitweb.conf.adoc
| @@ -178,7 +178,7 @@ $export_ok:: | |||
| 178 | 178 | Show repository only if this file exists (in repository). Only | |
| 179 | 179 | effective if this variable evaluates to true. Can be set when | |
| 180 | 180 | building gitweb by setting `GITWEB_EXPORT_OK`. This path is | |
| 181 | - | relative to `GIT_DIR`. git-daemon[1] uses 'git-daemon-export-ok', | |
| 181 | + | relative to `GIT_DIR`. linkgit:git-daemon[1] uses 'git-daemon-export-ok', | |
| 182 | 182 | unless started with `--export-all`. By default this variable is | |
| 183 | 183 | not set, which means that this feature is turned off. | |
| 184 | 184 | ||
modified Documentation/glossary-content.adoc
| @@ -297,8 +297,8 @@ This commit is referred to as a "merge commit", or sometimes just a | |||
| 297 | 297 | identified by its <<def_object_name,object name>>. The objects usually | |
| 298 | 298 | live in `$GIT_DIR/objects/`. | |
| 299 | 299 | ||
| 300 | - | [[def_object_identifier]]object identifier (oid):: | |
| 301 | - | Synonym for <<def_object_name,object name>>. | |
| 300 | + | [[def_object_identifier]]object identifier, object ID, oid:: | |
| 301 | + | Synonyms for <<def_object_name,object name>>. | |
| 302 | 302 | ||
| 303 | 303 | [[def_object_name]]object name:: | |
| 304 | 304 | The unique identifier of an <<def_object,object>>. The | |
| @@ -418,9 +418,8 @@ full pathname may have special meaning: | |||
| 418 | 418 | ||
| 419 | 419 | - A leading "`**`" followed by a slash means match in all | |
| 420 | 420 | directories. For example, "`**/foo`" matches file or directory | |
| 421 | - | "`foo`" anywhere, the same as pattern "`foo`". "`**/foo/bar`" | |
| 422 | - | matches file or directory "`bar`" anywhere that is directly | |
| 423 | - | under directory "`foo`". | |
| 421 | + | "`foo`" anywhere. "`**/foo/bar`" matches file or directory "`bar`" | |
| 422 | + | anywhere that is directly under directory "`foo`". | |
| 424 | 423 | ||
| 425 | 424 | - A trailing "`/**`" matches everything inside. For example, | |
| 426 | 425 | "`abc/**`" matches all files inside directory "abc", relative | |
| @@ -431,6 +430,7 @@ full pathname may have special meaning: | |||
| 431 | 430 | matches "`a/b`", "`a/x/b`", "`a/x/y/b`" and so on. | |
| 432 | 431 | ||
| 433 | 432 | - Other consecutive asterisks are considered invalid. | |
| 433 | + | ||
| 434 | 434 | + | |
| 435 | 435 | Glob magic is incompatible with literal magic. | |
| 436 | 436 | ||
| @@ -453,6 +453,7 @@ these forms: | |||
| 453 | 453 | ||
| 454 | 454 | - "`!ATTR`" requires that the attribute `ATTR` be | |
| 455 | 455 | unspecified. | |
| 456 | + | ||
| 456 | 457 | + | |
| 457 | 458 | Note that when matching against a tree object, attributes are still | |
| 458 | 459 | obtained from working tree, not from the given tree object. | |
| @@ -561,14 +562,17 @@ The ref namespace is hierarchical. | |||
| 561 | 562 | Ref names must either start with `refs/` or be located in the root of | |
| 562 | 563 | the hierarchy. For the latter, their name must follow these rules: | |
| 563 | 564 | + | |
| 565 | + | -- | |
| 564 | 566 | - The name consists of only upper-case characters or underscores. | |
| 565 | 567 | ||
| 566 | 568 | - The name ends with "`_HEAD`" or is equal to "`HEAD`". | |
| 569 | + | -- | |
| 567 | 570 | + | |
| 568 | 571 | There are some irregular refs in the root of the hierarchy that do not | |
| 569 | 572 | match these rules. The following list is exhaustive and shall not be | |
| 570 | 573 | extended in the future: | |
| 571 | 574 | + | |
| 575 | + | -- | |
| 572 | 576 | - `AUTO_MERGE` | |
| 573 | 577 | ||
| 574 | 578 | - `BISECT_EXPECTED_REV` | |
| @@ -578,6 +582,7 @@ extended in the future: | |||
| 578 | 582 | - `NOTES_MERGE_REF` | |
| 579 | 583 | ||
| 580 | 584 | - `MERGE_AUTOSTASH` | |
| 585 | + | -- | |
| 581 | 586 | + | |
| 582 | 587 | Different subhierarchies are used for different purposes. For example, | |
| 583 | 588 | the `refs/heads/` hierarchy is used to represent local branches whereas | |
modified Documentation/howto/meson.build
| @@ -29,13 +29,13 @@ howto_index = custom_target( | |||
| 29 | 29 | output: 'howto-index.adoc', | |
| 30 | 30 | ) | |
| 31 | 31 | ||
| 32 | - | custom_target( | |
| 32 | + | doc_targets += custom_target( | |
| 33 | 33 | command: asciidoc_html_options, | |
| 34 | 34 | input: howto_index, | |
| 35 | 35 | output: 'howto-index.html', | |
| 36 | 36 | depends: documentation_deps, | |
| 37 | 37 | install: true, | |
| 38 | - | install_dir: get_option('datadir') / 'doc/git-doc', | |
| 38 | + | install_dir: htmldir, | |
| 39 | 39 | ) | |
| 40 | 40 | ||
| 41 | 41 | foreach howto : howto_sources | |
| @@ -51,12 +51,12 @@ foreach howto : howto_sources | |||
| 51 | 51 | capture: true, | |
| 52 | 52 | ) | |
| 53 | 53 | ||
| 54 | - | custom_target( | |
| 54 | + | doc_targets += custom_target( | |
| 55 | 55 | command: asciidoc_html_options, | |
| 56 | 56 | input: howto_stripped, | |
| 57 | 57 | output: fs.stem(howto_stripped.full_path()) + '.html', | |
| 58 | 58 | depends: documentation_deps, | |
| 59 | 59 | install: true, | |
| 60 | - | install_dir: get_option('datadir') / 'doc/git-doc/howto', | |
| 60 | + | install_dir: htmldir / 'howto', | |
| 61 | 61 | ) | |
| 62 | 62 | endforeach | |
modified Documentation/line-range-format.adoc
| @@ -1,30 +1,30 @@ | |||
| 1 | - | '<start>' and '<end>' can take one of these forms: | |
| 1 | + | _<start>_ and _<end>_ can take one of these forms: | |
| 2 | 2 | ||
| 3 | - | - number | |
| 3 | + | - _<number>_ | |
| 4 | 4 | + | |
| 5 | - | If '<start>' or '<end>' is a number, it specifies an | |
| 5 | + | If _<start>_ or _<end>_ is a number, it specifies an | |
| 6 | 6 | absolute line number (lines count from 1). | |
| 7 | 7 | + | |
| 8 | 8 | ||
| 9 | - | - `/regex/` | |
| 9 | + | - `/<regex>/` | |
| 10 | 10 | + | |
| 11 | 11 | This form will use the first line matching the given | |
| 12 | - | POSIX regex. If '<start>' is a regex, it will search from the end of | |
| 12 | + | POSIX _<regex>_. If _<start>_ is a regex, it will search from the end of | |
| 13 | 13 | the previous `-L` range, if any, otherwise from the start of file. | |
| 14 | - | If '<start>' is `^/regex/`, it will search from the start of file. | |
| 15 | - | If '<end>' is a regex, it will search | |
| 16 | - | starting at the line given by '<start>'. | |
| 14 | + | If _<start>_ is `^/<regex>/`, it will search from the start of file. | |
| 15 | + | If _<end>_ is a regex, it will search starting at the line given by | |
| 16 | + | _<start>_. | |
| 17 | 17 | + | |
| 18 | 18 | ||
| 19 | - | - +offset or -offset | |
| 19 | + | - `+<offset>` or `-<offset>` | |
| 20 | 20 | + | |
| 21 | - | This is only valid for '<end>' and will specify a number | |
| 22 | - | of lines before or after the line given by '<start>'. | |
| 21 | + | This is only valid for _<end>_ and will specify a number | |
| 22 | + | of lines before or after the line given by _<start>_. | |
| 23 | 23 | ||
| 24 | 24 | + | |
| 25 | - | If `:<funcname>` is given in place of '<start>' and '<end>', it is a | |
| 25 | + | If `:<funcname>` is given in place of _<start>_ and _<end>_, it is a | |
| 26 | 26 | regular expression that denotes the range from the first funcname line | |
| 27 | - | that matches '<funcname>', up to the next funcname line. `:<funcname>` | |
| 27 | + | that matches _<funcname>_, up to the next funcname line. `:<funcname>` | |
| 28 | 28 | searches from the end of the previous `-L` range, if any, otherwise | |
| 29 | 29 | from the start of file. `^:<funcname>` searches from the start of | |
| 30 | 30 | file. The function names are determined in the same way as `git diff` | |
modified Documentation/line-range-options.adoc
| @@ -1,15 +1,21 @@ | |||
| 1 | - | -L<start>,<end>:<file>:: | |
| 2 | - | -L:<funcname>:<file>:: | |
| 1 | + | `-L<start>,<end>:<file>`:: | |
| 2 | + | `-L:<funcname>:<file>`:: | |
| 3 | 3 | ||
| 4 | - | Trace the evolution of the line range given by '<start>,<end>', | |
| 5 | - | or by the function name regex '<funcname>', within the '<file>'. You may | |
| 4 | + | Trace the evolution of the line range given by `<start>,<end>`, | |
| 5 | + | or by the function name regex _<funcname>_, within the _<file>_. You may | |
| 6 | 6 | not give any pathspec limiters. This is currently limited to | |
| 7 | 7 | a walk starting from a single revision, i.e., you may only | |
| 8 | 8 | give zero or one positive revision arguments, and | |
| 9 | - | '<start>' and '<end>' (or '<funcname>') must exist in the starting revision. | |
| 9 | + | _<start>_ and _<end>_ (or _<funcname>_) must exist in the starting revision. | |
| 10 | 10 | You can specify this option more than once. Implies `--patch`. | |
| 11 | - | Patch output can be suppressed using `--no-patch`, but other diff formats | |
| 12 | - | (namely `--raw`, `--numstat`, `--shortstat`, `--dirstat`, `--summary`, | |
| 13 | - | `--name-only`, `--name-status`, `--check`) are not currently implemented. | |
| 11 | + | Patch output can be suppressed using `--no-patch`. | |
| 12 | + | Non-patch diff formats `--raw`, `--name-only`, `--name-status`, | |
| 13 | + | and `--summary` are supported. Diff stat formats | |
| 14 | + | (`--stat`, `--numstat`, `--shortstat`, `--dirstat`) are not | |
| 15 | + | currently implemented. | |
| 16 | + | + | |
| 17 | + | Patch formatting options such as `--word-diff`, `--color-moved`, | |
| 18 | + | `--no-prefix`, and whitespace options (`-w`, `-b`) are supported, | |
| 19 | + | as are pickaxe options (`-S`, `-G`) and `--diff-filter`. | |
| 14 | 20 | + | |
| 15 | 21 | include::line-range-format.adoc[] | |
added Documentation/lint-delimited-sections.perl mode 100755
| @@ -0,0 +1,48 @@ | |||
| 1 | + | #!/usr/bin/perl | |
| 2 | + | ||
| 3 | + | use strict; | |
| 4 | + | use warnings; | |
| 5 | + | ||
| 6 | + | my $exit_code = 0; | |
| 7 | + | sub report { | |
| 8 | + | my ($msg) = @_; | |
| 9 | + | print STDERR "$ARGV:$.: $msg\n"; | |
| 10 | + | $exit_code = 1; | |
| 11 | + | } | |
| 12 | + | ||
| 13 | + | my $line_length = 0; | |
| 14 | + | my $in_section = 0; | |
| 15 | + | my $section_header = ""; | |
| 16 | + | ||
| 17 | + | ||
| 18 | + | while (my $line = <>) { | |
| 19 | + | if (($line =~ /^\+?$/) || | |
| 20 | + | ($line =~ /^\[.*\]$/) || | |
| 21 | + | ($line =~ /^ifdef::/)) { | |
| 22 | + | $line_length = 0; | |
| 23 | + | } elsif ($line =~ /^[^-.]/) { | |
| 24 | + | $line_length = length($line); | |
| 25 | + | } elsif (($line =~ /^-{3,}$/) || ($line =~ /^\.{3,}$/)) { | |
| 26 | + | if ($in_section) { | |
| 27 | + | if ($line eq $section_header) { | |
| 28 | + | $in_section = 0; | |
| 29 | + | } | |
| 30 | + | next; | |
| 31 | + | } | |
| 32 | + | if ($line_length == 0) { | |
| 33 | + | $in_section = 1; | |
| 34 | + | $section_header = $line; | |
| 35 | + | next; | |
| 36 | + | } | |
| 37 | + | if (($line_length != 0) && (length($line) != $line_length)) { | |
| 38 | + | report("section delimiter not preceded by an empty line"); | |
| 39 | + | } | |
| 40 | + | $line_length = 0; | |
| 41 | + | } | |
| 42 | + | } | |
| 43 | + | ||
| 44 | + | if ($in_section) { | |
| 45 | + | report("section not finished"); | |
| 46 | + | } | |
| 47 | + | ||
| 48 | + | exit $exit_code; | |
added Documentation/lint-documentation-style.perl mode 100755
| @@ -0,0 +1,33 @@ | |||
| 1 | + | #!/usr/bin/perl | |
| 2 | + | ||
| 3 | + | use strict; | |
| 4 | + | use warnings; | |
| 5 | + | ||
| 6 | + | my $exit_code = 0; | |
| 7 | + | sub report { | |
| 8 | + | my ($line, $msg) = @_; | |
| 9 | + | chomp $line; | |
| 10 | + | print STDERR "$ARGV:$.: '$line' $msg\n"; | |
| 11 | + | $exit_code = 1; | |
| 12 | + | } | |
| 13 | + | ||
| 14 | + | my $synopsis_style = 0; | |
| 15 | + | ||
| 16 | + | while (my $line = <>) { | |
| 17 | + | if ($line =~ /^[ \t]*`?[-a-z0-9.]+`?(, `?[-a-z0-9.]+`?)+(::|;;)$/) { | |
| 18 | + | ||
| 19 | + | report($line, "multiple parameters in a definition list item"); | |
| 20 | + | } | |
| 21 | + | if ($line =~ /^`?--\[no-\][a-z0-9-]+.*(::|;;)$/) { | |
| 22 | + | report($line, "definition list item with a `--[no-]` parameter"); | |
| 23 | + | } | |
| 24 | + | if ($line =~ /^\[synopsis\]$/) { | |
| 25 | + | $synopsis_style = 1; | |
| 26 | + | } | |
| 27 | + | if (($line =~ /^(-[-a-z].*|<[-a-z0-9]+>(\.{3})?)(::|;;)$/) && ($synopsis_style)) { | |
| 28 | + | report($line, "synopsis style and definition list item not backquoted"); | |
| 29 | + | } | |
| 30 | + | } | |
| 31 | + | ||
| 32 | + | ||
| 33 | + | exit $exit_code; | |
modified Documentation/lint-gitlink.perl
| @@ -41,6 +41,14 @@ die "BUG: No list of valid linkgit:* files given" unless @ARGV; | |||
| 41 | 41 | @ARGV = $to_check; | |
| 42 | 42 | while (<>) { | |
| 43 | 43 | my $line = $_; | |
| 44 | + | next if $line =~ /^\s*(ifn?def|endif)::/; | |
| 45 | + | while ($line =~ m/(.{,8})((git[-a-z]+|scalar)\[(\d)*\])/g) { | |
| 46 | + | my $pos = pos $line; | |
| 47 | + | my ($macro, $target, $page, $section) = ($1, $2, $3, $4); | |
| 48 | + | if ( $macro ne "linkgit:" ) { | |
| 49 | + | report($pos, $line, $target, "linkgit: macro expected"); | |
| 50 | + | } | |
| 51 | + | } | |
| 44 | 52 | while ($line =~ m/linkgit:((.*?)\[(\d)\])/g) { | |
| 45 | 53 | my $pos = pos $line; | |
| 46 | 54 | my ($target, $page, $section) = ($1, $2, $3); | |
modified Documentation/merge-options.adoc
| @@ -56,7 +56,7 @@ ifdef::git-pull[] | |||
| 56 | 56 | `--ff-only`:: | |
| 57 | 57 | Only update to the new history if there is no divergent local | |
| 58 | 58 | history. This is the default when no method for reconciling | |
| 59 | - | divergent histories is provided (via the --rebase=* flags). | |
| 59 | + | divergent histories is provided (via the `--rebase` flags). | |
| 60 | 60 | ||
| 61 | 61 | `--ff`:: | |
| 62 | 62 | `--no-ff`:: | |
| @@ -113,6 +113,9 @@ include::signoff-option.adoc[] | |||
| 113 | 113 | With `-n` or `--no-stat` do not show a diffstat at the end of the | |
| 114 | 114 | merge. | |
| 115 | 115 | ||
| 116 | + | `--compact-summary`:: | |
| 117 | + | Show a compact-summary at the end of the merge. | |
| 118 | + | ||
| 116 | 119 | `--squash`:: | |
| 117 | 120 | `--no-squash`:: | |
| 118 | 121 | Produce the working tree and index state as if a real merge | |
| @@ -132,7 +135,8 @@ ifdef::git-pull[] | |||
| 132 | 135 | Only useful when merging. | |
| 133 | 136 | endif::git-pull[] | |
| 134 | 137 | ||
| 135 | - | `--[no-]verify`:: | |
| 138 | + | `--verify`:: | |
| 139 | + | `--no-verify`:: | |
| 136 | 140 | By default, the pre-merge and commit-msg hooks are run. | |
| 137 | 141 | When `--no-verify` is given, these are bypassed. | |
| 138 | 142 | See also linkgit:githooks[5]. | |
modified Documentation/mergetools/vimdiff.adoc
| @@ -3,6 +3,7 @@ Description | |||
| 3 | 3 | ||
| 4 | 4 | When specifying `--tool=vimdiff` in `git mergetool` Git will open Vim with a 4 | |
| 5 | 5 | windows layout distributed in the following way: | |
| 6 | + | ||
| 6 | 7 | .... | |
| 7 | 8 | ------------------------------------------ | |
| 8 | 9 | | | | | | |
| @@ -56,6 +57,7 @@ needed in this case. The next layout definition is equivalent: | |||
| 56 | 57 | + | |
| 57 | 58 | -- | |
| 58 | 59 | If, for some reason, we are not interested in the `BASE` buffer. | |
| 60 | + | ||
| 59 | 61 | .... | |
| 60 | 62 | ------------------------------------------ | |
| 61 | 63 | | | | | | |
| @@ -72,6 +74,7 @@ If, for some reason, we are not interested in the `BASE` buffer. | |||
| 72 | 74 | Only the `MERGED` buffer will be shown. Note, however, that all the other | |
| 73 | 75 | ones are still loaded in vim, and you can access them with the "buffers" | |
| 74 | 76 | command. | |
| 77 | + | ||
| 75 | 78 | .... | |
| 76 | 79 | ------------------------------------------ | |
| 77 | 80 | | | | |
| @@ -88,6 +91,7 @@ command. | |||
| 88 | 91 | When `MERGED` is not present in the layout, you must "mark" one of the | |
| 89 | 92 | buffers with an arobase (`@`). That will become the buffer you need to edit and | |
| 90 | 93 | save after resolving the conflicts. | |
| 94 | + | ||
| 91 | 95 | .... | |
| 92 | 96 | ------------------------------------------ | |
| 93 | 97 | | | | | |
| @@ -106,6 +110,7 @@ save after resolving the conflicts. | |||
| 106 | 110 | Three tabs will open: the first one is a copy of the default layout, while | |
| 107 | 111 | the other two only show the differences between (`BASE` and `LOCAL`) and | |
| 108 | 112 | (`BASE` and `REMOTE`) respectively. | |
| 113 | + | ||
| 109 | 114 | .... | |
| 110 | 115 | ------------------------------------------ | |
| 111 | 116 | | <TAB #1> | TAB #2 | TAB #3 | | | |
| @@ -119,6 +124,7 @@ the other two only show the differences between (`BASE` and `LOCAL`) and | |||
| 119 | 124 | | | | |
| 120 | 125 | ------------------------------------------ | |
| 121 | 126 | .... | |
| 127 | + | ||
| 122 | 128 | .... | |
| 123 | 129 | ------------------------------------------ | |
| 124 | 130 | | TAB #1 | <TAB #2> | TAB #3 | | | |
| @@ -132,6 +138,7 @@ the other two only show the differences between (`BASE` and `LOCAL`) and | |||
| 132 | 138 | | | | | |
| 133 | 139 | ------------------------------------------ | |
| 134 | 140 | .... | |
| 141 | + | ||
| 135 | 142 | .... | |
| 136 | 143 | ------------------------------------------ | |
| 137 | 144 | | TAB #1 | TAB #2 | <TAB #3> | | | |
| @@ -151,6 +158,7 @@ the other two only show the differences between (`BASE` and `LOCAL`) and | |||
| 151 | 158 | -- | |
| 152 | 159 | Same as the previous example, but adds a fourth tab with the same | |
| 153 | 160 | information as the first tab, with a different layout. | |
| 161 | + | ||
| 154 | 162 | .... | |
| 155 | 163 | --------------------------------------------- | |
| 156 | 164 | | TAB #1 | TAB #2 | TAB #3 | <TAB #4> | | |
modified Documentation/meson.build
| @@ -55,6 +55,7 @@ manpages = { | |||
| 55 | 55 | 'git-for-each-ref.adoc' : 1, | |
| 56 | 56 | 'git-for-each-repo.adoc' : 1, | |
| 57 | 57 | 'git-format-patch.adoc' : 1, | |
| 58 | + | 'git-format-rev.adoc' : 1, | |
| 58 | 59 | 'git-fsck-objects.adoc' : 1, | |
| 59 | 60 | 'git-fsck.adoc' : 1, | |
| 60 | 61 | 'git-fsmonitor--daemon.adoc' : 1, | |
| @@ -64,6 +65,7 @@ manpages = { | |||
| 64 | 65 | 'git-gui.adoc' : 1, | |
| 65 | 66 | 'git-hash-object.adoc' : 1, | |
| 66 | 67 | 'git-help.adoc' : 1, | |
| 68 | + | 'git-history.adoc' : 1, | |
| 67 | 69 | 'git-hook.adoc' : 1, | |
| 68 | 70 | 'git-http-backend.adoc' : 1, | |
| 69 | 71 | 'git-http-fetch.adoc' : 1, | |
| @@ -74,6 +76,7 @@ manpages = { | |||
| 74 | 76 | 'git-init.adoc' : 1, | |
| 75 | 77 | 'git-instaweb.adoc' : 1, | |
| 76 | 78 | 'git-interpret-trailers.adoc' : 1, | |
| 79 | + | 'git-last-modified.adoc' : 1, | |
| 77 | 80 | 'git-log.adoc' : 1, | |
| 78 | 81 | 'git-ls-files.adoc' : 1, | |
| 79 | 82 | 'git-ls-remote.adoc' : 1, | |
| @@ -116,6 +119,7 @@ manpages = { | |||
| 116 | 119 | 'git-repack.adoc' : 1, | |
| 117 | 120 | 'git-replace.adoc' : 1, | |
| 118 | 121 | 'git-replay.adoc' : 1, | |
| 122 | + | 'git-repo.adoc' : 1, | |
| 119 | 123 | 'git-request-pull.adoc' : 1, | |
| 120 | 124 | 'git-rerere.adoc' : 1, | |
| 121 | 125 | 'git-reset.adoc' : 1, | |
| @@ -152,13 +156,13 @@ manpages = { | |||
| 152 | 156 | 'git-update-server-info.adoc' : 1, | |
| 153 | 157 | 'git-upload-archive.adoc' : 1, | |
| 154 | 158 | 'git-upload-pack.adoc' : 1, | |
| 159 | + | 'git-url-parse.adoc' : 1, | |
| 155 | 160 | 'git-var.adoc' : 1, | |
| 156 | 161 | 'git-verify-commit.adoc' : 1, | |
| 157 | 162 | 'git-verify-pack.adoc' : 1, | |
| 158 | 163 | 'git-verify-tag.adoc' : 1, | |
| 159 | 164 | 'git-version.adoc' : 1, | |
| 160 | 165 | 'git-web--browse.adoc' : 1, | |
| 161 | - | 'git-whatchanged.adoc' : 1, | |
| 162 | 166 | 'git-worktree.adoc' : 1, | |
| 163 | 167 | 'git-write-tree.adoc' : 1, | |
| 164 | 168 | 'git.adoc' : 1, | |
| @@ -172,6 +176,7 @@ manpages = { | |||
| 172 | 176 | 'gitformat-chunk.adoc' : 5, | |
| 173 | 177 | 'gitformat-commit-graph.adoc' : 5, | |
| 174 | 178 | 'gitformat-index.adoc' : 5, | |
| 179 | + | 'gitformat-loose.adoc' : 5, | |
| 175 | 180 | 'gitformat-pack.adoc' : 5, | |
| 176 | 181 | 'gitformat-signature.adoc' : 5, | |
| 177 | 182 | 'githooks.adoc' : 5, | |
| @@ -191,6 +196,7 @@ manpages = { | |||
| 191 | 196 | 'gitcore-tutorial.adoc' : 7, | |
| 192 | 197 | 'gitcredentials.adoc' : 7, | |
| 193 | 198 | 'gitcvs-migration.adoc' : 7, | |
| 199 | + | 'gitdatamodel.adoc' : 7, | |
| 194 | 200 | 'gitdiffcore.adoc' : 7, | |
| 195 | 201 | 'giteveryday.adoc' : 7, | |
| 196 | 202 | 'gitfaq.adoc' : 7, | |
| @@ -207,6 +213,7 @@ manpages = { | |||
| 207 | 213 | ||
| 208 | 214 | manpages_breaking_changes = { | |
| 209 | 215 | 'git-pack-redundant.adoc' : 1, | |
| 216 | + | 'git-whatchanged.adoc' : 1, | |
| 210 | 217 | } | |
| 211 | 218 | ||
| 212 | 219 | if not get_option('breaking_changes') | |
| @@ -349,13 +356,10 @@ foreach mode : [ 'diff', 'merge' ] | |||
| 349 | 356 | command: [ | |
| 350 | 357 | shell, | |
| 351 | 358 | '@INPUT@', | |
| 352 | - | '..', | |
| 359 | + | meson.project_source_root(), | |
| 353 | 360 | mode, | |
| 354 | 361 | '@OUTPUT@' | |
| 355 | 362 | ], | |
| 356 | - | env: [ | |
| 357 | - | 'MERGE_TOOLS_DIR=' + meson.project_source_root() / 'mergetools', | |
| 358 | - | ], | |
| 359 | 363 | input: 'generate-mergetool-list.sh', | |
| 360 | 364 | output: 'mergetools-' + mode + '.adoc', | |
| 361 | 365 | ) | |
| @@ -375,8 +379,7 @@ foreach manpage, category : manpages | |||
| 375 | 379 | output: fs.stem(manpage) + '.xml', | |
| 376 | 380 | ) | |
| 377 | 381 | ||
| 378 | - | manpage_path = fs.stem(manpage) + '.' + category.to_string() | |
| 379 | - | manpage_target = custom_target( | |
| 382 | + | doc_targets += custom_target( | |
| 380 | 383 | command: [ | |
| 381 | 384 | xmlto, | |
| 382 | 385 | '-m', '@INPUT0@', | |
| @@ -392,14 +395,14 @@ foreach manpage, category : manpages | |||
| 392 | 395 | 'manpage-normal.xsl', | |
| 393 | 396 | 'manpage-bold-literal.xsl', | |
| 394 | 397 | ], | |
| 395 | - | output: manpage_path, | |
| 398 | + | output: fs.stem(manpage) + '.' + category.to_string(), | |
| 396 | 399 | install: true, | |
| 397 | 400 | install_dir: get_option('mandir') / 'man' + category.to_string(), | |
| 398 | 401 | ) | |
| 399 | 402 | endif | |
| 400 | 403 | ||
| 401 | 404 | if get_option('docs').contains('html') | |
| 402 | - | custom_target( | |
| 405 | + | doc_targets += custom_target( | |
| 403 | 406 | command: asciidoc_common_options + [ | |
| 404 | 407 | '--backend=' + asciidoc_html, | |
| 405 | 408 | '--doctype=manpage', | |
| @@ -410,7 +413,7 @@ foreach manpage, category : manpages | |||
| 410 | 413 | input: manpage, | |
| 411 | 414 | output: fs.stem(manpage) + '.html', | |
| 412 | 415 | install: true, | |
| 413 | - | install_dir: get_option('datadir') / 'doc/git-doc', | |
| 416 | + | install_dir: htmldir, | |
| 414 | 417 | ) | |
| 415 | 418 | endif | |
| 416 | 419 | endforeach | |
| @@ -421,7 +424,7 @@ if get_option('docs').contains('html') | |||
| 421 | 424 | output: 'docinfo.html', | |
| 422 | 425 | copy: true, | |
| 423 | 426 | install: true, | |
| 424 | - | install_dir: get_option('datadir') / 'doc/git-doc', | |
| 427 | + | install_dir: htmldir, | |
| 425 | 428 | ) | |
| 426 | 429 | ||
| 427 | 430 | configure_file( | |
| @@ -429,11 +432,11 @@ if get_option('docs').contains('html') | |||
| 429 | 432 | output: 'docbook-xsl.css', | |
| 430 | 433 | copy: true, | |
| 431 | 434 | install: true, | |
| 432 | - | install_dir: get_option('datadir') / 'doc/git-doc', | |
| 435 | + | install_dir: htmldir, | |
| 433 | 436 | ) | |
| 434 | 437 | ||
| 435 | 438 | install_symlink('index.html', | |
| 436 | - | install_dir: get_option('datadir') / 'doc/git-doc', | |
| 439 | + | install_dir: htmldir, | |
| 437 | 440 | pointing_to: 'git.html', | |
| 438 | 441 | ) | |
| 439 | 442 | ||
| @@ -451,7 +454,7 @@ if get_option('docs').contains('html') | |||
| 451 | 454 | depends: documentation_deps, | |
| 452 | 455 | ) | |
| 453 | 456 | ||
| 454 | - | custom_target( | |
| 457 | + | doc_targets += custom_target( | |
| 455 | 458 | command: [ | |
| 456 | 459 | xsltproc, | |
| 457 | 460 | '--xinclude', | |
| @@ -464,7 +467,7 @@ if get_option('docs').contains('html') | |||
| 464 | 467 | input: 'docbook.xsl', | |
| 465 | 468 | output: 'user-manual.html', | |
| 466 | 469 | install: true, | |
| 467 | - | install_dir: get_option('datadir') / 'doc/git-doc', | |
| 470 | + | install_dir: htmldir, | |
| 468 | 471 | ) | |
| 469 | 472 | ||
| 470 | 473 | articles = [ | |
| @@ -480,7 +483,7 @@ if get_option('docs').contains('html') | |||
| 480 | 483 | ] | |
| 481 | 484 | ||
| 482 | 485 | foreach article : articles | |
| 483 | - | custom_target( | |
| 486 | + | doc_targets += custom_target( | |
| 484 | 487 | command: asciidoc_common_options + [ | |
| 485 | 488 | '--backend=' + asciidoc_html, | |
| 486 | 489 | '--out-file=@OUTPUT@', | |
| @@ -490,7 +493,7 @@ if get_option('docs').contains('html') | |||
| 490 | 493 | output: fs.stem(article) + '.html', | |
| 491 | 494 | depends: documentation_deps, | |
| 492 | 495 | install: true, | |
| 493 | - | install_dir: get_option('datadir') / 'doc/git-doc', | |
| 496 | + | install_dir: htmldir, | |
| 494 | 497 | ) | |
| 495 | 498 | endforeach | |
| 496 | 499 | ||
added Documentation/pack-refs-options.adoc mode 100644
| @@ -0,0 +1,52 @@ | |||
| 1 | + | --all:: | |
| 2 | + | ||
| 3 | + | The command by default packs all tags and refs that are already | |
| 4 | + | packed, and leaves other refs | |
| 5 | + | alone. This is because branches are expected to be actively | |
| 6 | + | developed and packing their tips does not help performance. | |
| 7 | + | This option causes all refs to be packed as well, with the exception | |
| 8 | + | of hidden refs, broken refs, and symbolic refs. Useful for a repository | |
| 9 | + | with many branches of historical interests. | |
| 10 | + | ||
| 11 | + | --no-prune:: | |
| 12 | + | ||
| 13 | + | The command usually removes loose refs under `$GIT_DIR/refs` | |
| 14 | + | hierarchy after packing them. This option tells it not to. | |
| 15 | + | ||
| 16 | + | --auto:: | |
| 17 | + | ||
| 18 | + | Pack refs as needed depending on the current state of the ref database. The | |
| 19 | + | behavior depends on the ref format used by the repository and may change in the | |
| 20 | + | future. | |
| 21 | + | + | |
| 22 | + | - "files": Loose references are packed into the `packed-refs` file | |
| 23 | + | based on the ratio of loose references to the size of the | |
| 24 | + | `packed-refs` file. The bigger the `packed-refs` file, the more loose | |
| 25 | + | references need to exist before we repack. | |
| 26 | + | + | |
| 27 | + | - "reftable": Tables are compacted such that they form a geometric | |
| 28 | + | sequence. For two tables N and N+1, where N+1 is newer, this | |
| 29 | + | maintains the property that N is at least twice as big as N+1. Only | |
| 30 | + | tables that violate this property are compacted. | |
| 31 | + | ||
| 32 | + | --include <pattern>:: | |
| 33 | + | ||
| 34 | + | Pack refs based on a `glob(7)` pattern. Repetitions of this option | |
| 35 | + | accumulate inclusion patterns. If a ref is both included in `--include` and | |
| 36 | + | `--exclude`, `--exclude` takes precedence. Using `--include` will preclude all | |
| 37 | + | tags from being included by default. Symbolic refs and broken refs will never | |
| 38 | + | be packed. When used with `--all`, it will be a noop. Use `--no-include` to clear | |
| 39 | + | and reset the list of patterns. | |
| 40 | + | ||
| 41 | + | --exclude <pattern>:: | |
| 42 | + | ||
| 43 | + | Do not pack refs matching the given `glob(7)` pattern. Repetitions of this option | |
| 44 | + | accumulate exclusion patterns. Use `--no-exclude` to clear and reset the list of | |
| 45 | + | patterns. If a ref is already packed, including it with `--exclude` will not | |
| 46 | + | unpack it. | |
| 47 | + | + | |
| 48 | + | When used with `--all`, pack only loose refs which do not match any of | |
| 49 | + | the provided `--exclude` patterns. | |
| 50 | + | + | |
| 51 | + | When used with `--include`, refs provided to `--include`, minus refs that are | |
| 52 | + | provided to `--exclude` will be packed. | |
modified Documentation/pretty-formats.adoc
| @@ -2,11 +2,11 @@ PRETTY FORMATS | |||
| 2 | 2 | -------------- | |
| 3 | 3 | ||
| 4 | 4 | If the commit is a merge, and if the pretty-format | |
| 5 | - | is not 'oneline', 'email' or 'raw', an additional line is | |
| 6 | - | inserted before the 'Author:' line. This line begins with | |
| 5 | + | is not `oneline`, `email` or `raw`, an additional line is | |
| 6 | + | inserted before the `Author:` line. This line begins with | |
| 7 | 7 | "Merge: " and the hashes of ancestral commits are printed, | |
| 8 | 8 | separated by spaces. Note that the listed commits may not | |
| 9 | - | necessarily be the list of the *direct* parent commits if you | |
| 9 | + | necessarily be the list of the 'direct' parent commits if you | |
| 10 | 10 | have limited your view of history: for example, if you are | |
| 11 | 11 | only interested in changes related to a certain directory or | |
| 12 | 12 | file. | |
| @@ -14,99 +14,117 @@ file. | |||
| 14 | 14 | There are several built-in formats, and you can define | |
| 15 | 15 | additional formats by setting a pretty.<name> | |
| 16 | 16 | config option to either another format name, or a | |
| 17 | - | 'format:' string, as described below (see | |
| 17 | + | `format:` string, as described below (see | |
| 18 | 18 | linkgit:git-config[1]). Here are the details of the | |
| 19 | 19 | built-in formats: | |
| 20 | 20 | ||
| 21 | - | * 'oneline' | |
| 22 | - | ||
| 23 | - | <hash> <title-line> | |
| 21 | + | `oneline`:: | |
| 22 | + | + | |
| 23 | + | [synopsis] | |
| 24 | + | -- | |
| 25 | + | <hash> <title-line> | |
| 26 | + | -- | |
| 24 | 27 | + | |
| 25 | 28 | This is designed to be as compact as possible. | |
| 26 | 29 | ||
| 27 | - | * 'short' | |
| 28 | - | ||
| 29 | - | commit <hash> | |
| 30 | - | Author: <author> | |
| 31 | - | ||
| 32 | - | <title-line> | |
| 33 | - | ||
| 34 | - | * 'medium' | |
| 35 | - | ||
| 36 | - | commit <hash> | |
| 37 | - | Author: <author> | |
| 38 | - | Date: <author-date> | |
| 39 | - | ||
| 40 | - | <title-line> | |
| 30 | + | `short`:: | |
| 31 | + | + | |
| 32 | + | [synopsis] | |
| 33 | + | -- | |
| 34 | + | commit <hash> | |
| 35 | + | Author: <author> | |
| 41 | 36 | ||
| 42 | - | <full-commit-message> | |
| 37 | + | <title-line> | |
| 38 | + | -- | |
| 43 | 39 | ||
| 44 | - | * 'full' | |
| 40 | + | `medium`:: | |
| 41 | + | + | |
| 42 | + | [synopsis] | |
| 43 | + | -- | |
| 44 | + | commit <hash> | |
| 45 | + | Author: <author> | |
| 46 | + | Date: <author-date> | |
| 45 | 47 | ||
| 46 | - | commit <hash> | |
| 47 | - | Author: <author> | |
| 48 | - | Commit: <committer> | |
| 48 | + | <title-line> | |
| 49 | 49 | ||
| 50 | - | <title-line> | |
| 50 | + | <full-commit-message> | |
| 51 | + | -- | |
| 51 | 52 | ||
| 52 | - | <full-commit-message> | |
| 53 | + | `full`:: | |
| 54 | + | + | |
| 55 | + | [synopsis] | |
| 56 | + | -- | |
| 57 | + | commit <hash> | |
| 58 | + | Author: <author> | |
| 59 | + | Commit: <committer> | |
| 53 | 60 | ||
| 54 | - | * 'fuller' | |
| 61 | + | <title-line> | |
| 55 | 62 | ||
| 56 | - | commit <hash> | |
| 57 | - | Author: <author> | |
| 58 | - | AuthorDate: <author-date> | |
| 59 | - | Commit: <committer> | |
| 60 | - | CommitDate: <committer-date> | |
| 63 | + | <full-commit-message> | |
| 64 | + | -- | |
| 61 | 65 | ||
| 62 | - | <title-line> | |
| 66 | + | `fuller`:: | |
| 67 | + | + | |
| 68 | + | [synopsis] | |
| 69 | + | -- | |
| 70 | + | commit <hash> | |
| 71 | + | Author: <author> | |
| 72 | + | AuthorDate: <author-date> | |
| 73 | + | Commit: <committer> | |
| 74 | + | CommitDate: <committer-date> | |
| 63 | 75 | ||
| 64 | - | <full-commit-message> | |
| 76 | + | <title-line> | |
| 65 | 77 | ||
| 66 | - | * 'reference' | |
| 78 | + | <full-commit-message> | |
| 79 | + | -- | |
| 67 | 80 | ||
| 68 | - | <abbrev-hash> (<title-line>, <short-author-date>) | |
| 81 | + | `reference`:: | |
| 82 | + | + | |
| 83 | + | [synopsis] | |
| 84 | + | -- | |
| 85 | + | <abbrev-hash> (<title-line>, <short-author-date>) | |
| 86 | + | -- | |
| 69 | 87 | + | |
| 70 | 88 | This format is used to refer to another commit in a commit message and | |
| 71 | - | is the same as `--pretty='format:%C(auto)%h (%s, %ad)'`. By default, | |
| 89 | + | is the same as ++--pretty=\'format:%C(auto)%h (%s, %ad)'++. By default, | |
| 72 | 90 | the date is formatted with `--date=short` unless another `--date` option | |
| 73 | 91 | is explicitly specified. As with any `format:` with format | |
| 74 | 92 | placeholders, its output is not affected by other options like | |
| 75 | 93 | `--decorate` and `--walk-reflogs`. | |
| 76 | 94 | ||
| 77 | - | * 'email' | |
| 78 | - | ||
| 79 | - | From <hash> <date> | |
| 80 | - | From: <author> | |
| 81 | - | Date: <author-date> | |
| 82 | - | Subject: [PATCH] <title-line> | |
| 83 | - | ||
| 84 | - | <full-commit-message> | |
| 85 | - | ||
| 86 | - | * 'mboxrd' | |
| 95 | + | `email`:: | |
| 87 | 96 | + | |
| 88 | - | Like 'email', but lines in the commit message starting with "From " | |
| 97 | + | [synopsis] | |
| 98 | + | -- | |
| 99 | + | From <hash> <date> | |
| 100 | + | From: <author> | |
| 101 | + | Date: <author-date> | |
| 102 | + | Subject: [PATCH] <title-line> | |
| 103 | + | ||
| 104 | + | <full-commit-message> | |
| 105 | + | -- | |
| 106 | + | ||
| 107 | + | `mboxrd`:: | |
| 108 | + | Like `email`, but lines in the commit message starting with "From " | |
| 89 | 109 | (preceded by zero or more ">") are quoted with ">" so they aren't | |
| 90 | 110 | confused as starting a new commit. | |
| 91 | 111 | ||
| 92 | - | * 'raw' | |
| 93 | - | + | |
This diff is too large to show in full - only the first part is shown.