2
2
mirror of https://github.com/octoleo/restic.git synced 2024-12-23 11:28:54 +00:00

Merge pull request #4007 from MichaelEischer/hide-compression-level-for-v1-repo

Only print compression level starting from repository version 2
This commit is contained in:
Michael Eischer 2022-11-05 10:33:25 +01:00 committed by GitHub
commit d29abc1a31
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -498,7 +498,11 @@ func OpenRepository(ctx context.Context, opts GlobalOptions) (*repository.Reposi
id = id[:8] id = id[:8]
} }
if !opts.JSON { 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)
} }
} }