Skip to content

Commit 40f4ce8

Browse files
committed
check: remove unused TarCheck(), for Compare()
Signed-off-by: Vincent Batts <[email protected]>
1 parent abf4d54 commit 40f4ce8

File tree

2 files changed

+4
-14
lines changed

2 files changed

+4
-14
lines changed

check.go

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,3 @@ func Check(root string, dh *DirectoryHierarchy, keywords []Keyword, fs FsEval) (
1818

1919
return Compare(dh, newDh, keywords)
2020
}
21-
22-
// TarCheck is the tar equivalent of checking a file hierarchy spec against a
23-
// tar stream to determine if files have been changed. This is precisely
24-
// equivalent to Compare(dh, tarDH, keywords).
25-
func TarCheck(tarDH, dh *DirectoryHierarchy, keywords []Keyword) ([]InodeDelta, error) {
26-
if keywords == nil {
27-
return Compare(dh, tarDH, dh.UsedKeywords())
28-
}
29-
return Compare(dh, tarDH, keywords)
30-
}

tar_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ func TestTar(t *testing.T) {
109109
t.Fatal(err)
110110
}
111111

112-
res, err := TarCheck(tdh, dh, append(DefaultKeywords, "sha1"))
112+
res, err := Compare(tdh, dh, append(DefaultKeywords, "sha1"))
113113
if err != nil {
114114
t.Fatal(err)
115115
}
@@ -164,7 +164,7 @@ func TestArchiveCreation(t *testing.T) {
164164
}
165165

166166
// Test the tar manifest against itself
167-
res, err = TarCheck(tdh, tdh, []Keyword{"sha1"})
167+
res, err = Compare(tdh, tdh, []Keyword{"sha1"})
168168
if err != nil {
169169
t.Fatal(err)
170170
}
@@ -180,7 +180,7 @@ func TestArchiveCreation(t *testing.T) {
180180
if err != nil {
181181
t.Fatal(err)
182182
}
183-
res, err = TarCheck(tdh, dh, []Keyword{"sha1"})
183+
res, err = Compare(tdh, dh, []Keyword{"sha1"})
184184
if err != nil {
185185
t.Fatal(err)
186186
}
@@ -218,7 +218,7 @@ func TestTreeTraversal(t *testing.T) {
218218
t.Fatal(err)
219219
}
220220

221-
res, err := TarCheck(tdh, tdh, []Keyword{"sha1"})
221+
res, err := Compare(tdh, tdh, []Keyword{"sha1"})
222222
if err != nil {
223223
t.Fatal(err)
224224
}

0 commit comments

Comments
 (0)