File: use_git_hook.Rd

package info (click to toggle)
r-cran-usethis 3.1.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,228 kB
  • sloc: sh: 26; makefile: 17; cpp: 6; ansic: 3
file content (27 lines) | stat: -rw-r--r-- 755 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/git.R
\name{use_git_hook}
\alias{use_git_hook}
\title{Add a git hook}
\usage{
use_git_hook(hook, script)
}
\arguments{
\item{hook}{Hook name. One of "pre-commit", "prepare-commit-msg",
"commit-msg", "post-commit", "applypatch-msg", "pre-applypatch",
"post-applypatch", "pre-rebase", "post-rewrite", "post-checkout",
"post-merge", "pre-push", "pre-auto-gc".}

\item{script}{Text of script to run}
}
\description{
Sets up a git hook using the specified script. Creates a hook directory if
needed, and sets correct permissions on hook.
}
\seealso{
Other git helpers: 
\code{\link{use_git}()},
\code{\link{use_git_config}()},
\code{\link{use_git_ignore}()}
}
\concept{git helpers}