aboutsummaryrefslogtreecommitdiffstats
path: root/pkgs/populate/src/sh.rs
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/populate/src/sh.rs')
-rw-r--r--pkgs/populate/src/sh.rs18
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 &&
[cgit] Unable to lock slot /tmp/cgit/cb300000.lock: Permission denied (13)