Package: devscripts
Version: 2.25.15
Severity: normal
X-Debbugs-Cc: [email protected];[email protected]

Hi

In the beginning of the documentation of the v5 watch file format, we find that the first paragraph must contain `Version: 5` and that any other field present will be used as default for the *next* paragraphs.

However, many of the examples we find in the man page, at least as rendered on [manpages.debian.org], shows a single stanza with the `Version` embedded into it. One such is from manpages.d.o is:

```
Version: 5
Source: http://git.ao2.it/tweeper.git
Version-Regex: refs/tags/v@ANY_VERSION@
Git-Mode: full
Mode: git
```

My reading of the documentation was that this does nothing and should have been:

```
Version: 5

Source: http://git.ao2.it/tweeper.git
Version-Regex: refs/tags/v@ANY_VERSION@
Git-Mode: full
Mode: git
```

I do not actually know what `uscan` does here. My personal preference is to use the second variant, since it follows the logic of the `debian/control` file where the first stanza is a special stanza but some fields can be inherited into the subsequent stanzas. This means that code deb822 parsers already has some logic for this pattern. It will also simplify my work on editor support in `debputy`, where documentation is by stanza type. I admit that is also one of my drivers for this preference.

Best regards,
Niels

[manpages.debian.org]: https://manpages.debian.org/experimental/devscripts/debian-watch.5.en.html#direct_access_to_the_git_repository_(tags)

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature

Reply via email to