summaryrefslogtreecommitdiffstats
path: root/src/subgit-ls
blob: 5016684f3de78b8c73b6e541e8ac22cbdda96e3c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/bin/bash

[ "$1" = "-h" ] && die $(cat <<-EOF
	Usage: subgit ls

	  Lists all tracked subrepositories (relative paths) from the
	  current subgit container's .subgitrc file.
	EOF
	)

root=$(subgit-source root .)
source "$root/.subgitrc"

for subrepo in "${!subgit[@]}"; do
	echo "$subrepo"
done