Skip to content

Commit

Permalink
fix: fix retrival of root dir
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewpeck committed Jan 22, 2024
1 parent 5c053a8 commit 5c7672c
Showing 1 changed file with 1 addition and 13 deletions.
14 changes: 1 addition & 13 deletions hog.el
Original file line number Diff line number Diff line change
Expand Up @@ -59,19 +59,7 @@ 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."
(let ((submodule-parent
(string-trim-right
(shell-command-to-string
"git rev-parse --show-superproject-working-tree")))
(repo (string-trim-right
(shell-command-to-string
"git rev-parse --show-toplevel"))))

(let ((repo-root
(if (not (string= submodule-parent ""))
submodule-parent repo)))
(if (not (string= repo-root ""))
(concat repo-root "/") ""))))
(vc-root-dir))

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

0 comments on commit 5c7672c

Please sign in to comment.