artrz / vscode-gitstash

Adds extra Git stash powers to VS Code
https://marketplace.visualstudio.com/items?itemName=arturock.gitstash
MIT License
24 stars 4 forks source link

[Bug] `git stash store -m 'msg' 'commit-id'` broken format #91

Open wenfangdu opened 1 year ago

wenfangdu commented 1 year ago

Repro Steps:

ss is an alias for stash.

image image image image
artrz commented 1 year ago

Thanks for your report. I`ll check it out as soon as I get some free time.

artrz commented 1 year ago

@wenfangdu I'm currently reviewing this and even tough I know why the error is occurring I'm not able to reproduce it. Basically the extension is parsing the values based on substrings and tokens which presumably are not part of your stashes' subject.

May I know your git version and the output of git stash list --format="%s" on the repo you're having issues with? The extension is expecting lines starting with either WIP on branchname: or On branchname:. I guess that in the case of your screenshots branchname would be main.

wenfangdu commented 1 year ago

@arturock Thanks for the investigation.

image
wenfangdu commented 1 year ago

@arturock Can you reproduce it now? If not, I'll try my best to help you!

artrz commented 1 year ago

@wenfangdu Unfortunately I haven't been able to look at this, so yeah, feel free to dig the code and create PR if you will. I'd start by taking a look into StashGit.getStashes() (where data is gathered) and StashLabels.parseStashLabel() (which presents the info). To see how the explorer is built check TreeDataProvider and TreeItemFactory

wenfangdu commented 1 year ago

@arturock Hi, where's the --format option documented? Couldn't find it here: https://git-scm.com/docs/git-stash.