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

Recreate repo state based on tagged file #357

Open
KnutAM opened this issue Sep 25, 2022 · 2 comments
Open

Recreate repo state based on tagged file #357

KnutAM opened this issue Sep 25, 2022 · 2 comments
Labels
enhancement New feature or request git Related to interafacing with git help wanted The developers need some help here!

Comments

@KnutAM
Copy link
Contributor

KnutAM commented Sep 25, 2022

Thank's for a nice package!

I could not find this, but perhaps this functionality already exists?

Basically, I think a nice functionality would be something like

function recreate_repo_state(file)
 d = load(file) 
 istagged(d) || throw(...)
 if ispatch(d)
  checkout_patch(d["commit"], d["patch"])
 else
  isdirty(d["commit"]) && @warn ...
  checkout(d["commit"])
 end

to allow easy reproducing of old results.
The checkout function should be easy, but I'm not sure how to do the checkout_patch...

Additional related feature suggestions

  • If packages with separate git-repos exists in src, also check these out to the tagged state
  • Provide an easy mechanism such as reset_repo_state to go back to the current state (including repos in src)
@Datseris Datseris added git Related to interafacing with git help wanted The developers need some help here! labels Sep 25, 2022
@Datseris
Copy link
Member

Thank you!

That's a nice suggestion! So we'd welcome a Pull Request for it! I also do not know about patches, perhaps @sebastianpech knows (I think he was the one that added the patch, or maybe not, I don't have the bandwidth to search now).

@Datseris Datseris added the enhancement New feature or request label Sep 25, 2022
@KnutAM
Copy link
Contributor Author

KnutAM commented Sep 25, 2022

For future ref: patch introduced in #80

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request git Related to interafacing with git help wanted The developers need some help here!
Projects
None yet
Development

No branches or pull requests

2 participants