C# 클래스 GitSharp.Core.DirectoryCache.DirCacheTree

Single tree record from the 'TREE' DirCache extension. A valid cache tree record contains the object id of a tree object and the total number of DirCacheEntry instances (counted recursively) from the DirCache contained within the tree. This information facilitates faster traversal of the index and quicker generation of tree objects prior to creating a new commit. An invalid cache tree record indicates a known subtree whose file entries have changed in ways that cause the tree to no longer have a known object id. Invalid cache tree records must be revalidated prior to use.
파일 보기 프로젝트 열기: stschake/GitSharp 1 사용 예제들

공개 메소드들

메소드 설명
DirCacheTree ( ) : System
DirCacheTree ( byte @in, MutableInteger off, DirCacheTree myParent ) : System
contains ( byte a, int aOff, int aLen ) : bool
getChild ( int i ) : DirCacheTree

Get the i-th child cache tree.

getChildCount ( ) : int

Get the number of cached subtrees contained within this tree.

getEntrySpan ( ) : int

Get the number of entries this tree spans within the DirCache. If this tree is not valid (see isValid()) this method's return value is always strictly negative (less than 0) but is otherwise an undefined result.

getNameString ( ) : string

Get the tree's name within its parent. This method is not very efficient and is primarily meant for debugging and final output generation. Applications should try to avoid calling it, and if invoked do so only once per interesting entry, where the name is absolutely required for correct function.

getObjectId ( ) : ObjectId
getPathString ( ) : string

Get the tree's path within the repository. This method is not very efficient and is primarily meant for debugging and final output generation. Applications should try to avoid calling it, and if invoked do so only once per interesting entry, where the name is absolutely required for correct function.

isValid ( ) : bool

Determine if this cache is currently valid. A valid cache tree knows how many DirCacheEntry instances from the parent DirCache reside within this tree (recursively enumerated). It also knows the object id of the tree, as the tree should be readily available from the repository's object database.

nameLength ( ) : int
validate ( DirCacheEntry cache, int cCnt, int cIdx, int pathOff ) : void

Update (if necessary) this tree's entrySpan.

write ( byte tmp, TemporaryBuffer os ) : void
writeTree ( DirCacheEntry cacheEntry, int cIdx, int pathOffset, ObjectWriter ow ) : ObjectId

Write (if necessary) this tree to the object store.

비공개 메소드들

메소드 설명
AppendName ( StringBuilder sb ) : void
ComputeSize ( DirCacheEntry cache, int cIdx, int pathOffset, ObjectWriter ow ) : int
DirCacheTree ( DirCacheTree myParent, byte path, int pathOff, int pathLen ) : System
InsertChild ( int stIdx, DirCacheTree st ) : void
NameComparison ( byte a, int aPos, DirCacheTree ct ) : int
RemoveChild ( int stIdx ) : void
Slash ( byte a, int aPos ) : int
peq ( byte a, byte b, int aLen ) : bool

메소드 상세

DirCacheTree() 공개 메소드

public DirCacheTree ( ) : System
리턴 System

DirCacheTree() 공개 메소드

public DirCacheTree ( byte @in, MutableInteger off, DirCacheTree myParent ) : System
@in byte
off GitSharp.Core.Util.MutableInteger
myParent DirCacheTree
리턴 System

contains() 공개 메소드

public contains ( byte a, int aOff, int aLen ) : bool
a byte
aOff int
aLen int
리턴 bool

getChild() 공개 메소드

Get the i-th child cache tree.
public getChild ( int i ) : DirCacheTree
i int Index of the child to obtain.
리턴 DirCacheTree

getChildCount() 공개 메소드

Get the number of cached subtrees contained within this tree.
public getChildCount ( ) : int
리턴 int

getEntrySpan() 공개 메소드

Get the number of entries this tree spans within the DirCache. If this tree is not valid (see isValid()) this method's return value is always strictly negative (less than 0) but is otherwise an undefined result.
public getEntrySpan ( ) : int
리턴 int

getNameString() 공개 메소드

Get the tree's name within its parent. This method is not very efficient and is primarily meant for debugging and final output generation. Applications should try to avoid calling it, and if invoked do so only once per interesting entry, where the name is absolutely required for correct function.
public getNameString ( ) : string
리턴 string

getObjectId() 공개 메소드

public getObjectId ( ) : ObjectId
리턴 ObjectId

getPathString() 공개 메소드

Get the tree's path within the repository. This method is not very efficient and is primarily meant for debugging and final output generation. Applications should try to avoid calling it, and if invoked do so only once per interesting entry, where the name is absolutely required for correct function.
public getPathString ( ) : string
리턴 string

isValid() 공개 메소드

Determine if this cache is currently valid. A valid cache tree knows how many DirCacheEntry instances from the parent DirCache reside within this tree (recursively enumerated). It also knows the object id of the tree, as the tree should be readily available from the repository's object database.
public isValid ( ) : bool
리턴 bool

nameLength() 공개 메소드

public nameLength ( ) : int
리턴 int

validate() 공개 메소드

Update (if necessary) this tree's entrySpan.
public validate ( DirCacheEntry cache, int cCnt, int cIdx, int pathOff ) : void
cache DirCacheEntry the complete cache from DirCache.
cCnt int /// Number of entries in cache that are valid for /// iteration. ///
cIdx int /// First position of cache that is a member of this /// tree. The path of cache[cacheIdx].path for the /// range [0,pathOff-1) matches the complete path of /// this tree, from the root of the repository. ///
pathOff int /// number of bytes of cache[cacheIdx].path that /// matches this tree's path. The value at array position /// cache[cacheIdx].path[pathOff-1] is always '/' if /// pathOff is > 0. ///
리턴 void

write() 공개 메소드

public write ( byte tmp, TemporaryBuffer os ) : void
tmp byte
os GitSharp.Core.Util.TemporaryBuffer
리턴 void

writeTree() 공개 메소드

Write (if necessary) this tree to the object store.
/// one or more paths contain higher-order stages (stage > 0), /// which cannot be stored in a tree object. /// /// an unexpected error occurred writing to the object store. ///
public writeTree ( DirCacheEntry cacheEntry, int cIdx, int pathOffset, ObjectWriter ow ) : ObjectId
cacheEntry DirCacheEntry the complete cache from DirCache.
cIdx int /// first position of cache that is a member of this /// tree. The path of cache[cacheIdx].path for the /// range [0,pathOff-1) matches the complete path of /// this tree, from the root of the repository.
pathOffset int /// number of bytes of cache[cacheIdx].path that /// matches this tree's path. The value at array position /// cache[cacheIdx].path[pathOff-1] is always '/' if /// pathOff is > 0. ///
ow ObjectWriter /// the writer to use when serializing to the store. ///
리턴 ObjectId