-
Notifications
You must be signed in to change notification settings - Fork 534
Conversation
Current coverage is 77.12% (diff: 77.50%)@@ master #180 diff @@
==========================================
Files 91 92 +1
Lines 5823 5863 +40
Methods 0 0
Messages 0 0
Branches 0 0
==========================================
- Hits 4527 4522 -5
- Misses 816 866 +50
+ Partials 480 475 -5
|
|
||
// ShallowStorer storage of shallow commits, meaning that it does not have the | ||
// parents of a commit (explanation from git documentation) | ||
type ShallowStorer interface { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is there a storer.ShallowStorer
interface when we already have an storer.ObjectStorer
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why the interfaces repeat the word Storer
in their name when it is already part of the package name?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because it only stores the references not the objects it self.
Yes maybe we can keep the Storer
what you suggest?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see. The comments of ShallowStorer suggest it stores commits not hashes. I would change that.
If this is just a collection of hashes I would said it so, and remove any reference to the shallow
word in the name of the interface. Maybe call it Hashes, for example.
I would call it storer.Hashes
or storer.HashCollection
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd propose something along these lines:
// ShallowStorer storage of references to shallow commits by hash, meaning that these commits have
// missing parents because of a shallow fetch.
?
|
||
import ( | ||
"fmt" | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
extra space ;)
* storage: shallow storage * changes * changes
This PR implements the shallow storage, when a Repository is cloned using Depth != 0, the shallow commits should be saved