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
200200 ITask < string > DiscardAll ( IOutputProcessor < string > processor = null ) ;
201201
202202 /// <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.
204204 /// </summary>
205205 /// <param name="files">The files to remove</param>
206206 /// <param name="processor">A custom output processor instance</param>
@@ -549,8 +549,22 @@ public ITask<string> DiscardAll(IOutputProcessor<string> processor = null)
549549 public ITask < string > Remove ( IList < string > files ,
550550 IOutputProcessor < string > processor = null )
551551 {
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 ;
554568 }
555569
556570 ///<inheritdoc/>
You can’t perform that action at this time.
0 commit comments