git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Why git tags are there in git?
@ 2011-01-28 11:37 vikram2rhyme
  2011-01-28 12:27 ` "L. Alberto Giménez"
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: vikram2rhyme @ 2011-01-28 11:37 UTC (permalink / raw)
  To: git


Hello friends
I am wondering why the tags are there in git. As they are just pointer to
the commit
we can refer those commit by SHA sum only then why tagging? Moreover a
commit can
be tagged more than once that result in multiple tags pointing to the same
point in the history.
Is this a design flaw?
-- 
View this message in context: http://git.661346.n2.nabble.com/Why-git-tags-are-there-in-git-tp5969544p5969544.html
Sent from the git mailing list archive at Nabble.com.

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

* Re: Why git tags are there in git?
  2011-01-28 11:37 Why git tags are there in git? vikram2rhyme
@ 2011-01-28 12:27 ` "L. Alberto Giménez"
  2011-01-28 15:03   ` Gabriel Filion
  2011-01-28 16:06 ` Konstantin Khomoutov
  2011-01-29 17:17 ` Enrico Weigelt
  2 siblings, 1 reply; 5+ messages in thread
From: "L. Alberto Giménez" @ 2011-01-28 12:27 UTC (permalink / raw)
  To: vikram2rhyme; +Cc: git

On 28/01/2011 12:37, vikram2rhyme wrote:
>
> Hello friends
> I am wondering why the tags are there in git. As they are just pointer to
> the commit
> we can refer those commit by SHA sum only then why tagging?

Hi, I tend to find easier "release-v1" than 2cff0e391ab127ae...

Regards,
L. Alberto Giménez

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

* Re: Why git tags are there in git?
  2011-01-28 12:27 ` "L. Alberto Giménez"
@ 2011-01-28 15:03   ` Gabriel Filion
  0 siblings, 0 replies; 5+ messages in thread
From: Gabriel Filion @ 2011-01-28 15:03 UTC (permalink / raw)
  To: "L. Alberto Giménez"; +Cc: vikram2rhyme, git

On 11-01-28 07:27 AM, "L. Alberto Giménez" wrote:
> On 28/01/2011 12:37, vikram2rhyme wrote:
>>
>> Hello friends
>> I am wondering why the tags are there in git. As they are just pointer to
>> the commit
>> we can refer those commit by SHA sum only then why tagging?
> 
> Hi, I tend to find easier "release-v1" than 2cff0e391ab127ae...
> 

In general, tags are used for marking a point in time. That marker won't
move, whereas branches can move with time.

For example, in most projects tags are used to make it easier to refer
to commits that mark official releases. In git.git (git's own
repository), the tag v1.7.3.5 points to the release with the same number.

-- 
Gabriel Filion

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

* Re: Why git tags are there in git?
  2011-01-28 11:37 Why git tags are there in git? vikram2rhyme
  2011-01-28 12:27 ` "L. Alberto Giménez"
@ 2011-01-28 16:06 ` Konstantin Khomoutov
  2011-01-29 17:17 ` Enrico Weigelt
  2 siblings, 0 replies; 5+ messages in thread
From: Konstantin Khomoutov @ 2011-01-28 16:06 UTC (permalink / raw)
  To: vikram2rhyme; +Cc: git

On Fri, 28 Jan 2011 03:37:56 -0800 (PST)
vikram2rhyme <vikram2rhyme@gmail.com> wrote:

> I am wondering why the tags are there in git. As they are just
> pointer to the commit
> we can refer those commit by SHA sum only then why tagging? Moreover a
> commit can
> be tagged more than once that result in multiple tags pointing to the
> same point in the history.
> Is this a design flaw?

Amending what other commenters said, I should note that beyond regular
tags which just provide human-readable names to objects, there exist
so-called "annotated tags" which are tags with descriptive messages
contained in them, which can be used as a side-channel to provide
additional information for commits, and also to digitally sign a line
of history to which such a tag is attached.

Also note that a tag can be attached to any object in a Git database,
not necessarily to a commit. This can be occasionally useful.

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

* Re: Why git tags are there in git?
  2011-01-28 11:37 Why git tags are there in git? vikram2rhyme
  2011-01-28 12:27 ` "L. Alberto Giménez"
  2011-01-28 16:06 ` Konstantin Khomoutov
@ 2011-01-29 17:17 ` Enrico Weigelt
  2 siblings, 0 replies; 5+ messages in thread
From: Enrico Weigelt @ 2011-01-29 17:17 UTC (permalink / raw)
  To: git

* vikram2rhyme <vikram2rhyme@gmail.com> wrote:

Hi,

> I am wondering why the tags are there in git. As they are just
> pointer to the commit we can refer those commit by SHA sum only
> then why tagging? Moreover a commit can be tagged more than once
> that result in multiple tags pointing to the same point in the history.
> Is this a design flaw?

No, it's an important design aspect.

Tag references (not to be mixed up w/ tag objects) are very useful
to add a conveniently named pointer to some object (not necessarily
a commit), so humans as well as programs can easily find them.

For example, in my OSS-QM repositories [1], I have some robots
importing releases (sometimes from upstream's git repos, sometimes
from foreign VCSs, tarballs or even distro packages) and tag
them into a normalized namespace, so automatic systems (eg. my
Briegel buildsystem) can easily fetch sourcetrees from there
w/o further manual tweaking.


cu

[1] http://www.metux.de/download/oss-qm/normalized_repository.pdf
-- 
----------------------------------------------------------------------
 Enrico Weigelt, metux IT service -- http://www.metux.de/

 phone:  +49 36207 519931  email: weigelt@metux.de
 mobile: +49 151 27565287  icq:   210169427         skype: nekrad666
----------------------------------------------------------------------
 Embedded-Linux / Portierung / Opensource-QM / Verteilte Systeme
----------------------------------------------------------------------

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

end of thread, other threads:[~2011-01-29 17:28 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-28 11:37 Why git tags are there in git? vikram2rhyme
2011-01-28 12:27 ` "L. Alberto Giménez"
2011-01-28 15:03   ` Gabriel Filion
2011-01-28 16:06 ` Konstantin Khomoutov
2011-01-29 17:17 ` Enrico Weigelt

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