minmo : return nil when storing ignore in the table
This commit is contained in:
parent
24e1030a55
commit
be5c57e909
1 changed files with 8 additions and 5 deletions
|
|
@ -121,11 +121,14 @@ filesystem FSTYPE, 'git or 'disk."
|
||||||
Optional FORCE means ignore the minmo--git-directory-table."
|
Optional FORCE means ignore the minmo--git-directory-table."
|
||||||
(let* ((dir (file-name-directory file))
|
(let* ((dir (file-name-directory file))
|
||||||
(hash (gethash dir minmo--git-directory-table)))
|
(hash (gethash dir minmo--git-directory-table)))
|
||||||
(if (or force (not hash))
|
(when (or force (not hash))
|
||||||
;; NOTE: store 'ignore for files not under .git, so these calls are also optimized:
|
;; NOTE: store 'ignore for files not under .git, so these calls are also optimized:
|
||||||
(puthash dir (or (locate-dominating-file file ".git") 'ignore) minmo--git-directory-table)
|
(setq hash (puthash dir (or
|
||||||
|
(locate-dominating-file file ".git")
|
||||||
|
'ignore)
|
||||||
|
minmo--git-directory-table)))
|
||||||
;; but return nil when 'ignore, so that this function serves as a guard:
|
;; but return nil when 'ignore, so that this function serves as a guard:
|
||||||
(if (eq hash 'ignore) nil hash))))
|
(if (eq hash 'ignore) nil hash)))
|
||||||
|
|
||||||
(defun minmo--file-exists-locally-p ()
|
(defun minmo--file-exists-locally-p ()
|
||||||
"Utility predicate to prevent expensive VC checks remotely."
|
"Utility predicate to prevent expensive VC checks remotely."
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue