Fix typos

This commit is contained in:
Viktor Szépe authored and Michael Eischer committed 2024-07-03 20:02:06 +02:00
1 parent a72b418319
commit ac00229386
23 files changed
+56 -56

No files matched your search

@@ -128,7 +128,7 @@ func TestAssociatedSetWithExtendedIndex(t *testing.T) {
mi.StorePack(blob2.PackID, []restic.Blob{blob2.Blob})
test.OK(t, mi.SaveIndex(context.TODO(), &noopSaver{}))
// non-existant
// non-existent
test.Equals(t, false, bs.Has(of))
// set
bs.Set(of, 5)
+1 -1
View File
@@ -156,7 +156,7 @@ func TestIndexMapFirstIndex(t *testing.T) {
for i := 1; i <= 400; i++ {
r.Read(id[:])
rtest.Equals(t, -1, m.firstIndex(id), "wrong firstIndex for nonexistant id")
rtest.Equals(t, -1, m.firstIndex(id), "wrong firstIndex for nonexistent id")
m.add(id, 0, 0, 0, 0)
idx := m.firstIndex(id)
+4 -4
View File
@@ -25,9 +25,9 @@ type PruneOptions struct {
MaxUnusedBytes func(used uint64) (unused uint64) // calculates the number of unused bytes after repacking, according to MaxUnused
MaxRepackBytes uint64
RepackCachableOnly bool
RepackSmall bool
RepackUncompressed bool
RepackCacheableOnly bool
RepackSmall bool
RepackUncompressed bool
}
type PruneStats struct {
@@ -381,7 +381,7 @@ func decidePackAction(ctx context.Context, opts PruneOptions, repo *Repository,
stats.Blobs.Remove += p.unusedBlobs
stats.Size.Remove += p.unusedSize
case opts.RepackCachableOnly && p.tpe == restic.DataBlob:
case opts.RepackCacheableOnly && p.tpe == restic.DataBlob:
// if this is a data pack and --repack-cacheable-only is set => keep pack!
stats.Packs.Keep++
+3 -3
View File
@@ -80,9 +80,9 @@ func TestPrune(t *testing.T) {
{
name: "cachableonly",
opts: repository.PruneOptions{
MaxRepackBytes: math.MaxUint64,
MaxUnusedBytes: func(used uint64) (unused uint64) { return used / 20 },
RepackCachableOnly: true,
MaxRepackBytes: math.MaxUint64,
MaxUnusedBytes: func(used uint64) (unused uint64) { return used / 20 },
RepackCacheableOnly: true,
},
},
{