list_commits: Commits' details.

View source: R/repo_metrics.R

list_commitsR Documentation

Commits' details.

Description

Given a repository path and number of commits (n), returns a data frame containing the date, SHA1 values and commit messages of the last n commits in the repo.

Usage

list_commits(path = "./", num_commits = 20)

Arguments

path

File-path to the git repository whose commits are to be summarized.

num_commits

Number of commits to be summarized. The default is 20.

Examples


## Not run: 
## Example-1

# Set the current directory to the git repository concerned.
setwd("./Path/to/repository")
 
# Obtained details of the last 10 commits in the repository
list_commits(num_commits = 10)

## Example-2

# Obtained the details of the last 20 (default value) commits in the repository
# specified by path.
list_commits(path)

## End(Not run)


analyticalmonk/Rperform documentation built on July 3, 2022, 2:36 a.m.