aboutsummaryrefslogtreecommitdiff
path: root/internal/git
diff options
context:
space:
mode:
Diffstat (limited to 'internal/git')
-rw-r--r--internal/git/handler.go1
-rw-r--r--internal/git/handler_test.go14
2 files changed, 15 insertions, 0 deletions
diff --git a/internal/git/handler.go b/internal/git/handler.go
index 5a3b3e6..6f29483 100644
--- a/internal/git/handler.go
+++ b/internal/git/handler.go
@@ -18,6 +18,7 @@ func GitHttpBackendHandler(reposDir, backendCommand string) http.Handler {
Dir: ".",
Env: []string{
projectDirEnv,
+ // TODO we don't want to export all
"GIT_HTTP_EXPORT_ALL=1",
fmt.Sprintf("REMOTE_USER=%s", uid),
},
diff --git a/internal/git/handler_test.go b/internal/git/handler_test.go
new file mode 100644
index 0000000..88267b9
--- /dev/null
+++ b/internal/git/handler_test.go
@@ -0,0 +1,14 @@
+package git
+
+import (
+ "os"
+ "testing"
+)
+
+func TestGitHandler(t *testing.T) {
+ dir, err := os.MkdirTemp("", "go-git-tests")
+ if err != nil {
+ t.Fatalf("Couldn't create a temp directory for tests: %s", err)
+ }
+ _ := GitHttpBackendHandler(dir, "git http-backend")
+}