Use "pack file" instead of "data file" (#2885)

- changed variable names, especially changed DataFile into PackFile
- changed in some comments
- always use "pack file" in docu
This commit is contained in:
aawsome
2020-08-16 11:16:38 +02:00
committed by GitHub
parent 643bbbe156
commit 0fed6a8dfc
45 changed files with 126 additions and 126 deletions

View File

@@ -236,7 +236,7 @@ func (c *Checker) Packs(ctx context.Context, errChan chan<- error) {
debug.Log("listing repository packs")
repoPacks := restic.NewIDSet()
err := c.repo.List(ctx, restic.DataFile, func(id restic.ID, size int64) error {
err := c.repo.List(ctx, restic.PackFile, func(id restic.ID, size int64) error {
repoPacks.Insert(id)
return nil
})
@@ -701,7 +701,7 @@ func (c *Checker) GetPacks() restic.IDSet {
// checkPack reads a pack and checks the integrity of all blobs.
func checkPack(ctx context.Context, r restic.Repository, id restic.ID) error {
debug.Log("checking pack %v", id)
h := restic.Handle{Type: restic.DataFile, Name: id.String()}
h := restic.Handle{Type: restic.PackFile, Name: id.String()}
packfile, hash, size, err := repository.DownloadAndHash(ctx, r.Backend(), h)
if err != nil {

View File

@@ -82,7 +82,7 @@ func TestMissingPack(t *testing.T) {
repo := repository.TestOpenLocal(t, repodir)
packHandle := restic.Handle{
Type: restic.DataFile,
Type: restic.PackFile,
Name: "657f7fb64f6a854fff6fe9279998ee09034901eded4e6db9bcee0e59745bbce6",
}
test.OK(t, repo.Backend().Remove(context.TODO(), packHandle))