aboutsummaryrefslogtreecommitdiffstats
path: root/plumbing/format/packfile/diff_delta.go
diff options
context:
space:
mode:
authorSantiago M. Mola <santi@mola.io>2016-12-14 23:12:44 +0100
committerMáximo Cuadros <mcuadros@gmail.com>2016-12-14 23:12:44 +0100
commit0af572dd21c0aa79d13745b633ee24ba6c4d6cf1 (patch)
tree49e81e74e82d84fd88b2fc1e4b0dc7c7bfe9c40f /plumbing/format/packfile/diff_delta.go
parentdf0f38af83f972f026d7e14150f3d37b95f13484 (diff)
downloadgo-git-0af572dd21c0aa79d13745b633ee24ba6c4d6cf1.tar.gz
move plumbing from top level package to plumbing (#183)
* plumbing: rename Object -> EncodedObject. * plumbing/storer: rename ObjectStorer -> EncodedObjectStorer. * move difftree to plumbing/difftree. * move diff -> utils/diff * make Object/Tag/Blob/Tree/Commit/File depend on storer. * Object and its implementations now depend only on storer.EncodedObjectStorer, not git.Repository. * Tests are decoupled accordingly. * move Object/Commit/File/Tag/Tree to plumbing/object. * move Object/Commit/File/Tag/Tree to plumbing/object. * move checkClose to utils/ioutil. * move RevListObjects to plumbing/revlist.Objects. * move DiffTree to plumbing/difftree package. * rename files with plural nouns to singular * plumbing/object: add GetBlob/GetCommit/GetTag/GetTree.
Diffstat (limited to 'plumbing/format/packfile/diff_delta.go')
-rw-r--r--plumbing/format/packfile/diff_delta.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/plumbing/format/packfile/diff_delta.go b/plumbing/format/packfile/diff_delta.go
index fb05a79..bc4fafa 100644
--- a/plumbing/format/packfile/diff_delta.go
+++ b/plumbing/format/packfile/diff_delta.go
@@ -17,17 +17,17 @@ const (
// GetOFSDelta returns an offset delta that knows the way of how to transform
// base object to target object
-func GetOFSDelta(base, target plumbing.Object) (plumbing.Object, error) {
+func GetOFSDelta(base, target plumbing.EncodedObject) (plumbing.EncodedObject, error) {
return getDelta(base, target, plumbing.OFSDeltaObject)
}
// GetRefDelta returns a reference delta that knows the way of how to transform
// base object to target object
-func GetRefDelta(base, target plumbing.Object) (plumbing.Object, error) {
+func GetRefDelta(base, target plumbing.EncodedObject) (plumbing.EncodedObject, error) {
return getDelta(base, target, plumbing.REFDeltaObject)
}
-func getDelta(base, target plumbing.Object, t plumbing.ObjectType) (plumbing.Object, error) {
+func getDelta(base, target plumbing.EncodedObject, t plumbing.ObjectType) (plumbing.EncodedObject, error) {
if t != plumbing.OFSDeltaObject && t != plumbing.REFDeltaObject {
return nil, fmt.Errorf("Type not supported: %v", t)
}