diff options
author | Miguel Molina <miguel@erizocosmi.co> | 2018-07-20 15:51:15 +0200 |
---|---|---|
committer | Miguel Molina <miguel@erizocosmi.co> | 2018-07-26 14:51:34 +0200 |
commit | ffdfb7dbabb78090b27ca29b762b803969c89fd7 (patch) | |
tree | 20eb3bff2328d6f6f8856901f4de76cb348886d3 /plumbing/memory.go | |
parent | a08061aa298ec4b92bbe470a1834465f25a0ad0d (diff) | |
download | go-git-ffdfb7dbabb78090b27ca29b762b803969c89fd7.tar.gz |
plumbing: packfile, new Packfile representation
Signed-off-by: Miguel Molina <miguel@erizocosmi.co>
Diffstat (limited to 'plumbing/memory.go')
-rw-r--r-- | plumbing/memory.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/plumbing/memory.go b/plumbing/memory.go index 51cbb54..b8e1e1b 100644 --- a/plumbing/memory.go +++ b/plumbing/memory.go @@ -14,10 +14,10 @@ type MemoryObject struct { sz int64 } -// Hash return the object Hash, the hash is calculated on-the-fly the first -// time is called, the subsequent calls the same Hash is returned even if the -// type or the content has changed. The Hash is only generated if the size of -// the content is exactly the Object.Size +// Hash returns the object Hash, the hash is calculated on-the-fly the first +// time it's called, in all subsequent calls the same Hash is returned even +// if the type or the content have changed. The Hash is only generated if the +// size of the content is exactly the object size. func (o *MemoryObject) Hash() Hash { if o.h == ZeroHash && int64(len(o.cont)) == o.sz { o.h = ComputeHash(o.t, o.cont) |