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

Add safeguard for out of sync loadBackup #10

Closed
maxyu1115 opened this issue Mar 9, 2023 · 1 comment · Fixed by #23
Closed

Add safeguard for out of sync loadBackup #10

maxyu1115 opened this issue Mar 9, 2023 · 1 comment · Fixed by #23
Assignees
Labels
enhancement New feature or request

Comments

@maxyu1115
Copy link
Owner

Currently loading backups will directly load whatever is on the remote backup branch. However, this is not safe to do when the remote backup branch is ahead of your actual branch.

For example, say I created a backup branch gbs-backup-example for my branch example. If my local example branch is at commit X. and my remote/gbs-backup-example is at commit X+2, we shouldn't directly bring in the work in progress from the remote.

Instead, after we detect such a scenario, we should create a stern warning for the user with a popup window, ask if they are certain, and only proceed when they confirm.

@maxyu1115 maxyu1115 added the enhancement New feature or request label Mar 9, 2023
@maxyu1115
Copy link
Owner Author

This safeguard would need to be written here:

// undoes the last commit

This is right after we pull in the remote backup branch contents, and before we bring over the change to our working branch.

@maxyu1115 maxyu1115 self-assigned this Mar 28, 2023
maxyu1115 added a commit that referenced this issue Mar 28, 2023
maxyu1115 added a commit that referenced this issue Mar 28, 2023
@maxyu1115 maxyu1115 linked a pull request Mar 28, 2023 that will close this issue
maxyu1115 added a commit that referenced this issue Mar 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant