On 26/06/2025 8:11 am, Xiyue Deng wrote:
Hi Hugh,
Hugh McMaster writes:
Hello Xiyue,
Thank you for the bug report and for testing uscan's gitmodules option.
On 14/06/2025 10:16 am, Xiyue Deng wrote:
I'm trying to use gitmodules in uscan which was introduced since
2.25.11[1], but it doesn't checkout the submodule when running uscan.
[snip]
I have updated debian/watch to use submodule following the uscan
manpage, which contains the following contents:
,----
| version=4
| opts="mode=git, gitmode=shallow, gitmodules, gitexport=all" \
| https://github.com/karthink/gptel \
| (?:.*?/)?@ANY_VERSION@ debian uupdate
`----
(I have created a branch to demonstrate this issue, and you can find the
debian/watch file at [2].)
Your regex is failing because of the 'optional' question mark after the
non-capturing group.
Thanks! Removing the optional regex mark (the question mark) fixes
this. I wonder why uscan behaves this way given that this regex works
for other use cases. I'm asking as I'm using this regex in many
packages and it would be great make it just work.
I tested the regex pattern and it should be fine, with or without the
optional mark. Strangely, I can't reproduce the problem now.
You'll probably find it easier to explicitly use 'refs/tags' as per the
man page:
refs/tags/v@ANY_VERSION@ debian uupdate
QQ: I think @ANY_VERSION@ now detects the "v" prefix recently. Or is
there a reason to still make it explicit?
I checked the pattern and it does include v and V now, so no need to
include it.
Hope that helps.
Hugh