git_stamp function

Get git stamp (commit and branch) for a repository

Get git stamp (commit and branch) for a repository

The function returns the latest git commit and branch for the repo specified in repo or the current working directory if unspecified. Git is needed for the command to run. The functions makes it possible to include the latest git commit and branch in a run to be able to know exactly which code where used.

git_stamp(repo = getwd())

Arguments

  • repo: Git repo directory. If unspecified, then the current working directory is used.

Returns

character vector with latest commit and branch

  • Maintainer: Christopher Gandrud
  • License: GPL (>= 3)
  • Last published: 2016-02-07