% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/config.R
\name{user_is_configured}
\alias{user_is_configured}
\title{Test if a Git user is configured}
\usage{
user_is_configured(repo = ".")
}
\arguments{
\item{repo}{An optional \code{repo}, in the sense of \code{\link[=git_open]{git_open()}}.}
}
\value{
\code{TRUE} if \code{user.name} and \code{user.email} are set locally or globally,
\code{FALSE} otherwise.
}
\description{
This function exists mostly to guard examples that rely on having a user
configured, in order to make commits. \code{user_is_configured()} makes no
distinction between local or global user config.
}
\examples{
\dontshow{if (interactive()) withAutoprint(\{ # examplesIf}
user_is_configured()
\dontshow{\}) # examplesIf}
}
