diff options
| author | tv <tv@krebsco.de> | 2026-12-01 02:47:32 +0000 |
|---|---|---|
| committer | tv <tv@krebsco.de> | 2026-12-01 04:06:17 +0000 |
| commit | 3aff9c58c68d6882294e6586ddb384709ce95abe (patch) | |
| tree | f7f7d13dec077dc21858f56a3a990c483f5f22c8 /pkgs/populate/src/sh.rs | |
| parent | cf26dc1f928e9839123bedd1693d792bbb418312 (diff) | |
populate: probe passage and pass sources too
A passage source ran rsync on every run, about a dozen round trips to a
remote target, and a pass source a command reading .pass_info, which
tells whether the passwords changed.
The probe lists the target paths of passage sources too, and reads what
pass sources' .pass_info contains. After decrypting, a passage source
lists its working directory with find, whose files have the times of
their .age files and fixed modes, and doesn't run rsync if the listings
are the same; Delivery::transfer does that for any source the probe
listed. A pass source takes .pass_info from the probe.
Diffstat (limited to 'pkgs/populate/src/sh.rs')
| -rw-r--r-- | pkgs/populate/src/sh.rs | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/pkgs/populate/src/sh.rs b/pkgs/populate/src/sh.rs index dc44854..9d2b1d4 100644 --- a/pkgs/populate/src/sh.rs +++ b/pkgs/populate/src/sh.rs @@ -347,13 +347,14 @@ fi /// probe KIND PATH...: prints, for each pair of KIND and PATH, what /// probe::Target takes from it: P and PATH, then, for KIND F, an entry like /// listings prints for each thing at and below PATH, for L, if PATH is a -/// symlink, L and its target, and for G, if PATH is a directory with a .git -/// directory that git_problems finds nothing wrong with, C, H and HEAD, U and -/// the origin's URL, D and what git status prints for anything modified, -/// untracked, or ignored, and, with submodules, M and what git submodule -/// status prints for them, and S and an exit status, all separated by NULs. -/// Git runs like the git script runs it, without hooks and file system -/// monitors, and without writing the index. +/// symlink, L and its target, for I, I and what PATH/.pass_info contains, +/// if anything, like pass_info prints it, and for G, if PATH is a directory +/// with a .git directory that git_problems finds nothing wrong with, C, H +/// and HEAD, U and the origin's URL, D and what git status prints for +/// anything modified, untracked, or ignored, and, with submodules, M and +/// what git submodule status prints for them, and S and an exit status, +/// all separated by NULs. Git runs like the git script runs it, without +/// hooks and file system monitors, and without writing the index. pub fn probe() -> String { GIT_PROBLEMS.to_string() + r#" @@ -377,6 +378,9 @@ while test $# -gt 1; do printf 'L\0%s\0' "$(readlink "$path")" fi ;; + I) + printf 'I\0%s\0' "$(cat "$path"/.pass_info 2>/dev/null || :)" + ;; G) if ! test -L "$path" && test -d "$path" && ! test -L "$path"/.git && test -d "$path"/.git && |
