Code

Merge branch 'jn/doc-backslash'
authorJunio C Hamano <gitster@pobox.com>
Fri, 3 Sep 2010 16:43:42 +0000 (09:43 -0700)
committerJunio C Hamano <gitster@pobox.com>
Fri, 3 Sep 2010 16:43:42 +0000 (09:43 -0700)
* jn/doc-backslash:
  Documentation: remove stray backslash in show-branch discussion
  Documentation: remove stray backslashes from "Fighting regressions" article
  Documentation: do not convert ... operator to ellipses
  Documentation: avoid stray backslash in user manual
  Documentation: avoid stray backslashes in core tutorial
  Documentation: remove stray backslashes in rev-parse manual
  Documentation: remove backslash before ~ in fast-import manual
  Documentation: remove stray backslash from "git bundle" manual
  Documentation/technical: avoid stray backslash in parse-options API docs
  Documentation: remove backslashes in manpage synopses
  Documentation: clarify quoting in gitignore docs
  Documentation: clarify quoting in "git rm" example
  Documentation: add missing quotes to "git grep" examples
  Documentation: clarify quoting in "git add" example
  Documentation: unbreak regex in show-ref manual
  Documentation: quoting trouble in "git rm" discussion
  Documentation: tweak description of log.date

26 files changed:
Documentation/asciidoc.conf
Documentation/config.txt
Documentation/git-add.txt
Documentation/git-bisect-lk2009.txt
Documentation/git-bundle.txt
Documentation/git-checkout-index.txt
Documentation/git-checkout.txt
Documentation/git-commit-tree.txt
Documentation/git-fast-export.txt
Documentation/git-for-each-ref.txt
Documentation/git-grep.txt
Documentation/git-ls-files.txt
Documentation/git-merge-index.txt
Documentation/git-push.txt
Documentation/git-rebase.txt
Documentation/git-relink.txt
Documentation/git-rev-parse.txt
Documentation/git-rm.txt
Documentation/git-show-branch.txt
Documentation/git-show-ref.txt
Documentation/git-update-index.txt
Documentation/gitcore-tutorial.txt
Documentation/gitignore.txt
Documentation/rev-list-options.txt
Documentation/technical/api-parse-options.txt
Documentation/user-manual.txt

index 87a90f2c3fd48bbb593a2cef135310f88d87e4b4..b5f0f29d1f736f2e6a0c544d682b973b95420191 100644 (file)
@@ -16,7 +16,9 @@ plus=&#43;
 caret=&#94;
 startsb=&#91;
 endsb=&#93;
+backslash=&#92;
 tilde=&#126;
+apostrophe=&#39;
 backtick=&#96;
 
 ifdef::backend-docbook[]
index 61831f60ce61f8a601fed3ba0b40559929d0ee61..0510ac795c1d558b7f3a551ac5cc10ba1f1c8dff 100644 (file)
@@ -1305,10 +1305,11 @@ interactive.singlekey::
        ignored if portable keystroke input is not available.
 
 log.date::
-       Set default date-time mode for the log command. Setting log.date
-       value is similar to using 'git log'\'s --date option. The value is one of the
-       following alternatives: {relative,local,default,iso,rfc,short}.
-       See linkgit:git-log[1].
+       Set the default date-time mode for the 'log' command.
+       Setting a value for log.date is similar to using 'git log''s
+       `\--date` option.  Possible values are `relative`, `local`,
+       `default`, `iso`, `rfc`, and `short`; see linkgit:git-log[1]
+       for details.
 
 log.decorate::
        Print out the ref names of any commits that are shown by the log
index e22a62f06592c7d233fc06da022962cae59d105a..e213a2efd72aa2cb242fd29922a0fb4c3565b78d 100644 (file)
@@ -157,14 +157,14 @@ those in info/exclude.  See linkgit:gitrepository-layout[5].
 EXAMPLES
 --------
 
-* Adds content from all `\*.txt` files under `Documentation` directory
+* Adds content from all `*.txt` files under `Documentation` directory
 and its subdirectories:
 +
 ------------
 $ git add Documentation/\*.txt
 ------------
 +
-Note that the asterisk `\*` is quoted from the shell in this
+Note that the asterisk `*` is quoted from the shell in this
 example; this lets the command include the files from
 subdirectories of `Documentation/` directory.
 
