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

Init Script Ends in Infinite Loop When Local Repository is Ahead of Remote #4

Open
lochel opened this issue Aug 29, 2024 · 2 comments

Comments

@lochel
Copy link
Member

lochel commented Aug 29, 2024

Description:
The init script currently enters an infinite loop if the local repository is ahead of the remote repository. While this scenario shouldn't occur under normal circumstances, it's possible that it might happen at some point. To ensure robustness, the script should be able to handle this situation gracefully.

Steps to Reproduce:

  1. Set up a local repository that is ahead of the remote (e.g., by making an empty commit without pushing it).
  2. Run the init script.

Expected Behavior:
The script should detect that the local repository is ahead of the remote and handle it appropriately.

Actual Behavior:
The script enters an infinite loop, requiring manual intervention to stop it.

Additional Context:
Although this situation shouldn't normally happen, it's better to be proactive and handle it now rather than risk the script failing unexpectedly in the future.

@jsliacan
Copy link
Contributor

jsliacan commented Sep 1, 2024

If the hashes don't match, regardless of ahead or behind or not even on the same branch :-).

@lochel
Copy link
Member Author

lochel commented Sep 2, 2024

Behind shouldn't be a problem, but diverged and ahead (which is arguably the same as diverged) causes problems right now.

This isn't much of a problem, because the cloned repository on the devices (boxes) should never be touched. But for the dev environment it is a bit of a pain.

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