Learn R Programming

Rperform (version 0.0.0.9000)

list_commits: 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

Run this code
# NOT RUN {
# }
# 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)
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab