diff options
Diffstat (limited to 'plumbing/reference.go')
-rw-r--r-- | plumbing/reference.go | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/plumbing/reference.go b/plumbing/reference.go index b9f4a95..798c3dd 100644 --- a/plumbing/reference.go +++ b/plumbing/reference.go @@ -28,6 +28,19 @@ const ( SymbolicReference ReferenceType = 2 ) +func (r ReferenceType) String() string { + switch r { + case InvalidReference: + return "invalid-reference" + case HashReference: + return "hash-reference" + case SymbolicReference: + return "symbolic-reference" + } + + return "" +} + // ReferenceName reference name's type ReferenceName string |