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 a command "fresh lock" or similar #122

Open
markgandolfo opened this issue Nov 7, 2014 · 4 comments
Open

Add a command "fresh lock" or similar #122

markgandolfo opened this issue Nov 7, 2014 · 4 comments

Comments

@markgandolfo
Copy link

Add a command "fresh lock" or similar that will grab the revisions of each external file to lock everything in place.

I often roll out vm's and fresh only to find a file in a remote repo has changed substaintially or been removed. I then go search the repo for the version I need.

It would be great if I can "lock" my fresh file somehow and push that to github.

@twe4ked
Copy link
Member

twe4ked commented Nov 7, 2014

👍

@twe4ked
Copy link
Member

twe4ked commented Nov 8, 2014

Okay, what are the things we need to think about with this @jasoncodes?

  • Local sources
  • Non git sources (future)

I'm guessing running fresh install would only write a lock file if it doesn't already exist.
And fresh update would always write the lock file.
--ref= would still apply in all cases.

What would the structure of the lock file be? It would need to know about every file (even inside directories) and what ref they're locked at. Perhaps a git url, file path and SHA?

I could be missing a lot here.

@jamesottaway
Copy link

jamesottaway commented Apr 8, 2018

I'm setting up my new work laptop and this would be amazing. So many broken refs given I (and likely most people) don't lock their refs.

@jasoncodes
Copy link
Member

This and #47 are my 2 most desired new features.

I think we only need to store a canonical representation for the fresh line (anything which can change the effective commit we are looking at which seems to be repo, path, and ref) and the resolved commit for that which will be the HEAD if no --ref was supplied. I don’t think we need to track the last commit for every file in a glob/dir fresh line like we output in fresh show. (We do need to make sure fresh show still does this resolution with a lock file present though.)

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

4 participants