-
Notifications
You must be signed in to change notification settings - Fork 152
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
Upstream seems to be checked out even when :fork is provided in the recipe. #350
Comments
This fixes a bug where if: (1) you specified both an upstream and a fork (2) both the upstream and a fork have a branch by the same name (3) your recipe tells straight.el to use that branch for your local work then your local branch is set up to track the upstream branch rather than the fork branch as it is supposed to.
Should be fixed now. Thanks for the report! I never ran into it because I never used a branch on my fork that was also present in upstream. |
I can confirm that the correct commit is checked out but it is in a detached head form. So I still get the I'm not sure if that's relevant to this issue or another one should be opened. What I did to test this was pull latest straight.el, rebuld and reload, then delete the helm repo so a new clone would trigger. |
Actually, now I tried to create a branch and I got "branch master already exists", so I think it is still tracking the origin (upstream). Personally I would prefer it to track the fork as I always sync with the upstream manually and push to my fork. |
Can't reproduce. Running this code from an empty (setq straight-repository-branch "develop")
(defvar bootstrap-version)
(let ((bootstrap-file
(expand-file-name "straight/repos/straight.el/bootstrap.el" user-emacs-directory))
(bootstrap-version 5))
(unless (file-exists-p bootstrap-file)
(with-current-buffer
(url-retrieve-synchronously
"https://raw.githubusercontent.com/raxod502/straight.el/develop/install.el"
'silent 'inhibit-cookies)
(goto-char (point-max))
(eval-print-last-sexp)))
(load bootstrap-file nil 'nomessage))
(straight-use-package
'(helm :repo "git@github.com:emacs-helm/helm.git" :remote "upstream"
:fork (:repo "git@github.com:Fuco1/helm.git" :remote "origin")))
(let ((default-directory (straight--repos-dir "helm")))
(compile "git status")) gives me the following:
Of course, if you have a version lockfile then the particular commit specified therein will be checked out, rather than the branch you specify in your recipe. Is that what is going on? |
Yes indeed, I have a lock file. I think we can close! |
Great. See also #66 to change the UX around detached HEADs. |
This fixes a bug where if: (1) you specified both an upstream and a fork (2) both the upstream and a fork have a branch by the same name (3) your recipe tells straight.el to use that branch for your local work then your local branch is set up to track the upstream branch rather than the fork branch as it is supposed to.
I have this recipe in my init
Yet after installation master is still checked out to upstream/master. This is wrong in my opinion. How can I force straight.el to always use my fork's master as the default checkout?
The text was updated successfully, but these errors were encountered: