Documentation: simplify refspec format description
The refspec format description was a mix of regexp and BNF, making it very difficult to read. The format was also wrong: it did not show that each part of a refspec is optional in different situations. Rather than having a confusing grammar, just present the format in informal prose. Signed-off-by: Anders Melchiorsen <mail@cup.kalibalik.dk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano committed
Jan 25, 2009 at 22:25 UTC
7a0d911f116e437628035d7b07035dbff707a172
2 files changed
+9
-9
Documentation/git-push.txt
+5
-4
@@ -33,10 +33,11 @@ OPTIONS
33
of a remote (see the section <<REMOTES,REMOTES>> below).
34
35
<refspec>...::
36
- The canonical format of a <refspec> parameter is
37
- `+?<src>:<dst>`; that is, an optional plus `{plus}`, followed
38
- by the source ref, followed by a colon `:`, followed by
39
- the destination ref.
36
+ The format of a <refspec> parameter is an optional plus
37
+ `{plus}`, followed by the source ref <src>, followed
38
+ by a colon `:`, followed by the destination ref <dst>.
39
+ It is used to specify with what <src> object the <dst> ref
40
+ in the remote repository is to be updated.
41
+
42
The <src> side represents the source branch (or arbitrary
43
"SHA1 expression", such as `master~4` (four parents before the
Documentation/pull-fetch-param.txt
+4
-5
@@ -5,15 +5,14 @@
5
of a remote (see the section <<REMOTES,REMOTES>> below).
6
7
<refspec>::
8
- The canonical format of a <refspec> parameter is
9
- `+?<src>:<dst>`; that is, an optional plus `{plus}`, followed
10
- by the source ref, followed by a colon `:`, followed by
11
- the destination ref.
8
+ The format of a <refspec> parameter is an optional plus
9
+ `{plus}`, followed by the source ref <src>, followed
10
+ by a colon `:`, followed by the destination ref <dst>.
11
+
12
The remote ref that matches <src>
13
is fetched, and if <dst> is not empty string, the local
14
ref that matches it is fast forwarded using <src>.
16
-Again, if the optional plus `+` is used, the local ref
15
+If the optional plus `+` is used, the local ref
16
is updated even if it does not result in a fast forward
17
update.
18
+