GitSharp.Core.DirectoryCache.DirCache.replace C# (CSharp) Method

replace() public method

public replace ( DirCacheEntry e, int cnt ) : void
e DirCacheEntry
cnt int
return void
		public void replace(DirCacheEntry[] e, int cnt)
		{
			_sortedEntries = e;
			_entryCnt = cnt;
			_cacheTree = null;
		}

Usage Example

Example #1
0
 ///	<summary>
 /// Update the DirCache with the contents of <seealso cref="Entries"/>.
 ///	<para />
 /// This method should be invoked only during an implementation of
 /// <seealso cref="finish()"/>, and only after <seealso cref="Entries"/> is sorted.
 /// </summary>
 protected void Replace()
 {
     if (_entryCnt < _entries.Length / 2)
     {
         var n = new DirCacheEntry[_entryCnt];
         Array.Copy(_entries, 0, n, 0, _entryCnt);
         _entries = n;
     }
     _cache.replace(_entries, _entryCnt);
 }