diff options
author | Máximo Cuadros <mcuadros@gmail.com> | 2015-10-27 01:49:58 +0100 |
---|---|---|
committer | Máximo Cuadros <mcuadros@gmail.com> | 2015-10-27 01:49:58 +0100 |
commit | 7d6c5a56c0b63705378f125523876de1a97fd1ce (patch) | |
tree | 8945a8a02d53f36a64304beaf006c4f46d61da48 /internal/hash.go | |
parent | a2e49a59782a50a9ff116c6d17c6e3888502f2ad (diff) | |
download | go-git-7d6c5a56c0b63705378f125523876de1a97fd1ce.tar.gz |
tree and commit
Diffstat (limited to 'internal/hash.go')
-rw-r--r-- | internal/hash.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/internal/hash.go b/internal/hash.go index db55b24..0540db1 100644 --- a/internal/hash.go +++ b/internal/hash.go @@ -30,6 +30,11 @@ func NewHash(s string) Hash { return h } +func (h Hash) IsZero() bool { + var empty Hash + return h == empty +} + func (h Hash) String() string { return hex.EncodeToString(h[:]) } |