All of lore.kernel.org
 help / color / mirror / Atom feed
* "man git-tag" inconsistent about whether you can tag non-commit objects
@ 2018-05-24 14:46 Robert P. J. Day
  2018-05-25  1:38 ` Junio C Hamano
  0 siblings, 1 reply; 5+ messages in thread
From: Robert P. J. Day @ 2018-05-24 14:46 UTC (permalink / raw)
  To: Git Mailing list


  embarrassed to admit i had no idea that you could tag non-commit
objects, only realized that when i was reading the man page and saw:

  SYNOPSIS
     git tag [-a | -s | -u <keyid>] [-f] [-m <msg> | -F <file>] [-e]
           <tagname> [<commit> | <object>]
                                 ^^^^^^^^

so i tried it and, sure enough, i could tag a blob object. but if you
read further into DESCRIPTION, about halfway through, you read:

  "Otherwise just a tag reference for the SHA-1 object name of the
   commit object is created (i.e. a lightweight tag)."
   ^^^^^^

which suggests only commit objects. finally, much further down, under
OPTIONS:

  "<commit>, <object>
     The object that the new tag will refer to, usually a commit.
                                                ^^^^^^^^^^^^^^^^

so to clean this up, is it sufficient to just change that middle line
to say "object" rather than "commit object"? or is there more in the
man page that needs tweaking?

rday

-- 

========================================================================
Robert P. J. Day                                 Ottawa, Ontario, CANADA
                  http://crashcourse.ca/dokuwiki

Twitter:                                       http://twitter.com/rpjday
LinkedIn:                               http://ca.linkedin.com/in/rpjday
========================================================================



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

* Re: "man git-tag" inconsistent about whether you can tag non-commit objects
  2018-05-24 14:46 "man git-tag" inconsistent about whether you can tag non-commit objects Robert P. J. Day
@ 2018-05-25  1:38 ` Junio C Hamano
  2018-05-25  7:45   ` Ævar Arnfjörð Bjarmason
  2018-05-25  9:40   ` Robert P. J. Day
  0 siblings, 2 replies; 5+ messages in thread
From: Junio C Hamano @ 2018-05-25  1:38 UTC (permalink / raw)
  To: Robert P. J. Day; +Cc: Git Mailing list

"Robert P. J. Day" <rpjday@crashcourse.ca> writes:

>   embarrassed to admit i had no idea that you could tag non-commit
> objects, only realized that when i was reading the man page and saw:
>
>   SYNOPSIS
>      git tag [-a | -s | -u <keyid>] [-f] [-m <msg> | -F <file>] [-e]
>            <tagname> [<commit> | <object>]
>                                  ^^^^^^^^
>
> so i tried it and, sure enough, i could tag a blob object. but if you
> read further into DESCRIPTION, about halfway through, you read:
>
>   "Otherwise just a tag reference for the SHA-1 object name of the
>    commit object is created (i.e. a lightweight tag)."
>    ^^^^^^
>
> which suggests only commit objects. finally, much further down, under
> OPTIONS:
>
>   "<commit>, <object>
>      The object that the new tag will refer to, usually a commit.
>                                                 ^^^^^^^^^^^^^^^^
>
> so to clean this up, is it sufficient to just change that middle line
> to say "object" rather than "commit object"? or is there more in the
> man page that needs tweaking?

As that sentence talks about a lightweight tag (i.e. a reference in
refs/tags/ hierarchy that directly points at an object of any kind),
another possibility would be to say

	Otherwise a tag reference that directly points at the given
	object (i.e. lightweight tag) is created.




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

* Re: "man git-tag" inconsistent about whether you can tag non-commit objects
  2018-05-25  1:38 ` Junio C Hamano
@ 2018-05-25  7:45   ` Ævar Arnfjörð Bjarmason
  2018-05-25  8:47     ` Junio C Hamano
  2018-05-25  9:40   ` Robert P. J. Day
  1 sibling, 1 reply; 5+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2018-05-25  7:45 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: Robert P. J. Day, Git Mailing list


On Fri, May 25 2018, Junio C Hamano wrote:

> "Robert P. J. Day" <rpjday@crashcourse.ca> writes:
>
>>   embarrassed to admit i had no idea that you could tag non-commit
>> objects, only realized that when i was reading the man page and saw:
>>
>>   SYNOPSIS
>>      git tag [-a | -s | -u <keyid>] [-f] [-m <msg> | -F <file>] [-e]
>>            <tagname> [<commit> | <object>]
>>                                  ^^^^^^^^
>>
>> so i tried it and, sure enough, i could tag a blob object. but if you
>> read further into DESCRIPTION, about halfway through, you read:
>>
>>   "Otherwise just a tag reference for the SHA-1 object name of the
>>    commit object is created (i.e. a lightweight tag)."
>>    ^^^^^^
>>
>> which suggests only commit objects. finally, much further down, under
>> OPTIONS:
>>
>>   "<commit>, <object>
>>      The object that the new tag will refer to, usually a commit.
>>                                                 ^^^^^^^^^^^^^^^^
>>
>> so to clean this up, is it sufficient to just change that middle line
>> to say "object" rather than "commit object"? or is there more in the
>> man page that needs tweaking?
>
> As that sentence talks about a lightweight tag (i.e. a reference in
> refs/tags/ hierarchy that directly points at an object of any kind),
> another possibility would be to say
>
> 	Otherwise a tag reference that directly points at the given
> 	object (i.e. lightweight tag) is created.

