Not finding branch name
IgorRebeche opened this issue · comments
Hello, today i tried to prune my branches using your approach but when i tried to delete some error occurred as you can see in the screenshot
I think it can be a problem with the deleteBranches implementation in find-stale.js.
It is using single quotes
i would change the line 256
var exec = utils.asyncExec(['git', 'branch', dFlag, "'" + branchName + "'"]);
To
var exec = utils.asyncExec(['git', 'branch', dFlag, branchName ]);
I am using windows, maybe in linux could work with single quote but i didn't test yet
I'm having the same issue. I want to add extra information:
If I get the error:
ERROR: Unable to remove: Command failed: git branch -D 'feature/add-button'
error: branch ''feature/add-button'' not found.
But if I run the exact same command (with the single quote) in the console manually, it works as expected:
C:\Code\Project\*****> git branch -D 'feature/add-button'
Deleted branch feature/add-button (was *****).
I'm running this on Windows
Even on v1.0.4? @DerZyklop
@nemisj which makes sense. With 1.0.3 the problematic single quotes came in. The 1.0.4 release only contains text changes in README.md
@DerZyklop yes, indeed, sorry.
I will have a look at this one.
1.0.5 should fix that @DerZyklop @IgorRebeche, can you please confirm?
@IgorRebeche, sorry for such a long answer, there is some issues with notifications to my email, haven't seen your message.
Tested it with 2.0.1 on Mac and Win.
Confirmed. Bug is fixed.
Thank you 💚
@rhalaly Thanks for reporting, but your issue is not related to this ticket. And it’s also not a bug.
The message says "branch … is not fully merged". This means the branch exists, and the git-removed-branches command could find it, but It contains changes that have not been merged into your main branch yet.
✌
@DerZyklop it was a false alarm, indeed. Sorry!