problem detecting git branch (simpleGit(dir).branchLocal())
See original GitHub issueHI! there is a problem in:
simpleGit(dir).branchLocal((err,branch)=>{
branch
});
it just detects the branch sometimes 😃
this does the reproduction: https://gist.github.com/Ardeshir81/7d387a4205be0f685d7a435766f266d4
Issue Analytics
- State:
- Created 5 years ago
- Comments:8 (3 by maintainers)
Top Results From Across the Web
simple-git - npm
Start using simple-git in your project by running `npm i simple-git`. ... deletes a local branch - treats a failed attempt as an...
Read more >git --git-dir not working as expected - Stack Overflow
So for example if I am in: cd /home/domain/ git status << runs perfect ie # On branch master # Your branch is...
Read more >git-filter-branch Documentation - Git
Lets you rewrite Git revision history by rewriting the branches mentioned in the <rev-list options>, applying custom filters on each revision. Those filters...
Read more >Git - Pull Not Working - Unfuddle Support
As the error message states: you will have to let Git know what remote branch it should use to track with the current...
Read more >Write yourself a Git!
This article will implement and explain in great details (if something is not clear, please report it!) a very simplified version of Git...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi, thank you for the bug report.
There is currently a non-deterministic bug in the example as you run two asynchronous tasks in a single promise, resolving whenever the first has completed so it isn’t certain that both directories will have been set up before the test runs:
https://gist.github.com/Ardeshir81/7d387a4205be0f685d7a435766f266d4#file-reproduce-bug-js-L29
I can look at this later in the week, but you may find it useful to use the integration test section of this repo to set up the two repos before running the tests against them, for example https://github.com/steveukx/git-js/blob/master/test/integration/test-parallel-requests.js#L6
Spawning “many” (in my testing it was anything over 6) child processes cause the exit & close events to return in the wrong order.
Please retry with version 1.105.0 which should resolve this issue. If it persists, please can you follow the pattern in test-concurrent-commands to create a failing test case.