git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Remote git-describe ?
@ 2007-01-24 10:31 Francis Moreau
  2007-01-24 11:03 ` Johannes Schindelin
  0 siblings, 1 reply; 11+ messages in thread
From: Francis Moreau @ 2007-01-24 10:31 UTC (permalink / raw)
  To: git

Hi !

I'm looking for a command that would give the same output than 'git
describe' but on a remote server.

Is this possible ?

thanks
-- 
Francis

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

* Re: Remote git-describe ?
  2007-01-24 10:31 Remote git-describe ? Francis Moreau
@ 2007-01-24 11:03 ` Johannes Schindelin
  2007-01-24 11:13   ` Francis Moreau
  0 siblings, 1 reply; 11+ messages in thread
From: Johannes Schindelin @ 2007-01-24 11:03 UTC (permalink / raw)
  To: Francis Moreau; +Cc: git

Hi,

On Wed, 24 Jan 2007, Francis Moreau wrote:

> I'm looking for a command that would give the same output than 'git
> describe' but on a remote server.
> 
> Is this possible ?

It would be possible; at a high cost (especially on the remote server): 
You definitely need _all_ commits between the commit you want to describe 
and the tag it eventually finds, and possibly all other commits, too.

So it boils down to fetching all commit objects. It is much cheaper, and 
more efficient, to just fetch the repo and do it locally.

Hth,
Dscho

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

* Re: Remote git-describe ?
  2007-01-24 11:03 ` Johannes Schindelin
@ 2007-01-24 11:13   ` Francis Moreau
  2007-01-24 11:29     ` Johannes Schindelin
  2007-01-24 12:21     ` Junio C Hamano
  0 siblings, 2 replies; 11+ messages in thread
From: Francis Moreau @ 2007-01-24 11:13 UTC (permalink / raw)
  To: Johannes Schindelin; +Cc: git

On 1/24/07, Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:
> Hi,
>
> On Wed, 24 Jan 2007, Francis Moreau wrote:
>
> > I'm looking for a command that would give the same output than 'git
> > describe' but on a remote server.
> >
> > Is this possible ?
>
> It would be possible; at a high cost (especially on the remote server):
> You definitely need _all_ commits between the commit you want to describe
> and the tag it eventually finds, and possibly all other commits, too.
>
> So it boils down to fetching all commit objects. It is much cheaper, and
> more efficient, to just fetch the repo and do it locally.
>

really ? Givinig that I would use it to describe the HEAD of the kernel repo:

        $ git describe --remote=<git-server> HEAD

this would make the server parse all commits between HEAD and the
closest tag which seems to me a lot cheaper than downloading the whole
repo...
-- 
Francis

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

* Re: Remote git-describe ?
  2007-01-24 11:13   ` Francis Moreau
@ 2007-01-24 11:29     ` Johannes Schindelin
  2007-01-24 12:21     ` Junio C Hamano
  1 sibling, 0 replies; 11+ messages in thread
From: Johannes Schindelin @ 2007-01-24 11:29 UTC (permalink / raw)
  To: Francis Moreau; +Cc: git

Hi,

On Wed, 24 Jan 2007, Francis Moreau wrote:

> On 1/24/07, Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:
> > Hi,
> > 
> > On Wed, 24 Jan 2007, Francis Moreau wrote:
> > 
> > > I'm looking for a command that would give the same output than 'git
> > > describe' but on a remote server.
> > >
> > > Is this possible ?
> > 
> > It would be possible; at a high cost (especially on the remote server):
> > You definitely need _all_ commits between the commit you want to describe
> > and the tag it eventually finds, and possibly all other commits, too.
> > 
> > So it boils down to fetching all commit objects. It is much cheaper, and
> > more efficient, to just fetch the repo and do it locally.
> > 
> 
> really ? Givinig that I would use it to describe the HEAD of the kernel 
> repo:
> 
>        $ git describe --remote=<git-server> HEAD
> 
> this would make the server parse all commits between HEAD and the 
> closest tag which seems to me a lot cheaper than downloading the whole 
> repo...

