git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 1/3] Documentation: simplify refspec format description

From
AMAnders Melchiorsen <mail@cup.kalibalik.dk>
Date
Jan 25, 2009, 23:45 UTC
Message-ID
<1232927133-30377-2-git-send-email-mail@cup.kalibalik.dk>
In-Reply-To
<1232927133-30377-1-git-send-email-mail@cup.kalibalik.dk>

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>
---

This is a rework of http://article.gmane.org/gmane.comp.version-control.git/99552/

 Documentation/git-push.txt         |    8 ++++----
 Documentation/pull-fetch-param.txt |    8 ++++----
 2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/Documentation/git-push.txt b/Documentation/git-push.txt
index 7b27dc6..3fd4bbb 100644
--- a/Documentation/git-push.txt
+++ b/Documentation/git-push.txt
@@ -33,10 +33,10 @@ OPTIONS
 	of a remote (see the section <<REMOTES,REMOTES>> below).
 
 <refspec>...::
-	The canonical format of a <refspec> parameter is
-	`+?<src>:<dst>`; that is, an optional plus `{plus}`, followed
-	by the source ref, followed by a colon `:`, followed by
-	the destination ref.
+	The format of a <refspec> parameter is an optional plus
+	`{plus}`, followed by the source ref <src>, followed
+	by a colon `:`, followed by the destination ref <dst>.
+	Find various forms of refspecs in examples section.
 +
 The <src> side represents the source branch (or arbitrary
 "SHA1 expression", such as `master~4` (four parents before the
diff --git a/Documentation/pull-fetch-param.txt b/Documentation/pull-fetch-param.txt
index ebdd948..820c140 100644
--- a/Documentation/pull-fetch-param.txt
+++ b/Documentation/pull-fetch-param.txt
@@ -5,10 +5,10 @@
 	of a remote (see the section <<REMOTES,REMOTES>> below).
 
 <refspec>::
-	The canonical format of a <refspec> parameter is
-	`+?<src>:<dst>`; that is, an optional plus `{plus}`, followed
-	by the source ref, followed by a colon `:`, followed by
-	the destination ref.
+	The format of a <refspec> parameter is an optional plus
+	`{plus}`, followed by the source ref <src>, followed
+	by a colon `:`, followed by the destination ref <dst>.
+	Find various forms of refspecs in examples section.
 +
 The remote ref that matches <src>
 is fetched, and if <dst> is not empty string, the local
-- 
1.6.0.2.514.g23abd3
Previous: Anders MelchiorsenNext: Anders Melchiorsen
Message 2 of 5 in “Documentation: refine refspec description”
  1. 0/3 Documentation: refine refspec descriptionAnders Melchiorsen, Jan 25, 2009
  2. 1/3 Documentation: simplify refspec format descriptionAnders Melchiorsen, Jan 25, 2009
  3. 2/3 Documentation: more git push examplesAnders Melchiorsen, Jan 25, 2009
  4. 3/3 Documentation: rework src/dst description in git pushAnders Melchiorsen, Jan 25, 2009
  5. Junio C HamanoJan 26, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.