index efbe3790bb4a0521c954650ad43075f583500c7b..8a2ba3790417d80f6e71e45bc07b1f3cbea41329 100644 (file)
@@ -873,7 +873,7 @@ c * N * T + b * M * log2(M) tests
 where c is the number of rounds of test (so a small constant) and b is
 the ratio of bug per commit (hopefully a small constant too).
 
-So of course it's much better as it's O(N \* T) vs O(N \* T \* M) if
+So of course it's much better as it's O(N * T) vs O(N * T * M) if
 you would test everything after each commit.
 
 This means that test suites are good to prevent some bugs from being
index a5ed8fb05b2f491f8f8ed7b95b808d04240327f6..f0b75c7e62e3c4ef045ace1d8c592d8e491d3080 100644 (file)
@@ -60,7 +60,7 @@ unbundle <file>::
 [git-rev-list-args...]::
        A list of arguments, acceptable to 'git rev-parse' and
        'git rev-list', that specifies the specific objects and references
-       to transport.  For example, `master\~10..master` causes the
+       to transport.  For example, `master~10..master` causes the
        current master reference to be packaged along with all objects
        added since its 10th ancestor commit.  There is no explicit
        limit to the number of references and objects that may be
@@ -79,12 +79,12 @@ SPECIFYING REFERENCES
 
 'git bundle' will only package references that are shown by
 'git show-ref': this includes heads, tags, and remote heads.  References
-such as `master\~1` cannot be packaged, but are perfectly suitable for
+such as `master{tilde}1` cannot be packaged, but are perfectly suitable for
 defining the basis.  More than one reference may be packaged, and more
 than one basis can be specified.  The objects packaged are those not
 contained in the union of the given bases.  Each basis can be
-specified explicitly (e.g. `^master\~10`), or implicitly (e.g.
-`master\~10..master`, `--since=10.days.ago master`).
+specified explicitly (e.g. `^master{tilde}10`), or implicitly (e.g.
+`master{tilde}10..master`, `--since=10.days.ago master`).
 
 It is very important that the basis used be held by the destination.
 It is okay to err on the side of caution, causing the bundle file
index d6aa6e14eb32967a09c5987fad26ece2749a65b8..62f9ab24c97875df6f053aa11f8f5cde56377175 100644 (file)
@@ -13,7 +13,7 @@ SYNOPSIS
                   [--stage=<number>|all]
                   [--temp]
                   [-z] [--stdin]
-                  [--] [<file>]\*
+                  [--] [<file>]*
 
 DESCRIPTION
 -----------
index 66e570113a077d2c52c4fc3ac09d24a272df5301..f88e9977d1137da0449736f5f8fe6746b42437e1 100644 (file)
@@ -187,7 +187,7 @@ As a special case, the `"@\{-N\}"` syntax for the N-th last branch
 checks out the branch (instead of detaching).  You may also specify
 `-` which is synonymous with `"@\{-1\}"`.
 +
-As a further special case, you may use `"A...B"` as a shortcut for the
+As a further special case, you may use `"A\...B"` as a shortcut for the
 merge base of `A` and `B` if there is exactly one merge base. You can
 leave out at most one of `A` and `B`, in which case it defaults to `HEAD`.
 
index 61888547a16e904a766734c6883d95ee46dfc61e..349366ee1e2c414aed87745d2c717ea9a2149367 100644 (file)
@@ -8,7 +8,7 @@ git-commit-tree - Create a new commit object
 
 SYNOPSIS
 --------
-'git commit-tree' <tree> [-p <parent commit>]\* < changelog
+'git commit-tree' <tree> [-p <parent commit>]* < changelog
 
 DESCRIPTION
 -----------
index 8a6a3cb255258dddc38f69b20525f8d123683681..fcad1132767021a03a88cf084d5eaf4ae8780792 100644 (file)
@@ -99,7 +99,7 @@ marks the same across runs.
 [git-rev-list-args...]::
        A list of arguments, acceptable to 'git rev-parse' and
        'git rev-list', that specifies the specific objects and references
-       to export.  For example, `master\~10..master` causes the
+       to export.  For example, `master{tilde}10..master` causes the
        current master reference to be exported along with all objects
        added since its 10th ancestor commit.
 
