Fix "fatal: no names found" errors on 'doom rebuild'

Some packages that depend on org (like elfeed) will load the built-in
org early in the rebuild/package install process, which causes org to
define org-release and org-git-version, sometimes overwriting our stubs
for it. Without our hack, org call 'git describe' in the org repo in an
attempt to determine the installed version, which won't work in a sparse
clone. To ensure future definitions never overwrite ours, we advise them
as well.

Also moves magit-version hack to its autoload file, for consistency with
org's hacks.
This commit is contained in:
Henrik Lissner 2019-08-07 16:31:45 -04:00
parent c8d6ab823b
commit 9ab49be564
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395
4 changed files with 19 additions and 14 deletions

View file

@ -1,5 +1,10 @@
;;; tools/magit/autoload.el -*- lexical-binding: t; -*-
;; HACK Magit complains loudly when it can't determine its own version, which is
;; the case when magit is built through straight. The warning is harmless,
;; however, so we just need it to shut up.
;;;###autoload (advice-add #'magit-version :around #'ignore)
;;;###autoload
(defun +magit-display-buffer-fn (buffer)
"Same as `magit-display-buffer-traditional', except...