From: Firmin Martin Date: Fri, 09 Apr 2021 04:02:57 GMT Subject: [RFC PATCH v1 09/13] doc: typeset command/option/value entries in monospace Message-ID: <20210409040301.3260358-10-firminmartin24@gmail.com> In-Reply-To: <20210409040301.3260358-1-firminmartin24@gmail.com> Automatically wrap command-line option entries (i.e. something of the form [::|;;]) with backticks as indicated in the CodingGuidelines. As an intended side effect, also wrap with backticks some configuration options and values entries. The following command and regex has performed the whole substitution (without manual intervention). REGEX="^([[:space:]]*?)[\"']?([][a-zA-Z-=<>]+)[\"']?(::|;;)([[:space:]]+|\$)" && perl -pi -e "s/$REGEX/\$1\`\$2\`\$3\$4/g" $(grep -Pl "$REGEX" *.txt --exclude-dir=RelNotes) Signed-off-by: Firmin Martin --- Documentation/blame-options.txt | 30 +-- Documentation/config.txt | 12 +- Documentation/diff-options.txt | 222 +++++++++++------------ Documentation/fetch-options.txt | 88 ++++----- Documentation/git-add.txt | 66 +++---- Documentation/git-am.txt | 82 ++++----- Documentation/git-apply.txt | 60 +++--- Documentation/git-archimport.txt | 12 +- Documentation/git-archive.txt | 30 +-- Documentation/git-bisect.txt | 4 +- Documentation/git-blame.txt | 22 +-- Documentation/git-branch.txt | 88 ++++----- Documentation/git-bundle.txt | 14 +- Documentation/git-cat-file.txt | 36 ++-- Documentation/git-check-attr.txt | 14 +- Documentation/git-check-ignore.txt | 6 +- Documentation/git-check-mailmap.txt | 2 +- Documentation/git-check-ref-format.txt | 6 +- Documentation/git-checkout-index.txt | 28 +-- Documentation/git-checkout.txt | 66 +++---- Documentation/git-cherry-pick.txt | 42 ++--- Documentation/git-cherry.txt | 8 +- Documentation/git-clean.txt | 30 +-- Documentation/git-clone.txt | 58 +++--- Documentation/git-commit-graph.txt | 8 +- Documentation/git-commit-tree.txt | 8 +- Documentation/git-commit.txt | 106 +++++------ Documentation/git-config.txt | 60 +++--- Documentation/git-count-objects.txt | 8 +- Documentation/git-cvsexportcommit.txt | 24 +-- Documentation/git-cvsimport.txt | 16 +- Documentation/git-cvsserver.txt | 16 +- Documentation/git-daemon.txt | 66 +++---- Documentation/git-describe.txt | 24 +-- Documentation/git-diff-files.txt | 6 +- Documentation/git-diff-index.txt | 8 +- Documentation/git-diff-tree.txt | 28 +-- Documentation/git-difftool.txt | 28 +-- Documentation/git-fast-export.txt | 28 +-- Documentation/git-fast-import.txt | 56 +++--- Documentation/git-fetch-pack.txt | 36 ++-- Documentation/git-fetch.txt | 12 +- Documentation/git-filter-branch.txt | 6 +- Documentation/git-fmt-merge-msg.txt | 6 +- Documentation/git-for-each-ref.txt | 54 +++--- Documentation/git-format-patch.txt | 86 ++++----- Documentation/git-fsck.txt | 28 +-- Documentation/git-gc.txt | 14 +- Documentation/git-grep.txt | 126 ++++++------- Documentation/git-gui.txt | 8 +- Documentation/git-hash-object.txt | 12 +- Documentation/git-help.txt | 26 +-- Documentation/git-http-backend.txt | 2 +- Documentation/git-http-fetch.txt | 12 +- Documentation/git-http-push.txt | 12 +- Documentation/git-imap-send.txt | 12 +- Documentation/git-index-pack.txt | 24 +-- Documentation/git-init.txt | 10 +- Documentation/git-instaweb.txt | 32 ++-- Documentation/git-interpret-trailers.txt | 20 +- Documentation/git-log.txt | 18 +- Documentation/git-ls-files.txt | 82 ++++----- Documentation/git-ls-remote.txt | 28 +-- Documentation/git-ls-tree.txt | 24 +-- Documentation/git-mailinfo.txt | 22 +-- Documentation/git-mailsplit.txt | 16 +- Documentation/git-maintenance.txt | 30 +-- Documentation/git-merge-base.txt | 12 +- Documentation/git-merge-file.txt | 10 +- Documentation/git-merge-index.txt | 6 +- Documentation/git-merge.txt | 16 +- Documentation/git-mergetool.txt | 18 +- Documentation/git-mktag.txt | 2 +- Documentation/git-mktree.txt | 6 +- Documentation/git-multi-pack-index.txt | 14 +- Documentation/git-mv.txt | 14 +- Documentation/git-name-rev.txt | 16 +- Documentation/git-notes.txt | 56 +++--- Documentation/git-p4.txt | 38 ++-- Documentation/git-pack-objects.txt | 74 ++++---- Documentation/git-pack-redundant.txt | 6 +- Documentation/git-pack-refs.txt | 4 +- Documentation/git-patch-id.txt | 4 +- Documentation/git-prune-packed.txt | 8 +- Documentation/git-prune.txt | 10 +- Documentation/git-pull.txt | 12 +- Documentation/git-push.txt | 76 ++++---- Documentation/git-quiltimport.txt | 6 +- Documentation/git-range-diff.txt | 10 +- Documentation/git-read-tree.txt | 34 ++-- Documentation/git-rebase.txt | 114 ++++++------ Documentation/git-reflog.txt | 20 +- Documentation/git-remote.txt | 26 +-- Documentation/git-repack.txt | 48 ++--- Documentation/git-replace.txt | 14 +- Documentation/git-request-pull.txt | 8 +- Documentation/git-rerere.txt | 10 +- Documentation/git-reset.txt | 22 +-- Documentation/git-restore.txt | 48 ++--- Documentation/git-rev-parse.txt | 82 ++++----- Documentation/git-revert.txt | 32 ++-- Documentation/git-rm.txt | 22 +-- Documentation/git-send-email.txt | 84 ++++----- Documentation/git-send-pack.txt | 26 +-- Documentation/git-sh-i18n.txt | 2 +- Documentation/git-sh-setup.txt | 4 +- Documentation/git-shortlog.txt | 20 +- Documentation/git-show-branch.txt | 38 ++-- Documentation/git-show-ref.txt | 24 +-- Documentation/git-sparse-checkout.txt | 12 +- Documentation/git-stash.txt | 40 ++-- Documentation/git-status.txt | 42 ++--- Documentation/git-stripspace.txt | 8 +- Documentation/git-submodule.txt | 56 +++--- Documentation/git-svn.txt | 150 +++++++-------- Documentation/git-switch.txt | 46 ++--- Documentation/git-symbolic-ref.txt | 12 +- Documentation/git-tag.txt | 62 +++---- Documentation/git-unpack-objects.txt | 10 +- Documentation/git-update-index.txt | 62 +++---- Documentation/git-update-ref.txt | 18 +- Documentation/git-upload-pack.txt | 10 +- Documentation/git-var.txt | 2 +- Documentation/git-verify-commit.txt | 6 +- Documentation/git-verify-pack.txt | 8 +- Documentation/git-verify-tag.txt | 6 +- Documentation/git-worktree.txt | 44 ++--- Documentation/git-write-tree.txt | 2 +- Documentation/git.txt | 66 +++---- Documentation/gitattributes.txt | 42 ++--- Documentation/gitcli.txt | 4 +- Documentation/gitcore-tutorial.txt | 2 +- Documentation/gitcredentials.txt | 10 +- Documentation/githooks.txt | 2 +- Documentation/gitk.txt | 28 +-- Documentation/gitmodules.txt | 8 +- Documentation/gitremote-helpers.txt | 38 ++-- Documentation/gitrepository-layout.txt | 32 ++-- Documentation/gitweb.conf.txt | 34 ++-- Documentation/gitweb.txt | 44 ++--- Documentation/glossary-content.txt | 12 +- Documentation/merge-options.txt | 70 +++---- Documentation/merge-strategies.txt | 36 ++-- Documentation/pretty-options.txt | 28 +-- Documentation/rev-list-options.txt | 204 ++++++++++----------- Documentation/sequencer.txt | 8 +- Documentation/signoff-option.txt | 6 +- 147 files changed, 2320 insertions(+), 2320 deletions(-) diff --git a/Documentation/blame-options.txt b/Documentation/blame-options.txt index 1d36a176bb..c58d30a648 100644 --- a/Documentation/blame-options.txt +++ b/Documentation/blame-options.txt @@ -1,12 +1,12 @@ --b:: +`-b`:: Show blank SHA-1 for boundary commits. This can also be controlled via the `blame.blankBoundary` config option. ---root:: +`--root`:: Do not treat root commits as boundaries. This can also be controlled via the `blame.showRoot` config option. ---show-stats:: +`--show-stats`:: Include additional statistics at the end of blame output. -L ,:: @@ -20,10 +20,10 @@ + include::line-range-format.txt[] --l:: +`-l`:: Show long rev (Default: off). --t:: +`-t`:: Show raw timestamp (Default: off). -S :: @@ -37,26 +37,26 @@ include::line-range-format.txt[] START. `git blame --reverse START` is taken as `git blame --reverse START..HEAD` for convenience. ---first-parent:: +`--first-parent`:: Follow only the first parent commit upon seeing a merge commit. This option can be used to determine when a line was introduced to a particular integration branch, rather than when it was introduced to the history overall. --p:: ---porcelain:: +`-p`:: +`--porcelain`:: Show in a format designed for machine consumption. ---line-porcelain:: +`--line-porcelain`:: Show the porcelain format, but output commit information for each line, not just the first time a commit is referenced. Implies `--porcelain`. ---incremental:: +`--incremental`:: Show the result incrementally in a format designed for machine consumption. ---encoding=:: +`--encoding=`:: Specifies the encoding used to output author names and commit summaries. Setting it to `none` makes blame output unconverted data. For more information see the @@ -77,14 +77,14 @@ include::line-range-format.txt[] iso format is used. For supported values, see the discussion of the `--date` option at linkgit:git-log[1]. ---[no-]progress:: +`--[no-]progress`:: Progress status is reported on the standard error stream by default when it is attached to a terminal. This flag enables progress reporting even if not attached to a terminal. Can't use `--progress` together with `--porcelain` or `--incremental`. --M[]:: +`-M[]`:: Detect moved or copied lines within a file. When a commit moves or copies a block of lines (e.g. the original file has A and then B, and the commit changes it to B and then @@ -100,7 +100,7 @@ alphanumeric characters that Git must detect as moving/copying within a file for it to associate those lines with the parent commit. The default value is 20. --C[]:: +`-C[]`:: In addition to `-M`, detect lines moved or copied from other files that were modified in the same commit. This is useful when you reorganize your program and move code @@ -136,5 +136,5 @@ take effect. option. An empty file name, `""`, will clear the list of revs from previously processed files. --h:: +`-h`:: Show help message. diff --git a/Documentation/config.txt b/Documentation/config.txt index 68529ad9db..6f83ce52a2 100644 --- a/Documentation/config.txt +++ b/Documentation/config.txt @@ -235,29 +235,29 @@ Values of many variables are treated as a simple string, but there are variables that take values of specific types and there are rules as to how to spell them. -boolean:: +`boolean`:: When a variable is said to take a boolean value, many synonyms are accepted for 'true' and 'false'; these are all case-insensitive. - true;; Boolean true literals are `yes`, `on`, `true`, + `true`;; Boolean true literals are `yes`, `on`, `true`, and `1`. Also, a variable defined without `= ` is taken as true. - false;; Boolean false literals are `no`, `off`, `false`, + `false`;; Boolean false literals are `no`, `off`, `false`, `0` and the empty string. + When converting a value to its canonical form using the `--type=bool` type specifier, `git config` will ensure that the output is "true" or "false" (spelled in lowercase). -integer:: +`integer`:: The value for many variables that specify various sizes can be suffixed with `k`, `M`,... to mean "scale the number by 1024", "by 1024x1024", etc. -color:: +`color`:: The value for a variable that takes a color is a list of colors (at most two, one for foreground and one for background) and attributes (as many as you want), separated by spaces. @@ -292,7 +292,7 @@ output) is set to be painted with `bold` or some other attribute. However, custom log formats may do more complicated and layered coloring, and the negated forms may be useful there. -pathname:: +`pathname`:: A variable that takes a pathname value can be given a string that begins with "`~/`" or "`~user/`", and the usual tilde expansion happens to such a string: `~/` diff --git a/Documentation/diff-options.txt b/Documentation/diff-options.txt index 34570aa445..1b594732aa 100644 --- a/Documentation/diff-options.txt +++ b/Documentation/diff-options.txt @@ -13,29 +13,29 @@ endif::git-diff[] endif::git-format-patch[] ifdef::git-format-patch[] --p:: ---no-stat:: +`-p`:: +`--no-stat`:: Generate plain patches without any diffstats. endif::git-format-patch[] ifndef::git-format-patch[] --p:: --u:: ---patch:: +`-p`:: +`-u`:: +`--patch`:: Generate patch (see section on generating patches). ifdef::git-diff[] This is the default. endif::git-diff[] --s:: ---no-patch:: +`-s`:: +`--no-patch`:: Suppress diff output. Useful for commands like `git show` that show the patch by default, or to cancel the effect of `--patch`. endif::git-format-patch[] ifdef::git-log[] --diff-merges=(off|none|first-parent|1|separate|m|combined|c|dense-combined|cc):: ---no-diff-merges:: +`--no-diff-merges`:: Specify diff format to be used for merge commits. Default is {diff-merges-default} unless `--first-parent` is in use, in which case `first-parent` is the default. @@ -76,7 +76,7 @@ ifdef::git-log[] two variants and the merge result picks one of them without modification. `--cc` implies `-p`. ---combined-all-paths:: +`--combined-all-paths`:: This flag causes combined diffs (used for merge commits) to list the name of the file from all parents. It thus only has effect when `--diff-merges=[dense-]combined` is in use, and @@ -84,26 +84,26 @@ ifdef::git-log[] when either rename or copy detection have been requested). endif::git-log[] --U:: ---unified=:: +`-U`:: +`--unified=`:: Generate diffs with lines of context instead of the usual three. ifndef::git-format-patch[] Implies `--patch`. endif::git-format-patch[] ---output=:: +`--output=`:: Output to a specific file instead of stdout. ---output-indicator-new=:: ---output-indicator-old=:: ---output-indicator-context=:: +`--output-indicator-new=`:: +`--output-indicator-old=`:: +`--output-indicator-context=`:: Specify the character used to indicate new, old or context lines in the generated patch. Normally they are '+', '-' and ' ' respectively. ifndef::git-format-patch[] ---raw:: +`--raw`:: ifndef::git-log[] Generate the diff in raw format. ifdef::git-diff-core[] @@ -120,33 +120,33 @@ endif::git-log[] endif::git-format-patch[] ifndef::git-format-patch[] ---patch-with-raw:: +`--patch-with-raw`:: Synonym for `-p --raw`. endif::git-format-patch[] ifdef::git-log[] --t:: +`-t`:: Show the tree objects in the diff output. endif::git-log[] ---indent-heuristic:: +`--indent-heuristic`:: Enable the heuristic that shifts diff hunk boundaries to make patches easier to read. This is the default. ---no-indent-heuristic:: +`--no-indent-heuristic`:: Disable the indent heuristic. ---minimal:: +`--minimal`:: Spend extra time to make sure the smallest possible diff is produced. ---patience:: +`--patience`:: Generate a diff using the "patience diff" algorithm. ---histogram:: +`--histogram`:: Generate a diff using the "histogram diff" algorithm. ---anchored=:: +`--anchored=`:: Generate a diff using the "anchored diff" algorithm. + This option may be specified more than once. @@ -194,7 +194,7 @@ have to use `--diff-algorithm=default` option. These parameters can also be set individually with `--stat-width=`, `--stat-name-width=` and `--stat-count=`. ---compact-summary:: +`--compact-summary`:: Output a condensed summary of extended header information such as file creations or deletions ("new" or "gone", optionally "+l" if it's a symlink) and mode changes ("+x" or "-x" for adding @@ -202,14 +202,14 @@ These parameters can also be set individually with `--stat-width=`, information is put between the filename part and the graph part. Implies `--stat`. ---numstat:: +`--numstat`:: Similar to `--stat`, but shows number of added and deleted lines in decimal notation and pathname without abbreviation, to make it more machine friendly. For binary files, outputs two `-` instead of saying `0 0`. ---shortstat:: +`--shortstat`:: Output only the last line of the `--stat` format containing total number of modified files, as well as number of added and deleted lines. @@ -248,7 +248,7 @@ These parameters can also be set individually with `--stat-width=`, Note that when using `cumulative`, the sum of the percentages reported may exceed 100%. The default (non-cumulative) behavior can be specified with the `noncumulative` parameter. -;; +``;; An integer parameter specifies a cut-off percent (3% by default). Directories contributing less than this percentage of the changes are not shown in the output. @@ -259,24 +259,24 @@ directories with less than 10% of the total amount of changed files, and accumulating child directory counts in the parent directories: `--dirstat=files,10,cumulative`. ---cumulative:: +`--cumulative`:: Synonym for --dirstat=cumulative --dirstat-by-file[=...]:: Synonym for --dirstat=files,param1,param2... ---summary:: +`--summary`:: Output a condensed summary of extended header information such as creations, renames and mode changes. ifndef::git-format-patch[] ---patch-with-stat:: +`--patch-with-stat`:: Synonym for `-p --stat`. endif::git-format-patch[] ifndef::git-format-patch[] --z:: +`-z`:: ifdef::git-log[] Separate the commits with NULs instead of with new newlines. + @@ -292,14 +292,14 @@ Without this option, pathnames with "unusual" characters are quoted as explained for the configuration variable `core.quotePath` (see linkgit:git-config[1]). ---name-only:: +`--name-only`:: Show only names of changed files. ---name-status:: +`--name-status`:: Show only names and status of changed files. See the description of the `--diff-filter` option on what the status letters mean. ---submodule[=]:: +`--submodule[=]`:: Specify how differences in submodules are shown. When specifying `--submodule=short` the 'short' format is used. This format just shows the names of the commits at the beginning and end of the range. @@ -311,7 +311,7 @@ linkgit:git-config[1]). commit range. Defaults to `diff.submodule` or the 'short' format if the config option is unset. ---color[=]:: +`--color[=]`:: Show colored diff. `--color` (i.e. without '=') is the same as `--color=always`. '' can be one of `always`, `never`, or `auto`. @@ -320,14 +320,14 @@ ifdef::git-diff[] configuration settings. endif::git-diff[] ---no-color:: +`--no-color`:: Turn off colored diff. ifdef::git-diff[] This can be used to override configuration settings. endif::git-diff[] It is the same as `--color=never`. ---color-moved[=]:: +`--color-moved[=]`:: Moved lines of code are colored differently. ifdef::git-diff[] It can be changed by the `diff.colorMoved` configuration setting. @@ -337,40 +337,40 @@ endif::git-diff[] The mode must be one of: + -- -no:: +`no`:: Moved lines are not highlighted. -default:: +`default`:: Is a synonym for `zebra`. This may change to a more sensible mode in the future. -plain:: +`plain`:: Any line that is added in one location and was removed in another location will be colored with `color.diff.newMoved`. Similarly `color.diff.oldMoved` will be used for removed lines that are added somewhere else in the diff. This mode picks up any moved line, but it is not very useful in a review to determine if a block of code was moved without permutation. -blocks:: +`blocks`:: Blocks of moved text of at least 20 alphanumeric characters are detected greedily. The detected blocks are painted using either the `color.diff.{old,new}Moved` color. Adjacent blocks cannot be told apart. -zebra:: +`zebra`:: Blocks of moved text are detected as in 'blocks' mode. The blocks are painted using either the `color.diff.{old,new}Moved` color or `color.diff.{old,new}MovedAlternative`. The change between the two colors indicates that a new block was detected. -dimmed-zebra:: +`dimmed-zebra`:: Similar to 'zebra', but additional dimming of uninteresting parts of moved code is performed. The bordering lines of two adjacent blocks are considered interesting, the rest is uninteresting. `dimmed_zebra` is a deprecated synonym. -- ---no-color-moved:: +`--no-color-moved`:: Turn off move detection. This can be used to override configuration settings. It is the same as `--color-moved=no`. ---color-moved-ws=:: +`--color-moved-ws=`:: This configures how whitespace is ignored when performing the move detection for `--color-moved`. ifdef::git-diff[] @@ -379,57 +379,57 @@ endif::git-diff[] These modes can be given as a comma separated list: + -- -no:: +`no`:: Do not ignore whitespace when performing move detection. -ignore-space-at-eol:: +`ignore-space-at-eol`:: Ignore changes in whitespace at EOL. -ignore-space-change:: +`ignore-space-change`:: Ignore changes in amount of whitespace. This ignores whitespace at line end, and considers all other sequences of one or more whitespace characters to be equivalent. -ignore-all-space:: +`ignore-all-space`:: Ignore whitespace when comparing lines. This ignores differences even if one line has whitespace where the other line has none. -allow-indentation-change:: +`allow-indentation-change`:: Initially ignore any whitespace in the move detection, then group the moved code blocks only into a block if the change in whitespace is the same per line. This is incompatible with the other modes. -- ---no-color-moved-ws:: +`--no-color-moved-ws`:: Do not ignore whitespace when performing move detection. This can be used to override configuration settings. It is the same as `--color-moved-ws=no`. ---word-diff[=]:: +`--word-diff[=]`:: Show a word diff, using the to delimit changed words. By default, words are delimited by whitespace; see `--word-diff-regex` below. The defaults to 'plain', and must be one of: + -- -color:: +`color`:: Highlight changed words using only colors. Implies `--color`. -plain:: +`plain`:: Show words as `[-removed-]` and `{+added+}`. Makes no attempts to escape the delimiters if they appear in the input, so the output may be ambiguous. -porcelain:: +`porcelain`:: Use a special line-based format intended for script consumption. Added/removed/unchanged runs are printed in the usual unified diff format, starting with a `+`/`-`/` ` character at the beginning of the line and extending to the end of the line. Newlines in the input are represented by a tilde `~` on a line of its own. -none:: +`none`:: Disable word diff again. -- + Note that despite the name of the first mode, color is used to highlight the changed parts in all modes if enabled. ---word-diff-regex=:: +`--word-diff-regex=`:: Use to decide what a word is, instead of considering runs of non-whitespace to be a word. Also implies `--word-diff` unless it was already enabled. @@ -450,20 +450,20 @@ linkgit:gitattributes[5] or linkgit:git-config[1]. Giving it explicitly overrides any diff driver or configuration setting. Diff drivers override configuration settings. ---color-words[=]:: +`--color-words[=]`:: Equivalent to `--word-diff=color` plus (if a regex was specified) `--word-diff-regex=`. endif::git-format-patch[] ---no-renames:: +`--no-renames`:: Turn off rename detection, even when the configuration file gives the default to do so. ---[no-]rename-empty:: +`--[no-]rename-empty`:: Whether to use empty blobs as rename source. ifndef::git-format-patch[] ---check:: +`--check`:: Warn if changes introduce conflict markers or whitespace errors. What are considered whitespace errors is controlled by `core.whitespace` configuration. By default, trailing whitespaces (including @@ -473,7 +473,7 @@ ifndef::git-format-patch[] Exits with non-zero status if problems are found. Not compatible with `--exit-code`. ---ws-error-highlight=:: +`--ws-error-highlight=`:: Highlight whitespace errors in the `context`, `old` or `new` lines of the diff. Multiple values are separated by comma, `none` resets previous values, `default` reset the list to @@ -485,19 +485,19 @@ ifndef::git-format-patch[] endif::git-format-patch[] ---full-index:: +`--full-index`:: Instead of the first handful of characters, show the full pre- and post-image blob object names on the "index" line when generating patch format output. ---binary:: +`--binary`:: In addition to `--full-index`, output a binary diff that can be applied with `git-apply`. ifndef::git-format-patch[] Implies `--patch`. endif::git-format-patch[] ---abbrev[=]:: +`--abbrev[=]`:: Instead of showing the full 40-byte hexadecimal object name in diff-raw format output and diff-tree header lines, show the shortest prefix that is at least '' @@ -530,8 +530,8 @@ addition and deletion compared to 20% or more of the file's size are eligible for being picked up as a possible source of a rename to another file. --M[]:: ---find-renames[=]:: +`-M[]`:: +`--find-renames[=]`:: ifndef::git-log[] Detect renames. endif::git-log[] @@ -550,12 +550,12 @@ endif::git-log[] the same as `-M5%`. To limit detection to exact renames, use `-M100%`. The default similarity index is 50%. --C[]:: ---find-copies[=]:: +`-C[]`:: +`--find-copies[=]`:: Detect copies as well as renames. See also `--find-copies-harder`. If `n` is specified, it has the same meaning as for `-M`. ---find-copies-harder:: +`--find-copies-harder`:: For performance reasons, by default, `-C` option finds copies only if the original file of the copy was modified in the same changeset. This flag makes the command @@ -564,8 +564,8 @@ endif::git-log[] projects, so use it with caution. Giving more than one `-C` option has the same effect. --D:: ---irreversible-delete:: +`-D`:: +`--irreversible-delete`:: Omit the preimage for deletes, i.e. print only the header but not the diff between the preimage and `/dev/null`. The resulting patch is not meant to be applied with `patch` or `git apply`; this is @@ -577,7 +577,7 @@ endif::git-log[] When used together with `-B`, omit also the preimage in the deletion part of a delete/create pair. --l:: +`-l`:: The `-M` and `-C` options require O(n^2) processing time where n is the number of potential rename/copy targets. This option prevents rename/copy detection from running if @@ -606,7 +606,7 @@ from the index to the working tree can never have Added entries the index). Similarly, copied and renamed entries cannot appear if detection for those types is disabled. --S:: +`-S`:: Look for differences that change the number of occurrences of the specified string (i.e. addition/deletion) in a file. Intended for the scripter's use. @@ -619,7 +619,7 @@ very first version of the block. + Binary files are searched as well. --G:: +`-G`:: Look for differences whose patch text contains added/removed lines that match . + @@ -643,7 +643,7 @@ filter will be ignored. See the 'pickaxe' entry in linkgit:gitdiffcore[7] for more information. ---find-object=:: +`--find-object=`:: Look for differences that change the number of occurrences of the specified object. Similar to `-S`, just the argument is different in that it doesn't search for a specific string but for a specific @@ -652,18 +652,18 @@ information. The object can be a blob or a submodule commit. It implies the `-t` option in `git-log` to also find trees. ---pickaxe-all:: +`--pickaxe-all`:: When `-S` or `-G` finds a change, show all the changes in that changeset, not just the files that contain the change in . ---pickaxe-regex:: +`--pickaxe-regex`:: Treat the given to `-S` as an extended POSIX regular expression to match. endif::git-format-patch[] --O:: +`-O`:: Control the order in which files appear in the output. This overrides the `diff.orderFile` configuration variable (see linkgit:git-config[1]). To cancel `diff.orderFile`, @@ -700,8 +700,8 @@ matches a pattern if removing any number of the final pathname components matches the pattern. For example, the pattern "`foo*bar`" matches "`fooasdfbar`" and "`foo/bar/baz/asdf`" but not "`foobarx`". ---skip-to=:: ---rotate-to=:: +`--skip-to=`:: +`--rotate-to=`:: Discard the files before the named from the output (i.e. 'skip to'), or move them to the end of the output (i.e. 'rotate to'). These were invented primarily for use @@ -709,13 +709,13 @@ matches "`fooasdfbar`" and "`foo/bar/baz/asdf`" but not "`foobarx`". otherwise. ifndef::git-format-patch[] --R:: +`-R`:: Swap two inputs; that is, show differences from index or on-disk file to tree contents. endif::git-format-patch[] ---relative[=]:: ---no-relative:: +`--relative[=]`:: +`--no-relative`:: When run from a subdirectory of the project, it can be told to exclude changes outside the directory and show pathnames relative to it with this option. When you are @@ -725,44 +725,44 @@ endif::git-format-patch[] `--no-relative` can be used to countermand both `diff.relative` config option and previous `--relative`. --a:: ---text:: +`-a`:: +`--text`:: Treat all files as text. ---ignore-cr-at-eol:: +`--ignore-cr-at-eol`:: Ignore carriage-return at the end of line when doing a comparison. ---ignore-space-at-eol:: +`--ignore-space-at-eol`:: Ignore changes in whitespace at EOL. --b:: ---ignore-space-change:: +`-b`:: +`--ignore-space-change`:: Ignore changes in amount of whitespace. This ignores whitespace at line end, and considers all other sequences of one or more whitespace characters to be equivalent. --w:: ---ignore-all-space:: +`-w`:: +`--ignore-all-space`:: Ignore whitespace when comparing lines. This ignores differences even if one line has whitespace where the other line has none. ---ignore-blank-lines:: +`--ignore-blank-lines`:: Ignore changes whose lines are all blank. --I:: ---ignore-matching-lines=:: +`-I`:: +`--ignore-matching-lines=`:: Ignore changes whose all lines match . This option may be specified more than once. ---inter-hunk-context=:: +`--inter-hunk-context=`:: Show the context between diff hunks, up to the specified number of lines, thereby fusing hunks that are close to each other. Defaults to `diff.interHunkContext` or 0 if the config option is unset. --W:: ---function-context:: +`-W`:: +`--function-context`:: Show whole function as context lines for each change. The function names are determined in the same way as `git diff` works out patch hunk headers (see 'Defining a @@ -770,26 +770,26 @@ endif::git-format-patch[] ifndef::git-format-patch[] ifndef::git-log[] ---exit-code:: +`--exit-code`:: Make the program exit with codes similar to diff(1). That is, it exits with 1 if there were differences and 0 means no differences. ---quiet:: +`--quiet`:: Disable all output of the program. Implies `--exit-code`. endif::git-log[] endif::git-format-patch[] ---ext-diff:: +`--ext-diff`:: Allow an external diff helper to be executed. If you set an external diff driver with linkgit:gitattributes[5], you need to use this option with linkgit:git-log[1] and friends. ---no-ext-diff:: +`--no-ext-diff`:: Disallow external diff drivers. ---textconv:: ---no-textconv:: +`--textconv`:: +`--no-textconv`:: Allow (or disallow) external text conversion filters to be run when comparing binary files. See linkgit:gitattributes[5] for details. Because textconv filters are typically a one-way @@ -799,7 +799,7 @@ endif::git-format-patch[] linkgit:git-log[1], but not for linkgit:git-format-patch[1] or diff plumbing commands. ---ignore-submodules[=]:: +`--ignore-submodules[=]`:: Ignore changes to submodules in the diff generation. can be either "none", "untracked", "dirty" or "all", which is the default. Using "none" will consider the submodule modified when it either contains @@ -812,19 +812,19 @@ endif::git-format-patch[] only changes to the commits stored in the superproject are shown (this was the behavior until 1.7.0). Using "all" hides all changes to submodules. ---src-prefix=:: +`--src-prefix=`:: Show the given source prefix instead of "a/". ---dst-prefix=:: +`--dst-prefix=`:: Show the given destination prefix instead of "b/". ---no-prefix:: +`--no-prefix`:: Do not show any source or destination prefix. ---line-prefix=:: +`--line-prefix=`:: Prepend an additional prefix to every line of output. ---ita-invisible-in-index:: +`--ita-invisible-in-index`:: By default entries added by `git add -N` appear as an existing empty file in `git diff` and a new file in `git diff --cached`. This option makes the entry appear as a new file in `git diff` diff --git a/Documentation/fetch-options.txt b/Documentation/fetch-options.txt index 94de13eec8..fcee0ad87d 100644 --- a/Documentation/fetch-options.txt +++ b/Documentation/fetch-options.txt @@ -1,38 +1,38 @@ ---all:: +`--all`:: Fetch all remotes. --a:: ---append:: +`-a`:: +`--append`:: Append ref names and object names of fetched refs to the existing contents of `.git/FETCH_HEAD`. Without this option old data in `.git/FETCH_HEAD` will be overwritten. ---atomic:: +`--atomic`:: Use an atomic transaction to update local refs. Either all refs are updated, or on error, no refs are updated. ---depth=:: +`--depth=`:: Limit fetching to the specified number of commits from the tip of each remote branch history. If fetching to a 'shallow' repository created by `git clone` with `--depth=` option (see linkgit:git-clone[1]), deepen or shorten the history to the specified number of commits. Tags for the deepened commits are not fetched. ---deepen=:: +`--deepen=`:: Similar to --depth, except it specifies the number of commits from the current shallow boundary instead of from the tip of each remote branch history. ---shallow-since=:: +`--shallow-since=`:: Deepen or shorten the history of a shallow repository to include all reachable commits after . ---shallow-exclude=:: +`--shallow-exclude=`:: Deepen or shorten the history of a shallow repository to exclude commits reachable from a specified remote branch or tag. This option can be specified multiple times. ---unshallow:: +`--unshallow`:: If the source repository is complete, convert a shallow repository to a complete one, removing all the limitations imposed by shallow repositories. @@ -40,7 +40,7 @@ If the source repository is shallow, fetch as much as possible so that the current repository has the same history as the source repository. ---update-shallow:: +`--update-shallow`:: By default when fetching from a shallow repository, `git fetch` refuses refs that require updating `.git/shallow`. This option updates `.git/shallow` and accept such @@ -65,11 +65,11 @@ this option multiple times, one for each matching ref name. See also the `fetch.negotiationAlgorithm` configuration variable documented in linkgit:git-config[1]. ---dry-run:: +`--dry-run`:: Show what would be done, without making any changes. ifndef::git-pull[] ---[no-]write-fetch-head:: +`--[no-]write-fetch-head`:: Write the list of remote refs fetched in the `FETCH_HEAD` file directly under `$GIT_DIR`. This is the default. Passing `--no-write-fetch-head` from the command line tells @@ -77,8 +77,8 @@ ifndef::git-pull[] file is never written. endif::git-pull[] --f:: ---force:: +`-f`:: +`--force`:: When `git fetch` is used with `:` refspec it may refuse to update the local branch as discussed ifdef::git-pull[] @@ -90,28 +90,28 @@ ifndef::git-pull[] endif::git-pull[] This option overrides that check. --k:: ---keep:: +`-k`:: +`--keep`:: Keep downloaded pack. ifndef::git-pull[] ---multiple:: +`--multiple`:: Allow several and arguments to be specified. No s may be specified. ---[no-]auto-maintenance:: ---[no-]auto-gc:: +`--[no-]auto-maintenance`:: +`--[no-]auto-gc`:: Run `git maintenance run --auto` at the end to perform automatic repository maintenance if needed. (`--[no-]auto-gc` is a synonym.) This is enabled by default. ---[no-]write-commit-graph:: +`--[no-]write-commit-graph`:: Write a commit-graph after fetching. This overrides the config setting `fetch.writeCommitGraph`. endif::git-pull[] --p:: ---prune:: +`-p`:: +`--prune`:: Before fetching, remove any remote-tracking references that no longer exist on the remote. Tags are not subject to pruning if they are fetched only because of the default tag @@ -125,8 +125,8 @@ ifndef::git-pull[] + See the PRUNING section below for more details. --P:: ---prune-tags:: +`-P`:: +`--prune-tags`:: Before fetching, remove any local tags that no longer exist on the remote if `--prune` is enabled. This option should be used more carefully, unlike `--prune` it will remove any local @@ -139,16 +139,16 @@ See the PRUNING section below for more details. endif::git-pull[] ifndef::git-pull[] --n:: +`-n`:: endif::git-pull[] ---no-tags:: +`--no-tags`:: By default, tags that point at objects that are downloaded from the remote repository are fetched and stored locally. This option disables this automatic tag following. The default behavior for a remote may be specified with the remote..tagOpt setting. See linkgit:git-config[1]. ---refmap=:: +`--refmap=`:: When fetching refs listed on the command line, use the specified refspec (can be given more than once) to map the refs to remote-tracking branches, instead of the values of @@ -159,8 +159,8 @@ endif::git-pull[] command-line arguments. See section on "Configured Remote-tracking Branches" for details. --t:: ---tags:: +`-t`:: +`--tags`:: Fetch all tags from the remote (i.e., fetch remote tags `refs/tags/*` into local tags with the same name), in addition to whatever else would otherwise be fetched. Using this @@ -182,8 +182,8 @@ ifndef::git-pull[] `fetch.recurseSubmodules` is set (see linkgit:git-config[1]). endif::git-pull[] --j:: ---jobs=:: +`-j`:: +`--jobs=`:: Number of parallel children to be used for all forms of fetching. + If the `--multiple` option was specified, the different remotes will be fetched @@ -195,12 +195,12 @@ Typically, parallel recursive and multi-remote fetches will be faster. By default fetches are performed sequentially, not in parallel. ifndef::git-pull[] ---no-recurse-submodules:: +`--no-recurse-submodules`:: Disable recursive fetching of submodules (this has the same effect as using the `--recurse-submodules=no` option). endif::git-pull[] ---set-upstream:: +`--set-upstream`:: If the remote is fetched successfully, add upstream (tracking) reference, used by argument-less linkgit:git-pull[1] and other commands. For more information, @@ -208,7 +208,7 @@ endif::git-pull[] linkgit:git-config[1]. ifndef::git-pull[] ---submodule-prefix=:: +`--submodule-prefix=`:: Prepend to paths printed in informative messages such as "Fetching submodule foo". This option is used internally when recursing over submodules. @@ -221,8 +221,8 @@ ifndef::git-pull[] linkgit:git-config[1]) override this option, as does specifying --[no-]recurse-submodules directly. --u:: ---update-head-ok:: +`-u`:: +`--update-head-ok`:: By default `git fetch` refuses to update the head which corresponds to the current branch. This flag disables the check. This is purely for the internal use for `git pull` @@ -238,25 +238,25 @@ endif::git-pull[] run on the other end. ifndef::git-pull[] --q:: ---quiet:: +`-q`:: +`--quiet`:: Pass `--quiet` to `git-fetch-pack` and silence any other internally used `git` commands. Progress is not reported to the standard error stream. --v:: ---verbose:: +`-v`:: +`--verbose`:: Be verbose. endif::git-pull[] ---progress:: +`--progress`:: Progress status is reported on the standard error stream by default when it is attached to a terminal, unless -q is specified. This flag forces progress status even if the standard error stream is not directed to a terminal. -o