{"thread":{"id":"51789","subject":"Re: Retrieve version-string on shallow clone","startedAt":"2019-09-02T14:09:00Z","lastAt":"2019-09-03T21:29:58Z","messageCount":2,"participants":["Giuseppe Crinò","Reino Wijnsma"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"381650","messageId":"20190902140854.GA3806@instance-1.europe-west6-a.c.vaulted-journal-250706.internal","threadId":"51789","inReplyTo":null,"subject":"Re: Retrieve version-string on shallow clone","fromName":"Giuseppe Crinò","fromEmail":"giuscri@gmail.com","sentAt":"2019-09-02T14:08:54Z","receivedAt":"2019-09-02T14:09:00Z","isPatch":false,"sender":{"key":"giuscri@gmail.com","avatar":"https://gravatar.com/avatar/0d6b46f6496321ee3646c8712de0b475e225f393a8c72d2c2385d7820b74dd90?d=mp&s=160"},"body":"> I'd figure one of these options would be to clone everything from tag\n> v2.0.0 onward, but if so how would I do that?\n> As another option I was thinking; maybe it's possible to do git describe\n> --tags on the remote repo?\n\n\nTo my understanding both questions are solved by\n\n* https://stackoverflow.com/a/47720414/2219670\n* https://stackoverflow.com/a/12704727/2219670\n\nIt seems to me that's the expected behaviour of git\n\n-Giuseppe\n"},{"id":"381770","messageId":"078d6283-726a-c7a9-5c24-97dbc7ff180f@xs4all.nl","threadId":"51789","inReplyTo":"20190902140854.GA3806@instance-1.europe-west6-a.c.vaulted-journal-250706.internal","subject":"Re: Retrieve version-string on shallow clone","fromName":"Reino Wijnsma","fromEmail":"rwijnsma@xs4all.nl","sentAt":"2019-09-03T21:30:06Z","receivedAt":"2019-09-03T21:29:58Z","isPatch":false,"sender":{"key":"rwijnsma@xs4all.nl","avatar":null},"body":"Hello Giuseppe, Philip and Jeff,\n\nOn 2019-09-02T16:08:54+0200, Giuseppe Crinò <giuscri@gmail.com> wrote:\n> To my understanding both questions are solved by\n> * https://stackoverflow.com/a/47720414/2219670\n> * https://stackoverflow.com/a/12704727/2219670\nOn 2019-09-02T17:52:19+0200, Philip Oakley <philipoakley@iee.email> wrote:\n> 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).\nOn 2019-09-02T17:54:40+0200, Jeff King <peff@peff.net> wrote:\n> But what you want is perfectly reasonable; there's just not a good way to do it yet.\n> [...] There's no way to trigger this within Git's protocols.\n\nI never thought this would be impossible, or at least very hard, to accomplish.\n\ngit ls-remote --tags --refs https://github.com/mstorsjo/fdk-aac.git\n94f9d5ca2077262e838fbc8ed111da03be5389d5        refs/tags/v0.1.0\n1551d17717e42e7c295da0a682ae299791ee87c7        refs/tags/v0.1.1\nfa3b711888883ccb19337c0ca76aea7dd85af9c8        refs/tags/v0.1.2\ndb7189736b49d27225eea917fcf1581b5228c830        refs/tags/v0.1.3\nd17a2ebc6d8f593ffbefacaea1bfa6d6a81356a1        refs/tags/v0.1.4\na3f40d8d974f1aacde95e0996739941bde8f5e98        refs/tags/v0.1.5\nc98ba983b0cd6905a52ab34222418ca7a5ff2260        refs/tags/v0.1.6\ne35d91ddd8d41515594b7fd51b6bae1b17fee530        refs/tags/v2.0.0\n\ngit ls-remote --tags --refs https://github.com/mstorsjo/fdk-aac.git | tail -n1 | cut -d/ -f3-\nv2.0.0\n\nRegrettably the remote repo doesn't include the entire version-string with revision and commit-hash (v2.0.0-185-gcc5c85d).\n\nHaving 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!\nI'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).\n\nSince this doesn't appear to be possible at the moment, I'll let this rest.\nThank you all for your replies.\n\n-- Reino\n"}]}