From 8ab2f173e7e5b008d9a5c72d124e99fe0cd578ab Mon Sep 17 00:00:00 2001 From: Michael Muré Date: Wed, 26 Sep 2018 22:04:41 +0200 Subject: util: handle both sha1 and sha256 git hashes --- util/git/hash.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 { -- cgit