atom/git-utils

getStatus not working

botcheddevil opened this issue · 9 comments

returns empty object

$ node
> git = require('git-utils');
{ open: [Function] }
> repo =  git.open('/Users/me/public_html/repo');
{ caseInsensitiveFs: true, submodules: {} }
> repo.getStatus();
{}

git-utils@1.4.1 and node@0.11.10:

I have more input, this works on some repositories and not on others. The only difference I see between them is the size of the repository.

Is the working directory dirty for the repository you are testing? getStatus only returns paths for dirty files in the repository's working directory.

yes $ git status returns me a list of modified / new files!

If you call refreshStatus() and then getStatus() do you see the right results?

Sorry, not refreshStatus(), refreshIndex().

😞

$ node
> git = require('git-utils');
{ open: [Function] }
> repo =  git.open('/Users/me/public_html/repo');
{ caseInsensitiveFs: true, submodules: {} }
> repo.refreshIndex();
undefined
> repo.getStatus();
{}
> 

Can you share a link to a repository that isn't working and also include the local changes you've made that you aren't seeing in the getStatus() return value?

Its a private repo hosted on bitbucket, I found this issue while working with atom. When I load atom for the first time from cli the modified color coding on the dir tree flashes for a fraction of a sec.

Let me find a public repo where I can reproduce this.

Closing this out since it wasn't reproducible and hasn't been confirmed by others, please comment if you are still experiencing it.