aboutsummaryrefslogtreecommitdiff
path: root/tests/test-reconcile--find-git-repos.el
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-06-13 11:06:49 -0500
committerCraig Jennings <c@cjennings.net>2026-06-13 11:06:49 -0500
commitd2e815d6387a5213b1c2d42ad07b0d3e2a20bb88 (patch)
treee4677d033b15d71599dad8759ca989b5340b63ac /tests/test-reconcile--find-git-repos.el
parent66fddcba183cbb791f716e1779e76255a6d1d0dd (diff)
downloaddotemacs-d2e815d6387a5213b1c2d42ad07b0d3e2a20bb88.tar.gz
dotemacs-d2e815d6387a5213b1c2d42ad07b0d3e2a20bb88.zip
fix: vertico-repeat C-s and dotted-repo discovery (audit bugs)
Two bugs from the 2026-06 config audit. - C-s C-s never repeated a search. cj/consult-line-or-repeat calls vertico-repeat on the second press, but vertico-repeat-save was never on minibuffer-setup-hook, so it always signalled "No Vertico session". I hooked vertico-repeat-save next to the vertico block. It's autoloaded, so the load defers to the first minibuffer. - reconcile-open-repos skipped any repo with a dot in its name. cj/find-git-repos filtered children through "^[^.]+$", which matches only dot-free names, so mcp.el, capture.el, and google-contacts.el were never reconciled while M-P still reported "Complete". It now filters through directory-files-no-dot-files-regexp plus a hidden-dir guard, so dotted repos pass and .git stays out. Each fix is test-first: a failing assertion (hook membership, three dotted repos found) precedes the change.
Diffstat (limited to 'tests/test-reconcile--find-git-repos.el')
-rw-r--r--tests/test-reconcile--find-git-repos.el9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/test-reconcile--find-git-repos.el b/tests/test-reconcile--find-git-repos.el
index e065fca9..c6a190a1 100644
--- a/tests/test-reconcile--find-git-repos.el
+++ b/tests/test-reconcile--find-git-repos.el
@@ -81,6 +81,15 @@
(should (= (length repos) 1))
(should (string-suffix-p "visible-repo" (car repos))))))
+(ert-deftest test-find-git-repos-boundary-dotted-repo-name-found ()
+ "Boundary: a repo whose directory name contains a dot (e.g. mcp.el) is
+discovered. Regression for the `^[^.]+$' filter that matched only dot-free
+names and silently skipped dotted repos like mcp.el / capture.el."
+ (reconcile-test-with-temp-dirs
+ ("mcp.el/.git/" "capture.el/.git/" "plain-repo/.git/")
+ (let ((repos (cj/find-git-repos test-root)))
+ (should (= (length repos) 3)))))
+
(ert-deftest test-find-git-repos-boundary-prunes-heavy-directories ()
"Skips generated/heavy directories while discovering repos."
(reconcile-test-with-temp-dirs