Function: hibtypes-git-add-project-to-repos-cache

hibtypes-git-add-project-to-repos-cache is an interactive and byte-compiled function defined in hib-social.el.

Signature

(hibtypes-git-add-project-to-repos-cache PROJECT)

Documentation

Locate PROJECT directory and add to directories in hibtypes-git-repos-cache.

Return the project directory found or nil if none.

Key Bindings

Source Code

;; Defined in ~/.emacs.d/elpa/hyperbole-20260414.325/hib-social.el
(defun hibtypes-git-add-project-to-repos-cache (project)
  "Locate PROJECT directory and add to directories in `hibtypes-git-repos-cache'.
Return the project directory found or nil if none."
  (interactive "sProject: ")
  (message "Please wait while %s's local git repository is found..." project)
  (let ((project-dir (shell-command-to-string
		      (format "%s -l1 /%s/.git | sed -e 's+/.git++' | tr -d '\n'"
			      (hibtypes-git-get-locate-command)
			      project))))
    (message "")
    (when (and (> (length project-dir) 0) (= ?/ (aref project-dir 0)))
      ;; project-dir a directory, prepend it to the cache file...
      (with-current-buffer (find-file-noselect hibtypes-git-repos-cache)
        (goto-char (point-min))
        (insert (concat project-dir "\n"))
        (save-buffer))
      ;; ...and return it.
      project-dir)))