Improve command shutdown on context cancellation

This commit is contained in:
Michael Eischer committed 2024-04-22 22:31:38 +02:00
1 parent 910927670f
commit 31624aeffd
17 files changed
+80 -6

No files matched your search

+3
View File
@@ -713,6 +713,9 @@ func (r *Repository) LoadIndex(ctx context.Context, p *progress.Counter) error {
return errors.New("index uses feature not supported by repository version 1")
}
}
if ctx.Err() != nil {
return ctx.Err()
}
// remove index files from the cache which have been removed in the repo
return r.prepareCache()