branch: externals/vc-got
commit 4093d2f9a9b37cb58d2b733514812820462464f3
Author: Omar Polo <[email protected]>
Commit: Omar Polo <[email protected]>
fix vc-got-registered
before it didn't check if the file is into a got worktree.
---
vc-got.el | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/vc-got.el b/vc-got.el
index 2d2fcfe..33c544a 100644
--- a/vc-got.el
+++ b/vc-got.el
@@ -200,9 +200,10 @@ DIR-OR-FILE."
"Return non-nil if FILE is registered with got."
(if (file-directory-p file)
nil ;got doesn't track directories
- (let ((status (vc-got--status file)))
- (not (or (string-prefix-p "?" status)
- (string-prefix-p "N" status))))))
+ (when (vc-find-root file ".got")
+ (let ((status (vc-got--status file)))
+ (not (or (string-prefix-p "?" status)
+ (string-prefix-p "N" status)))))))
;; (vc-got-registered "/usr/ports/mystuff/net/td")
;; (vc-got-registered "/usr/ports/mystuff/net/td/Makefile")