R/sha.R

Defines functions get_shas

get_shas <- function(repo, nchars = NULL) {
  
  # commits   <- git2r::commits(repo)
  # shas      <- vapply(commits, function(x) x@sha, character(1))
  
  shas <- call_system("git", c("rev-list", "--all"))
  
  if (!is.null(nchars)) {
    shas <- substr(shas, 1, nchars)
  }
  
  shas
}
ropenscilabs/ozrepro documentation built on May 20, 2022, 10:43 a.m.