[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#932696: Please document Haskell team style Vcs-Git sytax



Ansgar <ansgar@43-1.org> writes:

>> +    In the case of Git, the value must have the following syntax::
>> +
>> +        <url> [ " -b " <branch> ] [ "[" <path> "]" ]

> That should be " [" (including a leading space).

Yup, indeed, thanks!

> I suggest something like "If <path> is not specified, it defaults to `.`
> (or `debian`; see below)".

It's ``.`` (just now verified with the GHC repository).

Revised patch:

diff --git a/policy/ch-controlfields.rst b/policy/ch-controlfields.rst
index 60edc82..c8f7f78 100644
--- a/policy/ch-controlfields.rst
+++ b/policy/ch-controlfields.rst
@@ -973,11 +973,33 @@ repository where the Debian source package is developed.
     - Mtn (Monotone)
     - Svn (Subversion)
 
-    In the case of Git and Mercurial, the value consists of a URL,
-    optionally followed by the word ``-b`` and the name of a branch in
-    the indicated repository, following the syntax of the ``git clone``
-    or ``hg clone`` command. If no branch is specified, the packaging
-    should be on the default branch.
+    In the case of Git, the value must have the following syntax::
+
+        <url> [ " -b " <branch> ] [ " [" <path> "]" ]
+
+    where the portions enclosed in brackets are optional and the portions
+    enclosed in double quotes are literal strings.  ``<url>`` indicates
+    the repository.  If the ``<branch>`` stanza is present, it names a
+    branch in the indicated repository.  If no branch is specified, the
+    packaging should be on the default branch.  If the ``<path>`` stanza
+    is present, it specifies the relative path to the top of the packaging
+    tree (the parent directory of the ``debian`` directory).  If no path
+    is specified, it defaults to ``.`` (the top level of the indicated
+    repository and branch).
+
+    For example::
+
+        Vcs-Git: https://example.org/repo -b debian [p/package]
+
+    indicates a subdirectory named ``p/package`` in the ``debian`` branch
+    of the repository at ``https://example.org/repo``.
+
+    In the case of Mercurial, the value must have the following syntax::
+
+        <url> [ " -b " <branch> ]
+
+    This is interpreted the same way as the Git syntax except a path
+    within the repository is not supported.
 
     A package control file must not have more than one ``Vcs-<type>``
     field.  If the package is maintained in multple version control

-- 
Russ Allbery (rra@debian.org)              <https://www.eyrie.org/~eagle/>


Reply to: