aboutsummaryrefslogtreecommitdiff
path: root/internal/testgit/repo_rev_parse.go
diff options
context:
space:
mode:
authorGravatar Runxi Yu2026-03-04 08:26:56 +0800
committerGravatar Runxi Yu2026-03-04 08:59:53 +0800
commitab7501be34032fb9e5c48726a68ae90a917af9eb (patch)
tree20d005647569befea8133e953c3270e8fd2a2a5b /internal/testgit/repo_rev_parse.go
parent*: gofumpt (diff)
signatureNo signature
*: Lint
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
}