implement progress bar for index loading

This commit is contained in:
arjunajesh authored and Michael Eischer committed 2023-10-01 19:52:59 +02:00
1 parent eac1c4a8d0
commit ed65a7dbca
24 files changed
+80 -37

No files matched your search

+4 -3
View File
@@ -99,12 +99,13 @@ func runCopy(ctx context.Context, opts CopyOptions, gopts GlobalOptions, args []
}
debug.Log("Loading source index")
if err := srcRepo.LoadIndex(ctx); err != nil {
bar := newProgressMax(!gopts.Quiet, 0, "index files loaded")
if err := srcRepo.LoadIndex(ctx, bar); err != nil {
return err
}
bar = newProgressMax(!gopts.Quiet, 0, "index files loaded")
debug.Log("Loading destination index")
if err := dstRepo.LoadIndex(ctx); err != nil {
if err := dstRepo.LoadIndex(ctx, bar); err != nil {
return err
}