diff options
Diffstat (limited to 'internal/testgit/repo_hash_object.go')
| -rw-r--r-- | internal/testgit/repo_hash_object.go | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/internal/testgit/repo_hash_object.go b/internal/testgit/repo_hash_object.go index 10a05381..bc2def72 100644 --- a/internal/testgit/repo_hash_object.go +++ b/internal/testgit/repo_hash_object.go @@ -10,9 +10,11 @@ import ( func (testRepo *TestRepo) HashObject(tb testing.TB, objType string, body []byte) objectid.ObjectID { tb.Helper() hex := testRepo.RunInput(tb, body, "hash-object", "-t", objType, "-w", "--stdin") + id, err := objectid.ParseHex(testRepo.algo, hex) if err != nil { tb.Fatalf("parse git hash-object output %q: %v", hex, err) } + return id } |
