interplane.Get Omega
Read in your language

git

[Ported from github.com/git/git] Sync with Git 2.56.1

Brought by drakestapleton

branch master Branches Tags History

git / contrib / git-shell-commands / list

10 lines · 227 bytes Raw Blame History
1#!/bin/sh
2
3print_if_bare_repo='
4 if "$(git --git-dir="$1" rev-parse --is-bare-repository)" = true
5 then
6 printf "%s\n" "${1#./}"
7 fi
8'
9
10find -type d -name "*.git" -exec sh -c "$print_if_bare_repo" -- \{} \; -prune 2>/dev/null