From d966c527077005c17571f9778d77fdc876a6d397 Mon Sep 17 00:00:00 2001
From: Michael Eischer <michael.eischer@fau.de>
Date: Sat, 22 Oct 2022 18:10:17 +0200
Subject: [PATCH] prune: allow gc of set of repacked blobs before index rebuild

---
 cmd/restic/cmd_prune.go | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/cmd/restic/cmd_prune.go b/cmd/restic/cmd_prune.go
index 46d62460b..7918b2294 100644
--- a/cmd/restic/cmd_prune.go
+++ b/cmd/restic/cmd_prune.go
@@ -720,6 +720,9 @@ func doPrune(ctx context.Context, opts PruneOptions, gopts GlobalOptions, repo r
 				"https://github.com/restic/restic/issues/new/choose\n", plan.keepBlobs)
 			return errors.Fatal("internal error: blobs were not repacked")
 		}
+
+		// allow GC of the blob set
+		plan.keepBlobs = nil
 	}
 
 	if len(plan.ignorePacks) == 0 {