diff options
Diffstat (limited to 'pkgs')
| -rw-r--r-- | pkgs/claude-inbox.nix | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/pkgs/claude-inbox.nix b/pkgs/claude-inbox.nix index 698f2c6..6e0dd6e 100644 --- a/pkgs/claude-inbox.nix +++ b/pkgs/claude-inbox.nix @@ -142,6 +142,15 @@ let # there (but master, which is no branch to show or take) is_repo() { case $1 in "" | . | .. | */*) return 1 ;; esac + # [remote "claude"] in .git/config, without running git (with many + # repositories, it adds up), but where .git isn't a directory + local l + if test -d "$src/$1/.git"; then + while IFS= read -r l; do + case $l in *'[remote "claude"]'*) return 0 ;; esac + done 2>/dev/null < "$src/$1/.git/config" || : + return 1 + fi test -e "$src/$1/.git" && git -C "$src/$1" remote get-url claude >/dev/null 2>&1 } has_branch() { |
