git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* Retrieve version-string on shallow clone
@ 2019-09-01 11:07 Reino Wijnsma
  2019-09-02 15:52 ` Philip Oakley
  2019-09-02 15:54 ` Jeff King
  0 siblings, 2 replies; 5+ messages in thread
From: Reino Wijnsma @ 2019-09-01 11:07 UTC (permalink / raw)
  To: git

Hello git@vger.kernel.org,

Two days ago I started https://github.com/mstorsjo/fdk-aac/issues/107, asking how to retrieve the fdk-aac version-string on a shallow clone.
My question was of course not fdk-aac related, so Martin Storsjö suggested I'd try here. It basicly comes down to this:

git clone https://github.com/mstorsjo/fdk-aac.git
[...]

git describe --tags
v2.0.0-185-gcc5c85d

git clone --depth 1 https://github.com/mstorsjo/fdk-aac.git

git describe --tags
fatal: No names found, cannot describe anything.

The tags get lost while doing a shallow clone.
I'm not an expert git user, so I was wondering if anyone could tell what my options are here.
I'd figure one of these options would be to clone everything from tag v2.0.0 onward, but if so how would I do that?
As another option I was thinking; maybe it's possible to do git describe --tags on the remote repo?

Thanks!

-- Reino

^ permalink raw reply	[flat|nested] 5+ messages in thread
* Re: Retrieve version-string on shallow clone
@ 2019-09-02 14:08 Giuseppe Crinò
  2019-09-03 21:30 ` Reino Wijnsma
  0 siblings, 1 reply; 5+ messages in thread
From: Giuseppe Crinò @ 2019-09-02 14:08 UTC (permalink / raw)
  To: Reino Wijnsma; +Cc: git

> I'd figure one of these options would be to clone everything from tag
> v2.0.0 onward, but if so how would I do that?
> As another option I was thinking; maybe it's possible to do git describe
> --tags on the remote repo?


To my understanding both questions are solved by

* https://stackoverflow.com/a/47720414/2219670
* https://stackoverflow.com/a/12704727/2219670

It seems to me that's the expected behaviour of git

-Giuseppe

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2019-09-03 21:29 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-01 11:07 Retrieve version-string on shallow clone Reino Wijnsma
2019-09-02 15:52 ` Philip Oakley
2019-09-02 15:54 ` Jeff King
  -- strict thread matches above, loose matches on Subject: below --
2019-09-02 14:08 Giuseppe Crinò
2019-09-03 21:30 ` Reino Wijnsma

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).