jbuedel/posh-git — comment on commit 3b67923aa1091d267b8b59a352d0ff258443acc2
File:  line 0
By jbuedel:

It's better than no git status in the prompt at all, but not a lot better. I find myself hitting enter a couple times when I don't see my changes reflected.

A couple of changes that I've been thinking might help are:
* Don't make the prompt wait while the cache is refreshed. Run git status as a background task that still updates the cache. The prompt uses the cache or just outputs the branch name but no status info if the cache is stale.
* Display the status but also a * to indicate when the status cache is stale. Stale might mean something like "be older than $secs/2".
* When I'm on a repo with a fast git status I don't want status caching at all. Only cache status on some repos, where those repos are listed in something like GitPromptSettings.RepositoriesInWhichToCacheFileStatus.
* Auto enroll repos in GitPromptSettings.RepositoriesInWhichToCacheFileStatus when their status command takes longer than $secs. (On a per powershell session basis - no need to persist that between sessions I don't think).