Skip to content

Avoid cloning the full repositories, use remote-ls instead

Emanuele Aina requested to merge wip/em/we-are-far-from-shallow-now into master

When building packages we currently depend on:

  1. the current commit with the packaging sources
  2. the pristine-lfs branch for the orig tarball
  3. the pristine-lfs-source branch to store the built source package
  4. the tags on the current commit, if any, to check whether we should pick the already built sources from pristine-lfs-source
  5. the tag corresponding to the current changelog version, to avoid building a different commit with an already-used version

To cover 2, 3, and 5 we used to do a full clone of the repository, which can be quite large in case of linux or firefox-esr.

But we do not actually need the full history, so let's pull only the current commit and fetch pristine-lfs and pristine-lfs-source explicitly.

To check whether the current tag already exists, query the remote with git ls-remote rather than retrieving anything locally.

Merge request reports