From c8fbbee154adfd7c312c7575c87fb25890168956 Mon Sep 17 00:00:00 2001 From: tv Date: Wed, 2 Dec 2026 01:35:46 +0000 Subject: populate probe: run git status before looking for nested .git Looking for a .git below a work tree takes find walking all of it, which takes longer than git status: for nixpkgs, 0.375 s and 0.275 s, of 0.65 s per git source and run with nothing to do. Without submodules, which the index tells, Git follows no .git below the work tree, so the probe runs git status first. If it finds anything untracked or ignored, the source gets delivered, and the git script checks the work tree as before; else there's no .git below it, except where Git doesn't list one, e.g. a .git file in a tracked directory, which the next run with something to deliver refuses. With submodules, the probe looks for nested .git first, as before. git_problems is git_dir_problems and git_nested_problems now. --- pkgs/populate/docs/design.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'pkgs/populate/docs/design.md') diff --git a/pkgs/populate/docs/design.md b/pkgs/populate/docs/design.md index 0e284a0..33148f4 100644 --- a/pkgs/populate/docs/design.md +++ b/pkgs/populate/docs/design.md @@ -146,7 +146,13 @@ processors: checked out, the URL is the source's, nothing is modified, untracked, or ignored, and the submodules are at their commits, nothing runs, and the flakes step takes the work tree for checked, as after the git - script. + script. Looking for a `.git` below the work tree takes find walking + all of it, longer than `git status`, so without submodules, where Git + follows none, `git status` comes first: if it finds anything untracked + or ignored, the work tree gets delivered, which checks it, and else + there's no `.git` below it, except in places Git doesn't list, e.g. a + `.git` file in a tracked directory, which the next run with something + to deliver refuses. ## Development -- cgit v1.3.1 [cgit] Unable to lock slot /tmp/cgit/94200000.lock: Permission denied (13)