Merge "CreateTag: document why we don't check for visibility"
This commit is contained in:
@@ -102,6 +102,8 @@ public class CreateTag implements RestCollectionCreateView<ProjectResource, TagR
|
|||||||
try (Repository repo = repoManager.openRepository(resource.getNameKey())) {
|
try (Repository repo = repoManager.openRepository(resource.getNameKey())) {
|
||||||
ObjectId revid = RefUtil.parseBaseRevision(repo, resource.getNameKey(), input.revision);
|
ObjectId revid = RefUtil.parseBaseRevision(repo, resource.getNameKey(), input.revision);
|
||||||
RevWalk rw = RefUtil.verifyConnected(repo, revid);
|
RevWalk rw = RefUtil.verifyConnected(repo, revid);
|
||||||
|
// Reachability through tags does not influence a commit's visibility, so no need to check for
|
||||||
|
// visibility.
|
||||||
RevObject object = rw.parseAny(revid);
|
RevObject object = rw.parseAny(revid);
|
||||||
rw.reset();
|
rw.reset();
|
||||||
boolean isAnnotated = Strings.emptyToNull(input.message) != null;
|
boolean isAnnotated = Strings.emptyToNull(input.message) != null;
|
||||||
|
|||||||
Reference in New Issue
Block a user