-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Incorrect git status #1428
Comments
Please do the following:
If you see "unsupported extension name" in there, look at the name of the extension. If it's related to sparse checkouts, see #816 (comment). If it's not related to sparse checkouts, please let me know the name of the extension. Either way, if the extension is not crucial for your workflow, try disabling it. |
@romkatv Thanks for the instruction Is the .git folder broken? Or a problem with the theme? Again, when I use BTW, I forgot to mention: |
Please attach (or send me by email) |
@romkatv |
Damn :-( Now I won't be able to fix the bug. Is it perchance possible you can recover the problematic packed-refs? |
Don't worry, it is only a temporary fix. When I re-cloned the same repo, it had the same exact problem. And I found a public repo to reproduce the problem: https://github.com/Shopify/ruby |
Here's what I've tried: git clone https://github.com/Shopify/ruby.git
cd ruby Once I ran these commands, I've got "master" in prompt (as expected). What happens if you run these commands? Do you get "master" in prompt? If not, could you send me |
96b520b2 build v1.5.1 binaries for all platforms ffeb0507 bump version to v1.5.1 1bcbea07 mbuild: disable pacman upgrades on msys 39dbb92f log a warning if unable to parse packed-refs a9d70ec0 add `-r` flag to gitstatus_start in bash bindings (#241) abbf9a79 don't use static_assert with one argument as it's not available prior to c++17 (#239) f8c396e4 drop all tags if packed-refs doesn't have a header line (#1428) git-subtree-dir: gitstatus git-subtree-split: 96b520b248ca872646e27b3df4535898356e4637
If packed-refs is not sorted, refs/tags can preceed refs/heads. We definitely want to read the latter, so we cannot stop parsing early. I don't know how but some users manage to create packed-refs that's not sorted. Moreover, they manage to place refs/heads/master into packed-refs. See romkatv/powerlevel10k#1428.
Thanks for sending a clone of the public ruby repo from your machine. This allowed me to track down the bug. The issue was caused by an unusual but valid format of your local repository. Firstly, there is no I've fixed the bug but haven't released a new version of gitstatusd yet. I was delaying the previous release in the hope that I would incorporate this fix in it but gave up waiting yesterday before you sent me your local ruby repo. This will now have to wait for the next release. There is no ETA. In the meantime you can run |
Hi there, it looks like I have a similar issue. P.S. Thanks for your awesome work! |
Doesn't sound like the same issue.
|
Yeah, likely... there is also a submodule and although |
gitstatus uses the equivalent of You can look at the gitstatusd log to see which file is reported as changed. See #1428 (comment) |
TLDR It was a git submodule configuration issue, please disregard. The |
Thanks for the update. I'm glad you've sorted it out. |
76182238 add zwc make target ea398d90 update libgit2 ref (#1428) git-subtree-dir: gitstatus git-subtree-split: 7618223859f614a76ed8019f1a60ee3df18984cf
I'm experiencing this issue on my repo as well. I have a single submodule that is initialise inside the repo. Neither the main repo, nor the submodule have any changes, however Powerline10k is reporting 1 unstaged file & 1 untracked file. I've tried running the Running these steps…
… I saw no errors reported, however it looks like it could be an issue with the case of a filename, since the same file is mentioned as both unstaged, and untracked, and it's a file we recently corrected the case (from peopleController.php to PeopleController.php). If I clone the repo down into a new directory then the status is reported correctly. Also of note, the directory that this local clone was originally setup on was a case-insensitive drive, however I've just rebuilt my laptop with a case-sensitive drive, and restored the backup, so not sure if that has caused the issue? |
@toby-griffiths Doesn't sound like the same issue. As a workaround you can manually fix the case of the file in your repo. mv peopleController.php tmp && mv tmp PeopleController.php |
In this case I highly recommend re-cloning your repo. git remembers whether your fs is case-sensitive or not when you clone. |
@romkatv Thank you for the advice. I appreciate not the same, but thought the info might be relevant. Apologies if you would have preferred this as a separate issue. And thanks for the tip. I will re-clone my repos now. |
I'm going to close this issue to avoid getting more unrelated issues reported via comments (already got two). As I mentioned earlier, the original issue has been fixed but I haven't released a new version of gitstatusd yet and there is no ETA for the next release (I won't do a release just for this fix). |
Sorry, for reference, the file in the normal file structure was the correct case all along. I just thing Git had it remembered as with its previous file name case. Interestingly, renaming the file & committing, then renaming back & committing does not resolve the issue, which I thought it might. |
If you're still facing this issue for large git repos, add this to your git config [index]
skipHash = false Or simply run
|
@igbanam That's not the same issue. |
Thanks for this gorgeous theme and easy-to-use configure command!
I pull a repo from my organization and see several errors when I use them:
After I cloned the repo, I immediately check the status with
git status
, the message showHowever, the git status show this:
Then when I try to create a new branch, the git status doesn't show at all
On the other hand, I tried to create a new folder in my local and everything works fine
It looks like something is off in that special repo, though I have no clue what params will impact the git status display?
Any suggestions for the investigation point, like a specific file in .git folder I should look into that my impact the
VCS_STATUS_NUM_STAGED
or even the whole git status prompt section?System: MacOS Big Sur Version 11.4
The text was updated successfully, but these errors were encountered: