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

4 messages from 2008-09-30 to 2008-09-30. Participants: SZEDER Gábor, Thomas Rast.
Thread: https://gitlist.dev/t/15724

## SZEDER Gábor, 2008-09-30 13:37

Subject: [PATCH] Documentation: remove '\' from front of options in githooks doc
Message-ID: <1222781831-6620-1-git-send-email-szeder@ira.uka.de>
URL: https://gitlist.dev/e/1222781831-6620-1-git-send-email-szeder%40ira.uka.de

```
... 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(-)

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, 2008-09-30 15:56

Subject: Re: [PATCH] Documentation: remove '\' from front of options in githooks doc
Message-ID: <200809301756.41518.trast@student.ethz.ch>
URL: https://gitlist.dev/e/200809301756.41518.trast%40student.ethz.ch
In-Reply-To: <1222781831-6620-1-git-send-email-szeder@ira.uka.de>

```
SZEDER Gábor wrote:
> ... because they show up in the man and html outputs.
...
> diff --git 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.

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, 2008-09-30 17:21

Subject: Re: [PATCH] Documentation: remove '\' from front of options in githooks doc
Message-ID: <20080930172155.GJ6941@neumann>
URL: https://gitlist.dev/e/20080930172155.GJ6941%40neumann
In-Reply-To: <200809301756.41518.trast@student.ethz.ch>

```
Hi Thomas,

On Tue, Sep 30, 2008 at 05:56:32PM +0200, Thomas Rast wrote:
> 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, 2008-09-30 17:27

Subject: [PATCH] Documentation: remove '\' in front of short options
Message-ID: <20080930172710.GK6941@neumann>
URL: https://gitlist.dev/e/20080930172710.GK6941%40neumann
In-Reply-To: <20080930172155.GJ6941@neumann>

```
... 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(-)

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

```
