Straight.el: Cannot install vc-fossil

Created on 25 May 2020  路  3Comments  路  Source: raxod502/straight.el

What's wrong

I'm trying to migrate from use-package to straight.el. However, two packages fail. (edit: I fixed the other one myself, it was a configuration mistake.) Trying to install vc-fossil fails:

(use-package vc-fossil
  :ensure t
  :config
  (add-to-list 'vc-handled-backends 'Fossil t))

While use-package worked just well, straight doesn't:

Warning (straight): Could not check out branch "master" of repository "emacs-fossil"

How can I fix that?

Version information

  • Emacs version: 26.3
  • Operating system: macOS
branch bug compatibility duplicate git github melpa

All 3 comments

It's just a warning.
straight.el cloned the repository but couldn't checkout the master branch because it doesn't exist. Instead the HEAD branch is checked out which points to origin/trunk. So vc-fossil is installed.
If you want to get rid of the warning (which you probably only see on initial install) you can specify the repository and branch to use:

(use-package vc-fossil
  :straight (:host github :branch "trunk")
  :config
  (add-to-list 'vc-handled-backends 'Fossil))

Indeed, that fixed it and no further errors appear on pull-all. Thank you!

This is actually a long-standing MELPA compatibility bug in straight.el, see #279. That said, it is easy to work around as @igroen outlined. (You actually should be able to get away with just :straight (:branch "trunk") in the use-package form, unless there's a bug.)

Was this page helpful?
0 / 5 - 0 ratings