| Commit message (Collapse) | Author | Age | Files | Lines |
|\
| |
| | |
Add cshared files to allow building wrappers in other languages
|
| | |
|
| | |
|
| | |
|
|/ |
|
| |
|
| |
|
|\
| |
| | |
Fix PullDefault to not cause panics.
|
|/
|
|
|
|
|
|
|
|
|
|
| |
The `remote.upInfo` is not set until `Connect()` is called.
However, `repository.PullDefault()` requires that it exists when
it calls `remote.DefaultBranch()`. This can be solved by pushing
the default branch discovery into `repository.Pull()`.
The empty string "" is not a valid branch name, so by allowing
the empty string to mean 'default branch' in the `Pull()` function
we can allow `PullDefault()` to not need a `remote.Connect()` call
before calling `repository.Pull()`
|
| |
|
| |
|
| |
|
| |
|
| |
|
|\
| |
| | |
Added Object interface for Commit, Tree, Blob and Tag
|
|/
|
|
|
|
|
|
|
|
|
|
|
| |
* 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
|
|\
| |
| | |
Added support for objfile format
|
| | |
|
| |
| |
| |
| | |
* Old name accidentally shadowed builtin close function
|
| | |
|
|/ |
|
|\
| |
| | |
Added Hasher for computing hashes of streamed objects
|
|/ |
|
|\
| |
| | |
Refactor to use core.ObjectReader and core.ObjectWriter
|
|/
|
|
|
|
|
|
|
|
|
|
| |
* 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
|
| |
|
|\
| |
| | |
Annotated tags
|
| | |
|
| | |
|
| | |
|
|/ |
|
| |
|
| |
|
|\
| |
| | |
Improved consistency of Tree iterators
|
| |
| |
| |
| | |
Tree's mapping of names to entries has been made internal, and will only be built when necessary with the first call to Tree.File().
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Instead of returning a channel of files, Tree.Files() now returns a
FileIter with these qualities:
* It returns files in the original order of the repository (relying on a
* new Tree.OrderedNames property)
* It can return errors encountered when retrieving files and trees from
* underlying storage
* It can be Closed without having to drain the entire channel
* It defers the heavy lifting to a new TreeWalker type
* Its behavior is a little more consistent with other Iter types
* It's a little less prone to memory leaks
This update includes a new TreeWalker type that will iterate through all
of the entries of a tree and its descendant subtrees. It does the dirty
work that Tree.walkEntries() used to do, but with a public API.
A new TreeIter type is also included that just walks through subtrees.
This could be useful for performing a directory search while ignoring
files/blobs altogether.
|
| |
|
|\
| |
| | |
storages: memory object
|
|/ |
|
|\
| |
| | |
File paths will now be consistent across platforms
|
|/
|
|
|
|
|
|
| |
Previously go-git used filepath.Join when walking tree structures and constructing paths, but its results are platform-dependent as it will return different results on different systems. For example, it will use backslashes as a path separator on Windows. As a result the SuiteTree.TestFiles test was failing on Windows because the returned paths didn't match what was expected.
filepath.Join has been changed to path.Join, which will return consistent results for all platforms. This change makes it so that go-git will always return paths with forward-slash delimiters.
Users of the library should convert the resulting file paths into platform-compatible paths when necessary.
|
|\
| |
| | |
Iterable ObjectStorage interface for use in Repository struct
|
| | |
|
| |\ |
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | | |
object iterators
|
| |\ \ |
|
| | | | |
|
| | | | |
|