index 390d85ccaea6ada3f3bce6148bcdd84d4f0bc2ac..d66fd9d2314774a0b31eadb23f8c00c199276d84 100644 (file)
@@ -9,7 +9,7 @@ SYNOPSIS
 --------
 [verse]
 'git for-each-ref' [--count=<count>] [--shell|--perl|--python|--tcl]
-                  [--sort=<key>]\* [--format=<format>] [<pattern>...]
+                  [--sort=<key>]* [--format=<format>] [<pattern>...]
 
 DESCRIPTION
 -----------
index 5474dd7f94c4b3217230808e656662d0edcef207..dab0a78fa890d0c0cd193d89b7f4ac9ed19fb001 100644 (file)
@@ -191,11 +191,11 @@ OPTIONS
 Examples
 --------
 
-git grep 'time_t' \-- '*.[ch]'::
+git grep {apostrophe}time_t{apostrophe} \-- {apostrophe}*.[ch]{apostrophe}::
        Looks for `time_t` in all tracked .c and .h files in the working
        directory and its subdirectories.
 
-git grep -e \'#define\' --and \( -e MAX_PATH -e PATH_MAX \)::
+git grep -e {apostrophe}#define{apostrophe} --and \( -e MAX_PATH -e PATH_MAX \)::
        Looks for a line that has `#define` and either `MAX_PATH` or
        `PATH_MAX`.
 
index a7c8174d01810bfb28e331aafc27414dd6cfad50..15aee2f9532e66e46c83e4cef908c0a4f87fadd9 100644 (file)
@@ -10,14 +10,14 @@ SYNOPSIS
 --------
 [verse]
 'git ls-files' [-z] [-t] [-v]
-               (--[cached|deleted|others|ignored|stage|unmerged|killed|modified])\*
-               (-[c|d|o|i|s|u|k|m])\*
+               (--[cached|deleted|others|ignored|stage|unmerged|killed|modified])*
+               (-[c|d|o|i|s|u|k|m])*
                [-x <pattern>|--exclude=<pattern>]
                [-X <file>|--exclude-from=<file>]
                [--exclude-per-directory=<file>]
                [--exclude-standard]
                [--error-unmatch] [--with-tree=<tree-ish>]
-               [--full-name] [--abbrev] [--] [<file>]\*
+               [--full-name] [--abbrev] [--] [<file>]*
 
 DESCRIPTION
 -----------
index 4d266de9ccb9d6881b18162c132ccd8475ca50ee..921b38f18374c20d1f94c0907a629425acb38aa4 100644 (file)
@@ -8,7 +8,7 @@ git-merge-index - Run a merge for files needing merging
 
 SYNOPSIS
 --------
-'git merge-index' [-o] [-q] <merge-program> (-a | [--] <file>\*)
+'git merge-index' [-o] [-q] <merge-program> (-a | [--] <file>*)
 
 DESCRIPTION
 -----------
index 658ff2ff67f23e9a9d2942e38528dba415139ac3..020955ff5a8635e385208a6a89b1ad71125fb205 100644 (file)
@@ -200,7 +200,7 @@ summary::
        For a successfully pushed ref, the summary shows the old and new
        values of the ref in a form suitable for using as an argument to
        `git log` (this is `<old>..<new>` in most cases, and
-       `<old>...<new>` for forced non-fast-forward updates).
+       `<old>\...<new>` for forced non-fast-forward updates).
 +
 For a failed update, more details are given:
 +
index 45c52d2e57d2f4c2783c32b4cb3ff8f4dcd6414e..30e5c0eb14470a5f72174b1071eac79c55fb0c41 100644 (file)
@@ -210,7 +210,7 @@ OPTIONS
        <upstream>.  May be any valid commit, and not just an
        existing branch name.
 +
-As a special case, you may use "A...B" as a shortcut for the
+As a special case, you may use "A\...B" as a shortcut for the
 merge base of A and B if there is exactly one merge base. You can
 leave out at most one of A and B, in which case it defaults to HEAD.
 
index 25ff8f9dcbe0db52675338f1429e9169052b9cf1..8a5842bb937a0f8f89a561566d1d7ce129edc4b0 100644 (file)
@@ -7,7 +7,7 @@ git-relink - Hardlink common objects in local repositories
 
 SYNOPSIS
 --------
