show,git_diff-method {git2r} | R Documentation |
Show a diff
## S4 method for signature 'git_diff' show(object)
object |
The diff |
## Not run: ## Initialize a repository path <- tempfile(pattern="git2r-") dir.create(path) repo <- init(path) ## Config user config(repo, user.name="Alice", user.email="alice@example.org") ## Create a file, add, commit writeLines("Hello world!", file.path(path, "test.txt")) add(repo, "test.txt") commit(repo, "Commit message") ## Change the file writeLines(c("Hello again!", "Here is a second line", "And a third"), file.path(path, "test.txt")) ## Brief summary of diff between index and workdir diff(repo) ## End(Not run)