summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRose Hogenson <rosehogenson@posteo.net>2026-07-09 17:58:21 -0700
committerRose Hogenson <rosehogenson@posteo.net>2026-07-09 17:59:05 -0700
commit93295a58ea02a8eb68dcaa5a283d057bd1749db1 (patch)
treec6961fc2e563e7fa8af0315a278ff2d19319fc94
parent79b2c0ecb76528f6002e078741dd173cfc6f2514 (diff)
downloadgit-shell-commands-93295a58ea02a8eb68dcaa5a283d057bd1749db1.tar.zst
Activate hook
-rw-r--r--git-shell-commands.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/git-shell-commands.go b/git-shell-commands.go
index 0e9ea44..d331ef5 100644
--- a/git-shell-commands.go
+++ b/git-shell-commands.go
@@ -54,6 +54,12 @@ Create a new git repo named REPO.
if err := git.Run(); err != nil {
return err
}
+ hook := filepath.Join(dir, "hooks/post-update")
+ hookSample := hook + ".sample"
+ fmt.Printf("mv %s %s\n", hookSample, hook)
+ if err := os.Rename(hookSample, hook); err != nil {
+ return err
+ }
return nil
}