extract_commit: Extract a commit from a Git repository
Description
extract_commit extracts the 7-digit SHA1 identifier and message for a
specified commit.
Usage
extract_commit(path, num)
Arguments
path
character. Specify the path to a directory that is a Git
repository (or any subdirectory of the Git repository).
num
numeric. The number of the commit to extract in reverse
chronological order. In other words, 1 is the most recent commit, 2 is the
second most recent commit, etc.
Value
A list with the named elements sha1 and message (both
characters). If a Git repository is not found at path, both are
NA.