git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] document that git-tag can tag more than heads
@ 2008-07-24  5:01 Jonathan Nieder
  2008-07-24  8:48 ` Kalle Olavi Niemitalo
  0 siblings, 1 reply; 3+ messages in thread
From: Jonathan Nieder @ 2008-07-24  5:01 UTC (permalink / raw)
  To: git

After looking the git-tag manpage, someone on #git wondered how
to tag a commit that is not a branch head.  This patch changes
the synopsis to say "<commit-ish> | <object>" instead of
"<head>" to address his question.

Samuel Bronson had the idea of putting "<commit-ish> | <object>"
for "<object>" because most tags point to commits (and for the
rest of the manpage, all tags point to commits).

Signed-off-by: Jonathan Nieder <jrnieder@uchicago.edu>
---
 Documentation/git-tag.txt |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/Documentation/git-tag.txt b/Documentation/git-tag.txt
index b8dc88f..1ce1d7d 100644
--- a/Documentation/git-tag.txt
+++ b/Documentation/git-tag.txt
@@ -9,7 +9,8 @@ git-tag - Create, list, delete or verify a tag object signed with GPG
 SYNOPSIS
 --------
 [verse]
-'git tag' [-a | -s | -u <key-id>] [-f] [-m <msg> | -F <file>]  <name> [<head>]
+'git tag' [-a | -s | -u <key-id>] [-f] [-m <msg> | -F <file>]
+	<name> [<commit-ish> | <object>]
 'git tag' -d <name>...
 'git tag' [-n[<num>]] -l [<pattern>]
 'git tag' -v <name>...
-- 
1.5.6.3.549.g8ca11

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

* Re: [PATCH] document that git-tag can tag more than heads
  2008-07-24  5:01 [PATCH] document that git-tag can tag more than heads Jonathan Nieder
@ 2008-07-24  8:48 ` Kalle Olavi Niemitalo
  2008-07-24 16:55   ` [PATCH v2] " Jonathan Nieder
  0 siblings, 1 reply; 3+ messages in thread
From: Kalle Olavi Niemitalo @ 2008-07-24  8:48 UTC (permalink / raw)
  To: git

Jonathan Nieder <jrnieder@uchicago.edu> writes:

> Samuel Bronson had the idea of putting "<commit-ish> | <object>"
> for "<object>" because most tags point to commits (and for the
> rest of the manpage, all tags point to commits).

But the argument is not a <commit-ish>.  git.txt says:

        A command that takes a <commit-ish> argument ultimately
	wants to operate on a <commit> object but automatically
	dereferences <tag> objects that point at a <commit>.

git-tag does not automatically dereference tag objects that
point to a commit.  So if you want to use "|", then it should be
"<commit> | <object>".

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

* [PATCH v2] document that git-tag can tag more than heads
  2008-07-24  8:48 ` Kalle Olavi Niemitalo
@ 2008-07-24 16:55   ` Jonathan Nieder
  0 siblings, 0 replies; 3+ messages in thread
From: Jonathan Nieder @ 2008-07-24 16:55 UTC (permalink / raw)
  To: Kalle Olavi Niemitalo; +Cc: git

After looking the git-tag manpage, someone on #git wondered how
to tag a commit that is not a branch head.  This patch changes
the synopsis to say "<commit> | <object>" instead of "<head>" to
address his question.

Samuel Bronson had the idea of putting "<commit> | <object>"
for "<object>" because most tags point to commits (and for the
rest of the manpage, all tags point to commits).

Signed-off-by: Jonathan Nieder <jrnieder@uchicago.edu>
---
 Kalle Olavi Niemitalo wrote:

 > git-tag does not automatically dereference tag objects that
 > point to a commit.  So if you want to use "|", then it should be
 > "<commit> | <object>".

 Nice catch -- thanks.

 Documentation/git-tag.txt |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/Documentation/git-tag.txt b/Documentation/git-tag.txt
index b8dc88f..046ab35 100644
--- a/Documentation/git-tag.txt
+++ b/Documentation/git-tag.txt
@@ -9,7 +9,8 @@ git-tag - Create, list, delete or verify a tag object signed with GPG
 SYNOPSIS
 --------
 [verse]
-'git tag' [-a | -s | -u <key-id>] [-f] [-m <msg> | -F <file>]  <name> [<head>]
+'git tag' [-a | -s | -u <key-id>] [-f] [-m <msg> | -F <file>]
+	<name> [<commit> | <object>]
 'git tag' -d <name>...
 'git tag' [-n[<num>]] -l [<pattern>]
 'git tag' -v <name>...
-- 
1.5.6.3.549.g8ca11

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

end of thread, other threads:[~2008-07-24 16:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-24  5:01 [PATCH] document that git-tag can tag more than heads Jonathan Nieder
2008-07-24  8:48 ` Kalle Olavi Niemitalo
2008-07-24 16:55   ` [PATCH v2] " Jonathan Nieder

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