aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Muré <batolettre@gmail.com>2018-09-26 22:04:41 +0200
committerMichael Muré <batolettre@gmail.com>2018-09-26 22:04:41 +0200
commit8ab2f173e7e5b008d9a5c72d124e99fe0cd578ab (patch)
tree7792302bc7512804cb73fff822d022bb1edaa820
parent5b3a8f01f06811a1f68278a759f18092fd7f1779 (diff)
downloadgit-bug-8ab2f173e7e5b008d9a5c72d124e99fe0cd578ab.tar.gz
util: handle both sha1 and sha256 git hashes
-rw-r--r--util/git/hash.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/util/git/hash.go b/util/git/hash.go
index c5fdfad4..401e6edc 100644
--- a/util/git/hash.go
+++ b/util/git/hash.go
@@ -35,7 +35,7 @@ func (h Hash) MarshalGQL(w io.Writer) {
// IsValid tell if the hash is valid
func (h *Hash) IsValid() bool {
- if len(*h) != 40 {
+ if len(*h) != 40 && len(*h) != 64 {
return false
}
for _, r := range *h {