diff options
Diffstat (limited to 'third_party/git/contrib/git-shell-commands/list')
-rwxr-xr-x | third_party/git/contrib/git-shell-commands/list | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/third_party/git/contrib/git-shell-commands/list b/third_party/git/contrib/git-shell-commands/list new file mode 100755 index 000000000000..6f8993882114 --- /dev/null +++ b/third_party/git/contrib/git-shell-commands/list @@ -0,0 +1,10 @@ +#!/bin/sh + +print_if_bare_repo=' + if "$(git --git-dir="$1" rev-parse --is-bare-repository)" = true + then + printf "%s\n" "${1#./}" + fi +' + +find -type d -name "*.git" -exec sh -c "$print_if_bare_repo" -- \{} \; -prune 2>/dev/null |