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

Fixes to hatchet lock #118

Merged
merged 2 commits into from
Aug 20, 2020
Merged

Conversation

schneems
Copy link
Contributor

@schneems schneems commented Aug 19, 2020

  • Allow hatchet lock to be called on a new app
  • Allow hatchet.lock to specify a different branch than what github currently has as the default

Currently when you run `hatchet install` for the first time on a new app it tells you to first run `hatchet lock`. However when you run `hatchet lock, it fails due to a missing file. 

This patch tests that behavior and allows for running `hatchet lock` when the file does not exist
If you've locked to the `main` branch in a lockfile, but the default branch on GitHub is something different (like `master`) then when hatchet tries to run `git reset --hard main` it fails because it doesn't have the references for `main` yet.

This commit fixes this by first explicitly fetching that commit, checking out into it to make sure it exists, and then doing the reset.
@schneems schneems force-pushed the schneems/lock-to-main-but-default-is-master branch from ac53606 to 4552ad9 Compare August 19, 2020 22:34
Copy link
Member

@Malax Malax left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! 🎉

@schneems schneems merged commit cccb0c1 into main Aug 20, 2020
@schneems schneems deleted the schneems/lock-to-main-but-default-is-master branch August 20, 2020 13:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants