has_git_user: Check whether global 'Git' credentials exist

View source: R/github.R

has_git_userR Documentation

Check whether global 'Git' credentials exist

Description

Check whether the values user.name and user.email exist exist for the current repository. Uses git_signature_default.

Usage

has_git_user(repo = ".")

Arguments

repo

The path to the git repository.

Value

Logical, indicating whether 'Git' global configuration settings could be retrieved, and contained the values user.name and user.email.

Examples

testdir <- file.path(tempdir(), "test_git_user")
dir.create(testdir)
gert::git_init(testdir)
has_git_user(testdir)
unlink(testdir, recursive = TRUE)

cjvanlissa/worcs documentation built on Jan. 18, 2025, 4:35 p.m.