This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
We set up knitr so it doesn't catch errors, then set | |
`options(error=recover)` to set up R's debug-on-error machinery. | |
We have to do one additional thing, before the options call though: | |
trace the recover function with`sink(NULL)` to turn off the output | |
capturing so the R console is useful when the debugging framework | |
dumps us back into it. This has to happen before the options call | |
because that call grabs the `recover` object and stores it somewhere | |
so setting a trace on recover after the call won't affect the cached | |
version that gets called upon an error. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#rm(list=ls()) | |
library(git2r) | |
library(plyr) | |
library(daff) | |
differ = function(file1, file2){ | |
path <- tempfile(pattern="git2r-") | |
dir.create(path) | |
repo <- init(path) |