git-js icon indicating copy to clipboard operation
git-js copied to clipboard

Current branch is incorrectly reported as "No" when running `git status` on an empty repo

Open MaddyGuthridge opened this issue 1 year ago • 0 comments

To reproduce:

  • git clone https://github.com/MadGutsBot/Empty.git (or any other empty repo)
  • (await repo.status()).current gives the string "No"
  • Contrastingly, (await repo.branchLocal()).current gives an empty string

I would expect these to give consistent results. In this case, given there are no branches, I'd expect the branch to be reported as null, although an empty string is manageable.

MaddyGuthridge avatar Sep 12 '24 06:09 MaddyGuthridge