Skip to content
This repository was archived by the owner on Sep 11, 2020. It is now read-only.

storage: Add object type hint parameter to ObjectStorage.Get. #69

Merged
merged 1 commit into from
Aug 29, 2016
Merged

storage: Add object type hint parameter to ObjectStorage.Get. #69

merged 1 commit into from
Aug 29, 2016

Conversation

smola
Copy link
Collaborator

@smola smola commented Aug 18, 2016

Some storage backends can optimize object lookup if they get
the object type that is expected. So we the signature of the Get
method is now Get(Hash, ObjectType).

@codecov-io
Copy link

codecov-io commented Aug 18, 2016

Current coverage is 66.17% (diff: 76.66%)

Merging #69 into v4 will decrease coverage by 2.14%

@@                 v4        #69   diff @@
==========================================
  Files            53         53          
  Lines          3050       3013    -37   
  Methods           0          0          
  Messages          0          0          
  Branches          0          0          
==========================================
- Hits           2084       1994    -90   
- Misses          738        805    +67   
+ Partials        228        214    -14   

Powered by Codecov. Last update 4a3fa49...35d5a82

@@ -49,6 +49,9 @@ const (
TagObject ObjectType = 4
OFSDeltaObject ObjectType = 6
REFDeltaObject ObjectType = 7

// Used as a placeholder to request an object of any time.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/time/type/

Copy link
Contributor

@alcortesm alcortesm Aug 18, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm thinking it will be nice to explain that all these types and their associated numbers are from the official git specification, except for InvalidObject and AnyObject, which are object types of our own invention, that will never be found inside an official git repository.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@alcortesm
Copy link
Contributor

LGTM, looking even better if #69 (comment) is fixed.

In any case, you can merge whenever you want.

Some storage backends can optimize object lookup if they get
the object type that is expected. So we the signature of the Get
method is now Get(Hash, ObjectType).

Added generic tests for storage backends.
@mcuadros mcuadros merged commit 524a28b into src-d:v4 Aug 29, 2016
mcuadros pushed a commit that referenced this pull request Jan 31, 2017
Some storage backends can optimize object lookup if they get
the object type that is expected. So we the signature of the Get
method is now Get(Hash, ObjectType).

Added generic tests for storage backends.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants