-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathyml-git.Rd
98 lines (85 loc) · 2.85 KB
/
yml-git.Rd
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/yml-git.R
\name{projr_yml_git_set}
\alias{projr_yml_git_set}
\alias{projr_yml_git_set_default}
\title{Set Git options}
\usage{
projr_yml_git_set(
all = NULL,
commit = NULL,
add_untracked = NULL,
push = NULL,
simplify_identical = TRUE,
simplify_default = TRUE,
profile = "default"
)
projr_yml_git_set_default(
profile = "default",
simplify_identical = TRUE,
simplify_default = TRUE
)
}
\arguments{
\item{all}{logical.
Whether to set all the options
to \code{TRUE} or \code{FALSE}.
If \code{NULL}, then \code{commit}, \code{add_untracked} and \code{push} are used.
Default is \code{NULL}.}
\item{commit}{logical.
Whether to commit changes automatically upon
project builds.
If \code{NULL}, then setting is not changed.
Default is \code{NULL}.}
\item{add_untracked}{logical.
Whether to add untracked files automatically upon
project builds.
If \code{NULL}, then setting is not changed.
Default is \code{NULL}.}
\item{push}{logical.
Whether to push changes automatically upon
project builds.
If \code{NULL}, then setting is not changed.
Default is \code{NULL}.}
\item{simplify_identical}{logical.
If \code{TRUE}, then if all the settings are the same
(for \code{commit}, \code{push} and \code{add_untracked}),
then only \code{git: TRUE} or \code{git: FALSE} is written to \verb{_projr.yml}.
Default is \code{TRUE}.}
\item{simplify_default}{logical.
If \code{TRUE}, then if the settings are the same as the default
(which is TRUE),
then the settings are removed from \verb{_projr.yml}.
Default is \code{TRUE}.}
\item{profile}{character.
Profile to add the script to.
If \verb{"default"`` (the default), the script is added to the default profile, which is }_projr.yml\verb{. If }NULL\verb{, then the active profile is used (i.e the merge of }_projr-local.yml\verb{, }_projr-\if{html}{\out{<profile>}}.yml\code{and}_projr.yml\verb{) and written to }_projr.yml\verb{. If another character vector, then the corresponding profile is used and written to }_projr-\if{html}{\out{<profile>}}.yml`.}
}
\description{
.yml_git_set` sets Git options for the project.
The options are:
\itemize{
\item{commit: }{whether to commit changes automatically upon
project builds.}
\item{add_untracked: }{whether to add untracked files automatically upon
project builds.}
\item{push: }{whether to push changes automatically upon
project builds.}
}
The default is to leave all the settings unchanged.
If these settings are not setting in \verb{_projr.yml},
then the default is to commit, add untracked files and push.
.yml_git_set_default\verb{ sets all Git options to default (}TRUE`).
}
\examples{
\dontrun{
# set all to TRUE
projr_yml_git_set(all = TRUE)
# set all to FALSE
projr_yml_git_set(all = FALSE)
# set only add_untracked to FALSE
projr_yml_git_set(add_untracked = FALSE)
# revert to defaults
projr_yml_git_set_default()
}
}