From e28d9c90aad624596d20d1a59c8371d81b69190b Mon Sep 17 00:00:00 2001 From: David Symonds Date: Wed, 15 Jul 2020 13:52:04 +1000 Subject: Support partial hashes in Repository.ResolveRevision. Like `git rev-parse `, this enumerates the hashes of objects with the given prefix and adds them to the list of candidates for resolution. This has an exhaustive slow path, which requires enumerating all objects and filtering each one, but also a couple of fast paths for common cases. There's room for future work to make this faster; TODOs have been left for that. Fixes #135. --- internal/revision/parser.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'internal/revision/parser.go') 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, type Ref string // TildePath represents ~, ~{n} -- cgit