git/Documentation
Tian Yuchen 4f6a803aba diff: document -U without <n> as using default context
The documentation for '-U<n>' implies that the numeric value '<n>' is
mandatory. However, the command line parser has historically accepted
'-U' without a number.

Strictly requiring a number for '-U' would break existing tests
(e.g., in 't4013') and likely disrupt user scripts relying on this
undocumented behavior.

Hence we retain this fallback behavior for backward compatibility, but
document it as such.

Signed-off-by: Tian Yuchen <cat@malon.dev>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2026-03-10 06:17:59 -07:00
..
RelNotes RelNotes: fully spell negation 2026-02-01 18:07:39 -08:00
config Merge branch 'mh/doc-core-attributesfile' 2025-12-30 12:58:19 +09:00
howto meson: make GIT_HTML_PATH configurable 2025-11-06 09:58:56 -08:00
includes
mergetools
technical Merge branch 'en/xdiff-cleanup-2' 2025-12-05 14:49:56 +09:00
.gitignore
BreakingChanges.adoc refs/files: deprecate writing symrefs as symbolic links 2025-10-15 09:11:08 -07:00
CodingGuidelines Documentation: note styling for bit fields 2025-08-26 15:46:03 -07:00
DecisionMaking.adoc
Makefile Merge branch 'en/xdiff-cleanup-2' 2025-12-05 14:49:56 +09:00
MyFirstContribution.adoc MyFirstContribution: add note on confirming patches 2025-10-27 09:09:53 -07:00
MyFirstObjectWalk.adoc
ReviewingGuidelines.adoc
SubmittingPatches Merge branch 'cc/doc-submitting-patches-with-ai' 2025-11-04 07:48:06 -08:00
ToolsForGit.adoc
asciidoc.conf.in
asciidoctor-extensions.rb.in
blame-options.adoc doc: blame-options: convert to new doc format 2026-01-09 06:15:31 -08:00
build-docdep.perl
cat-texi.perl
cmd-list.sh
config.adoc Merge branch 'jc/doc-includeif-hasconfig-remote-url-fix' into maint-2.51 2025-10-15 10:29:34 -07:00
date-formats.adoc
diff-algorithm-option.adoc blame: make diff algorithm configurable 2025-11-17 09:31:59 -08:00
diff-context-options.adoc diff: document -U without <n> as using default context 2026-03-10 06:17:59 -07:00
diff-format.adoc
diff-generate-patch.adoc
diff-options.adoc diff: document -U without <n> as using default context 2026-03-10 06:17:59 -07:00
doc-diff
docbook-xsl.css
docbook.xsl
docinfo-html.in
everyday.adoco
fetch-options.adoc doc: convert git pull to synopsis style 2025-11-19 15:00:42 -08:00
fix-texi.sh
for-each-ref-options.adoc
fsck-msgids.adoc builtin/fsck: move generic HEAD check into `refs_fsck()` 2026-01-12 06:55:41 -08:00
generate-mergetool-list.sh
git-add.adoc add-patch: fully document option P 2025-10-21 14:35:44 -07:00
git-am.adoc Merge branch 'kh/doc-committer-date-is-author-date' 2025-12-05 14:49:57 +09:00
git-annotate.adoc
git-apply.adoc
git-archimport.adoc
git-archive.adoc
git-backfill.adoc
git-bisect-lk2009.adoc
git-bisect.adoc bisect: update usage and docs to match each other 2025-10-28 15:41:42 -07:00
git-blame.adoc doc: git-blame: convert to new doc format 2026-01-09 06:15:53 -08:00
git-branch.adoc
git-bugreport.adoc
git-bundle.adoc
git-cat-file.adoc
git-check-attr.adoc
git-check-ignore.adoc
git-check-mailmap.adoc
git-check-ref-format.adoc
git-checkout-index.adoc
git-checkout.adoc doc: fix asciidoc markup issues in several files 2025-12-20 14:55:43 +09:00
git-cherry-pick.adoc
git-cherry.adoc
git-citool.adoc
git-clean.adoc
git-clone.adoc Merge branch 'kr/clone-synopsis-fix' into maint-2.51 2025-10-15 10:29:32 -07:00
git-column.adoc
git-commit-graph.adoc commit-graph: add new config for changed-paths & recommend it in scalar 2025-10-22 10:40:11 -07:00
git-commit-tree.adoc
git-commit.adoc doc: commit: link to git-status(1) on all format options 2025-11-14 08:56:35 -08:00
git-config.adoc Merge branch 'ps/config-doc-get-urlmatch-fix' 2026-01-21 16:16:28 -08:00
git-count-objects.adoc
git-credential-cache--daemon.adoc
git-credential-cache.adoc
git-credential-store.adoc
git-credential.adoc
git-cvsexportcommit.adoc
git-cvsimport.adoc
git-cvsserver.adoc
git-daemon.adoc
git-describe.adoc
git-diagnose.adoc
git-diff-files.adoc
git-diff-index.adoc
git-diff-pairs.adoc
git-diff-tree.adoc
git-diff.adoc
git-difftool.adoc
git-fast-export.adoc
git-fast-import.adoc fast-import: add 'strip-if-invalid' mode to --signed-commits=<mode> 2025-11-26 08:43:44 -08:00
git-fetch-pack.adoc
git-fetch.adoc doc: convert git fetch to synopsis style 2025-11-19 15:00:37 -08:00
git-filter-branch.adoc
git-fmt-merge-msg.adoc
git-for-each-ref.adoc
git-for-each-repo.adoc
git-format-patch.adoc
git-fsck-objects.adoc
git-fsck.adoc
git-fsmonitor--daemon.adoc
git-gc.adoc
git-get-tar-commit-id.adoc
git-grep.adoc
git-gui.adoc
git-hash-object.adoc
git-help.adoc
git-hook.adoc
git-http-backend.adoc
git-http-fetch.adoc
git-http-push.adoc
git-imap-send.adoc
git-index-pack.adoc
git-init-db.adoc
git-init.adoc
git-instaweb.adoc
git-interpret-trailers.adoc
git-last-modified.adoc
git-log.adoc
git-ls-files.adoc
git-ls-remote.adoc
git-ls-tree.adoc
git-mailinfo.adoc
git-mailsplit.adoc
git-maintenance.adoc maintenance: add 'is-needed' subcommand 2025-11-10 09:28:48 -08:00
git-merge-base.adoc
git-merge-file.adoc
git-merge-index.adoc
git-merge-one-file.adoc
git-merge-tree.adoc
git-merge.adoc
git-mergetool--lib.adoc
git-mergetool.adoc
git-mktag.adoc
git-mktree.adoc
git-multi-pack-index.adoc Merge branch 'kh/doc-markup-fixes' into maint-2.51 2025-10-15 10:29:33 -07:00
git-mv.adoc
git-name-rev.adoc
git-notes.adoc
git-p4.adoc
git-pack-objects.adoc
git-pack-redundant.adoc
git-pack-refs.adoc
git-patch-id.adoc doc: patch-id: --verbatim locks in --stable 2026-01-09 06:08:37 -08:00
git-prune-packed.adoc
git-prune.adoc
git-pull.adoc Merge branch 'je/doc-pull' 2025-12-14 17:04:37 +09:00
git-push.adoc doc: convert git push to synopsis style 2025-11-19 15:00:45 -08:00
git-quiltimport.adoc
git-range-diff.adoc
git-read-tree.adoc
git-rebase.adoc Merge branch 'ja/doc-misc-fixes' 2025-12-28 17:36:16 +09:00
git-receive-pack.adoc
git-reflog.adoc
git-refs.adoc
git-remote-ext.adoc
git-remote-fd.adoc
git-remote-helpers.adoco
git-remote.adoc doc: convert git-remote to synopsis style 2025-12-21 11:33:10 +09:00
git-repack.adoc doc: correct minor wording issues 2025-12-20 14:55:43 +09:00
git-replace.adoc
git-replay.adoc replay: drop rev-list formatting options from manual 2026-01-20 09:38:56 -08:00
git-repo.adoc Merge branch 'jt/repo-struct-more-objinfo' 2025-12-30 12:58:19 +09:00
git-request-pull.adoc
git-rerere.adoc
git-reset.adoc doc: git-reset: clarify `git reset <pathspec>` 2026-01-06 08:10:14 +09:00
git-restore.adoc
git-rev-list.adoc
git-rev-parse.adoc Merge branch 'bc/sha1-256-interop-01' 2025-10-22 11:38:58 -07:00
git-revert.adoc
git-rm.adoc
git-send-email.adoc Merge branch 'ja/doc-misc-fixes' 2025-12-28 17:36:16 +09:00
git-send-pack.adoc
git-sh-i18n--envsubst.adoc
git-sh-i18n.adoc
git-sh-setup.adoc
git-shell.adoc
git-shortlog.adoc
git-show-branch.adoc
git-show-index.adoc
git-show-ref.adoc
git-show.adoc
git-sparse-checkout.adoc Merge branch 'ds/sparse-checkout-clean' 2025-10-28 10:29:09 -07:00
git-stage.adoc doc: convert git stage to use synopsis block 2025-12-21 11:33:10 +09:00
git-stash.adoc
git-status.adoc doc: convert git-status tables to AsciiDoc format 2025-12-21 11:33:10 +09:00
git-stripspace.adoc
git-submodule.adoc
git-svn.adoc
git-switch.adoc
git-symbolic-ref.adoc
git-tag.adoc Merge branch 'cc/fast-import-strip-signed-tags' 2025-10-28 10:29:09 -07:00
git-tools.adoc
git-unpack-file.adoc
git-unpack-objects.adoc
git-update-index.adoc
git-update-ref.adoc Merge branch 'sb/doc-update-ref-markup-fix' 2026-01-23 13:34:35 -08:00
git-update-server-info.adoc
git-upload-archive.adoc
git-upload-pack.adoc
git-var.adoc
git-verify-commit.adoc
git-verify-pack.adoc
git-verify-tag.adoc
git-version.adoc
git-web--browse.adoc
git-whatchanged.adoc
git-worktree.adoc doc: fix asciidoc markup issues in several files 2025-12-20 14:55:43 +09:00
git-write-tree.adoc
git.adoc
gitattributes.adoc
gitcli.adoc doc: clarify command equivalence comment 2025-11-04 09:25:51 -08:00
gitcore-tutorial.adoc
gitcredentials.adoc Merge branch 'mh/doc-credential-url-prefix' into maint-2.51 2025-10-15 10:29:35 -07:00
gitcvs-migration.adoc
gitdatamodel.adoc doc: remove stray text in Git data model 2025-12-03 00:17:07 -08:00
gitdiffcore.adoc
giteveryday.adoc
gitfaq.adoc Merge branch 'bc/doc-stash-import-export' 2026-01-16 12:40:27 -08:00
gitformat-bundle.adoc
gitformat-chunk.adoc
gitformat-commit-graph.adoc
gitformat-index.adoc
gitformat-loose.adoc
gitformat-pack.adoc
gitformat-signature.adoc
gitglossary.adoc
githooks.adoc doc: join default pre-commit paragraphs 2025-12-08 22:20:14 +09:00
gitignore.adoc doc: document backslash in gitignore patterns 2025-10-29 09:17:21 -07:00
gitk.adoc
gitmailmap.adoc
gitmodules.adoc
gitnamespaces.adoc
gitpacking.adoc
gitprotocol-capabilities.adoc
gitprotocol-common.adoc
gitprotocol-http.adoc doc: clarify server behavior for invalid 'want' lines in HTTP protocol 2025-11-06 09:45:38 -08:00
gitprotocol-pack.adoc
gitprotocol-v2.adoc
gitremote-helpers.adoc
gitrepository-layout.adoc
gitrevisions.adoc
gitsubmodules.adoc
gittutorial-2.adoc
gittutorial.adoc
gitweb.adoc
gitweb.conf.adoc
gitworkflows.adoc
glossary-content.adoc doc: add an explanation of Git's data model 2025-11-12 12:21:15 -08:00
i18n.adoc
install-doc-quick.sh
install-webdoc.sh
line-range-format.adoc
line-range-options.adoc
lint-delimited-sections.perl
lint-documentation-style.perl
lint-fsck-msgids.perl
lint-gitlink.perl lint-gitlink: preemptively ignore all /ifn?def|endif/ macros 2026-01-21 08:26:00 -08:00
lint-man-end-blurb.perl
lint-man-section-order.perl
lint-manpages.sh
manpage-bold-literal.xsl
manpage-normal.xsl
manpage.xsl
merge-options.adoc doc: convert git pull to synopsis style 2025-11-19 15:00:42 -08:00
merge-strategies.adoc
meson.build Merge branch 'je/doc-data-model' 2025-11-30 18:31:40 -08:00
object-format-disclaimer.adoc
pack-refs-options.adoc
pretty-formats.adoc Merge branch 'ja/doc-markup-attached-paragraph-fix' into maint-2.51 2025-10-15 10:29:35 -07:00
pretty-options.adoc
pull-fetch-param.adoc doc: pull-fetch-param typofix 2025-11-24 10:55:48 -08:00
ref-reachability-filters.adoc
ref-storage-format.adoc
rerere-options.adoc
rev-list-description.adoc
rev-list-options.adoc replay: drop rev-list formatting options from manual 2026-01-20 09:38:56 -08:00
revisions.adoc
scalar.adoc scalar: document config settings 2025-12-16 09:42:44 +09:00
sequencer.adoc
signoff-option.adoc signoff-option: linkify the reference to gitfaq 2025-12-19 21:51:01 +09:00
texi.xsl
trace2-target-values.adoc
transfer-data-leaks.adoc
urls-remotes.adoc doc: convert git pull to synopsis style 2025-11-19 15:00:42 -08:00
urls.adoc
user-manual.adoc