Hi!

> > I'm going to have to disagree with this part, the whole point of DEP14
> > is that our debianisms are namespaced, so there's no harm in pushing
> > all branches.
>
> Are you really sure that there is no harm in, for example, pushing all
> the 5785 (and counting) branches of https://github.com/JetBrains/kotlin/
> to its packaging repository? For the record, it's a 4 GiB download, and
> it makes some tools crash. There are probably even worse examples in the
> wild.

I think Phil meant by 'all branches' here both the Debian packaging
branches and the upstream development branch, not 'all upstream
branches'. I don't think that even Kotlin developers themselves want
to have all 5000+ branches and 36000+ tags on their machines :)

I imagine that apart from the largest upstream projects that have
multiple parallel maintenance releases, pulling a single 'main' branch
or equivalent is enough for a Debian Developer to base patches on and
be able to easily submit back upstream.

If you want to have an upstream from Kotlin and make it smaller, you
can do it whit a tag-free and shallow git clone with commands:

gbp clone g...@salsa.debian.org:java-team/kotlin.git
cd kotlin
git remote add upstreamvcs https://github.com/JetBrains/kotlin.git -t
master --no-tags
git fetch upstreamvcs --shallow-since='2 months ago'

du -sh .git
=> 182M .git

If you also want to have the most recent tags, this would selectively
fetch the latest release tags and only them (tailored to the Kotlin
repo tag format):

for TAG in $(git ls-remote upstreamvcs | grep --only-matching
--perl-regexp 'tags/\Kv[^-]+$' | tail); do   git fetch upstreamvcs tag
$TAG --depth=1; done
=> 219M .git

However, git does not support *pushing* shallow branches, so the above
does not help optimize Salsa in any way. I only shared as curiosa for
those who are interested in git features.

Reply via email to