Skip to content

Commit 5132088

Browse files
committed
storage/filesystem: dotgit, Change the order of checking packfile name prefix and suffix. Fixes src-d#1149
Signed-off-by: Yuichi Watanabe <[email protected]>
1 parent 1da0bac commit 5132088

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

storage/filesystem/dotgit/dotgit.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ func (d *DotGit) objectPacks() ([]plumbing.Hash, error) {
226226
var packs []plumbing.Hash
227227
for _, f := range files {
228228
n := f.Name()
229-
if !strings.HasPrefix(n, packPrefix) || !strings.HasSuffix(n, packExt) {
229+
if !strings.HasSuffix(n, packExt) || !strings.HasPrefix(n, packPrefix) {
230230
continue
231231
}
232232

0 commit comments

Comments
 (0)