-
Notifications
You must be signed in to change notification settings - Fork 64
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
Document how to remove stgit metadata from git when stgit messes itself and does not work. #388
Comments
I wonder if deleting my git branch gets rid of all stgit metadata for it? |
I'm sorry that is bug is affecting you. Thank you for reporting. I'd be very interested in knowing more details about how the repo might have gotten into this state. Any details would be appreciated; a reproducing case would be amazing. The stack metadata associated with a branch is kept in a special ref:
Alternatively, one can checkout the stack metadata ref and inspect or even modify the metadata.
There is some information about this in the |
Commits on the metadata branch:
This is the commit that seems to have broken the metadata:
Topmost commit seems empty, I must have rebased twice:
Tried updating the stacks reference to to remove the top two commits, but then it fails due to "stack metedata not found" :-) After removing the stack reference,
After
|
If I create a new branch and then reset to my upstream branch I can init stgit again. IMO this shows that So this works:
|
I appreciate the details, thank you. It appears that something may be wrong with
You're right and I was too hasty with my reply. In addition to The patches refs found in It seems clear that part of the problem at play is that the I should have recommended deleting all the The procedure that worked for you makes sense to me too. |
Finally got to a clean state after removing all refs under 'refs/patches/dns-proxy-use-original-source-address-and-port-redux-v1.14' as well as After the refs removal |
Just to add a data point, I started seeing this error after simply pushing a couple of patches on the stack. Haven't done a rebase in several hours (and these patches have all been pushed before). Not sure if it might be relevant but this is on a separate worktree. |
I have repeatedly hit this issue when doing rebases using manual complex rebases using git. This is definitely not the right way to work with stg, but it would still be nice to just have a |
Heya @jpgrayson - I'm running into this issue with stgit 2.4.12 from the Fedora 40 repo. My setup is that I've got a branch ( I have a second branch I switched to the first branch (git checkout sphinx-domain) and tried to run Then, I switched to the second and tried to run Can you kindly suggest what types of information you'd like to see to help diagnose what's going wrong with the rebase, as I am seemingly able to reproduce this at the moment? Thanks, |
I appreciate the offer to help diagnose this @jnsnow. I'm not sure I have enough bandwidth to git deep into this problem right now though. From reading your description of steps, I do have some immediate questions:
What is the failure signature? I.e. what is printed to stderr?
That's an interesting clue. But what made you decide to delete that particular ref?
I'm trying to decide if that means the index is correct? Or the working tree? Or neither? Apologies in advance if this issue continues to linger. |
There should be some documentation on how to remove stgit metadata form a git branch when stgit messes it's metadata and can't recover.
My branch is showing this type of error on every stgit command:
When I try to fix this with
git update-ref
to the wanted reference, it complains about another reference in the branch in the same manner. If I fix that up, it gives the first error again, and so it goes in an infinite loop.Nothing works (
stg branch --cleanup
,stg branch --delete
,stg repair
) all give the same error.I would appreciate if
stg init
had a--force
flag to reinitialize stgit metadata for the current branch!The text was updated successfully, but these errors were encountered: