| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
| |
Encode method encodes a typed object (commit, tree,
tag, blob) into raw core.Object representation.
Additionally, Decode does not trim commit message
lines. This is needed for Decode/Encode to be
idempotent.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* New Object interface is distinct from core.Object
* New Object interface is used in places where returned object could be of any type
* Object is implemented by Commit, Tree, Blob, File and Tag
* Added Repository.Object function for retrieving objects of any type
* Tag.Object now returns Object instead of core.Object
* Tag target hash is now publicly accessible
* Renamed Tag.Type field to Tag.TargetType, making it distinct from Tag.Type function
* Fixed infinite recursive loop in TagIter.Close
* TreeWalker.Next now returns Object instead of core.Object
* Removed some duplicate test setup code
|
|
|
|
| |
* Old name accidentally shadowed builtin close function
|
|
|
|
|
|
|
|
|
|
|
|
| |
* New function signatures provide the necessary interface to stream data from disk when using filesystem-based storage in the future
* New function signatures provide proper error handling
* ObjectReader and ObjectWriter interfaces added to avoid future refactoring, currently are type aliases for io.ReadCloser and io.WriteCloser respectively
* Object.Reader now returns (ObjectReader, error)
* Object.Writer now returns (ObjectWriter, error)
* File.Contents now returns (string, error)
* File.Lines now returns ([]string, error)
* Blob.Reader now returns (core.ObjectReader, error)
* Added internal close helper function for deferred calls to Close that need to check the return value
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Commit.File() was leaking a goroutine because it was looping over
an iterator without closing its channel.
Now commit.File() calls the new Tree.File() method that searches
the file in the repository by trasversing the dir tree instead
of using the tree.Files() iterator.
This not only prevent the goroutine leak, but also speeds up
file searching.
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
This also includes a diff package and revlist package (needed by
blame)
Some extra packfiles (<1MB) are also included, to be used as fixtures in
the tests.
|
| |
|
| |
|
|
|