diff options
author | Máximo Cuadros <mcuadros@gmail.com> | 2020-07-16 21:28:40 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-16 21:28:40 +0200 |
commit | 7906922c319b6077e8e66b70711073fb59a08a20 (patch) | |
tree | 5785565db48069ff8f173b9dddcbb1b4c1f7e8ff /internal/revision | |
parent | 41758ec4b81c557092d7566c3eed46f89c1ec3cc (diff) | |
parent | e28d9c90aad624596d20d1a59c8371d81b69190b (diff) | |
download | go-git-7906922c319b6077e8e66b70711073fb59a08a20.tar.gz |
Merge pull request #136 from dsymonds/revparse-partial-hash
Repository.ResolveRevision, support partial hashes
Diffstat (limited to 'internal/revision')
-rw-r--r-- | internal/revision/parser.go | 2 | ||||
-rw-r--r-- | internal/revision/parser_test.go | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/internal/revision/parser.go b/internal/revision/parser.go index 61de386..3efe5d7 100644 --- a/internal/revision/parser.go +++ b/internal/revision/parser.go @@ -28,7 +28,7 @@ func (e *ErrInvalidRevision) Error() string { type Revisioner interface { } -// Ref represents a reference name : HEAD, master +// Ref represents a reference name : HEAD, master, <hash> type Ref string // TildePath represents ~, ~{n} diff --git a/internal/revision/parser_test.go b/internal/revision/parser_test.go index 4bb007f..98403cc 100644 --- a/internal/revision/parser_test.go +++ b/internal/revision/parser_test.go @@ -354,6 +354,7 @@ func (s *ParserSuite) TestParseRefWithValidName(c *C) { "refs/remotes/test", "refs/remotes/origin/HEAD", "refs/remotes/origin/master", + "0123abcd", // short hash } for _, d := range datas { |