git2r
git2r copied to clipboard
diff(repository(".")) fails
> summary(diff(repository(".")))
Old: index
New: workdir
No changes.
> system("git diff")
diff --git a/R/git.R b/R/git.R
index 7cb7b6d..38fab7d 100644
--- a/R/git.R
+++ b/R/git.R
@@ -28,8 +28,9 @@ git_sha1 <- function(n = 10, path = ".") {
uncommitted <- function(path = ".") {
in_dir(path, system("git diff-index --quiet --cached HEAD") == 1 ||
- system("git diff-files --quiet") == 1)
+ system("git diff-files --quiet") == 1)
}
+# tests
github_info <- function(pkg = ".") {
Any thoughts on what might cause this problem? The example in git_diff
works as expected
Wow, I can reproduce this in the devtools
tree, but not in other git trees.....