Open Jiedara opened 8 years ago
@peey this is I assume caused by your https://github.com/zaggino/brackets-git/pull/1289 can you have a look?
Your assumptions seem true. This behavior first appears in v0.16.4
Steps for reproducing the bug
v0.16.3 behavior
v0.16.4 behavior
Still investigating
Git.getCurrentBranchName() is returning true in Branch.js, line 436. I think it is supposed to return a string and that's what causing this bug.
This was probably not introduced by #1289 but uncovered by it. Does any part of branch determining code depend on the repository having at least one commit, @zaggino?
Released 0.16.5 which should address this.
The original issue is fixed now. However there's a new one which I think is related to this code.
If I create a new branch before the first commit, its name does not reflect in the UI. Steps for reproducing issue:
Git status shows the current branch to be "new-branch" as expected. If you commit via the brackets git extension it makes the commit in "new-branch" as well. But on the UI it displays "master" for the branch name till brackets is refreshed/new branch is created.
This issue does not happen if you create a branch after the first commit. Only happens in an uinitialized repository.
Unsure if I should open a separate issue for this or not.
We can have it here as a bug but I don't consider it critical
by any means.
The place where code needs to be updated for the fix is here: https://github.com/zaggino/brackets-git/blob/master/src/git/GitCli.js#L435
You need to execute some git command to get the branch name.
Hi.
I saw that bug append right before my very first commit: Branch won't show up correctly under the project name. Instead, the branch name is replaced by 'true' and I can't neither add index or change branch...
Here is a what I saw :![buggitbracket](https://cloud.githubusercontent.com/assets/15139759/15189435/fd805d20-17aa-11e6-9537-569caf3606cf.png)
This happened in a very classic repository, except that there was no commit made yet. After the first commit, everything came back to normal :+1: I don't have any console information, because I made my commit before looking at it ... sorry Not a hard bug, but this can be tricky for a new git user that can't understand how to handle it ...