Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitaly.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Cai <jcai@gitlab.com>2022-04-01 00:08:53 +0300
committerJohn Cai <jcai@gitlab.com>2022-04-01 00:13:19 +0300
commit2380b7dfbc8640a2f0fdfdb43f8d30245487e741 (patch)
tree33c2c75fc3866e9bf289fd71bc4c0b7732e47f83
parente424af9884ed428574bd7e0f1e4764b913d9197a (diff)
localrepo: Fallback to objects directoryjc-get-object-dir-size-general
-rw-r--r--internal/git/localrepo/paths.go2
-rw-r--r--internal/git/localrepo/paths_test.go2
2 files changed, 2 insertions, 2 deletions
diff --git a/internal/git/localrepo/paths.go b/internal/git/localrepo/paths.go
index 0c6e32ada..553f150f2 100644
--- a/internal/git/localrepo/paths.go
+++ b/internal/git/localrepo/paths.go
@@ -24,7 +24,7 @@ func (repo *Repo) ObjectDirectoryPath() (string, error) {
objectDirectoryPath := repo.GetGitObjectDirectory()
if objectDirectoryPath == "" {
- return "", helper.ErrInvalidArgumentf("object directory path is not set")
+ objectDirectoryPath = "objects"
}
// We need to check whether the relative object directory as given by the repository is
diff --git a/internal/git/localrepo/paths_test.go b/internal/git/localrepo/paths_test.go
index 290690a08..3f6a033ea 100644
--- a/internal/git/localrepo/paths_test.go
+++ b/internal/git/localrepo/paths_test.go
@@ -82,7 +82,7 @@ func TestRepo_ObjectDirectoryPath(t *testing.T) {
{
desc: "no GitObjectDirectoryPath",
repo: repoProto,
- err: codes.InvalidArgument,
+ path: filepath.Join(repoPath, "objects/"),
},
{
desc: "with directory traversal",