author | Junio C Hamano <junkio@cox.net> | |
Sun, 16 Oct 2005 00:14:10 +0000 (17:14 -0700) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Sun, 16 Oct 2005 00:14:10 +0000 (17:14 -0700) | ||
commit | 4baf5dda9e30ddc472bec444af7a572e5d3cb467 | |
tree | 361c7d681fc476d8ad07b622e519a46d98136d08 | tree | snapshot |
parent | 5a2e04d2031b229a242d07e11e514220e71a0d33 | commit | diff |
Introduce notation "ref^{type}".
Existing "tagname^0" notation means "dereference tag zero or more
times until you cannot dereference it anymore, and make sure it is a
commit -- otherwise barf". But tags do not necessarily reference
commit objects.
This commit introduces a bit more generalized notation, "ref^{type}".
Existing "ref^0" is a shorthand for "ref^{commit}". If the type
is empty, it just dereferences tags until it hits a non-tag object.
With this, "git-rev-parse --verify 'junio-gpg-pub^{}'" shows the blob
object name -- there is no need to manually read the tag object and
find out the object name anymore.
"git-rev-parse --verify 'HEAD^{tree}'" can be used to find out the
tree object name of the HEAD commit.
Signed-off-by: Junio C Hamano <junkio@cox.net>
Existing "tagname^0" notation means "dereference tag zero or more
times until you cannot dereference it anymore, and make sure it is a
commit -- otherwise barf". But tags do not necessarily reference
commit objects.
This commit introduces a bit more generalized notation, "ref^{type}".
Existing "ref^0" is a shorthand for "ref^{commit}". If the type
is empty, it just dereferences tags until it hits a non-tag object.
With this, "git-rev-parse --verify 'junio-gpg-pub^{}'" shows the blob
object name -- there is no need to manually read the tag object and
find out the object name anymore.
"git-rev-parse --verify 'HEAD^{tree}'" can be used to find out the
tree object name of the HEAD commit.
Signed-off-by: Junio C Hamano <junkio@cox.net>
sha1_name.c | diff | blob | history |