Skip to content

Commit

Permalink
fix get project-root when run in batch mode
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewpeck committed Apr 19, 2024
1 parent dadda66 commit ebf5210
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion hog.el
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@ Can be set in dir-locals to be changed on a per-project basis.")

(defun hog--project-root ()
"Get the root of the current version controlled project."
(expand-file-name (vc-root-dir)))
(expand-file-name (or (vc-root-dir)
(locate-dominating-file (buffer-file-name)".git"))))

(defun hog--get-projects ()
"Get a list of available Hog projects."
Expand Down

0 comments on commit ebf5210

Please sign in to comment.