Effectively, if a pattern is supplied and no existing tags are found an error is always returned.
|
g, err := glob.Compile(pattern) |
|
if err != nil { |
|
return "", err |
|
} |
|
for _, tag := range tags { |
|
if g.Match(tag) { |
|
return tag, nil |
|
} |
|
} |
|
return "", fmt.Errorf("no tags match '%s'", pattern) |
Whereas if no pattern is supplied, it is not an error to find no tags:
|
if len(tags) == 0 { |
|
return "", nil |
|
} |
Effectively, if a pattern is supplied and no existing tags are found an error is always returned.
svu/internal/git/git.go
Lines 45 to 54 in 0b3a780
Whereas if no pattern is supplied, it is not an error to find no tags:
svu/internal/git/git.go
Lines 38 to 40 in 0b3a780