Sean Whitton writes ("Re: Include git commit id and git tree id in *.changes 
files when uploading? [and 1 more messages] [and 1 more messages]"):
> Simon Josefsson [12/Jan  7:55pm +01] wrote:
> > I suppose the PTS watch tracker performs a heavy 'git clone' somehow,
> > and this is the problem?  I got complaints for >512MB git repositories
> > (or some similar limit), so this seems likely.
> >
> > Fetching all tags or the latest git commit on a particular branch is
> > inexpensive.  It doesn't have to do a full clone.
> 
> Right.  But so long as that's the implementation, the discouragement is
> apt.

I just experimented.  I took the "bubblewrap" package in sid as a test
case.  The existing watch file uses an https pattern.  I replaced it
with this:

  version=4
  opts="mode=git" https://github.com/bundlewrap/bundlewrap refs/tags/v?(\d\S*)

With all of devscripts v2.23.4 (oldstable) and v2.25.15 (stable,
oldstable-bpo) and #main, I ran

  rm t.*; PERLLIB=../../devscripts/lib strace -ffot 
../../devscripts/scripts/uscan.pl --no-download
  grep execve t.* |less

This shows it running git ls-remote, which is very cheap.
I get the same results if I run vanilla installed uscan from trixie.

I RTFM and UTSL and it appears that if the ref specification
("matchig-pattern") is HEAD or a refs/heads/ it does git clone
and some kind of stuff involving git describe and/or git log.
But if the ref specification is refs/tags/, it uses git ls-remote.

So I think mode=git is fine with a refs/tags/ pattern.

And we can safely narrow the "last resort" in the documentation,
since surely the qa systems pass the --no-download flag.

Ian.

-- 
Ian Jackson <[email protected]>   These opinions are my own.  

Pronouns: they/he.  If I emailed you from @fyvzl.net or @evade.org.uk,
that is a private address which bypasses my fierce spamfilter.

Reply via email to