aboutsummaryrefslogtreecommitdiffstats
path: root/tree.go
Commit message (Collapse)AuthorAgeFilesLines
* Tree.Entries is now a sliceJoshua Sjoding2016-02-171-20/+21
| | | | 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().
* New iteration behavior via FileIter and TreeWalkerJoshua Sjoding2016-02-171-49/+65
| | | | | | | | | | | | | | | | | | | | | | 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.
* update imports to v3Máximo Cuadros2016-02-171-1/+1
|
* storages: memory objectMáximo Cuadros2016-02-171-0/+4
|
* File paths will now be consistent across platformsJoshua Sjoding2016-02-161-3/+3
| | | | | | | | 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.
* Functions in core.ObjectStorage interface now return an errorJoshua Sjoding2016-02-161-9/+19
|
* Repository now works against the generic ObjectStore interfaceJoshua Sjoding2016-01-231-8/+9
|
* Merge pull request #15 from alcortesm/performance-increase-for-big-reposMáximo Cuadros2016-01-211-9/+11
|\ | | | | Performance increase for big repos
| * performance increase for repos with many files and directoriesAlberto Cortés2016-01-211-9/+11
| |
* | Readability improvementsAlberto Cortés2016-01-211-2/+4
|/
* Fix commit.File() gorutine leakAlberto Cortés2016-01-211-0/+80
| | | | | | | | | | | | 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.
* Ignore submodule dirs (empty directories without associated object), add ↵Alberto Cortés2016-01-081-1/+5
| | | | empty dir test
* fix PR#7 commentsAlberto Cortés2015-12-041-6/+0
|
* Blame support for filesAlberto Cortés2015-11-251-1/+2
| | | | | | | | 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.
* internal -> coreMáximo Cuadros2015-10-311-7/+7
|
* tree and commitMáximo Cuadros2015-10-271-0/+122