Open abderrahim opened 3 years ago
Looks like simply writing .tarball-version is enough to convince git-version-gen to do nothing.
Turns out there are bootstrap commands where this workaround doesn't really work.
Reading https://github.com/coreutils/gnulib/blob/master/build-aux/git-version-gen#L157 it looks like it's mostly only using this to test that there is a commit. Git log doesn't need to show more things than the single commit.
Essentially what I noticed (and implemented for https://gitlab.com/freedesktop-sdk/freedesktop-sdk/-/merge_requests/9009) is that to get every corner case covered (mainly git log -1
, git log -1 .
, git describe --dirty
), you need to add all tree objects. Basically a shallow clone until the tag, with all blob objects removed (and with loose objects for reproducibility)
When the
track-tags
option of thegit
plugin is enabled, it generates a slimmed-down.git
directory enough forgit describe
andgit log
to succeed.However gnulib's
git-version-gen
script relies ongit log .
which doesn't work, and returns an error like