Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

gitR: fixing crash in case of ignored directory (using git 1.7.6.5).

  • Loading branch information...
commit c1fe794a51053d60bb804fb8bfe34d6efa2643e0 1 parent df3f300
Manuel Koller authored
Showing with 2 additions and 1 deletion.
  1. +2 −1  gitR-package/R/methods.R
View
3  gitR-package/R/methods.R
@@ -124,6 +124,7 @@ gitStatus <- function(dir=getwd(),
untracked = c("all", "no", "normal"),
ignoreSubmodules = c("none", "untracked", "dirty", "all"),
ignored = FALSE) {
+ if (dir == "./") dir <- getwd()
## get toplevel directory (show only subdirectory if dir is not tl)
tl <- gitToplevel(dir)
## convert dir into an absolute path
@@ -140,7 +141,7 @@ gitStatus <- function(dir=getwd(),
status <- gitSystem(args, dir)
## filter
if (nchar(rdir) > 0) {
- filter <- sprintf("( |\")%s/", rdir)
+ filter <- sprintf("( |\")%s/.+", rdir)
status <- grep(filter, status, value=TRUE)
status <- gsub(filter, "\\1", status)
}
Please sign in to comment.
Something went wrong with that request. Please try again.