diff options
| author | Ibrahim Serdar Acikgoz <serdaracikgoz86@gmail.com> | 2018-12-27 22:35:18 +0300 |
|---|---|---|
| committer | Ibrahim Serdar Acikgoz <serdaracikgoz86@gmail.com> | 2018-12-27 22:35:18 +0300 |
| commit | 56f7a998b45f985865997b540e15e1046f74e5a0 (patch) | |
| tree | bcc04da9925481194dd98022c360ed50a53305c1 | |
| parent | Merge branch 'master' of https://github.com/isacikgoz/gitbatch into develop (diff) | |
| download | gitbatch-56f7a998b45f985865997b540e15e1046f74e5a0.tar.gz | |
fix #38 for unhashed stashed items.
| -rw-r--r-- | pkg/git/cmd-stash.go | 7 |
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, |