The problem is that you don't know which tag is closest. You _have_ to 
walk the ancestry to find out.

Besides, it has been determined that the commit objects _alone_ make up 
quite a substantial part of the repo, so downloading them _is_ similar to 
downloading the whole repo.

Ciao,
Dscho

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

* Re: Remote git-describe ?
  2007-01-24 11:13   ` Francis Moreau
  2007-01-24 11:29     ` Johannes Schindelin
@ 2007-01-24 12:21     ` Junio C Hamano
  2007-01-24 12:34       ` Junio C Hamano
  2007-01-24 12:50       ` Francis Moreau
  1 sibling, 2 replies; 11+ messages in thread
From: Junio C Hamano @ 2007-01-24 12:21 UTC (permalink / raw)
  To: Francis Moreau; +Cc: git, Johannes Schindelin

"Francis Moreau" <francis.moro@gmail.com> writes:

> ... Givinig that I would use it to describe the HEAD of the kernel repo:
>
>        $ git describe --remote=<git-server> HEAD
>
> this would make the server parse all commits between HEAD and the
> closest tag which seems to me a lot cheaper than downloading the whole
> repo...

Do you mean you want to have the server describe the HEAD the
server side has (not the HEAD in your repository)?  Why?

I suspect the real motivation of your question lies elsewhere
and not in "describe".

Suppose we had such a service on the server side, and you asked
the server twice and got these (at different times, of course):

	v2.6.20-rc5-g419dd83
	v2.6.20-rc5-gde14569

What useful information can you get between the two?  

Nothing.

The commit object names are like random numbers and 419dd83 may
or may not be older than de14569.  The "hash" part of the
output is meaningless for you until you actually have the
history to poke at with "git log", "git diff" and friends.

Another request might give you this:

	v2.6.20-rc6

At least, between this one and the previous two, you have a
little bit of information that you can use: "Ah, another
development phase."

So I suspect what you are after is not about using describe
remotely or describing where the HEAD is; you want to know if
there is a new tag near the tip since the last time you checked.

If that is the case, "git-ls-remote --tags" is probably what you
want. 

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

* Re: Remote git-describe ?
  2007-01-24 12:21     ` Junio C Hamano
@ 2007-01-24 12:34       ` Junio C Hamano
  2007-01-24 13:01         ` Santi Béjar
                           ` (2 more replies)
  2007-01-24 12:50       ` Francis Moreau
  1 sibling, 3 replies; 11+ messages in thread
From: Junio C Hamano @ 2007-01-24 12:34 UTC (permalink / raw)
  To: git

Junio C Hamano <junkio@cox.net> writes:

> Suppose we had such a service on the server side, and you asked
> the server twice and got these (at different times, of course):
>
> 	v2.6.20-rc5-g419dd83
> 	v2.6.20-rc5-gde14569
>
> What useful information can you get between the two?  
>
> Nothing.
>
> The commit object names are like random numbers and 419dd83 may
> or may not be older than de14569.  The "hash" part of the
> output is meaningless for you until you actually have the
> history to poke at with "git log", "git diff" and friends.

Side note.

Also the commit object names (hence "describe" output) do not
tell you how far they are from the tag used to describe them.

However, I suspect that we could do better with Shawn's new
fangled describe implementation that actually counts the
distance between what is described and the tag.  We could add
"number of commits since the tag" somewhere, to describe:

	v2.6.20-rc5-256-g419dd83
        v2.6.20-rc5-217-gde14569

to say that the first one has 256 commits accumulated since the
given tag "v2.6.20-rc5" and the second one has only 217
commits, to get the sense of how busy the development activity
is.

Is it useful?  That is something I am not sure.

Side note for side note.