-'git relink' [--safe] <dir> [<dir>]\* <master_dir>
+'git relink' [--safe] <dir> [<dir>]* <master_dir>
 
 DESCRIPTION
 -----------
index be4c0533603443cd9b4df5bf732bbcdd31802a11..341ca90c6e2b40676d4be360118176a39955b11c 100644 (file)
@@ -74,7 +74,7 @@ OPTIONS
        properly quoted for consumption by shell.  Useful when
        you expect your parameter to contain whitespaces and
        newlines (e.g. when using pickaxe `-S` with
-       'git diff-\*'). In contrast to the `--sq-quote` option,
+       'git diff-{asterisk}'). In contrast to the `--sq-quote` option,
        the command input is still interpreted as usual.
 
 --not::
@@ -112,14 +112,15 @@ OPTIONS
 +
 If a `pattern` is given, only refs matching the given shell glob are
 shown.  If the pattern does not contain a globbing character (`?`,
-`\*`, or `[`), it is turned into a prefix match by appending `/\*`.
+`{asterisk}`, or `[`), it is turned into a prefix match by
+appending `/{asterisk}`.
 
 --glob=pattern::
        Show all refs matching the shell glob pattern `pattern`. If
        the pattern does not start with `refs/`, this is automatically
        prepended.  If the pattern does not contain a globbing
-       character (`?`, `\*`, or `[`), it is turned into a prefix
-       match by appending `/\*`.
+       character (`?`, `{asterisk}`, or `[`), it is turned into a prefix
+       match by appending `/{asterisk}`.
 
 --show-toplevel::
        Show the absolute path of the top-level directory.
index c21d19e573d5192597b4766d8d87d17ab8f1c0f3..71e3d9fc23ab6f1c181c47ebb7c9483950a9e9a6 100644 (file)
@@ -78,7 +78,8 @@ a file that you have not told git about does not remove that file.
 
 File globbing matches across directory boundaries.  Thus, given
 two directories `d` and `d2`, there is a difference between
-using `git rm \'d\*\'` and `git rm \'d/\*\'`, as the former will
+using `git rm {apostrophe}d{asterisk}{apostrophe}` and
+`git rm {apostrophe}d/{asterisk}{apostrophe}`, as the former will
 also remove all of directory `d2`.
 
 REMOVING FILES THAT HAVE DISAPPEARED FROM THE FILESYSTEM
@@ -135,11 +136,11 @@ git diff --name-only --diff-filter=D -z | xargs -0 git rm --cached
 
 EXAMPLES
 --------
-git rm Documentation/\\*.txt::
-       Removes all `\*.txt` files from the index that are under the
+git rm Documentation/\*.txt::
+       Removes all `*.txt` files from the index that are under the
        `Documentation` directory and any of its subdirectories.
 +
-Note that the asterisk `\*` is quoted from the shell in this
+Note that the asterisk `*` is quoted from the shell in this
 example; this lets git, and not the shell, expand the pathnames
 of files and subdirectories under the `Documentation/` directory.
 
index 81ba29669c52a7c50fb126b7b70c3a867df25f00..64532633406bedb431c4c6755101ce117e71388f 100644 (file)
@@ -168,10 +168,10 @@ $ git show-branch master fixes mhf
 ------------------------------------------------
 
 These three branches all forked from a common commit, [master],
-whose commit message is "Add \'git show-branch\'". The "fixes"
-branch adds one commit "Introduce "reset type" flag to "git reset"".
-The "mhf" branch adds many other commits. The current branch
-is "master".
+whose commit message is "Add {apostrophe}git show-branch{apostrophe}".
+The "fixes" branch adds one commit "Introduce "reset type" flag to
+"git reset"". The "mhf" branch adds many other commits.
+The current branch is "master".
 
 
 EXAMPLE
index 75780d7d63894e220bf938da0b4f5dca40d6301d..4696af743321d78d9e1d17115d29222f17cb4d55 100644 (file)
@@ -73,8 +73,8 @@ OPTIONS
 --exclude-existing[=<pattern>]::
 
        Make 'git show-ref' act as a filter that reads refs from stdin of the
-       form "^(?:<anything>\s)?<refname>(?:\^\{\})?$" and performs the
-       following actions on each:
+       form "^(?:<anything>\s)?<refname>(?:{backslash}{caret}\{\})?$"
+       and performs the following actions on each:
        (1) strip "^{}" at the end of line if any;
        (2) ignore if pattern is provided and does not head-match refname;
        (3) warn if refname is not a well-formed refname and skip;
index 765d4b312ed6f062180e83fa0d931e6bd2eef24f..74d1d49dbffda60a00f6c195d77020b5ec7be979 100644 (file)
@@ -12,7 +12,7 @@ SYNOPSIS
 'git update-index'
             [--add] [--remove | --force-remove] [--replace]
             [--refresh] [-q] [--unmerged] [--ignore-missing]
-            [--cacheinfo <mode> <object> <file>]\*
+            [--cacheinfo <mode> <object> <file>]*
             [--chmod=(+|-)x]
             [--assume-unchanged | --no-assume-unchanged]
             [--skip-worktree | --no-skip-worktree]
@@ -21,7 +21,7 @@ SYNOPSIS
             [--info-only] [--index-info]
             [-z] [--stdin]
             [--verbose]
-            [--] [<file>]\*
+            [--] [<file>]*
 
 DESCRIPTION
 -----------
index ed3ddc92cb51eaeb3d4a988e396a4f90297037c6..5e9c5ebba3e3239f61195155448c960cfe476463 100644 (file)
@@ -110,7 +110,7 @@ An 'object' is identified by its 160-bit SHA1 hash, aka 'object name',
 and a reference to an object is always the 40-byte hex
 representation of that SHA1 name. The files in the `refs`
 subdirectory are expected to contain these hex references
-(usually with a final `\'\n\'` at the end), and you should thus
+(usually with a final `\n` at the end), and you should thus
 expect to see a number of 41-byte files containing these
 references in these `refs` subdirectories when you actually start
 populating your tree.
@@ -310,7 +310,7 @@ and this will just output the name of the resulting tree, in this case
 ----------------
 
 which is another incomprehensible object name. Again, if you want to,
