diff --git a/internal/git/localrepo/paths.go b/internal/git/localrepo/paths.go index 0c6e32adade57524a2ee11a1f138349798933727..553f150f24637a615f64e405f3846dc5bc11dfdc 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 290690a0896fa187de86b07762afd6864b204156..3f6a033ea56fe5eb053e21a1347ec84fae9ed523 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",