aboutsummaryrefslogtreecommitdiffstats
path: root/storage/filesystem/dotgit/dotgit.go
diff options
context:
space:
mode:
authorPaulo Gomes <pjbgf@linux.com>2023-07-20 19:40:25 +0100
committerGitHub <noreply@github.com>2023-07-20 19:40:25 +0100
commit0f46b7a16fe1fc51048e8e5274f2cf84da8a0328 (patch)
tree8434724cba6763f87fa1eeddd3ed5f1f46db9565 /storage/filesystem/dotgit/dotgit.go
parent56c4bf4ca9789505db7a6eefb910a7259c1fcb79 (diff)
parent939ad4a432f58d2a301db9bae1cf4143bfd659ea (diff)
downloadgo-git-0f46b7a16fe1fc51048e8e5274f2cf84da8a0328.tar.gz
Merge pull request #812 from L11R/incoming-dir-fix
storage: filesystem/dotgit, add support for tmp_objdir prefix
Diffstat (limited to 'storage/filesystem/dotgit/dotgit.go')
-rw-r--r--storage/filesystem/dotgit/dotgit.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/storage/filesystem/dotgit/dotgit.go b/storage/filesystem/dotgit/dotgit.go
index 19d7026..e02e6dd 100644
--- a/storage/filesystem/dotgit/dotgit.go
+++ b/storage/filesystem/dotgit/dotgit.go
@@ -582,7 +582,9 @@ func (d *DotGit) hasIncomingObjects() bool {
directoryContents, err := d.fs.ReadDir(objectsPath)
if err == nil {
for _, file := range directoryContents {
- if strings.HasPrefix(file.Name(), "incoming-") && file.IsDir() {
+ if file.IsDir() && (strings.HasPrefix(file.Name(), "tmp_objdir-incoming-") ||
+ // Before Git 2.35 incoming commits directory had another prefix
+ strings.HasPrefix(file.Name(), "incoming-")) {
d.incomingDirName = file.Name()
}
}