~edwargix/git.sr.ht

136bd3848aad6522ca3545fceeaccc5429864a3e — Drew DeVault 2 years ago fb3f415
API: createRepository: create git-daemon-export-ok

This file is necessary for git clones to work for public and unlisted
repositories.
1 files changed, 8 insertions(+), 0 deletions(-)

M api/graph/schema.resolvers.go
M api/graph/schema.resolvers.go => api/graph/schema.resolvers.go +8 -0
@@ 180,6 180,14 @@ func (r *mutationResolver) CreateRepository(ctx context.Context, name string, vi
			}
		}

		export := path.Join(repoPath, "git-daemon-export-ok")
		if repo.Visibility() != model.VisibilityPrivate {
			_, err := os.Create(export)
			if err != nil {
				return err
			}
		}

		if cloneInProgress {
			u, err := url.Parse(*cloneURL)
			if err != nil {