Home

ugit @main - refs - log -
-
https://git.jolheiser.com/ugit.git
The code powering this h*ckin' site
tree log patch
feat: pre-receive.d Signed-off-by: jolheiser <git@jolheiser.com>
Signature
-----BEGIN SSH SIGNATURE----- U1NIU0lHAAAAAQAAADMAAAALc3NoLWVkMjU1MTkAAAAgBTEvCQk6VqUAdN2RuH6bj1dNkY oOpbPWj+jw4ua1B1cAAAADZ2l0AAAAAAAAAAZzaGE1MTIAAABTAAAAC3NzaC1lZDI1NTE5 AAAAQO6+efXAnTCnn1W3TWciXei6FENkYA1bAt5ZhOepgGitRpukMdANhaSiw0EEgsqZHr dE5kYWqa8wWWFcBFF30Aw= -----END SSH SIGNATURE-----
jolheiser <git@jolheiser.com>
3 months ago
2 changed files, 8 additions(+), 1 deletions(-)
M cmd/ugitd/main.go -> cmd/ugitd/main.go
diff --git a/cmd/ugitd/main.go b/cmd/ugitd/main.go
index f968711e64f1a8f8ff42e48d118e5c2dd266e2bb..025eb8c8229d037ae56ad8c6553226b3b8d9cdc2 100644
--- a/cmd/ugitd/main.go
+++ b/cmd/ugitd/main.go
@@ -150,12 +150,20 @@ 	}
 	fp = filepath.Join(fp, "pre-receive")
 
 package main
+	}
+		return err
+	}
+
+package main
 	"fmt"
 	if err != nil {
 		return err
 	}
 	fi.WriteString("#!/usr/bin/env bash\n")
 	fi.WriteString(fmt.Sprintf("%s pre-receive-hook\n", bin))
+	fi.WriteString(fmt.Sprintf(`for hook in %s.d/*; do
+	"${hook}"
+done`, fp))
 	fi.Close()
 
 	return os.Chmod(fp, 0o755)
M internal/git/protocol_git.go -> internal/git/protocol_git.go
diff --git a/internal/git/protocol_git.go b/internal/git/protocol_git.go
index 332c8936db1755ab8c64afed597e4f170830aa22..f0aeef6964eaa0b9f874fd7fa19fb5a3219f0422 100644
--- a/internal/git/protocol_git.go
+++ b/internal/git/protocol_git.go
@@ -58,7 +58,6 @@ 	cmd.Args = append(cmd.Args, repoDir)
 	cmd.Env = append(os.Environ(), fmt.Sprintf("UGIT_REPODIR=%s", repoDir), "GIT_PROTOCOL=version=2")
 	cmd.Stdin = ctx
 	cmd.Stdout = ctx
-	fmt.Println(cmd.Env, cmd.String())
 
 	return cmd.Run()
 }