-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Warning: repos that have renamed "master" branch to "main" must be fixed manually on doom update
or doom upgrade
#3435
Comments
This should probably be reported upstream to straight. It defaults to cloning master in the absence of an explicit branch. Though, I suspect no good, general solution for this exists. Neither Doom nor straight is able to guess what a (remote) repo's main branch is, or whether the current branch was necessarily renamed to main or some other arbitrary name. Perhaps melpa should update it's recipes to include branch names. |
@hlissner I've taken the liberty of opening a couple of issues. One over in the emacs-websocket repo where I think it'd be considerate to let people know about the breaking change, and one over in the straight.el repo. |
A permanent solution to this problem has been discussed already. Some nontrivial work is required, but I do not think the problem is insurmountable in principle. |
@telotortium can you show step-by-step instructions what we need to do? |
@randomizedthinking My instructions above don't work? |
@telotortium To me, websocket is a package in the middle. After running your commands inside .emacs.d/.local/straight/repos/emacs-websocket, I still stuck with doom update: I would like to update the rest of the packages after websocket, but it won't work. Update: I didn't do anything and doom update now works. Thank all upstream maintainers for making it happen. |
Workaround (CAVEAT EMPTOR: with full rebuild)Assumptions:
Workaround properEMACSDIR="~/.emacs.d" # Ensure this is accurate!
mv -iv "$EMACSDIR" "$EMACSDIR".bck
git clone --depth 1 https://github.com/hlissner/doom-emacs.git "$EMACSDIR"
"$EMACSDIR"/bin/doom sync
→ Building ein → Cloning emacs-websocket...
Warning (straight): Could not check out branch "master" of repository "emacs-websocket"
→ Building ein → Cloning emacs-websocket...done ... but will compile it anyway: $ ls -l ~/.emacs.d/.local/straight/build/websocket/
total 68
lrwxrwxrwx 1 pancho pancho 72 Jun 23 07:04 websocket.el -> /home/pancho/.emacs.d/.local/straight/repos/emacs-websocket/websocket.el
-rw-r--r-- 1 pancho pancho 62441 Jun 23 07:04 websocket.elc
Hope that it helps! |
Perhaps I am missing something, but why can you not just go into the |
That's the first thing I tried. But in my case, the repo was already tracking |
I got these kind of errors also when cleaning out repos to start from scratch due to |
This issue has been automatically marked stale because of a lack of recent activity. If this issue is still valid, reply to it or remove the label or it will be closed in 7 days. |
Stalebot strikes once again and closes a relevant and unresolved issue. |
doom upgrade
(and I presumedoom update
) aborts if upstream has changed the default branch name (for example, from master to main). Example failure:This is because https://github.com/ahyatt/emacs-websocket has renamed their "master" branch to "main". Git doesn't handle this situation automatically if you've already cloned a local copy. It can be fixed with instructions from the aforementioned article:
The text was updated successfully, but these errors were encountered: