Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

diff(repository(".")) fails #124

Open
hadley opened this issue Apr 28, 2015 · 1 comment
Open

diff(repository(".")) fails #124

hadley opened this issue Apr 28, 2015 · 1 comment

Comments

@hadley
Copy link
Member

hadley commented Apr 28, 2015

> 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

@gaborcsardi
Copy link
Contributor

Wow, I can reproduce this in the devtools tree, but not in other git trees.....

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants