threads / patch / 15724

patchDocumentation: remove '\' from front of options in githooks doc

Subject: [PATCH] Documentation: remove '\' from front of options in githooks doc

## tl;dr

4 messages between Sep 30, 2008 and Sep 30, 2008. Diffs are folded; open one to read it.

replies: 3people: 2as markdown or json

SZEDER Gábor· Sep 30, 2008, 13:37 UTC · lore
... because they show up in the man and html outputs.
Signed-off-by: SZEDER Gábor <szeder@ira.uka.de>
---
 Documentation/githooks.txt |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)
Show changes to Documentation/githooks.txt +6 −6
diff --git a/Documentation/githooks.txt b/Documentation/githooks.txt
index 046a2a7..5bb7b33 100644
--- a/Documentation/githooks.txt
+++ b/Documentation/githooks.txt
@@ -66,7 +66,7 @@ pre-commit
 ----------
 
 This hook is invoked by 'git-commit', and can be bypassed
-with `\--no-verify` option.  It takes no parameter, and is
+with `--no-verify` option.  It takes no parameter, and is
 invoked before obtaining the proposed commit log message and
 making a commit.  Exiting with non-zero status from this script
 causes the 'git-commit' to abort.
@@ -87,17 +87,17 @@ default log message, and before the editor is started.
 
 It takes one to three parameters.  The first is the name of the file
 that the commit log message.  The second is the source of the commit
-message, and can be: `message` (if a `\-m` or `\-F` option was
-given); `template` (if a `\-t` option was given or the
+message, and can be: `message` (if a `-m` or `-F` option was
+given); `template` (if a `-t` option was given or the
 configuration option `commit.template` is set); `merge` (if the
 commit is a merge or a `.git/MERGE_MSG` file exists); `squash`
 (if a `.git/SQUASH_MSG` file exists); or `commit`, followed by
-a commit SHA1 (if a `\-c`, `\-C` or `\--amend` option was given).
+a commit SHA1 (if a `-c`, `-C` or `--amend` option was given).
 
 If the exit status is non-zero, 'git-commit' will abort.
 
 The purpose of the hook is to edit the message file in place, and
-it is not suppressed by the `\--no-verify` option.  A non-zero exit
+it is not suppressed by the `--no-verify` option.  A non-zero exit
 means a failure of the hook and aborts the commit.  It should not
 be used as replacement for pre-commit hook.
 
@@ -108,7 +108,7 @@ commit-msg
 ----------
 
 This hook is invoked by 'git-commit', and can be bypassed
-with `\--no-verify` option.  It takes a single parameter, the
+with `--no-verify` option.  It takes a single parameter, the
 name of the file that holds the proposed commit log message.
 Exiting with non-zero status causes the 'git-commit' to
 abort.
-- 
1.6.0.2.448.g0c4e5
Thomas Rast· Sep 30, 2008, 15:56 UTC · re: SZEDER Gábor · lore

Re: [PATCH] Documentation: remove '\' from front of options in githooks doc

SZEDER Gábor wrote:
> ... because they show up in the man and html outputs.
...
> diff --git a/Documentation/githooks.txt b/Documentation/githooks.txt
...
Show 9 quoted lines
> @@ -66,7 +66,7 @@ pre-commit
>  ----------
>  
>  This hook is invoked by 'git-commit', and can be bypassed
> -with `\--no-verify` option.  It takes no parameter, and is
> +with `--no-verify` option.  It takes no parameter, and is
>  invoked before obtaining the proposed commit log message and
>  making a commit.  Exiting with non-zero status from this script
>  causes the 'git-commit' to abort.

This must be checked against older asciidocs to verify that it does not turn the unescaped sequence -- into an em-dash. The \-- traces back to e1ccf53 ([PATCH] Escape asciidoc's built-in em-dash replacement, 2005-09-12), which indicates that it _was_ a problem in the past. (The asciidoc 8.2.5 on my system does not use an em-dash in either case.)

ACK on all single-dash cases though, which are indeed wrong and were apparently introduced later in 8089c85 (git-commit: add a prepare-commit-msg hook, 2008-02-05).

- Thomas
-- 
Thomas Rast
trast@student.ethz.ch
SZEDER Gábor· Sep 30, 2008, 17:21 UTC · re: Thomas Rast · lore

Re: [PATCH] Documentation: remove '\' from front of options in githooks doc

Hi Thomas,
On Tue, Sep 30, 2008 at 05:56:32PM +0200, Thomas Rast wrote:
Show 6 quoted lines
> This must be checked against older asciidocs to verify that it does
> not turn the unescaped sequence -- into an em-dash.  The \-- traces
> back to e1ccf53 ([PATCH] Escape asciidoc's built-in em-dash
> replacement, 2005-09-12), which indicates that it _was_ a problem in
> the past.  (The asciidoc 8.2.5 on my system does not use an em-dash in
> either case.)

Indeed, now that I look more closely, I had those '\' characters only in front of short options in the outputs.

However, it worth noting that there are plenty other places where the double dash in long options are not escaped with a '\'.

> ACK on all single-dash cases though, which are indeed wrong and were
> apparently introduced later in 8089c85 (git-commit: add a
> prepare-commit-msg hook, 2008-02-05).
I will send a corrected patch shortly.

Thanks, Gábor

SZEDER Gábor· Sep 30, 2008, 17:27 UTC · re: SZEDER Gábor · lore

[PATCH] Documentation: remove '\' in front of short options

... because they show up in the man and html outputs.

This escaping is only needed for double dashes to be compatible with older asciidoc versions; see commit e1ccf53 ([PATCH] Escape asciidoc's built-in em-dash replacement, 2005-09-12).

Signed-off-by: SZEDER Gábor <szeder@ira.uka.de>
---
 Documentation/git-rev-list.txt |    6 +++---
 Documentation/githooks.txt     |    6 +++---
 2 files changed, 6 insertions(+), 6 deletions(-)
Show changes to 2 files +6 −6

Documentation/git-rev-list.txt, Documentation/githooks.txt

diff --git a/Documentation/git-rev-list.txt b/Documentation/git-rev-list.txt
index fd1de92..1c9cc28 100644
--- a/Documentation/git-rev-list.txt
+++ b/Documentation/git-rev-list.txt
@@ -32,9 +32,9 @@ SYNOPSIS
 	     [ \--cherry-pick ]
 	     [ \--encoding[=<encoding>] ]
 	     [ \--(author|committer|grep)=<pattern> ]
-	     [ \--regexp-ignore-case | \-i ]
-	     [ \--extended-regexp | \-E ]
-	     [ \--fixed-strings | \-F ]
+	     [ \--regexp-ignore-case | -i ]
+	     [ \--extended-regexp | -E ]
+	     [ \--fixed-strings | -F ]
 	     [ \--date={local|relative|default|iso|rfc|short} ]
 	     [ [\--objects | \--objects-edge] [ \--unpacked ] ]
 	     [ \--pretty | \--header ]
diff --git a/Documentation/githooks.txt b/Documentation/githooks.txt
index 046a2a7..7fefdb1 100644
--- a/Documentation/githooks.txt
+++ b/Documentation/githooks.txt
@@ -87,12 +87,12 @@ default log message, and before the editor is started.
 
 It takes one to three parameters.  The first is the name of the file
 that the commit log message.  The second is the source of the commit
-message, and can be: `message` (if a `\-m` or `\-F` option was
-given); `template` (if a `\-t` option was given or the
+message, and can be: `message` (if a `-m` or `-F` option was
+given); `template` (if a `-t` option was given or the
 configuration option `commit.template` is set); `merge` (if the
 commit is a merge or a `.git/MERGE_MSG` file exists); `squash`
 (if a `.git/SQUASH_MSG` file exists); or `commit`, followed by
-a commit SHA1 (if a `\-c`, `\-C` or `\--amend` option was given).
+a commit SHA1 (if a `-c`, `-C` or `\--amend` option was given).
 
 If the exit status is non-zero, 'git-commit' will abort.
 
-- 
1.6.0.2.448.g0c4e5

← back to recent threads