本站源代码
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

38 lines
617B

  1. package filesystem
  2. import (
  3. "gopkg.in/src-d/go-git.v4/plumbing"
  4. )
  5. type deltaObject struct {
  6. plumbing.EncodedObject
  7. base plumbing.Hash
  8. hash plumbing.Hash
  9. size int64
  10. }
  11. func newDeltaObject(
  12. obj plumbing.EncodedObject,
  13. hash plumbing.Hash,
  14. base plumbing.Hash,
  15. size int64) plumbing.DeltaObject {
  16. return &deltaObject{
  17. EncodedObject: obj,
  18. hash: hash,
  19. base: base,
  20. size: size,
  21. }
  22. }
  23. func (o *deltaObject) BaseHash() plumbing.Hash {
  24. return o.base
  25. }
  26. func (o *deltaObject) ActualSize() int64 {
  27. return o.size
  28. }
  29. func (o *deltaObject) ActualHash() plumbing.Hash {
  30. return o.hash
  31. }
上海开阖软件有限公司 沪ICP备12045867号-1