Skip to content
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

Crash resilience on push #336

Closed
riastradh opened this issue Oct 14, 2024 · 3 comments
Closed

Crash resilience on push #336

riastradh opened this issue Oct 14, 2024 · 3 comments

Comments

@riastradh
Copy link

While experimenting with #335, I discovered that after a push is accepted by the remote hg repo (adding new changesets), git cinnabar may not have yet updated refs/cinnabar/*.

Does that pose any issues for crash resilience? Can anything be lost by a successful push without updating refs/cinnabar/*?

(If not, one wonders why refs/cinnabar/* needs to exist at all! But I'm not familiar with the data structures stored here; maybe there's an obvious answer about refs/cinnabar/* being a cache that's necessary for performance in large repositories but not a big deal for a few changesets at a time.)

@glandium
Copy link
Owner

git-cinnabar is idempotent, so pushing the same things in the same way will do the same thing. You're not really losing anything except time if the metadata behind refs/cinnabar is not updated.

@riastradh
Copy link
Author

Thanks! Will anything be potentially lost or confused if, instead of pushing again, I fetch from the hg repo -- getting the hg view of the new commit -- and then try to push again?

@glandium
Copy link
Owner

If the new commits come from git-cinnabar in the first place, there isn't going to be a problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants