cloc_git: Count lines of code, comments and whitespace in a git tree

View source: R/cloc-git.R

cloc_gitR Documentation

Count lines of code, comments and whitespace in a git tree

Description

Count lines of code, comments and whitespace in a git tree

Usage

cloc_git(
  repo,
  commit = ".",
  branch = NULL,
  credentials = NULL,
  progress = FALSE
)

Arguments

repo

path to git repo; if repo is a URL like ⁠git://⁠, it will be fetched into a temporary directory

commit

"." for the current source tree or the commit identifier for a specific commit

branch, credentials, progress

passed on to git2r::clone().

Value

data frame (tibble)

Examples

## Not run: 
cloc_git("~/packages/cloc", "3643cd09d4b951b1b35d32dffe35985dfe7756c4")

# from remote git
cloc_git("git://github.com/hrbrmstr/cloc.git")

## End(Not run)

hrbrmstr/cloc documentation built on May 1, 2023, 7:34 a.m.