atom / github

:octocat: Git and GitHub integration for Atom
https://github.atom.io
MIT License
1.11k stars 393 forks source link

null git branch in status-bar #1672

Open smashwilson opened 6 years ago

smashwilson commented 6 years ago

Filed by @unluisco as atom/status-bar#227

Prerequisites

Description

I started a new git project from the terminal, I have not yet made the first commit, but in the status bar appears the icon of the null branch, when I switch to other tabs, for some reason the branch icon disappears.

Steps to Reproduce

  1. open atom in --safe mode
  2. open a git project without any commit
  3. check the status-bar

Expected behavior: the master branch should appear, and when switching between tabs, it should not disappear the icon.

Actual behavior: the master branch does not appear, instead it indicates that there is no branch (null). and when switching between tabs, the branches icon disappears.

Versions

Atom    : 1.30.0
Electron: 2.0.5
Chrome  : 61.0.3163.100
Node    : 8.9.3

Additional Information

Here is a video to see the problem. git branch Thanks.

smashwilson commented 6 years ago

From Slack, running git for-each-ref --format='%(objectname) %(HEAD) %(refname:short)' 'refs/heads/**' returns empty output, which we must not be parsing correctly.

GeniaT commented 6 years ago

Add that "issue" but I was located in the parent folder instead of the exact one of the project. Maybe same on your side?