You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After files got added to an index, getStatus doesn't regard them as it still returns them as "new".
Idea 1: Optionally pass an Index to getStatus to filter out these files
While WIP
test.only('test1',async(t)=>{constrepoPath=getRandomPath();constsubdir=join(repoPath,'subdir1','subdir2');constfileSample=10;letrepo: Repository;awaitRepository.initExt(repoPath).then((repoResult: Repository)=>{repo=repoResult;constaddedFiles: string[]=[];constindex=repo.ensureMainIndex();fse.ensureDirSync(subdir);t.log("Write 'subdir1/subdir2/foo' with 9 bytes");for(leti=0;i<fileSample;i){constrelPath=join(subdir,`foo${i}`);addedFiles.push(relPath);fse.writeFileSync(relPath,i.toString());}index.addFiles(addedFiles);returnindex.writeFiles();}).then(()=>{t.log('getStatus on all elements, including directories');returnrepo.getStatus(FILTER.ALL);}).then((statuses: StatusEntry[])=>{t.is(statuses.length,0);// <-- the files were already written to the index, this should be 0});});
The text was updated successfully, but these errors were encountered:
After files got added to an index,
getStatus
doesn't regard them as it still returns them as "new".Idea 1: Optionally pass an Index to getStatus to filter out these files
While WIP
The text was updated successfully, but these errors were encountered: