#!/usr/bin/env bash
#
# List configured GIT branches.
# Copyright (c) Steven Cole 2005
#
# Print a listing of all known branches.
#
# The output has the following format:
#
#	BRANCH LOCATION
# 
# For example
#
#	origin  http://www.kernel.org/pub/scm/cogito/cogito.git

USAGE="cg-branch-ls"

. ${COGITO_LIB}cg-Xlib || exit 1

mkdir -p $_git/branches
[ "$(find $_git/branches -follow -type f)" ] \
	|| die "List of branches is empty. See cg-branch-add."

cd $_git/branches
for branch in *; do
	echo -n $branch
	echo -ne "\t"
	cat $branch
done
