git2r (version 0.10.1)

default_signature: Get the signature

Description

Get the signature according to the repository's configuration

Usage

default_signature(repo)

## S3 method for class 'git_repository': default_signature(repo)

Arguments

repo
The repository object to check signature

Value

  • S4 class git_signature

Examples

Run this code
## Initialize a temporary repository
path <- tempfile(pattern="git2r-")
dir.create(path)
repo <- init(path)

## Create a user
config(repo, user.name="Alice", user.email="alice@example.org")

## Get the default signature
default_signature(repo)

## Change user
config(repo, user.name="Bob", user.email="bob@example.org")

## Get the default signature
default_signature(repo)

Run the code above in your browser using DataLab