Ian Jackson <[email protected]> writes:
> Package: debian-policy
> Version: 4.4.0.1
> Many packages' .dscs contain something like this:
> Source: bustle
> Version: 0.7.4-1
> Vcs-Git: https://salsa.debian.org/haskell-team/DHG_packages.git [p/bustle]
> The semantics do not appearr to be documented in policy.
Reminder that this proposed patch needs one more second to be merged into
the next release of Policy.
--
Russ Allbery ([email protected]) <https://www.eyrie.org/~eagle/>
diff --git a/policy/ch-controlfields.rst b/policy/ch-controlfields.rst
index a21a510..2a2e364 100644
--- a/policy/ch-controlfields.rst
+++ b/policy/ch-controlfields.rst
@@ -972,11 +972,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 multiple version control