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

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

if (FALSE) {
cloc_git("~/packages/cloc", "3643cd09d4b951b1b35d32dffe35985dfe7756c4")

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