arl/gitmux

[BUG] Stashed files not handled in some cases

iusmac opened this issue · 5 comments

Hello again! It appears that stashed files are no longer handled in v0.7.8.

How to reproduce

$ mkdir testGitmux
$ cd testGitmux
$ git init
$ touch test_file
$ git add test_file
$ git commit -m 'First commit'
$ touch new_file
$ git add new_file 
$ git stash push

Even though there's a stashed file, gitmux claims the tree is "clean". But if we create an untracked file (touch another_file), gitmux will show 1 untracked and 1 stashed.

I've checked the previous version (v0.7.7) and stashed files are handled as expected.

arl commented

Hi.
In latest version, I've slightly changed the definition of a clean repository. It has always bothered me that the clean flag depended on the number of stashed entries. Stash entries could have been added from other branches, and should not cause in my opinion the repository to be considered_dirty_.

However, stash entries should still be counted and displayed in the status, is it still the case for you?

@arl I've been using gitmux for more than a year, and I've really got used to the stashed indicator, for me it's like "list of pending jobs", it helps a lot when switching between projects during the day. I agree that the clean tree does not depend on what's in stash, so I think we should always display stashed files independently, exactly like we do with the remote and the current branch which, indeed, does not affect how "clean" the tree is.

arl commented

Ok now i see what you mean. The stashed count was absent from gitmux in case the working tree was clean. I've fixed this

arl commented

Thank you again for noticing and reporting!

arl commented