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

Future Feature - Erasing your future #2

Open
aljachimiak opened this issue Sep 3, 2013 · 0 comments
Open

Future Feature - Erasing your future #2

aljachimiak opened this issue Sep 3, 2013 · 0 comments

Comments

@aljachimiak
Copy link
Owner

Consider the following premise:

  1. You have run fur init on a project
  2. You have run fur store five times and your fur pointer is at 6
  3. You run fur back three times to view an old version; your fur pointer is at 3
  4. You make changes and decide to go in a new direction
  5. You run fur store to save your changes; your fur pointer is a 4

This is where the problem lies
You have two more diffs in .fur/diffs/ called 4.f and 5.f that refer back to potentially non-existant lines, directories, or files.

Feature - Erase the future

At #5 in the situation above, fur store should do the following:

  1. check to see if #{pointer}.f exists
  2. prompt user: "You are about to destroy #{ #{number of .fur/diffs/} - 1 } future versions. Do you want to store your project and continue? [y/n]
  3. if [y], continue with store; and:
    3.5. loop through the .fur/diffs directory and rm all i.f files that are greater than the #{new fur pointer}.
  4. if [n]; Return a message: "Your changes have not been stored"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant