Learn R Programming

workflowr (version 0.2.0)

obtain_files_in_commit: Obtain the files updated in a commit

Description

Obtain the files updated in a commit, similar to git status --stat, by running a diff between the trees pointed to by the commit and its parent commit.

Usage

obtain_files_in_commit(repo, commit)

Arguments

Details

This only works for commits that have one parent commit. Thus it will fail for merge commits (two parents) or the initial root commit (zero parents). two most recent commits. This uses `diff,git_tree`. See the source code at https://github.com/ropensci/git2r/blob/89d916f17cb979b3cc21cbb5834755a2cf075f5f/R/diff.r#L314 and examples at https://github.com/ropensci/git2r/blob/cb30b1dd5f8b57978101ea7b7dc26ae2c9eed38e/tests/diff.R#L88.

See Also

obtain_files_in_commit_root, decide_to_render