On Tue, 2 Apr 2024 at 17:19, Jeremy Stanley wrote:
> On 2024-04-02 16:44:54 -0700 (-0700), Russ Allbery wrote:
> [...]
> > I think a shallow clone of depth 1 is sufficient, although that's not
> > sufficient to get the correct version number from Git in all cases.
> [...]
>
> Some tools (python3-reno, for example) want to inspect the commits
> and historical tags on branches, in order to do things like
> assembling release notes documents. I don't know if any reno-using
> projects packaged in Debian get release notes included, but if they
> do then shallow clones would break that process. The python3-pbr

You could use --depth=99 perhaps?

Usually the difference of having depth=1 or 99 isn't that big unless
there was a recent large refactoring. Git repositories that are very
big (e.g. LibreOffice, MariaDB) have hundreds of thousands of commits,
and by doing a depth=99 clone you avoid 99.995% of the history, and in
projects where changelog/release notes is based on git commits, then
99 commits is probably enough.

I wanted to also highlight that git-buildpackage supports '--depth=',
so this is a command and well supported usage pattern
(https://manpages.debian.org/testing/git-buildpackage/gbp-clone.1.en.html#depth).

Reply via email to