File tree Expand file tree Collapse file tree 1 file changed +3
-25
lines changed Expand file tree Collapse file tree 1 file changed +3
-25
lines changed Original file line number Diff line number Diff line change @@ -91,7 +91,7 @@ func brokenFS(
91
91
}
92
92
93
93
var brokenFS billy.Filesystem
94
- if brokenType == 0 {
94
+ if brokenType == brokenNone {
95
95
brokenFS = dotFS
96
96
} else {
97
97
brokenFS = NewBrokenFS (brokenType , dotFS )
@@ -100,30 +100,6 @@ func brokenFS(
100
100
return brokenFS , nil
101
101
}
102
102
103
- func brokenRepo (
104
- brokenType brokenType ,
105
- fs billy.Filesystem ,
106
- ) (* git.Repository , error ) {
107
- dotFS , err := fs .Chroot (".git" )
108
- if err != nil {
109
- return nil , err
110
- }
111
-
112
- var brokenFS billy.Filesystem
113
- if brokenType == 0 {
114
- brokenFS = dotFS
115
- } else {
116
- brokenFS = NewBrokenFS (brokenType , dotFS )
117
- }
118
-
119
- storage , err := filesystem .NewStorage (brokenFS )
120
- if err != nil {
121
- return nil , err
122
- }
123
-
124
- return git .Open (storage , fs )
125
- }
126
-
127
103
func testTable (t * testing.T , tableName string , number int ) {
128
104
require := require .New (t )
129
105
@@ -179,6 +155,8 @@ func (r *billyRepository) Path() string {
179
155
type brokenType uint64
180
156
181
157
const (
158
+ // no errors
159
+ brokenNone brokenType = 0
182
160
// packfile has read errors
183
161
brokenPackfile brokenType = 1 << iota
184
162
// there's no index for one packfile
You can’t perform that action at this time.
0 commit comments