Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make Reference.getFullName return Optional<String> #6776

Merged
merged 1 commit into from
May 9, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import java.util.Optional;
import org.immutables.value.Value;

/**
Expand Down Expand Up @@ -46,13 +47,14 @@ public interface Reference {
/**
* The full name of the reference, e.g. "refs/heads/branch1".
*
* <p>Full names are unique across all reference types.
* <p>Full names are unique across all reference types. If the reference was detached however,
* this will return empty.
*
* <p>The reference type can be inferred from the full name; e.g. if the full name starts with
* "refs/heads/", then the reference is a branch. If the full name starts with "refs/tags/", then
* the reference is a tag.
*/
String getFullName();
Optional<String> getFullName();

/**
* The type of the reference. This is usually either {@value #BRANCH} or {@value #TAG}, but more
Expand Down