From 5a46d415df75b8b0168e2cf48b30fe463c01a77c Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Sun, 10 May 2026 02:44:10 -0500 Subject: Make repo reconciliation review-first Stop automatically stashing, pulling, and popping dirty repos during reconciliation. Clean repos still pull, dirty repos open Magit for review, and results now include structured statuses, skip reasons, pruning, and a summary. --- tests/test-reconcile--find-git-repos.el | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) (limited to 'tests/test-reconcile--find-git-repos.el') diff --git a/tests/test-reconcile--find-git-repos.el b/tests/test-reconcile--find-git-repos.el index 25987818b..e065fca90 100644 --- a/tests/test-reconcile--find-git-repos.el +++ b/tests/test-reconcile--find-git-repos.el @@ -27,11 +27,19 @@ (should (= (length repos) 1)) (should (string-suffix-p "child" (car repos)))))) -(ert-deftest test-find-git-repos-normal-repo-with-nested-subrepo () - "Finds both a parent repo and a sub-repo inside it." +(ert-deftest test-find-git-repos-normal-stops-at-repo-root-by-default () + "Finds a parent repo and does not descend into nested repos by default." (reconcile-test-with-temp-dirs ("deepsat/.git/" "deepsat/frontend/.git/" "deepsat/backend/.git/") (let ((repos (cj/find-git-repos test-root))) + (should (= (length repos) 1)) + (should (string-suffix-p "deepsat" (car repos)))))) + +(ert-deftest test-find-git-repos-normal-can-include-nested-subrepos () + "Finds nested repos when INCLUDE-NESTED is non-nil." + (reconcile-test-with-temp-dirs + ("deepsat/.git/" "deepsat/frontend/.git/" "deepsat/backend/.git/") + (let ((repos (cj/find-git-repos test-root t))) (should (= (length repos) 3))))) (ert-deftest test-find-git-repos-normal-mixed-repos-and-dirs () @@ -73,5 +81,15 @@ (should (= (length repos) 1)) (should (string-suffix-p "visible-repo" (car repos)))))) +(ert-deftest test-find-git-repos-boundary-prunes-heavy-directories () + "Skips generated/heavy directories while discovering repos." + (reconcile-test-with-temp-dirs + ("project/node_modules/dependency/.git/" + "project/.venv/tool/.git/" + "project/src/repo/.git/") + (let ((repos (cj/find-git-repos test-root))) + (should (= (length repos) 1)) + (should (string-suffix-p "repo" (car repos)))))) + (provide 'test-reconcile--find-git-repos) ;;; test-reconcile--find-git-repos.el ends here -- cgit v1.2.3