We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 180eb6f commit ad6f348Copy full SHA for ad6f348
.emacs.rc/autocommit-rc.el
@@ -5,8 +5,16 @@
5
(defvar rc/autocommit-local-locks
6
(make-hash-table :test 'equal))
7
8
+(defun rc/file-truename-nilable (filename)
9
+ (when filename
10
+ (file-truename filename)))
11
+
12
(defun rc/autocommit--id ()
- (let ((id (file-truename default-directory)))
13
+ (let ((id (-> default-directory
14
+ (locate-dominating-file ".git")
15
+ (rc/file-truename-nilable))))
16
+ (when (not id)
17
+ (error "%s is not inside of a git repository" default-directory))
18
(unless (gethash id rc/autocommit-local-locks)
19
(puthash id nil rc/autocommit-local-locks))
20
id))
0 commit comments