fixed bug with stash detection when in .git directory