aboutsummaryrefslogtreecommitdiffstats
path: root/plumbing/object/tree.go
Commit message (Collapse)AuthorAgeFilesLines
* fix panic in object.Tree.FindEntryniukuo2019-03-271-1/+1
| | | | Signed-off-by: niukuo <niukuo@gmail.com>
* tree: add a Size() method for getting plaintext sizeJeremy Stribling2018-10-111-0/+11
| | | | | | Without reading the entire object into memory. Signed-off-by: Jeremy Stribling <strib@alum.mit.edu>
* Merge pull request #885 from jsravn/findentry-return-file-not-foundMáximo Cuadros2018-07-161-3/+2
|\ | | | | plumbing: object, return ErrFileNotFound in FindEntry. Fixes #883
| * plumbing: object, expose ErrEntryNotFound in FindEntry. Fixes #883James Ravn2018-07-101-3/+2
| | | | | | | | | | | | | | | | | | FindEntry will return ErrDirNotFound if the directory doesn't exist. But it doesn't return a public error if the entry itself is missing. This exposes the internal error ErrEntryNotFound, so users can programmatically check for this condition. Signed-off-by: James Ravn <james@r-vn.org>
* | plumbing: add context to allow cancel on diff/patch computingMarc Barussaud2018-07-021-2/+18
|/ | | | Signed-off-by: Marc Barussaud <marc.barussaud@orange.com>
* plumbing: object, adds tree path cache to trees. Fixes #793Javi Fontan2018-06-061-1/+26
| | | | | | The cache is used in Tree.FindEntry for faster path search. Signed-off-by: Javi Fontan <jfontan@gmail.com>
* *: Use CheckClose with named returnsJavi Fontan2018-03-271-2/+2
| | | | | | | | Previously some close errors were losts. This is specially problematic in go-git as lots of work is done here like generating indexes and moving packfiles. Signed-off-by: Javi Fontan <jfontan@gmail.com>
* plumbing/object: do not eat error on tree decodeferhat elmas2017-11-211-2/+2
|
* plumbing: use `seen` map in tree walkerJeremy Stribling2017-08-271-5/+11
| | | | | | | This helps avoids iterating down the same trees for every commit. For a big-ish repo with 35K objects (17K commits), this reduced the time for calling `revlist.Objects` during a push (with 0 hashes to ignore) from more than ten minutes to less than a minute.
* format/diff: unified diff encoder and public APIAntonio Jesus Navarro Perez2017-05-231-0/+11
| | | | | | | | | - Added Patch interface - Added a Unified Diff encoder from Patches - Added Change method to generate Patches - Added Changes method to generate Patches - Added Tree method to generate Patches - Added Commit method to generate Patches
* plumbing: MemoryObject.Writer tracks his own sizeMáximo Cuadros2017-05-041-11/+3
|
* worktree, reset implementation and status improvementsMáximo Cuadros2017-04-121-1/+1
|
* plumbing: object, public Tree.FindEntry and minor diff changesMáximo Cuadros2017-04-111-3/+5
|
* project: move imports from srcd.works to gopkg.inAntonio Jesus Navarro Perez2017-03-071-4/+4
| | | | To be able to fix #261 we will move again to gopkg.in before v4 stable release.
* replace os.FileMode use with filemode.FileModeAlberto Cortés2017-03-011-36/+8
|
* Added documentation to Diff methodAntonio Jesus Navarro Perez2017-02-241-0/+1
|
* plumbing/object: move difftree to object packageAntonio Jesus Navarro Perez2017-02-241-0/+4
| | | | | - To avoid ciclic dependency errors, we move all the difftree files to object package. - Added Diff method to Tree object.
* difftree: ignore permissions changes between regular filesAlberto Cortés2017-02-221-5/+6
| | | | Fix issue #279.
* plumbing/object: allow TreeIter return SubModule entriesMáximo Cuadros2017-02-131-5/+0
|
* doc: improve object iterators godoc.Santiago M. Mola2017-02-071-5/+6
|
* new srcd.works/go-git.v4 pathMáximo Cuadros2017-01-301-3/+3
|
* Worktree correct FileMode at index entriesMáximo Cuadros2017-01-301-11/+11
|
* object: modes in TreeEntry as os.FileMode, and not the git internalMáximo Cuadros2017-01-281-4/+12
|
* adds Tree method to Tree (#224)Alberto Cortés2017-01-261-5/+23
| | | | | | | | This patch adds a new method to the Tree object that allows you to get a child tree from a parent tree by its relative name. Before this patch, this was only possible with files, using the File method. The new Tree method has a similar signature to the old File method for consistency.
* move plumbing from top level package to plumbing (#183)Santiago M. Mola2016-12-141-0/+449
* plumbing: rename Object -> EncodedObject. * plumbing/storer: rename ObjectStorer -> EncodedObjectStorer. * move difftree to plumbing/difftree. * move diff -> utils/diff * make Object/Tag/Blob/Tree/Commit/File depend on storer. * Object and its implementations now depend only on storer.EncodedObjectStorer, not git.Repository. * Tests are decoupled accordingly. * move Object/Commit/File/Tag/Tree to plumbing/object. * move Object/Commit/File/Tag/Tree to plumbing/object. * move checkClose to utils/ioutil. * move RevListObjects to plumbing/revlist.Objects. * move DiffTree to plumbing/difftree package. * rename files with plural nouns to singular * plumbing/object: add GetBlob/GetCommit/GetTag/GetTree.