Function: hibtypes-git-find-execute
hibtypes-git-find-execute is a byte-compiled function defined in
hib-social.el.
Signature
(hibtypes-git-find-execute FORMAT-PREFIX FIND-DIR FILE)
Documentation
Build and execute a shell command to find a matching git-versioned file.
Return nil if no matching file is found.
Source Code
;; Defined in ~/.emacs.d/elpa/hyperbole-20260414.325/hib-social.el
(defun hibtypes-git-find-execute (format-prefix find-dir file)
"Build and execute a shell command to find a matching git-versioned file.
Return nil if no matching file is found."
(let ((path
(shell-command-to-string
(format (concat
;; Ignore any errors for non-existing paths
"%s %s -path '*/.git' -prune -o -path '*%s' -print 2> /dev/null"
;; Choose the shortest matching path which is usually the best guess.
" | awk '{ print length($0) \"\t\" $0 }' - | sort -n | head -n 1 | cut -f2- | tr -d '\n'")
format-prefix find-dir file))))
(and (stringp path) (> (length path) 0) path)))