-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wrong git branch showing when inside a git sub-module since v1.10 #4266
Comments
We've replaced (lib)git2 with gitoxide/git-repository in 0.10. Is the repo owned by the user, and would it be considered trusted by git without |
Hey @davidkna. Actually trying to answer your question made me realize that both repos I tested were in sub-module contexts so there's no I tried in a classic repo and it works fine so it limits the issue to the sub-module scenario, that's a positive point 😊 |
I'm not getting any git module stuff for a large mono repo |
@davidkna can that all be backed out - theres apparently a lot of breaking changes |
I see this same problem, anytime I descend into a submodule the branch shown by |
I've confirmed the cause of the bug and upstream will hopefully fix it soon. @daniel-white Personally, I wouldn’t revert it just yet, though at this time reverting should still be straightforward. The other large issue wasn't specifically tied to the git implementation, and more related to how starship is parallelized. Would you please describe your issue in more detail? I'm not sure if it's the same issue from your description. |
@davidkna i'd be happy to move this to a new thread, but since i upgraded to 1.10.1, none of the git modules are working in a rather large (private) monorepo. for a smaller public repo, they do present. i do not have any submodules. i'd be happy to see if theres any debug flags to help isolate the problem. i'm just concerned that the new git crate is failing on this repo. my git version is 2.37.2 |
@daniel-white I've created a new issue for your problem in #4272. |
… configuration values where possible Originally required by starship/starship#4266 .
Indeed, submodules have never been tested and apparently during the test-period of That said, today |
This release comes with lenient configuration handling by default, allowing to open repositories even their configuration values are invalid (even for git), as long as there are viable defaults. Furthermore this release adds the ability to open submodule repsitories. Fixes starship#4266 and fixes starship#4272
* upgrade `gitoxide` to v0.21 This release comes with lenient configuration handling by default, allowing to open repositories even their configuration values are invalid (even for git), as long as there are viable defaults. Furthermore this release adds the ability to open submodule repsitories. Fixes #4266 and fixes #4272 * Assure an object cache is set to speed up `commit.describe()` Related to #4275 bringing performance to spitting distance compared to git.
Just installed the latest version and everything is working fine. Thanks for the very quick fix and thanks for Starship! ❤️ |
I can also confirm the submodule branch detection works again with 1.10.2. Thanks! |
Sadly I don't think it's the end of it 🙈 Just checked out a commit on the git tree. It used to show the commit number but now it simply prints like if there was not git activity 😕 I'll open a new issue for this problem as it's different. |
* upgrade `gitoxide` to v0.21 This release comes with lenient configuration handling by default, allowing to open repositories even their configuration values are invalid (even for git), as long as there are viable defaults. Furthermore this release adds the ability to open submodule repsitories. Fixes starship#4266 and fixes starship#4272 * Assure an object cache is set to speed up `commit.describe()` Related to starship#4275 bringing performance to spitting distance compared to git.
Current Behavior
The value printed for
git_branch
is alwaysmaster
instead of the current branch. Same thing in a repo where the default branch ismain
, it will always printmain
.Expected Behavior
The
git_branch
module should print the current active branch.Additional context/Screenshots
$ git branch master * test-branch $ starship module git_branch master
Environment
The text was updated successfully, but these errors were encountered: