From c0b1345d9a45190f47ce76d4cd91ab0400ffb697 Mon Sep 17 00:00:00 2001 From: Julio Lopez Date: Tue, 17 Dec 2019 16:58:17 -0800 Subject: [PATCH] Trivial: add clarifying comment --- repo/content/committed_content_index.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/repo/content/committed_content_index.go b/repo/content/committed_content_index.go index 44a0adec0..e881eb79d 100644 --- a/repo/content/committed_content_index.go +++ b/repo/content/committed_content_index.go @@ -89,6 +89,9 @@ func (b *committedContentIndex) packFilesChanged(packFiles []blob.ID) bool { return false } +// Uses packFiles for indexing and returns whether or not the set of index +// packs have changed compared to the previous set. An error is returned if the +// indices cannot be read for any reason. func (b *committedContentIndex) use(packFiles []blob.ID) (bool, error) { b.mu.Lock() defer b.mu.Unlock() @@ -124,7 +127,7 @@ func (b *committedContentIndex) use(packFiles []blob.ID) (bool, error) { log.Warningf("unable to expire unused content index files: %v", err) } - newMerged = nil + newMerged = nil // prevent closing newMerged indices return true, nil }