If pathPrefix is "a/b" and the tree contains file "c" then the resulting DirCacheEntry will have the path "a/b/c".
All entries are inserted at stage 0, therefore assuming that the application will not insert any other paths with the same pathPrefix.
@param pathPrefix UTF-8 encoded prefix to mount the tree's entries at. If the path does not end with '/' one will be automatically inserted as necessary.
@param stage stage of the entries when adding them.
@param reader reader the tree(s) will be read from during recursive traversal. This must be the same repository that the resulting DirCache would be written out to (or used in) otherwise the caller is simply asking for deferred MissingObjectExceptions. Caller is responsible for releasing this reader when done.
@param tree the tree to recursively add. This tree's contents will appear under pathPrefix
. The ObjectId must be that of a tree; the caller is responsible for dereferencing a tag or commit (if necessary).
@throws IOException a tree cannot be read to iterate through its entries.
The position of this tree is returned to the caller, in case the caller has lost track of the order they added the trees into the walker.
The tree must have the same root as existing trees in the walk. @param id identity of the tree object the caller wants walked. @return position of this tree within the walker. @throws MissingObjectException the given tree object does not exist in this repository. @throws IncorrectObjectTypeException the given object id does not denote a tree, but instead names some other non-tree type of object. Note that commits are not trees, even if they are sometimes called a "tree-ish". @throws CorruptObjectException the object claimed to be a tree, but its contents did not appear to be a tree. The repository may have data corruption. @throws IOException a loose object or pack file could not be read.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|