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
1 changed files with 5 additions and 1 deletions

View File

@ -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)
}
}