diff options
Diffstat (limited to 'lsgit')
-rwxr-xr-x | lsgit | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lsgit b/lsgit new file mode 100755 index 0000000..9b316ea --- /dev/null +++ b/lsgit @@ -0,0 +1,7 @@ +#!/usr/bin/sh +# Parse all subdirectories and list git repos encountered. +# This oneliner just naively looks for .git folders under subdirectories; it won't catch repos with changed --git-dir. + +# original source (c) 2016 user1685095 CC BY-SA 3.0 <https://unix.stackexchange.com/a/333918> +# modified by Alex Starfall 2022 +find '.' -type d -execdir test -e '{}/.git' ';' -printf '%P/\n' -prune | tree --fromfile . |