summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIbrahim Serdar Acikgoz <serdaracikgoz86@gmail.com>2018-12-28 01:58:30 +0300
committerGitHub <noreply@github.com>2018-12-28 01:58:30 +0300
commit51ee48c28778c022e0b17e6102495caa571e12b1 (patch)
treeb1048bf57db2c80e2ee165800ee1e49c4057e040
parentfixes a bug on branch and stash without HEAD (#44) (diff)
downloadgitbatch-51ee48c28778c022e0b17e6102495caa571e12b1.tar.gz
Hotfix 40 (#45)
* fixes a bug on branch and stash without HEAD * fix on 40 issue, again.
-rw-r--r--pkg/git/cmd-stash.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/pkg/git/cmd-stash.go b/pkg/git/cmd-stash.go
index 934628e..463bd35 100644
--- a/pkg/git/cmd-stash.go
+++ b/pkg/git/cmd-stash.go
@@ -67,7 +67,7 @@ func (e *RepoEntity) loadStashedItems() error {
hash := stashHashRegex.FindString(trimmed)
var desc string
- if stashHashRegex.MatchString(hash) {
+ if stashHashRegex.MatchString(hash) && len(stashHashRegex.Split(trimmed, 2)) >= 2 {
desc = stashHashRegex.Split(trimmed, 2)[1][1:]
} else {
desc = trimmed