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

Whippet gets confused if both main and master exist #188

Open
RobjS opened this issue Oct 26, 2022 · 1 comment
Open

Whippet gets confused if both main and master exist #188

RobjS opened this issue Oct 26, 2022 · 1 comment
Labels

Comments

@RobjS
Copy link
Contributor

RobjS commented Oct 26, 2022

To recreate:

  • Create a new plugin repo, with both main and master branches. Make master the default
  • Push an older version of the plugin to main, and a newer version to master (i.e. so that the older version does not exist on the commit history of main)
  • Point your whippet.json file at that repo (with no specific reference beyond the repo source)
  • Run whippet deps update. Whippet will take the commit hash reference added to whippet.lock from main, but try and pull the plugin from master, using that reference. This will result in a fatal: reference is not a tree: [commit-hash-from-master] error when running whippet deps install or whippet deps update

It appears that, if main exists, Whippet assumes it's the default branch, but that may not actually be the case. It should probably just use the default branch at all times, and allow that default branch to be either main or master.

@snim2
Copy link
Contributor

snim2 commented Sep 18, 2023

@RobjS where we've had this problem, we haven't always been consistent about whether main or master is the default branch. If a plugin repo has both, I'm wondering whether Whippet should just exist with an error message?

@snim2 snim2 added the bug label Sep 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants