summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorİbrahim Serdar Açıkgöz <serdaracikgoz86@gmail.com>2018-12-03 15:05:37 +0300
committerIbrahim Serdar Acikgoz <serdaracikgoz86@gmail.com>2018-12-03 15:11:35 +0300
commita9b0dec43b0cc2d4d50fafd65373362641f55996 (patch)
treeea8369e4e0b1859f7694bd1441cdb5cb33edaa8c
parentMerge pull request #15 from isacikgoz/develop (diff)
downloadgitbatch-a9b0dec43b0cc2d4d50fafd65373362641f55996.tar.gz
bugfix on #16
-rw-r--r--pkg/git/branch.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/pkg/git/branch.go b/pkg/git/branch.go
index 4eb5ffe..692ec5d 100644
--- a/pkg/git/branch.go
+++ b/pkg/git/branch.go
@@ -109,7 +109,10 @@ func (entity *RepoEntity) isClean() bool {
if status != "?" {
verbose := strings.Split(status, "\n")
lastLine := verbose[len(verbose)-1]
- if strings.Contains(lastLine, "working tree clean") {
+ // earlier versions of git returns "working directory clean" instead of
+ //"working tree clean" message
+ if strings.Contains(lastLine, "working tree clean") ||
+ strings.Contains(lastLine, "working directory clean") {
return true
}
}