aboutsummaryrefslogtreecommitdiffstats
path: root/cache
diff options
context:
space:
mode:
authorMichael Muré <batolettre@gmail.com>2022-05-31 21:38:28 +0200
committerMichael Muré <batolettre@gmail.com>2022-05-31 21:47:57 +0200
commit295da9c70f6cedb1394c2fa04c0b48a49448e8da (patch)
treea0830d73f013f63150b0ee653c32569aaafeadfb /cache
parent96327c3371ca762d906209c6114092bbf552c0f4 (diff)
downloadgit-bug-295da9c70f6cedb1394c2fa04c0b48a49448e8da.tar.gz
cache: ensure that the default repo has a non-empty name to make js/apollo happy
Diffstat (limited to 'cache')
-rw-r--r--cache/multi_repo_cache.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/cache/multi_repo_cache.go b/cache/multi_repo_cache.go
index 726558d9..659cd5e6 100644
--- a/cache/multi_repo_cache.go
+++ b/cache/multi_repo_cache.go
@@ -7,6 +7,7 @@ import (
)
const lockfile = "lock"
+const defaultRepoName = "__default"
// MultiRepoCache is the root cache, holding multiple RepoCache.
type MultiRepoCache struct {
@@ -37,7 +38,7 @@ func (c *MultiRepoCache) RegisterDefaultRepository(repo repository.ClockedRepo)
return nil, err
}
- c.repos[""] = r
+ c.repos[defaultRepoName] = r
return r, nil
}