Re: Retrieve version-string on shallow clone

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello Giuseppe, Philip and Jeff,

On 2019-09-02T16:08:54+0200, Giuseppe Crinò <giuscri@xxxxxxxxx> wrote:
> To my understanding both questions are solved by
> * https://stackoverflow.com/a/47720414/2219670
> * https://stackoverflow.com/a/12704727/2219670
On 2019-09-02T17:52:19+0200, Philip Oakley <philipoakley@iee.email> wrote:
> Start by getting a bit more history depth, then see if you need to fetch some of the tags (or at least any specific tags of interest).
On 2019-09-02T17:54:40+0200, Jeff King <peff@xxxxxxxx> wrote:
> But what you want is perfectly reasonable; there's just not a good way to do it yet.
> [...] There's no way to trigger this within Git's protocols.

I never thought this would be impossible, or at least very hard, to accomplish.

git ls-remote --tags --refs https://github.com/mstorsjo/fdk-aac.git
94f9d5ca2077262e838fbc8ed111da03be5389d5        refs/tags/v0.1.0
1551d17717e42e7c295da0a682ae299791ee87c7        refs/tags/v0.1.1
fa3b711888883ccb19337c0ca76aea7dd85af9c8        refs/tags/v0.1.2
db7189736b49d27225eea917fcf1581b5228c830        refs/tags/v0.1.3
d17a2ebc6d8f593ffbefacaea1bfa6d6a81356a1        refs/tags/v0.1.4
a3f40d8d974f1aacde95e0996739941bde8f5e98        refs/tags/v0.1.5
c98ba983b0cd6905a52ab34222418ca7a5ff2260        refs/tags/v0.1.6
e35d91ddd8d41515594b7fd51b6bae1b17fee530        refs/tags/v2.0.0

git ls-remote --tags --refs https://github.com/mstorsjo/fdk-aac.git | tail -n1 | cut -d/ -f3-
v2.0.0

Regrettably the remote repo doesn't include the entire version-string with revision and commit-hash (v2.0.0-185-gcc5c85d).

Having to download fdk-aac's complete commit-history (9.38MB) isn't yet all too bad. FFmpeg (https://github.com/FFmpeg/FFmpeg.git) its commit-history on the other hand is a whopping 239MB (as opposed to 15.7MB for --depth 1) and perhaps a better example here!
I'm compiling and distributing FFmpeg executables. When I compile FFmpeg I'm not interested in its entire commit-history at that moment. I'm only interested in the checked out source files and the version-string (4.3-dev-327-g83e0b71 for instance).

Since this doesn't appear to be possible at the moment, I'll let this rest.
Thank you all for your replies.

-- Reino



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux