summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIbrahim Serdar Acikgoz <serdaracikgoz86@gmail.com>2018-12-27 22:40:14 +0300
committerGitHub <noreply@github.com>2018-12-27 22:40:14 +0300
commit24acc45a1296d096e81698cda87bc5d50e5b7c54 (patch)
treebcc04da9925481194dd98022c360ed50a53305c1
parentMerge pull request #37 from isacikgoz/develop (diff)
parentfix #38 for unhashed stashed items. (diff)
downloadgitbatch-24acc45a1296d096e81698cda87bc5d50e5b7c54.tar.gz
Merge pull request #40 from isacikgoz/develop
fixes #39 #38
-rw-r--r--pkg/git/cmd-stash.go7
1 files changed, 6 insertions, 1 deletions
diff --git a/pkg/git/cmd-stash.go b/pkg/git/cmd-stash.go
index a786833..85e25e3 100644
--- a/pkg/git/cmd-stash.go
+++ b/pkg/git/cmd-stash.go
@@ -60,8 +60,13 @@ func (e *RepoEntity) loadStashedItems() error {
trimmed = stashBranchRegex.Split(trimmed, 2)[1]
hash := stashHashRegex.FindString(trimmed)
+ var desc string
+ if stashHashRegex.MatchString(hash) {
+ desc = stashHashRegex.Split(trimmed, 2)[1][1:]
+ } else {
+ desc = trimmed
+ }
// trim hash
- desc := stashHashRegex.Split(trimmed, 2)[1][1:]
e.Stasheds = append(e.Stasheds, &StashedItem{
StashID: i,