Function: git-find-file

git-find-file is an interactive and byte-compiled function defined in hib-social.el.

Signature

(git-find-file FILE)

Documentation

Locate FILE with the shortest git-versioned pathname.

Uses hpath:find to display the FILE, typically in another window. FILE must not have any path component.

If the current directory is in a git repository, search only that one; otherwise, search all known local repositories. Signal an error if no match is found.

Key Bindings

Source Code

;; Defined in ~/.emacs.d/elpa/hyperbole-20260414.325/hib-social.el
(defun git-find-file (file)
  "Locate FILE with the shortest git-versioned pathname.
Uses `hpath:find' to display the FILE, typically in another
window.  FILE must not have any path component.

If the current directory is in a git repository, search only that one;
otherwise, search all known local repositories.  Signal an error if no match
is found."
  (interactive "sFind git-versioned file: ")
  (let ((path (hibtypes-git-find file)))
    (if path
	(progn (message path)
	       (hpath:find path))
      (error "(git-find-file): `%s' not found in any local git repository" file))))