* git clone --depth and git describe
@ 2013-05-09 23:07 Ruediger Meier
2013-05-10 1:36 ` Duy Nguyen
0 siblings, 1 reply; 4+ messages in thread
From: Ruediger Meier @ 2013-05-09 23:07 UTC (permalink / raw)
To: git
Hi,
I have a use case where I'd like to improve performance using "git
clone --depth". But I also need "git describe" working on that clone.
So something like
git clone --depth=describable
would be nice to have.
Would it be possible to add such feature?
cu,
Rudi
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: git clone --depth and git describe
2013-05-09 23:07 git clone --depth and git describe Ruediger Meier
@ 2013-05-10 1:36 ` Duy Nguyen
2013-05-10 8:42 ` Ruediger Meier
0 siblings, 1 reply; 4+ messages in thread
From: Duy Nguyen @ 2013-05-10 1:36 UTC (permalink / raw)
To: Ruediger Meier; +Cc: Git Mailing List
On Fri, May 10, 2013 at 6:07 AM, Ruediger Meier <sweet_f_a@gmx.de> wrote:
> Hi,
>
> I have a use case where I'd like to improve performance using "git
> clone --depth". But I also need "git describe" working on that clone.
>
> So something like
> git clone --depth=describable
> would be nice to have.
What does --depth=describable do?
>
> Would it be possible to add such feature?
--
Duy
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: git clone --depth and git describe
2013-05-10 1:36 ` Duy Nguyen
@ 2013-05-10 8:42 ` Ruediger Meier
2013-05-10 10:48 ` Duy Nguyen
0 siblings, 1 reply; 4+ messages in thread
From: Ruediger Meier @ 2013-05-10 8:42 UTC (permalink / raw)
To: Duy Nguyen; +Cc: Git Mailing List
On Friday 10 May 2013, Duy Nguyen wrote:
> On Fri, May 10, 2013 at 6:07 AM, Ruediger Meier <sweet_f_a@gmx.de>
wrote:
> > Hi,
> >
> > I have a use case where I'd like to improve performance using "git
> > clone --depth". But I also need "git describe" working on that
> > clone.
> >
> > So something like
> > git clone --depth=describable
> > would be nice to have.
>
> What does --depth=describable do?
I mean automatically getting the minimum depth which gives us the
history back to the last (annotated) tag. So that "git describe" and
possibly other project specific administrative scripts (like
git-version-gen or gitlog-to-changelog) would work safely on that
shallow clone.
Or maybe --depth could just generally accept a revspec as argument
instead of number only. This would be more useful anyway IMO. Then
perhaps something like "last_tag" could be a general magic revspec,
probably useful for many other git commands too.
> > Would it be possible to add such feature?
>
cu,
Rudi
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: git clone --depth and git describe
2013-05-10 8:42 ` Ruediger Meier
@ 2013-05-10 10:48 ` Duy Nguyen
0 siblings, 0 replies; 4+ messages in thread
From: Duy Nguyen @ 2013-05-10 10:48 UTC (permalink / raw)
To: Ruediger Meier; +Cc: Git Mailing List
On Fri, May 10, 2013 at 3:42 PM, Ruediger Meier <sweet_f_a@gmx.de> wrote:
> On Friday 10 May 2013, Duy Nguyen wrote:
>> On Fri, May 10, 2013 at 6:07 AM, Ruediger Meier <sweet_f_a@gmx.de>
> wrote:
>> > Hi,
>> >
>> > I have a use case where I'd like to improve performance using "git
>> > clone --depth". But I also need "git describe" working on that
>> > clone.
>> >
>> > So something like
>> > git clone --depth=describable
>> > would be nice to have.
>>
>> What does --depth=describable do?
>
> I mean automatically getting the minimum depth which gives us the
> history back to the last (annotated) tag. So that "git describe" and
> possibly other project specific administrative scripts (like
> git-version-gen or gitlog-to-changelog) would work safely on that
> shallow clone.
That should be possible to do. But you need to define it more clearly
if you start working on it. If you set --depth=v1.7.0, but another
branch in the source repo does not cross v1.7.0, what should we get?
Full history of that branch?
Just thinking out loud. We could make git-describe work with fixed
depth (e.g. --depth=12). The server could be made to send the client
some extended sha-1 syntax to get to related tags from the cut points,
e.g. v1.7.0 = <cut point>~12^2~14^1~20. And git-describe could be
modified to make use of that information when it traverses down to the
cut point. But I'm not sure if it's worth doing.
> Or maybe --depth could just generally accept a revspec as argument
> instead of number only. This would be more useful anyway IMO. Then
> perhaps something like "last_tag" could be a general magic revspec,
> probably useful for many other git commands too.
revspec is probably overkill. Take a look at
shallow.c:get_shallow_commits(). "cut at the first found tag" should
be easy to do, I think.
--
Duy
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-05-10 10:48 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-05-09 23:07 git clone --depth and git describe Ruediger Meier
2013-05-10 1:36 ` Duy Nguyen
2013-05-10 8:42 ` Ruediger Meier
2013-05-10 10:48 ` Duy Nguyen
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.