aboutsummaryrefslogtreecommitdiffstats
path: root/storage/filesystem/internal/dotgit/writers.go
diff options
context:
space:
mode:
Diffstat (limited to 'storage/filesystem/internal/dotgit/writers.go')
-rw-r--r--storage/filesystem/internal/dotgit/writers.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/storage/filesystem/internal/dotgit/writers.go b/storage/filesystem/internal/dotgit/writers.go
index a7525d4..46d3619 100644
--- a/storage/filesystem/internal/dotgit/writers.go
+++ b/storage/filesystem/internal/dotgit/writers.go
@@ -92,7 +92,7 @@ func (w *PackWriter) Write(p []byte) (int, error) {
// was written, the tempfiles are deleted without writing a packfile.
func (w *PackWriter) Close() error {
defer func() {
- if w.Notify != nil {
+ if w.Notify != nil && w.index != nil && w.index.Size() > 0 {
w.Notify(w.checksum, w.index)
}