Config file management. To display the configuration variables,
call method config
without the user.name
,
user.email
or ...
options.
Details
There are two ways git2r can find the local repository when
writing local options (1) Use the repo
argument. (2) If the
repo
argument is NULL
but the current working
directory is inside the local repository, then git2r
uses
that repository.
Examples
if (FALSE) { # \dontrun{
## Initialize a temporary repository
path <- tempfile(pattern = "git2r-")
dir.create(path)
repo <- init(path)
## Set user name and email.
config(repo, user.name = "Alice", user.email = "alice@example.org")
## Display configuration
config(repo)
## Delete user email.
config(repo, user.email = NULL)
## Display configuration
config(repo)
} # }