This should be obvious to people who know git, but the above
does not mean we can remove gXXXX part from the describe output,
becauses there could be infinite number of commits that are 256
commits away from v2.6.20-rc5 tag.  v2.6.20-rc5-256 alone does
not uniquely identify the commit 419dd83.

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

* Re: Remote git-describe ?
  2007-01-24 12:21     ` Junio C Hamano
  2007-01-24 12:34       ` Junio C Hamano
@ 2007-01-24 12:50       ` Francis Moreau
  1 sibling, 0 replies; 11+ messages in thread
From: Francis Moreau @ 2007-01-24 12:50 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git, Johannes Schindelin

Junio C Hamano wrote:
> "Francis Moreau" <francis.moro@gmail.com> writes:
>
>> ... Givinig that I would use it to describe the HEAD of the kernel repo:
>>
>>        $ git describe --remote=<git-server> HEAD
>>
>> this would make the server parse all commits between HEAD and the
>> closest tag which seems to me a lot cheaper than downloading the whole
>> repo...
>
> Do you mean you want to have the server describe the HEAD the
> server side has (not the HEAD in your repository)?  Why?
>

yes. see below...

> I suspect the real motivation of your question lies elsewhere
> and not in "describe".
>
> Suppose we had such a service on the server side, and you asked
> the server twice and got these (at different times, of course):
>
> 	v2.6.20-rc5-g419dd83
> 	v2.6.20-rc5-gde14569
>
> What useful information can you get between the two?
>
> Nothing.
>

I agree in the context I gave, it's useless.

>
> So I suspect what you are after is not about using describe
> remotely or describing where the HEAD is; you want to know if
> there is a new tag near the tip since the last time you checked.
>

Actually I'd like to generate an archive from a git server. And
I want to give the name of the archive file, the ouptut given by
'git describe'.

Since I can pass --remote to 'git archive', I do not need anymore
to clone the repo before generating the archive. But I still needs
it only to run 'git describe' thus my question...

thanks
-- 
Francis

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

* Re: Remote git-describe ?
  2007-01-24 12:34       ` Junio C Hamano
@ 2007-01-24 13:01         ` Santi Béjar
  2007-01-24 13:57         ` Johannes Schindelin
  2007-01-24 15:23         ` Nicolas Pitre
  2 siblings, 0 replies; 11+ messages in thread
From: Santi Béjar @ 2007-01-24 13:01 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git

On 1/24/07, Junio C Hamano <junkio@cox.net> wrote:
> Also the commit object names (hence "describe" output) do not
> tell you how far they are from the tag used to describe them.
>
> However, I suspect that we could do better with Shawn's new
> fangled describe implementation that actually counts the
> distance between what is described and the tag.  We could add
> "number of commits since the tag" somewhere, to describe:
>
>         v2.6.20-rc5-256-g419dd83
>         v2.6.20-rc5-217-gde14569
>
> to say that the first one has 256 commits accumulated since the
> given tag "v2.6.20-rc5" and the second one has only 217
> commits, to get the sense of how busy the development activity
> is.
>
> Is it useful?  That is something I am not sure.

I find it usefull. I even suggested it in November:
http://marc.theaimsgroup.com/?l=git&m=116246596012422&w=2

Quote:
One problem I see with this scheme (either 'g', 'git' of '+') is that
it does not provide an increasing version number, even for
fast-forwarding commits. Then it is not useful as a package version
number (deb or rpm). I've already seen deb packages with
version+git20061010.
End Quote:

The "either 'g',..." was something it that thread, but applies to the
current scheme.

Santi

>
> Side note for side note.
>
> This should be obvious to people who know git, but the above
> does not mean we can remove gXXXX part from the describe output,
> becauses there could be infinite number of commits that are 256
> commits away from v2.6.20-rc5 tag.  v2.6.20-rc5-256 alone does
> not uniquely identify the commit 419dd83.
>
>
> -
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>

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

* Re: Remote git-describe ?
  2007-01-24 12:34       ` Junio C Hamano
  2007-01-24 13:01         ` Santi Béjar
@ 2007-01-24 13:57         ` Johannes Schindelin
  2007-01-24 14:28           ` Simon 'corecode' Schubert
  2007-01-24 15:23         ` Nicolas Pitre
  2 siblings, 1 reply; 11+ messages in thread
