diff options
author | Yuichi Watanabe <yuichi.watanabe.ja@gmail.com> | 2019-05-17 14:25:55 +0900 |
---|---|---|
committer | Yuichi Watanabe <yuichi.watanabe.ja@gmail.com> | 2019-05-17 14:25:55 +0900 |
commit | 51320886176abed6647d2d7bab5bd6df17c4d44f (patch) | |
tree | 9303a95029f1209fee463644977035e555dc7325 /storage/filesystem/dotgit/dotgit.go | |
parent | 1da0bac9d6e7142b46f1fb9ff007cbc90ca9af97 (diff) | |
download | go-git-51320886176abed6647d2d7bab5bd6df17c4d44f.tar.gz |
storage/filesystem: dotgit, Change the order of checking packfile name prefix and suffix. Fixes #1149
Signed-off-by: Yuichi Watanabe <yuichi.watanabe.ja@gmail.com>
Diffstat (limited to 'storage/filesystem/dotgit/dotgit.go')
-rw-r--r-- | storage/filesystem/dotgit/dotgit.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/storage/filesystem/dotgit/dotgit.go b/storage/filesystem/dotgit/dotgit.go index d80d420..7989e53 100644 --- a/storage/filesystem/dotgit/dotgit.go +++ b/storage/filesystem/dotgit/dotgit.go @@ -226,7 +226,7 @@ func (d *DotGit) objectPacks() ([]plumbing.Hash, error) { var packs []plumbing.Hash for _, f := range files { n := f.Name() - if !strings.HasPrefix(n, packPrefix) || !strings.HasSuffix(n, packExt) { + if !strings.HasSuffix(n, packExt) || !strings.HasPrefix(n, packPrefix) { continue } |