Skip to content

Commit e909794

Browse files
committed
Add pack, idx and rev tags with format version
Signed-off-by: Paulo Gomes <paulo@entire.io>
1 parent 5f61723 commit e909794

File tree

3 files changed

+23
-34
lines changed

3 files changed

+23
-34
lines changed

fixtures.go

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -22,31 +22,31 @@ var data embed.FS
2222

2323
//nolint:gochecknoglobals
2424
var fixtures = Fixtures{{
25-
Tags: []string{"packfile", "ofs-delta", ".git", "root-reference"},
25+
Tags: []string{"packfile", "pack-v2", "idx-v2", "ofs-delta", ".git", "root-reference"},
2626
URL: "https://github.com/git-fixtures/root-references.git",
2727
Head: "6ecf0ef2c2dffb796033e5a02219af86ec6584e5",
2828
PackfileHash: "135fe3d1ad828afe68706f1d481aedbcfa7a86d2",
2929
DotGitHash: "78c5fb882e76286d8201016cffee63ea7060a0c2",
3030
ObjectsCount: 68,
3131
ObjectFormat: "sha1",
3232
}, {
33-
Tags: []string{"packfile", "ofs-delta", ".git"},
33+
Tags: []string{"packfile", "pack-v2", "idx-v2", "ofs-delta", ".git"},
3434
URL: "https://github.com/git-fixtures/basic.git",
3535
Head: "6ecf0ef2c2dffb796033e5a02219af86ec6584e5",
3636
PackfileHash: "a3fed42da1e8189a077c0e6846c040dcf73fc9dd",
3737
DotGitHash: "7a725350b88b05ca03541b59dd0649fda7f521f2",
3838
ObjectsCount: 31,
3939
ObjectFormat: "sha1",
4040
}, {
41-
Tags: []string{"packfile", "ref-delta", ".git", "rev"},
41+
Tags: []string{"packfile", "pack-v2", "idx-v2", "ref-delta", ".git", "rev-v1"},
4242
URL: "https://github.com/git-fixtures/basic.git",
4343
Head: "6ecf0ef2c2dffb796033e5a02219af86ec6584e5",
4444
PackfileHash: "c544593473465e6315ad4182d04d366c4592b829",
4545
DotGitHash: "7cbde0ca02f13aedd5ec8b358ca17b1c0bf5ee64",
4646
ObjectsCount: 31,
4747
ObjectFormat: "sha1",
4848
}, {
49-
Tags: []string{"packfile", "ofs-delta", ".git", "single-branch", "rev"},
49+
Tags: []string{"packfile", "pack-v2", "idx-v2", "ofs-delta", ".git", "single-branch", "rev-v1"},
5050
URL: "https://github.com/git-fixtures/basic.git",
5151
Head: "6ecf0ef2c2dffb796033e5a02219af86ec6584e5",
5252
PackfileHash: "61f0ee9c75af1f9678e6f76ff39fbe372b6f1c45",
@@ -89,72 +89,72 @@ var fixtures = Fixtures{{
8989
WorktreeHash: "8b4d55c85677b6b94bef2e46832ed2174ed6ecaf",
9090
ObjectFormat: "sha1",
9191
}, {
92-
Tags: []string{"packfile", ".git", "unpacked", "multi-packfile"},
92+
Tags: []string{"packfile", "pack-v2", "idx-v2", ".git", "unpacked", "multi-packfile"},
9393
URL: "https://github.com/src-d/go-git.git",
9494
Head: "e8788ad9165781196e917292d6055cba1d78664e",
9595
PackfileHash: "3559b3b47e695b33b0913237a4df3357e739831c",
9696
DotGitHash: "174be6bd4292c18160542ae6dc6704b877b8a01a",
9797
ObjectsCount: 2133,
9898
ObjectFormat: "sha1",
9999
}, {
100-
Tags: []string{"packfile", ".git", "tags"},
100+
Tags: []string{"packfile", "pack-v2", "idx-v2", ".git", "tags"},
101101
URL: "https://github.com/git-fixtures/tags.git",
102102
Head: "f7b877701fbf855b44c0a9e86f3fdce2c298b07f",
103103
DotGitHash: "c0c7c57ab1753ddbd26cc45322299ddd12842794",
104104
PackfileHash: "b68617dd8637fe6409d9842825a843a1d9a6e484",
105105
ObjectsCount: 7,
106106
ObjectFormat: "sha1",
107107
}, {
108-
Tags: []string{"packfile", "rev"},
108+
Tags: []string{"packfile", "pack-v2", "idx-v2", "rev-v1"},
109109
URL: "https://github.com/spinnaker/spinnaker.git",
110110
Head: "06ce06d0fc49646c4de733c45b7788aabad98a6f",
111111
PackfileHash: "f2e0a8889a746f7600e07d2246a2e29a72f696be",
112112
ObjectFormat: "sha1",
113113
}, {
114-
Tags: []string{"packfile", "rev"},
114+
Tags: []string{"packfile", "pack-v2", "idx-v2", "rev-v1"},
115115
URL: "https://github.com/jamesob/desk.git",
116116
Head: "d2313db6e7ca7bac79b819d767b2a1449abb0a5d",
117117
PackfileHash: "4ec6344877f494690fc800aceaf2ca0e86786acb",
118118
ObjectFormat: "sha1",
119119
}, {
120-
Tags: []string{"packfile", "empty-folder", "rev"},
120+
Tags: []string{"packfile", "pack-v2", "idx-v2", "empty-folder", "rev-v1"},
121121
URL: "https://github.com/cpcs499/Final_Pres_P.git",
122122
Head: "70bade703ce556c2c7391a8065c45c943e8b6bc3",
123123
PackfileHash: "29f304662fd64f102d94722cf5bd8802d9a9472c",
124124
DotGitHash: "e1580a78f7d36791249df76df8a2a2613d629902",
125125
ObjectFormat: "sha1",
126126
}, {
127-
Tags: []string{"packfile", "diff-tree", "rev"},
127+
Tags: []string{"packfile", "pack-v2", "idx-v2", "diff-tree", "rev-v1"},
128128
URL: "https://github.com/github/gem-builder.git",
129129
PackfileHash: "1ea0b3971fd64fdcdf3282bfb58e8cf10095e4e6",
130130
ObjectFormat: "sha1",
131131
}, {
132-
Tags: []string{"packfile", "diff-tree"},
132+
Tags: []string{"packfile", "pack-v2", "idx-v2", "diff-tree"},
133133
URL: "https://github.com/githubtraining/example-branches.git",
134134
PackfileHash: "bb8ee94710d3fa39379a630f76812c187217b312",
135135
ObjectFormat: "sha1",
136136
}, {
137-
Tags: []string{"packfile", "diff-tree"},
137+
Tags: []string{"packfile", "pack-v2", "idx-v2", "diff-tree"},
138138
URL: "https://github.com/rumpkernel/rumprun-xen.git",
139139
PackfileHash: "7861f2632868833a35fe5e4ab94f99638ec5129b",
140140
ObjectFormat: "sha1",
141141
}, {
142-
Tags: []string{"packfile", "diff-tree", "rev"},
142+
Tags: []string{"packfile", "pack-v2", "idx-v2", "diff-tree", "rev-v1"},
143143
URL: "https://github.com/mcuadros/skeetr.git",
144144
PackfileHash: "36ef7a2296bfd526020340d27c5e1faa805d8d38",
145145
ObjectFormat: "sha1",
146146
}, {
147-
Tags: []string{"packfile", "diff-tree", "rev"},
147+
Tags: []string{"packfile", "pack-v2", "idx-v2", "diff-tree", "rev-v1"},
148148
URL: "https://github.com/dezfowler/LiteMock.git",
149149
PackfileHash: "0d9b6cfc261785837939aaede5986d7a7c212518",
150150
ObjectFormat: "sha1",
151151
}, {
152-
Tags: []string{"packfile", "diff-tree", "rev"},
152+
Tags: []string{"packfile", "pack-v2", "idx-v2", "diff-tree", "rev-v1"},
153153
URL: "https://github.com/tyba/storable.git",
154154
PackfileHash: "0d3d824fb5c930e7e7e1f0f399f2976847d31fd3",
155155
ObjectFormat: "sha1",
156156
}, {
157-
Tags: []string{"packfile", "diff-tree", "rev"},
157+
Tags: []string{"packfile", "pack-v2", "idx-v2", "diff-tree", "rev-v1"},
158158
URL: "https://github.com/toqueteos/ts3.git",
159159
PackfileHash: "21b33a26eb7ffbd35261149fe5d886b9debab7cb",
160160
ObjectFormat: "sha1",
@@ -174,7 +174,7 @@ var fixtures = Fixtures{{
174174
ObjectFormat: "sha1",
175175
}, {
176176
// standalone packfile that does not have any dependencies nor is part of any other fixture repo.
177-
Tags: []string{"packfile", "standalone"},
177+
Tags: []string{"packfile", "pack-v2", "idx-v2", "standalone"},
178178
PackfileHash: "3638209d310e10ea8d90c362d568be65dd5e03a6",
179179
ObjectFormat: "sha1",
180180
}, {
@@ -202,7 +202,7 @@ var fixtures = Fixtures{{
202202
ObjectsCount: 31,
203203
ObjectFormat: "sha1",
204204
}, {
205-
Tags: []string{"commit-graph-chain-2", "rev"},
205+
Tags: []string{"commit-graph-chain-2", "rev-v1"},
206206
Head: "ec6f456c0e8c7058a29611429965aa05c190b54b",
207207
PackfileHash: "06ede69e9eba9f1af36eeee184402dc3ad705cd7",
208208
DotGitHash: "77b6511a6e67c99162ebcecd2763a9a19a7ad429",
@@ -216,20 +216,20 @@ var fixtures = Fixtures{{
216216
WorktreeHash: "e3b91f99d8d050cac81d84fbef89172f58eeb745",
217217
ObjectFormat: "sha1",
218218
}, {
219-
Tags: []string{"packfile", "codecommit"},
219+
Tags: []string{"packfile", "pack-v2", "idx-v2", "codecommit"},
220220
PackfileHash: "9733763ae7ee6efcf452d373d6fff77424fb1dcc",
221221
ObjectFormat: "sha1",
222222
}, {
223-
Tags: []string{"packfile", "delta-before-base"},
223+
Tags: []string{"packfile", "pack-v2", "idx-v2", "delta-before-base"},
224224
PackfileHash: "90fedc00729b64ea0d0406db861be081cda25bbf",
225225
ObjectFormat: "sha1",
226226
}, {
227-
Tags: []string{"packfile-sha256", "packfile", "rev"}, // Drop packfile-sha256 as part of V6.
227+
Tags: []string{"packfile-sha256", "packfile", "rev-v1"}, // Drop packfile-sha256 as part of V6.
228228
PackfileHash: "407497645643e18a7ba56c6132603f167fe9c51c00361ee0c81d74a8f55d0ee2",
229229
ObjectsCount: 5,
230230
ObjectFormat: "sha256",
231231
}, {
232-
Tags: []string{"packfile", "notes"},
232+
Tags: []string{"packfile", "pack-v2", "idx-v2", "notes"},
233233
PackfileHash: "bc4b855a55cae7703c023d4e36e3a7c9f5d84491",
234234
ObjectFormat: "sha1",
235235
}, {

fixtures_test.go

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -76,17 +76,6 @@ func TestEmbeddedFiles(t *testing.T) {
7676
}
7777
}
7878

79-
func TestRevFiles(t *testing.T) {
80-
t.Parallel()
81-
82-
f := fixtures.ByTag("rev").One()
83-
require.NotNil(t, f)
84-
85-
file, err := f.Rev()
86-
require.NoError(t, err)
87-
assert.NotNil(t, file, "failed to get rev file")
88-
}
89-
9079
func TestAll(t *testing.T) {
9180
t.Parallel()
9281

osfixture_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ func TestOSFixtureIdx(t *testing.T) {
5252
func TestOSFixtureRev(t *testing.T) {
5353
t.Parallel()
5454

55-
f := fixtures.ByTag("rev").One()
55+
f := fixtures.ByTag("rev-v1").One()
5656
require.NotNil(t, f)
5757

5858
osf := fixtures.NewOSFixture(f, t.TempDir())

0 commit comments

Comments
 (0)