diff options
author | Junio C Hamano <gitster@pobox.com> | 2013-07-07 14:14:22 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2013-07-09 08:14:05 -0700 |
commit | b23e0b9353e38149e791bde0feb1220aa1c8bac1 (patch) | |
tree | 700d95cb0070543a005ca8b9defdf526b086bae7 /t/t9807-git-p4-submit.sh | |
parent | name-ref: factor out name shortening logic from name_ref() (diff) | |
download | tgif-b23e0b9353e38149e791bde0feb1220aa1c8bac1.tar.xz |
name-rev: allow converting the exact object name at the tip of a ref
"git name-rev" is supposed to convert given object names into
strings that name the same objects based on refs, that can be fed to
"git rev-parse" to get the same object names back, so the output for
the commit object v1.8.3^0 (i.e. the commit tagged as v1.8.3)
$ git rev-parse v1.8.3 v1.8.3^0 | git name-rev --stdin
8af06057d0c31a24e8737ae846ac2e116e8bafb9
edca4152560522a431a51fc0a06147fc680b5b18 (tags/v1.8.3^0)
has to have "^0" at the end, as "edca41" is a commit, not the tag
that references it. But we do not get anything for the tag object
(8af0605) itself.
This is because the command however did not bother to see if the
object is at the tip of some ref, and failed to convert a tag
object.
Teach it to show this instead:
$ git rev-parse v1.8.3 v1.8.3^0 | git name-rev --stdin
8af06057d0c31a24e8737ae846ac2e116e8bafb9 (tags/v1.8.3)
edca4152560522a431a51fc0a06147fc680b5b18 (tags/v1.8.3^0)
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t9807-git-p4-submit.sh')
0 files changed, 0 insertions, 0 deletions