aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorn-peugnet <n.peugnet@free.fr>2021-10-06 11:34:14 +0200
committern-peugnet <n.peugnet@free.fr>2021-10-06 11:34:14 +0200
commitfccc89de47a3ed5fc576f28f7f02b1111a59c0c4 (patch)
tree9de36f7e6eab07c78d59428b2345aceab34df9cd
parent9b9710511b0dbe51ac030ef908f9468103b0bd0a (diff)
downloaddna-backup-fccc89de47a3ed5fc576f28f7f02b1111a59c0c4.tar.gz
dna-backup-fccc89de47a3ed5fc576f28f7f02b1111a59c0c4.zip
refactor: move repo and delta in their own package
-rw-r--r--delta/delta.go (renamed from delta.go)2
-rw-r--r--main.go5
-rw-r--r--main_test.go21
-rw-r--r--repo/chunk.go (renamed from chunk.go)2
-rw-r--r--repo/const.go (renamed from const.go)2
-rw-r--r--repo/nowindows_test.go (renamed from nowindows_test.go)2
-rw-r--r--repo/repo.go (renamed from repo.go)15
-rw-r--r--repo/repo_test.go (renamed from repo_test.go)37
-rw-r--r--repo/testdata/.gitattributes (renamed from testdata/.gitattributes)0
-rw-r--r--repo/testdata/logs/1/logTest.log (renamed from testdata/logs/1/logTest.log)0
-rw-r--r--repo/testdata/logs/2/csvParserTest.log (renamed from testdata/logs/2/csvParserTest.log)0
-rw-r--r--repo/testdata/logs/2/slipdb.log (renamed from testdata/logs/2/slipdb.log)0
-rw-r--r--repo/testdata/logs/3/indexingTreeTest.log (renamed from testdata/logs/3/indexingTreeTest.log)0
-rw-r--r--repo/testdata/repo_8k/00000/chunks/000000000000000 (renamed from testdata/repo_8k/00000/chunks/000000000000000)0
-rw-r--r--repo/testdata/repo_8k/00000/chunks/000000000000001 (renamed from testdata/repo_8k/00000/chunks/000000000000001)0
-rw-r--r--repo/testdata/repo_8k/00000/chunks/000000000000002 (renamed from testdata/repo_8k/00000/chunks/000000000000002)0
-rw-r--r--repo/testdata/repo_8k/00000/chunks/000000000000003 (renamed from testdata/repo_8k/00000/chunks/000000000000003)0
-rw-r--r--repo/testdata/repo_8k/00000/chunks/000000000000004 (renamed from testdata/repo_8k/00000/chunks/000000000000004)0
-rw-r--r--repo/testdata/repo_8k/00000/chunks/000000000000005 (renamed from testdata/repo_8k/00000/chunks/000000000000005)0
-rw-r--r--repo/testdata/repo_8k/00000/chunks/000000000000006 (renamed from testdata/repo_8k/00000/chunks/000000000000006)0
-rw-r--r--repo/testdata/repo_8k/00000/chunks/000000000000007 (renamed from testdata/repo_8k/00000/chunks/000000000000007)0
-rw-r--r--repo/testdata/repo_8k/00000/chunks/000000000000008 (renamed from testdata/repo_8k/00000/chunks/000000000000008)0
-rw-r--r--repo/testdata/repo_8k/00000/chunks/000000000000009 (renamed from testdata/repo_8k/00000/chunks/000000000000009)0
-rw-r--r--repo/testdata/repo_8k/00000/chunks/000000000000010 (renamed from testdata/repo_8k/00000/chunks/000000000000010)0
-rw-r--r--repo/testdata/repo_8k/00000/chunks/000000000000011 (renamed from testdata/repo_8k/00000/chunks/000000000000011)0
-rw-r--r--repo/testdata/repo_8k/00000/chunks/000000000000012 (renamed from testdata/repo_8k/00000/chunks/000000000000012)0
-rw-r--r--repo/testdata/repo_8k/00000/files (renamed from testdata/repo_8k/00000/files)bin379 -> 379 bytes
-rw-r--r--repo/testdata/repo_8k/00000/hashes (renamed from testdata/repo_8k/00000/hashes)bin570 -> 570 bytes
-rw-r--r--repo/testdata/repo_8k/00000/recipe (renamed from testdata/repo_8k/00000/recipe)bin6783 -> 6783 bytes
-rw-r--r--repo/testdata/repo_8k_zlib/00000/chunks/000000000000000 (renamed from testdata/repo_8k_zlib/00000/chunks/000000000000000)bin1077 -> 1077 bytes
-rw-r--r--repo/testdata/repo_8k_zlib/00000/chunks/000000000000001 (renamed from testdata/repo_8k_zlib/00000/chunks/000000000000001)bin985 -> 985 bytes
-rw-r--r--repo/testdata/repo_8k_zlib/00000/chunks/000000000000002 (renamed from testdata/repo_8k_zlib/00000/chunks/000000000000002)bin1118 -> 1118 bytes
-rw-r--r--repo/testdata/repo_8k_zlib/00000/chunks/000000000000003 (renamed from testdata/repo_8k_zlib/00000/chunks/000000000000003)bin1343 -> 1343 bytes
-rw-r--r--repo/testdata/repo_8k_zlib/00000/chunks/000000000000004 (renamed from testdata/repo_8k_zlib/00000/chunks/000000000000004)bin1366 -> 1366 bytes
-rw-r--r--repo/testdata/repo_8k_zlib/00000/chunks/000000000000005 (renamed from testdata/repo_8k_zlib/00000/chunks/000000000000005)bin1350 -> 1350 bytes
-rw-r--r--repo/testdata/repo_8k_zlib/00000/chunks/000000000000006 (renamed from testdata/repo_8k_zlib/00000/chunks/000000000000006)bin1360 -> 1360 bytes
-rw-r--r--repo/testdata/repo_8k_zlib/00000/chunks/000000000000007 (renamed from testdata/repo_8k_zlib/00000/chunks/000000000000007)bin1373 -> 1373 bytes
-rw-r--r--repo/testdata/repo_8k_zlib/00000/chunks/000000000000008 (renamed from testdata/repo_8k_zlib/00000/chunks/000000000000008)bin1254 -> 1254 bytes
-rw-r--r--repo/testdata/repo_8k_zlib/00000/chunks/000000000000009 (renamed from testdata/repo_8k_zlib/00000/chunks/000000000000009)bin1350 -> 1350 bytes
-rw-r--r--repo/testdata/repo_8k_zlib/00000/chunks/000000000000010 (renamed from testdata/repo_8k_zlib/00000/chunks/000000000000010)bin1173 -> 1173 bytes
-rw-r--r--repo/testdata/repo_8k_zlib/00000/chunks/000000000000011 (renamed from testdata/repo_8k_zlib/00000/chunks/000000000000011)bin1356 -> 1356 bytes
-rw-r--r--repo/testdata/repo_8k_zlib/00000/chunks/000000000000012 (renamed from testdata/repo_8k_zlib/00000/chunks/000000000000012)bin1252 -> 1252 bytes
-rw-r--r--repo/testdata/repo_8k_zlib/00000/files (renamed from testdata/repo_8k_zlib/00000/files)bin275 -> 275 bytes
-rw-r--r--repo/testdata/repo_8k_zlib/00000/hashes (renamed from testdata/repo_8k_zlib/00000/hashes)bin570 -> 570 bytes
-rw-r--r--repo/testdata/repo_8k_zlib/00000/recipe (renamed from testdata/repo_8k_zlib/00000/recipe)bin2638 -> 2638 bytes
-rw-r--r--tar.go3
46 files changed, 43 insertions, 46 deletions
diff --git a/delta.go b/delta/delta.go
index a127580..439da1d 100644
--- a/delta.go
+++ b/delta/delta.go
@@ -1,4 +1,4 @@
-package main
+package delta
import (
"io"
diff --git a/main.go b/main.go
index 51cfac2..f1bb1d8 100644
--- a/main.go
+++ b/main.go
@@ -6,6 +6,7 @@ import (
"os"
"github.com/n-peugnet/dna-backup/logger"
+ "github.com/n-peugnet/dna-backup/repo"
)
type command struct {
@@ -84,7 +85,7 @@ func commitMain(args []string) error {
}
source := args[0]
dest := args[1]
- repo := NewRepo(dest)
+ repo := repo.NewRepo(dest)
repo.Commit(source)
return nil
}
@@ -95,7 +96,7 @@ func restoreMain(args []string) error {
}
source := args[0]
dest := args[1]
- repo := NewRepo(source)
+ repo := repo.NewRepo(source)
repo.Restore(dest)
return nil
}
diff --git a/main_test.go b/main_test.go
index 27a3d65..06ab7d0 100644
--- a/main_test.go
+++ b/main_test.go
@@ -1,22 +1 @@
package main
-
-import (
- "log"
- "os"
- "testing"
-
- "github.com/n-peugnet/dna-backup/logger"
-)
-
-func TestMain(m *testing.M) {
- setup()
- code := m.Run()
- shutdown()
- os.Exit(code)
-}
-
-func setup() {
- logger.SetFlags(log.Lshortfile)
-}
-
-func shutdown() {}
diff --git a/chunk.go b/repo/chunk.go
index 3efaf4a..618cc9b 100644
--- a/chunk.go
+++ b/repo/chunk.go
@@ -1,4 +1,4 @@
-package main
+package repo
import (
"bytes"
diff --git a/const.go b/repo/const.go
index c40cb97..f4d79ae 100644
--- a/const.go
+++ b/repo/const.go
@@ -1,4 +1,4 @@
-package main
+package repo
const (
chunksName = "chunks"
diff --git a/nowindows_test.go b/repo/nowindows_test.go
index 2f2879c..28752ba 100644
--- a/nowindows_test.go
+++ b/repo/nowindows_test.go
@@ -1,6 +1,6 @@
// +build !windows
-package main
+package repo
import (
"bytes"
diff --git a/repo.go b/repo/repo.go
index 543f6c3..97d0b5c 100644
--- a/repo.go
+++ b/repo/repo.go
@@ -24,7 +24,7 @@ repo/
```
*/
-package main
+package repo
import (
"bufio"
@@ -40,6 +40,7 @@ import (
"github.com/chmduquesne/rollinghash/rabinkarp64"
"github.com/n-peugnet/dna-backup/cache"
+ "github.com/n-peugnet/dna-backup/delta"
"github.com/n-peugnet/dna-backup/logger"
"github.com/n-peugnet/dna-backup/sketch"
"github.com/n-peugnet/dna-backup/slice"
@@ -74,8 +75,8 @@ type Repo struct {
sketchSfCount int
sketchFCount int
pol rabinkarp64.Pol
- differ Differ
- patcher Patcher
+ differ delta.Differ
+ patcher delta.Patcher
fingerprints FingerprintMap
sketches SketchMap
recipe []Chunk
@@ -124,8 +125,8 @@ func NewRepo(path string) *Repo {
sketchSfCount: 3,
sketchFCount: 4,
pol: p,
- differ: Fdelta{},
- patcher: Fdelta{},
+ differ: delta.Fdelta{},
+ patcher: delta.Fdelta{},
fingerprints: make(FingerprintMap),
sketches: make(SketchMap),
chunkCache: cache.NewFifoCache(10000),
@@ -134,11 +135,11 @@ func NewRepo(path string) *Repo {
}
}
-func (r *Repo) Differ() Differ {
+func (r *Repo) Differ() delta.Differ {
return r.differ
}
-func (r *Repo) Patcher() Patcher {
+func (r *Repo) Patcher() delta.Patcher {
return r.patcher
}
diff --git a/repo_test.go b/repo/repo_test.go
index 9e7b09b..0d26ccd 100644
--- a/repo_test.go
+++ b/repo/repo_test.go
@@ -1,10 +1,11 @@
-package main
+package repo
import (
"bytes"
"fmt"
"io"
"io/ioutil"
+ "log"
"os"
"path/filepath"
"strings"
@@ -12,12 +13,26 @@ import (
"testing"
"github.com/chmduquesne/rollinghash/rabinkarp64"
+ "github.com/n-peugnet/dna-backup/delta"
"github.com/n-peugnet/dna-backup/logger"
"github.com/n-peugnet/dna-backup/sketch"
"github.com/n-peugnet/dna-backup/testutils"
"github.com/n-peugnet/dna-backup/utils"
)
+func TestMain(m *testing.M) {
+ setup()
+ code := m.Run()
+ shutdown()
+ os.Exit(code)
+}
+
+func setup() {
+ logger.SetFlags(log.Lshortfile)
+}
+
+func shutdown() {}
+
func chunkCompare(t *testing.T, dataDir string, repo *Repo, testFiles []string, chunkCount int) {
reader, writer := io.Pipe()
chunks := make(chan []byte)
@@ -290,8 +305,8 @@ func TestBsdiff(t *testing.T) {
defer os.Remove(addedFile2)
// configure repo
- repo.patcher = Bsdiff{}
- repo.differ = Bsdiff{}
+ repo.patcher = delta.Bsdiff{}
+ repo.differ = delta.Bsdiff{}
repo.chunkReadWrapper = utils.NopReadWrapper
repo.chunkWriteWrapper = utils.NopWriteWrapper
@@ -327,8 +342,8 @@ func TestCommit(t *testing.T) {
source := filepath.Join("testdata", "logs")
expected := filepath.Join("testdata", "repo_8k")
repo := NewRepo(dest)
- repo.patcher = Bsdiff{}
- repo.differ = Bsdiff{}
+ repo.patcher = delta.Bsdiff{}
+ repo.differ = delta.Bsdiff{}
repo.chunkReadWrapper = utils.NopReadWrapper
repo.chunkWriteWrapper = utils.NopWriteWrapper
@@ -341,8 +356,8 @@ func TestCommitZlib(t *testing.T) {
source := filepath.Join("testdata", "logs")
expected := filepath.Join("testdata", "repo_8k_zlib")
repo := NewRepo(dest)
- repo.patcher = Bsdiff{}
- repo.differ = Bsdiff{}
+ repo.patcher = delta.Bsdiff{}
+ repo.differ = delta.Bsdiff{}
repo.chunkReadWrapper = utils.ZlibReader
repo.chunkWriteWrapper = utils.ZlibWriter
@@ -357,8 +372,8 @@ func TestRestore(t *testing.T) {
source := filepath.Join("testdata", "repo_8k")
expected := filepath.Join("testdata", "logs")
repo := NewRepo(source)
- repo.patcher = Bsdiff{}
- repo.differ = Bsdiff{}
+ repo.patcher = delta.Bsdiff{}
+ repo.differ = delta.Bsdiff{}
repo.chunkReadWrapper = utils.NopReadWrapper
repo.chunkWriteWrapper = utils.NopWriteWrapper
@@ -373,8 +388,8 @@ func TestRestoreZlib(t *testing.T) {
source := filepath.Join("testdata", "repo_8k_zlib")
expected := filepath.Join("testdata", "logs")
repo := NewRepo(source)
- repo.patcher = Bsdiff{}
- repo.differ = Bsdiff{}
+ repo.patcher = delta.Bsdiff{}
+ repo.differ = delta.Bsdiff{}
repo.chunkReadWrapper = utils.ZlibReader
repo.chunkWriteWrapper = utils.ZlibWriter
diff --git a/testdata/.gitattributes b/repo/testdata/.gitattributes
index 6313b56..6313b56 100644
--- a/testdata/.gitattributes
+++ b/repo/testdata/.gitattributes
diff --git a/testdata/logs/1/logTest.log b/repo/testdata/logs/1/logTest.log
index 6bf31c3..6bf31c3 100644
--- a/testdata/logs/1/logTest.log
+++ b/repo/testdata/logs/1/logTest.log
diff --git a/testdata/logs/2/csvParserTest.log b/repo/testdata/logs/2/csvParserTest.log
index 328720a..328720a 100644
--- a/testdata/logs/2/csvParserTest.log
+++ b/repo/testdata/logs/2/csvParserTest.log
diff --git a/testdata/logs/2/slipdb.log b/repo/testdata/logs/2/slipdb.log
index 1f0e3b4..1f0e3b4 100644
--- a/testdata/logs/2/slipdb.log
+++ b/repo/testdata/logs/2/slipdb.log
diff --git a/testdata/logs/3/indexingTreeTest.log b/repo/testdata/logs/3/indexingTreeTest.log
index b115b45..b115b45 100644
--- a/testdata/logs/3/indexingTreeTest.log
+++ b/repo/testdata/logs/3/indexingTreeTest.log
diff --git a/testdata/repo_8k/00000/chunks/000000000000000 b/repo/testdata/repo_8k/00000/chunks/000000000000000
index ac78620..ac78620 100644
--- a/testdata/repo_8k/00000/chunks/000000000000000
+++ b/repo/testdata/repo_8k/00000/chunks/000000000000000
diff --git a/testdata/repo_8k/00000/chunks/000000000000001 b/repo/testdata/repo_8k/00000/chunks/000000000000001
index 3e728e2..3e728e2 100644
--- a/testdata/repo_8k/00000/chunks/000000000000001
+++ b/repo/testdata/repo_8k/00000/chunks/000000000000001
diff --git a/testdata/repo_8k/00000/chunks/000000000000002 b/repo/testdata/repo_8k/00000/chunks/000000000000002
index 079ca90..079ca90 100644
--- a/testdata/repo_8k/00000/chunks/000000000000002
+++ b/repo/testdata/repo_8k/00000/chunks/000000000000002
diff --git a/testdata/repo_8k/00000/chunks/000000000000003 b/repo/testdata/repo_8k/00000/chunks/000000000000003
index 8720f6b..8720f6b 100644
--- a/testdata/repo_8k/00000/chunks/000000000000003
+++ b/repo/testdata/repo_8k/00000/chunks/000000000000003
diff --git a/testdata/repo_8k/00000/chunks/000000000000004 b/repo/testdata/repo_8k/00000/chunks/000000000000004
index f05dda7..f05dda7 100644
--- a/testdata/repo_8k/00000/chunks/000000000000004
+++ b/repo/testdata/repo_8k/00000/chunks/000000000000004
diff --git a/testdata/repo_8k/00000/chunks/000000000000005 b/repo/testdata/repo_8k/00000/chunks/000000000000005
index 0134101..0134101 100644
--- a/testdata/repo_8k/00000/chunks/000000000000005
+++ b/repo/testdata/repo_8k/00000/chunks/000000000000005
diff --git a/testdata/repo_8k/00000/chunks/000000000000006 b/repo/testdata/repo_8k/00000/chunks/000000000000006
index 91c72a3..91c72a3 100644
--- a/testdata/repo_8k/00000/chunks/000000000000006
+++ b/repo/testdata/repo_8k/00000/chunks/000000000000006
diff --git a/testdata/repo_8k/00000/chunks/000000000000007 b/repo/testdata/repo_8k/00000/chunks/000000000000007
index f9f54db..f9f54db 100644
--- a/testdata/repo_8k/00000/chunks/000000000000007
+++ b/repo/testdata/repo_8k/00000/chunks/000000000000007
diff --git a/testdata/repo_8k/00000/chunks/000000000000008 b/repo/testdata/repo_8k/00000/chunks/000000000000008
index 5995b3c..5995b3c 100644
--- a/testdata/repo_8k/00000/chunks/000000000000008
+++ b/repo/testdata/repo_8k/00000/chunks/000000000000008
diff --git a/testdata/repo_8k/00000/chunks/000000000000009 b/repo/testdata/repo_8k/00000/chunks/000000000000009
index 8a0d0af..8a0d0af 100644
--- a/testdata/repo_8k/00000/chunks/000000000000009
+++ b/repo/testdata/repo_8k/00000/chunks/000000000000009
diff --git a/testdata/repo_8k/00000/chunks/000000000000010 b/repo/testdata/repo_8k/00000/chunks/000000000000010
index 97a481a..97a481a 100644
--- a/testdata/repo_8k/00000/chunks/000000000000010
+++ b/repo/testdata/repo_8k/00000/chunks/000000000000010
diff --git a/testdata/repo_8k/00000/chunks/000000000000011 b/repo/testdata/repo_8k/00000/chunks/000000000000011
index 5a30329..5a30329 100644
--- a/testdata/repo_8k/00000/chunks/000000000000011
+++ b/repo/testdata/repo_8k/00000/chunks/000000000000011
diff --git a/testdata/repo_8k/00000/chunks/000000000000012 b/repo/testdata/repo_8k/00000/chunks/000000000000012
index 612b2ee..612b2ee 100644
--- a/testdata/repo_8k/00000/chunks/000000000000012
+++ b/repo/testdata/repo_8k/00000/chunks/000000000000012
diff --git a/testdata/repo_8k/00000/files b/repo/testdata/repo_8k/00000/files
index 56431d4..56431d4 100644
--- a/testdata/repo_8k/00000/files
+++ b/repo/testdata/repo_8k/00000/files
Binary files differ
diff --git a/testdata/repo_8k/00000/hashes b/repo/testdata/repo_8k/00000/hashes
index ec622b2..ec622b2 100644
--- a/testdata/repo_8k/00000/hashes
+++ b/repo/testdata/repo_8k/00000/hashes
Binary files differ
diff --git a/testdata/repo_8k/00000/recipe b/repo/testdata/repo_8k/00000/recipe
index 66bde3d..66bde3d 100644
--- a/testdata/repo_8k/00000/recipe
+++ b/repo/testdata/repo_8k/00000/recipe
Binary files differ
diff --git a/testdata/repo_8k_zlib/00000/chunks/000000000000000 b/repo/testdata/repo_8k_zlib/00000/chunks/000000000000000
index 11c1cab..11c1cab 100644
--- a/testdata/repo_8k_zlib/00000/chunks/000000000000000
+++ b/repo/testdata/repo_8k_zlib/00000/chunks/000000000000000
Binary files differ
diff --git a/testdata/repo_8k_zlib/00000/chunks/000000000000001 b/repo/testdata/repo_8k_zlib/00000/chunks/000000000000001
index b212097..b212097 100644
--- a/testdata/repo_8k_zlib/00000/chunks/000000000000001
+++ b/repo/testdata/repo_8k_zlib/00000/chunks/000000000000001
Binary files differ
diff --git a/testdata/repo_8k_zlib/00000/chunks/000000000000002 b/repo/testdata/repo_8k_zlib/00000/chunks/000000000000002
index 15d2a66..15d2a66 100644
--- a/testdata/repo_8k_zlib/00000/chunks/000000000000002
+++ b/repo/testdata/repo_8k_zlib/00000/chunks/000000000000002
Binary files differ
diff --git a/testdata/repo_8k_zlib/00000/chunks/000000000000003 b/repo/testdata/repo_8k_zlib/00000/chunks/000000000000003
index d3c7997..d3c7997 100644
--- a/testdata/repo_8k_zlib/00000/chunks/000000000000003
+++ b/repo/testdata/repo_8k_zlib/00000/chunks/000000000000003
Binary files differ
diff --git a/testdata/repo_8k_zlib/00000/chunks/000000000000004 b/repo/testdata/repo_8k_zlib/00000/chunks/000000000000004
index be13110..be13110 100644
--- a/testdata/repo_8k_zlib/00000/chunks/000000000000004
+++ b/repo/testdata/repo_8k_zlib/00000/chunks/000000000000004
Binary files differ
diff --git a/testdata/repo_8k_zlib/00000/chunks/000000000000005 b/repo/testdata/repo_8k_zlib/00000/chunks/000000000000005
index a92e0a6..a92e0a6 100644
--- a/testdata/repo_8k_zlib/00000/chunks/000000000000005
+++ b/repo/testdata/repo_8k_zlib/00000/chunks/000000000000005
Binary files differ
diff --git a/testdata/repo_8k_zlib/00000/chunks/000000000000006 b/repo/testdata/repo_8k_zlib/00000/chunks/000000000000006
index 47e1d74..47e1d74 100644
--- a/testdata/repo_8k_zlib/00000/chunks/000000000000006
+++ b/repo/testdata/repo_8k_zlib/00000/chunks/000000000000006
Binary files differ
diff --git a/testdata/repo_8k_zlib/00000/chunks/000000000000007 b/repo/testdata/repo_8k_zlib/00000/chunks/000000000000007
index 2428c10..2428c10 100644
--- a/testdata/repo_8k_zlib/00000/chunks/000000000000007
+++ b/repo/testdata/repo_8k_zlib/00000/chunks/000000000000007
Binary files differ
diff --git a/testdata/repo_8k_zlib/00000/chunks/000000000000008 b/repo/testdata/repo_8k_zlib/00000/chunks/000000000000008
index 0524676..0524676 100644
--- a/testdata/repo_8k_zlib/00000/chunks/000000000000008
+++ b/repo/testdata/repo_8k_zlib/00000/chunks/000000000000008
Binary files differ
diff --git a/testdata/repo_8k_zlib/00000/chunks/000000000000009 b/repo/testdata/repo_8k_zlib/00000/chunks/000000000000009
index e89cb70..e89cb70 100644
--- a/testdata/repo_8k_zlib/00000/chunks/000000000000009
+++ b/repo/testdata/repo_8k_zlib/00000/chunks/000000000000009
Binary files differ
diff --git a/testdata/repo_8k_zlib/00000/chunks/000000000000010 b/repo/testdata/repo_8k_zlib/00000/chunks/000000000000010
index 140ca5f..140ca5f 100644
--- a/testdata/repo_8k_zlib/00000/chunks/000000000000010
+++ b/repo/testdata/repo_8k_zlib/00000/chunks/000000000000010
Binary files differ
diff --git a/testdata/repo_8k_zlib/00000/chunks/000000000000011 b/repo/testdata/repo_8k_zlib/00000/chunks/000000000000011
index b61efae..b61efae 100644
--- a/testdata/repo_8k_zlib/00000/chunks/000000000000011
+++ b/repo/testdata/repo_8k_zlib/00000/chunks/000000000000011
Binary files differ
diff --git a/testdata/repo_8k_zlib/00000/chunks/000000000000012 b/repo/testdata/repo_8k_zlib/00000/chunks/000000000000012
index 677a3a8..677a3a8 100644
--- a/testdata/repo_8k_zlib/00000/chunks/000000000000012
+++ b/repo/testdata/repo_8k_zlib/00000/chunks/000000000000012
Binary files differ
diff --git a/testdata/repo_8k_zlib/00000/files b/repo/testdata/repo_8k_zlib/00000/files
index 70ca423..70ca423 100644
--- a/testdata/repo_8k_zlib/00000/files
+++ b/repo/testdata/repo_8k_zlib/00000/files
Binary files differ
diff --git a/testdata/repo_8k_zlib/00000/hashes b/repo/testdata/repo_8k_zlib/00000/hashes
index ec622b2..ec622b2 100644
--- a/testdata/repo_8k_zlib/00000/hashes
+++ b/repo/testdata/repo_8k_zlib/00000/hashes
Binary files differ
diff --git a/testdata/repo_8k_zlib/00000/recipe b/repo/testdata/repo_8k_zlib/00000/recipe
index d8c788b..d8c788b 100644
--- a/testdata/repo_8k_zlib/00000/recipe
+++ b/repo/testdata/repo_8k_zlib/00000/recipe
Binary files differ
diff --git a/tar.go b/tar.go
index feb3b34..02b8957 100644
--- a/tar.go
+++ b/tar.go
@@ -6,9 +6,10 @@ import (
"os"
"github.com/n-peugnet/dna-backup/logger"
+ "github.com/n-peugnet/dna-backup/repo"
)
-func streamFilesTar(files []File, stream io.WriteCloser) {
+func streamFilesTar(files []repo.File, stream io.WriteCloser) {
tarStream := tar.NewWriter(stream)
for _, f := range files {
file, err := os.Open(f.Path)