git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Philip Oakley <philipoakley@iee.email>
To: Reino Wijnsma <rwijnsma@xs4all.nl>, git@vger.kernel.org
Subject: Re: Retrieve version-string on shallow clone
Date: Mon, 2 Sep 2019 16:52:19 +0100	[thread overview]
Message-ID: <26794b96-8627-0d73-c548-91b0ea7fde83@iee.email> (raw)
In-Reply-To: <26d7f32e-2df5-ce39-cd20-8cd82dc8587c@xs4all.nl>

Hi Reino

On 01/09/2019 12:07, Reino Wijnsma wrote:
> 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?
>
This is most likely a mental model problem.

If you only have a depth = 1 level clone, then there is no history 
available locally to use from which to describe almost anything.
Even if you had all the tags (without the actual commits they tagged) 
you still don't have that history upon which to describe them.

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).

Philip


  reply	other threads:[~2019-09-02 15:52 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-01 11:07 Retrieve version-string on shallow clone Reino Wijnsma
2019-09-02 15:52 ` Philip Oakley [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=26794b96-8627-0d73-c548-91b0ea7fde83@iee.email \
    --to=philipoakley@iee.email \
    --cc=git@vger.kernel.org \
    --cc=rwijnsma@xs4all.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).