mirror of
https://github.com/MichaelMure/git-bug.git
synced 2024-12-15 02:01:43 +03:00
util: handle both sha1 and sha256 git hashes
This commit is contained in:
parent
5b3a8f01f0
commit
8ab2f173e7
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user