show,git_diff-method {git2r} | R Documentation

## Show a diff

### Description

Show a diff

### Usage

    ## S4 method for signature 'git_diff'
    show(object)

### Arguments

`object` | The diff `object`.

### Examples

    ## 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)

[Package git2r version 0.20.0 Index]