aboutsummaryrefslogtreecommitdiffstats
path: root/storage/filesystem/object.go
diff options
context:
space:
mode:
Diffstat (limited to 'storage/filesystem/object.go')
-rw-r--r--storage/filesystem/object.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/storage/filesystem/object.go b/storage/filesystem/object.go
index 6cd2d4c..57dcbb4 100644
--- a/storage/filesystem/object.go
+++ b/storage/filesystem/object.go
@@ -61,6 +61,11 @@ func (s *ObjectStorage) requireIndex() error {
return nil
}
+// Reindex indexes again all packfiles. Useful if git changed packfiles externally
+func (s *ObjectStorage) Reindex() {
+ s.index = nil
+}
+
func (s *ObjectStorage) loadIdxFile(h plumbing.Hash) (err error) {
f, err := s.dir.ObjectPackIdx(h)
if err != nil {