subesokun / atom-tree-view-git-status

Shows the Git repository status in the Atom tree-view
MIT License
24 stars 2 forks source link

folder is showing a different folder's status #23

Closed boblannon-picwell closed 8 years ago

boblannon-picwell commented 8 years ago

I have two separate repos. one is in a folder called etl and the other is in one called etltools. the folders are sisters:

$> tree dev -L 1
dev
├── etl
└── etltools

when both project folders are added, tree-view-git-status shows the same status for both. for instance, if etl is checked out to my-new-feature, then etltools will display that it's also checked out to that branch (even though that branch doesn't even exist for etltools!).

I don't have this issue with any of my other repos, so i'm thinking that the similarity in the names might be the source of the issue. Not sure about that.

screen shot 2016-04-11 at 12 45 15 pm

boblannon-picwell commented 8 years ago

noticed something:

  1. checkout my-new-feature from etl, both folders show my-new-feature (as reported above)
  2. checkout my-nifty-branch from etltools, each folder shows the correct status
  3. checkout another-new-feature from etl, and i'm back to having both folders show the same status (like the result of 1, but now both show another-new-feature)
subesokun commented 8 years ago

Hi @boblannon-picwell, could you do me a favor and check which branch Atom reports for files in etl and etltools and if they match the branch name showed by jspm-git? Sometimes Atom behaves very weird regarding git :( If Atom and jspm-git are reporting the same branch then you might need to file this issue directly on the Atom project.

atom-repo-status

rabbitfang commented 8 years ago

I am experiencing this issue with project folders named foo and foo-bar. If project foo is on branch apple with foo-bar on orange, tree-view-git-status will display apple for project foo-bar.

One interesting thing to note is that turning off the "Show Branch Label" option and turning it back on causes the correct branch to be displayed (orange for project foo-bar) until the branch in foo changes.

subesokun commented 8 years ago

Hi @rabbitfang, sorry to hear that you're also facing this issue.

"Show Branch Label" option and turning it back on causes the correct branch to be displayed

Ok this is very interesting. That really sound like it's an issue of this package. Just to be sure, which branch name gets reported by Atom itself (see my last comment)?

rabbitfang commented 8 years ago

In the foo package, Atom reports (in the lower right corner of the window, as in your comment) apple. In the foo-bar package, Atom reports orange (the correct branch).

subesokun commented 8 years ago

Fixed via PR #27