Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitaly.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Cai <jcai@gitlab.com>2019-01-14 22:59:22 +0300
committerJohn Cai <jcai@gitlab.com>2019-01-14 22:59:22 +0300
commitb9d8491cb72952fcc00688efc23be062bcd0ee3f (patch)
tree0aa36da9613cd84f83d1183b9c440c89b788a4a1
parentcce583df8566e5fb5022c22029797f1ea48fbd68 (diff)
ignore all other objects than commitsrewrite-get-all-tags
-rw-r--r--internal/git/log/tags.go8
1 files changed, 5 insertions, 3 deletions
diff --git a/internal/git/log/tags.go b/internal/git/log/tags.go
index 0487d2f65..bbb0ae282 100644
--- a/internal/git/log/tags.go
+++ b/internal/git/log/tags.go
@@ -35,9 +35,6 @@ func GetAllTags(ctx context.Context, repo *gitalypb.Repository) ([]*gitalypb.Tag
if err != nil {
return tags, err
}
- if info.IsBlob() {
- continue
- }
tag, err := buildTag(oid, info.Type, line[1], c)
if err != nil {
return tags, err
@@ -98,6 +95,11 @@ func buildAnnotatedTag(b *catfile.Batch, oid string) (*gitalypb.Tag, error) {
}
headerSplit := strings.SplitN(line, " ", 2)
switch headerSplit[0] {
+ case "type":
+ // we only want to get the referenced target commit, and are ignoring any other objects
+ if headerSplit[1] != "commit" {
+ continue
+ }
case "object":
commit, err := GetCommitCatfile(b, headerSplit[1])
if err != nil {