1
0
mirror of https://github.com/go-gitea/gitea.git synced 2024-12-04 14:46:57 -05:00
gitea/vendor/gopkg.in/src-d/go-git.v4/storage/filesystem/deltaobject.go
Lauris BH 08bf443016 Implement git refs API for listing references (branches, tags and other) (#5354)
* Inital routes to git refs api

* Git refs API implementation

* Update swagger

* Fix copyright

* Make swagger happy add basic test

* Fix test

* Fix test again :)
2018-11-27 16:52:20 -05:00

38 lines
617 B
Go

package filesystem
import (
"gopkg.in/src-d/go-git.v4/plumbing"
)
type deltaObject struct {
plumbing.EncodedObject
base plumbing.Hash
hash plumbing.Hash
size int64
}
func newDeltaObject(
obj plumbing.EncodedObject,
hash plumbing.Hash,
base plumbing.Hash,
size int64) plumbing.DeltaObject {
return &deltaObject{
EncodedObject: obj,
hash: hash,
base: base,
size: size,
}
}
func (o *deltaObject) BaseHash() plumbing.Hash {
return o.base
}
func (o *deltaObject) ActualSize() int64 {
return o.size
}
func (o *deltaObject) ActualHash() plumbing.Hash {
return o.hash
}