From: Greg Brockman Date: Wed, 14 Jul 2010 03:01:13 GMT Subject: [PATCH/RFC 2/4] git-shell-commands: Add a command to list bare repos Message-ID: <1279076475-27730-3-git-send-email-gdb@mit.edu> In-Reply-To: <1279076475-27730-1-git-send-email-gdb@mit.edu> Signed-off-by: Greg Brockman --- git-shell-commands/list | 9 +++++++++ 1 files changed, 9 insertions(+), 0 deletions(-) create mode 100755 git-shell-commands/list diff --git a/git-shell-commands/list b/git-shell-commands/list new file mode 100755 index 0000000..dca2472 --- /dev/null +++ b/git-shell-commands/list @@ -0,0 +1,9 @@ +#!/bin/bash + +cd ".."; +# TODO: make safe for spaces +for dir in $(find -type d -name '*.git'); do + if [ "$(git --git-dir="$dir" rev-parse --is-bare-repository)" = "true" ]; then + echo "${dir#./}" + fi +done -- 1.7.0.4