Not sure if this is by design or not. But this is different than I was expecting, so if nothing else it might be worth mentioning this in the docs if it's by design.
I can see here that to compute isDirty the command being used is git diff --stat. That doesn't display staged changes. Ex:
$ git status
On branch master
nothing to commit, working tree clean
$ echo 'a change' > tmp
$ git diff --stat
tmp | 1 +
1 file changed, 1 insertion(+)
$ git add tmp
$ git diff --stat
I would love to be able to have a way to track if there are any changes between the working directory and the upstream repository state, staged or not. From my testing, it doesn't appear that any of the variables are sensitive to staged changes.
Perhaps this ticket isn't so much a bug with with git:isDirty but maybe more a feature request for a new variable git:hasStagedChanges. Either would work fine for my purposes.
Let me know what you think, and if there's the solution to this that you'd be open to merging and addresses my needs, I can write up a PR. Thanks a bunch for the plugin & happy holidays.
Not sure if this is by design or not. But this is different than I was expecting, so if nothing else it might be worth mentioning this in the docs if it's by design.
I can see here that to compute
isDirty
the command being used isgit diff --stat
. That doesn't display staged changes. Ex:I would love to be able to have a way to track if there are any changes between the working directory and the upstream repository state, staged or not. From my testing, it doesn't appear that any of the variables are sensitive to staged changes.
Perhaps this ticket isn't so much a bug with with
git:isDirty
but maybe more a feature request for a new variablegit:hasStagedChanges
. Either would work fine for my purposes.Let me know what you think, and if there's the solution to this that you'd be open to merging and addresses my needs, I can write up a PR. Thanks a bunch for the plugin & happy holidays.