diff options
author | Chris Marchesi <chrism@vancluevertech.com> | 2018-08-23 11:57:51 -0700 |
---|---|---|
committer | Chris Marchesi <chrism@vancluevertech.com> | 2018-08-23 12:04:05 -0700 |
commit | 01631f0e5c4be73cefaa8b2cc8a4811005871656 (patch) | |
tree | d3a1b4768f05a3f4aeee71e28e39fa0f3a657f54 /common_test.go | |
parent | 119459a6b9ddaa244f76f67b182bf2c627434d02 (diff) | |
download | go-git-01631f0e5c4be73cefaa8b2cc8a4811005871656.tar.gz |
git: Don't return tag object with Tag, adjust docs for Tag and Tags
I've mainly noticed that in using the current Tag function, that there
were lots of times that I was ignoring the ref or the object, depending
on what I needed. This was evident in the tests as well. As such, I
think it just makes more sense for a singular tag fetcher to return just
a ref, through which the caller may grab the annotation if they need it,
and if it exists.
Also, contrary to the docs on Tags, all tags have a ref, even if they
are annotated. The difference between a lightweight tag and an annotated
tag is the presence of the tag object, which the ref will point to if
the tag is annotated. As such I've adjusted the docs with an example as
to how one can get the annotation for a tag ref through the iterator.
Source: https://git-scm.com/book/en/v2/Git-Internals-Git-References,
tags section.
Signed-off-by: Chris Marchesi <chrism@vancluevertech.com>
Diffstat (limited to 'common_test.go')
0 files changed, 0 insertions, 0 deletions