From fd4d23460f387d75cf8842e74765e07c55376e02 Mon Sep 17 00:00:00 2001 From: Michael Eischer Date: Fri, 4 Nov 2022 22:40:07 +0100 Subject: [PATCH] only print compression level starting from repository version 2 --- cmd/restic/global.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cmd/restic/global.go b/cmd/restic/global.go index 96c640f76..b4da9dfbe 100644 --- a/cmd/restic/global.go +++ b/cmd/restic/global.go @@ -498,7 +498,11 @@ func OpenRepository(ctx context.Context, opts GlobalOptions) (*repository.Reposi id = id[:8] } if !opts.JSON { - Verbosef("repository %v opened (version %v, compression level %v)\n", id, s.Config().Version, opts.Compression.String()) + extra := "" + if s.Config().Version >= 2 { + extra = ", compression level " + opts.Compression.String() + } + Verbosef("repository %v opened (version %v%s)\n", id, s.Config().Version, extra) } }