aboutsummaryrefslogtreecommitdiff
path: root/internal/testgit/repo_rev_parse.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/testgit/repo_rev_parse.go')
-rw-r--r--internal/testgit/repo_rev_parse.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/internal/testgit/repo_rev_parse.go b/internal/testgit/repo_rev_parse.go
index bebdfa8e..3bee6108 100644
--- a/internal/testgit/repo_rev_parse.go
+++ b/internal/testgit/repo_rev_parse.go
@@ -10,9 +10,11 @@ import (
func (testRepo *TestRepo) RevParse(tb testing.TB, spec string) objectid.ObjectID {
tb.Helper()
hex := testRepo.Run(tb, "rev-parse", spec)
+
id, err := objectid.ParseHex(testRepo.algo, hex)
if err != nil {
tb.Fatalf("parse rev-parse output %q: %v", hex, err)
}
+
return id
}