aboutsummaryrefslogtreecommitdiffstats
path: root/repository/repo_testing.go
diff options
context:
space:
mode:
authorMichael Muré <batolettre@gmail.com>2020-09-27 22:56:53 +0200
committerMichael Muré <batolettre@gmail.com>2020-09-29 20:42:21 +0200
commit736d0a2f0931d3e5466d9838839f5bbde606fe34 (patch)
tree3d140626eeb28b2618e27bddbd5285e2707f9ee6 /repository/repo_testing.go
parentd8b49e025a01e45cfc90bb11b8a0645b616ec561 (diff)
downloadgit-bug-736d0a2f0931d3e5466d9838839f5bbde606fe34.tar.gz
repo: more testing for an edge case
Diffstat (limited to 'repository/repo_testing.go')
-rw-r--r--repository/repo_testing.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/repository/repo_testing.go b/repository/repo_testing.go
index cfa26631..b1f47396 100644
--- a/repository/repo_testing.go
+++ b/repository/repo_testing.go
@@ -157,6 +157,11 @@ func RepoDataTest(t *testing.T, repo RepoData) {
require.NoError(t, err)
require.Equal(t, treeHash2, treeHash2Read)
+ // ReadTree should accept tree and commit hashes
+ tree1read, err := repo.ReadTree(commit1)
+ require.NoError(t, err)
+ require.Equal(t, tree1read, tree1)
+
// Ref
exist1, err := repo.RefExist("refs/bugs/ref1")