git-trace

romele / git-trace public

62 commits · 1 branch · 1 tag · 1 contributor (top: Romele) · first commit 3d ago · last push 10m ago

src/cgi.h

#ifndef GT_CGI_H
#define GT_CGI_H

#include "httpd.h"

/*
 * Bridge to `git http-backend` (CGI shipped with git itself).
 * path_info must already be validated: "/<owner>/<name>.git/<rest>".
 * repos_root must be an absolute, canonicalised path.
 */
int cgi_git_backend(struct request *req, const char *repos_root,
                    const char *path_info, const char *remote_user);

/* validate the "/info/refs", "/git-upload-pack", "/objects/..." tail */
int git_rest_ok(const char *rest);

#endif