This repository was archived by the owner on Dec 5, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +17
-3
lines changed Expand file tree Collapse file tree 1 file changed +17
-3
lines changed Original file line number Diff line number Diff line change @@ -200,7 +200,7 @@ public interface IGitClient
200
200
ITask < string > DiscardAll ( IOutputProcessor < string > processor = null ) ;
201
201
202
202
/// <summary>
203
- /// Executes `git reset HEAD` command to remove files from the git index.
203
+ /// Executes at least one `git reset HEAD` command to remove files from the git index.
204
204
/// </summary>
205
205
/// <param name="files">The files to remove</param>
206
206
/// <param name="processor">A custom output processor instance</param>
@@ -549,8 +549,22 @@ public ITask<string> DiscardAll(IOutputProcessor<string> processor = null)
549
549
public ITask < string > Remove ( IList < string > files ,
550
550
IOutputProcessor < string > processor = null )
551
551
{
552
- return new GitRemoveFromIndexTask ( files , cancellationToken , processor )
553
- . Configure ( processManager ) ;
552
+ GitRemoveFromIndexTask last = null ;
553
+ foreach ( var batch in files . Spool ( 5000 ) )
554
+ {
555
+ var current = new GitRemoveFromIndexTask ( batch , cancellationToken , processor ) . Configure ( processManager ) ;
556
+ if ( last == null )
557
+ {
558
+ last = current ;
559
+ }
560
+ else
561
+ {
562
+ last . Then ( current ) ;
563
+ last = current ;
564
+ }
565
+ }
566
+
567
+ return last ;
554
568
}
555
569
556
570
///<inheritdoc/>
You can’t perform that action at this time.
0 commit comments