Related, this recent patch of mine:
https://public-inbox.org/git/20180429202100.32353-6-avarab@gmail.com/#t

I.e. might be worth talking about this briefly in the git-tag manpage as
well, i.e. that you can create a lightweight "tag" to a commit, but then
depending on where you push it it becomes either a branch or a tag,
which may not be intuitive to users...

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

* Re: "man git-tag" inconsistent about whether you can tag non-commit objects
  2018-05-25  7:45   ` Ævar Arnfjörð Bjarmason
@ 2018-05-25  8:47     ` Junio C Hamano
  0 siblings, 0 replies; 5+ messages in thread
From: Junio C Hamano @ 2018-05-25  8:47 UTC (permalink / raw)
  To: Ævar Arnfjörð Bjarmason; +Cc: Robert P. J. Day, Git Mailing list

Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:

>> As that sentence talks about a lightweight tag (i.e. a reference in
>> refs/tags/ hierarchy that directly points at an object of any kind),
>> another possibility would be to say
>>
>> 	Otherwise a tag reference that directly points at the given
>> 	object (i.e. lightweight tag) is created.
>
> Related, this recent patch of mine:
> https://public-inbox.org/git/20180429202100.32353-6-avarab@gmail.com/#t
>
> I.e. might be worth talking about this briefly in the git-tag manpage as
> well, i.e. that you can create a lightweight "tag" to a commit, but then
> depending on where you push it it becomes either a branch or a tag,
> which may not be intuitive to users...

I am not sure if I agree.  People won't get confused, unless they
think too much and pedantically.

If you make refs/tags/$name point at a commit, it becomes a
lightweight tag, if you make refs/heads/$name point at a commit,
it becomes a local branch, if you make refs/remotes/$remote/$name
point at a commit, it behaves as a remote-tracking branch for the
named $remote.  Anywhere else, it is just a random ref that happens
to point at a commit.

And notice that I never said "push" in the above.  The verb I used
is "make" and that is deliberate.  It does not make any difference
if you make such a ref point at a commit by pushing into a
repository, fetching from elsewhere, or running "git branch", "git
tag", "git update-ref" locally.


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

* Re: "man git-tag" inconsistent about whether you can tag non-commit objects
  2018-05-25  1:38 ` Junio C Hamano
  2018-05-25  7:45   ` Ævar Arnfjörð Bjarmason
@ 2018-05-25  9:40   ` Robert P. J. Day
  1 sibling, 0 replies; 5+ messages in thread
From: Robert P. J. Day @ 2018-05-25  9:40 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: Git Mailing list

On Fri, 25 May 2018, Junio C Hamano wrote:

> "Robert P. J. Day" <rpjday@crashcourse.ca> writes:
>
> >   embarrassed to admit i had no idea that you could tag non-commit
> > objects, only realized that when i was reading the man page and saw:
> >
> >   SYNOPSIS
> >      git tag [-a | -s | -u <keyid>] [-f] [-m <msg> | -F <file>] [-e]
> >            <tagname> [<commit> | <object>]
> >                                  ^^^^^^^^
> >
> > so i tried it and, sure enough, i could tag a blob object. but if you
> > read further into DESCRIPTION, about halfway through, you read:
> >
> >   "Otherwise just a tag reference for the SHA-1 object name of the
> >    commit object is created (i.e. a lightweight tag)."
> >    ^^^^^^
> >
> > which suggests only commit objects. finally, much further down, under
> > OPTIONS:
> >
> >   "<commit>, <object>
> >      The object that the new tag will refer to, usually a commit.
> >                                                 ^^^^^^^^^^^^^^^^
> >
> > so to clean this up, is it sufficient to just change that middle line
> > to say "object" rather than "commit object"? or is there more in the
> > man page that needs tweaking?
>
> As that sentence talks about a lightweight tag (i.e. a reference in
> refs/tags/ hierarchy that directly points at an object of any kind),
> another possibility would be to say
>
> 	Otherwise a tag reference that directly points at the given
> 	object (i.e. lightweight tag) is created.

  yup, that would resolve the issue. patch coming shortly.

rday

-- 

========================================================================
Robert P. J. Day                                 Ottawa, Ontario, CANADA
                  http://crashcourse.ca/dokuwiki

Twitter:                                       http://twitter.com/rpjday
LinkedIn:                               http://ca.linkedin.com/in/rpjday
========================================================================

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

end of thread, other threads:[~2018-05-25  9:42 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-24 14:46 "man git-tag" inconsistent about whether you can tag non-commit objects Robert P. J. Day
2018-05-25  1:38 ` Junio C Hamano
2018-05-25  7:45   ` Ævar Arnfjörð Bjarmason
2018-05-25  8:47     ` Junio C Hamano
2018-05-25  9:40   ` Robert P. J. Day

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.