Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions git-auto-commit-mode.el
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,9 @@ It can be:
(function :tag "Function")))

(defun gac-relative-file-name (filename)
"Find the path to FILENAME relative to the git directory."
(let* ((git-dir
"Find the path to FILENAME relative to its git directory."
(let* ((default-directory (file-name-directory (expand-file-name filename)))
(git-dir
(string-trim-right
(shell-command-to-string "git rev-parse --show-toplevel"))))
(file-relative-name filename git-dir)))
Expand Down