From 51320886176abed6647d2d7bab5bd6df17c4d44f Mon Sep 17 00:00:00 2001 From: Yuichi Watanabe Date: Fri, 17 May 2019 14:25:55 +0900 Subject: storage/filesystem: dotgit, Change the order of checking packfile name prefix and suffix. Fixes #1149 Signed-off-by: Yuichi Watanabe --- storage/filesystem/dotgit/dotgit.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'storage') 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 } -- cgit