From: Johannes Schindelin @ 2007-01-24 13:57 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git

Hi,

On Wed, 24 Jan 2007, Junio C Hamano wrote:

> This should be obvious to people who know git, but the above
> does not mean we can remove gXXXX part from the describe output,
> becauses there could be infinite number of commits that are 256
> commits away from v2.6.20-rc5 tag.

This is only completely true if "infinite" is smaller than 2^160...

;-)

Ciao,
Dscho

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

* Re: Remote git-describe ?
  2007-01-24 13:57         ` Johannes Schindelin
@ 2007-01-24 14:28           ` Simon 'corecode' Schubert
  0 siblings, 0 replies; 11+ messages in thread
From: Simon 'corecode' Schubert @ 2007-01-24 14:28 UTC (permalink / raw)
  To: Johannes Schindelin; +Cc: Junio C Hamano, git

[-- Attachment #1: Type: text/plain, Size: 755 bytes --]

Johannes Schindelin wrote:
>> This should be obvious to people who know git, but the above
>> does not mean we can remove gXXXX part from the describe output,
>> becauses there could be infinite number of commits that are 256
>> commits away from v2.6.20-rc5 tag.
> This is only completely true if "infinite" is smaller than 2^160...

actually not.  you can have more, but then even the hash isn't unique anymore.  oh no!

cheers
  simon

-- 
Serve - BSD     +++  RENT this banner advert  +++    ASCII Ribbon   /"\
Work - Mac      +++  space for low €€€ NOW!1  +++      Campaign     \ /
Party Enjoy Relax   |   http://dragonflybsd.org      Against  HTML   \
Dude 2c 2 the max   !   http://golden-apple.biz       Mail + News   / \


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 252 bytes --]

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

* Re: Remote git-describe ?
  2007-01-24 12:34       ` Junio C Hamano
  2007-01-24 13:01         ` Santi Béjar
  2007-01-24 13:57         ` Johannes Schindelin
@ 2007-01-24 15:23         ` Nicolas Pitre
  2 siblings, 0 replies; 11+ messages in thread
From: Nicolas Pitre @ 2007-01-24 15:23 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git

On Wed, 24 Jan 2007, Junio C Hamano wrote:

> However, I suspect that we could do better with Shawn's new
> fangled describe implementation that actually counts the
> distance between what is described and the tag.  We could add
> "number of commits since the tag" somewhere, to describe:
> 
> 	v2.6.20-rc5-256-g419dd83
>         v2.6.20-rc5-217-gde14569
> 
> to say that the first one has 256 commits accumulated since the
> given tag "v2.6.20-rc5" and the second one has only 217
> commits, to get the sense of how busy the development activity
> is.
> 
> Is it useful?  That is something I am not sure.

I think this would be really nice to have even if not absolutely useful.


Nicolas

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

end of thread, other threads:[~2007-01-24 15:23 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-01-24 10:31 Remote git-describe ? Francis Moreau
2007-01-24 11:03 ` Johannes Schindelin
2007-01-24 11:13   ` Francis Moreau
2007-01-24 11:29     ` Johannes Schindelin
2007-01-24 12:21     ` Junio C Hamano
2007-01-24 12:34       ` Junio C Hamano
2007-01-24 13:01         ` Santi Béjar
2007-01-24 13:57         ` Johannes Schindelin
2007-01-24 14:28           ` Simon 'corecode' Schubert
2007-01-24 15:23         ` Nicolas Pitre
2007-01-24 12:50       ` Francis Moreau

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 NNTP newsgroup(s).