-you can use `git cat-file -t 8988d\...` to see that this time the object
+you can use `git cat-file -t 8988d...` to see that this time the object
 is not a "blob" object, but a "tree" object (you can also use
 `git cat-file` to actually output the raw object contents, but you'll see
 mainly a binary mess, so that's less interesting).
@@ -436,8 +436,8 @@ $ git update-index hello
 (note how we didn't need the `\--add` flag this time, since git knew
 about the file already).
 
-Note what happens to the different 'git diff-\*' versions here. After
-we've updated `hello` in the index, `git diff-files -p` now shows no
+Note what happens to the different 'git diff-{asterisk}' versions here.
+After we've updated `hello` in the index, `git diff-files -p` now shows no
 differences, but `git diff-index -p HEAD` still *does* show that the
 current state is different from the state we committed. In fact, now
 'git diff-index' shows the same difference whether we use the `--cached`
@@ -494,7 +494,7 @@ and it will show what the last commit (in `HEAD`) actually changed.
 [NOTE]
 ============
 Here is an ASCII art by Jon Loeliger that illustrates how
-various diff-\* commands compare things.
+various 'diff-{asterisk}' commands compare things.
 
                       diff-tree
                        +----+
@@ -958,11 +958,11 @@ $ git show-branch --topo-order --more=1 master mybranch
 The first two lines indicate that it is showing the two branches
 and the first line of the commit log message from their
 top-of-the-tree commits, you are currently on `master` branch
-(notice the asterisk `\*` character), and the first column for
+(notice the asterisk `{asterisk}` character), and the first column for
 the later output lines is used to show commits contained in the
 `master` branch, and the second column for the `mybranch`
 branch. Three commits are shown along with their log messages.
-All of them have non blank characters in the first column (`*`
+All of them have non blank characters in the first column (`{asterisk}`
 shows an ordinary commit on the current branch, `-` is a merge commit), which
 means they are now part of the `master` branch. Only the "Some
 work" commit has the plus `+` character in the second column,
@@ -1092,7 +1092,7 @@ Downloader from http and https URL
 first obtains the topmost commit object name from the remote site
 by looking at the specified refname under `repo.git/refs/` directory,
 and then tries to obtain the
-commit object by downloading from `repo.git/objects/xx/xxx\...`
+commit object by downloading from `repo.git/objects/xx/xxx...`
 using the object name of that commit object.  Then it reads the
 commit object to find out its parent commits and the associate
 tree object; it repeats this process until it gets all the
@@ -1420,7 +1420,7 @@ packed, and stores the packed file in `.git/objects/pack`
 directory.
 
 [NOTE]
-You will see two files, `pack-\*.pack` and `pack-\*.idx`,
+You will see two files, `pack-{asterisk}.pack` and `pack-{asterisk}.idx`,
 in `.git/objects/pack` directory. They are closely related to
 each other, and if you ever copy them by hand to a different
 repository for whatever reason, you should make sure you copy
index e10fa88b8cf98b796fc9354e7671dc7bec25840d..7dc2e8b0bcdfb189724ef9b2204f4e624e3be589 100644 (file)
@@ -90,12 +90,12 @@ Patterns have the following format:
  - Otherwise, git treats the pattern as a shell glob suitable
    for consumption by fnmatch(3) with the FNM_PATHNAME flag:
    wildcards in the pattern will not match a / in the pathname.
-   For example, "Documentation/\*.html" matches
+   For example, "Documentation/{asterisk}.html" matches
    "Documentation/git.html" but not "Documentation/ppc/ppc.html"
    or "tools/perf/Documentation/perf.html".
 
  - A leading slash matches the beginning of the pathname.
-   For example, "/*.c" matches "cat-file.c" but not
+   For example, "/{asterisk}.c" matches "cat-file.c" but not
    "mozilla-sha1/sha1.c".
 
 An example:
index cc562a057af3694d3518bc91b52ae322b6b1d9cc..e2237ae4a0a80b0e5aa22cbb13aa5a01ce4fb891 100644 (file)
@@ -321,7 +321,7 @@ excluded from the output.
        reflog entries from the most recent one to older ones.
        When this option is used you cannot specify commits to
        exclude (that is, '{caret}commit', 'commit1..commit2',
-       nor 'commit1...commit2' notations cannot be used).
+       nor 'commit1\...commit2' notations cannot be used).
 +
 With '\--pretty' format other than oneline (for obvious reasons),
 this causes the output to have two extra lines of information
index 312e3b2e2ba184b6329298753e996e14fe04386e..c5d141cd63d15e97dd4b4777c30dccb57d430782 100644 (file)
@@ -201,7 +201,7 @@ The last element of the array must be `OPT_END()`.
 If not stated otherwise, interpret the arguments as follows:
 
 * `short` is a character for the short option
-  (e.g. `\'e\'` for `-e`, use `0` to omit),
+  (e.g. `{apostrophe}e{apostrophe}` for `-e`, use `0` to omit),
 
 * `long` is a string for the long option
   (e.g. `"example"` for `\--example`, use `NULL` to omit),
@@ -228,10 +228,10 @@ The function must be defined in this form:
 The callback mechanism is as follows:
 
 * Inside `func`, the only interesting member of the structure
-  given by `opt` is the void pointer `opt->value`.
-  `\*opt->value` will be the value that is saved into `var`, if you
+  given by `opt` is the void pointer `opt\->value`.
+  `\*opt\->value` will be the value that is saved into `var`, if you
   use `OPT_CALLBACK()`.
-  For example, do `*(unsigned long *)opt->value = 42;` to get 42
+  For example, do `*(unsigned long *)opt\->value = 42;` to get 42
   into an `unsigned long` variable.
 
 * Return value `0` indicates success and non-zero return
index 22aee34d4a49b242370e5244f35d542ad0b79391..fecc4eb5b3b853f4781c769fff8337e8bb6c3500 100644 (file)
@@ -4251,9 +4251,9 @@ Two things are interesting here:
   negative numbers in case of different errors--and 0 on success.
 
 - the variable `sha1` in the function signature of `get_sha1()` is `unsigned
-  char \*`, but is actually expected to be a pointer to `unsigned
+  char {asterisk}`, but is actually expected to be a pointer to `unsigned
   char[20]`.  This variable will contain the 160-bit SHA-1 of the given
-  commit.  Note that whenever a SHA-1 is passed as `unsigned char \*`, it
+  commit.  Note that whenever a SHA-1 is passed as `unsigned char {asterisk}`, it
   is the binary representation, as opposed to the ASCII representation in
   hex characters, which is passed as `char *`.