summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJens Axboe <jens.axboe@oracle.com>2007-06-19 13:40:40 +0200
committerJens Axboe <jens.axboe@oracle.com>2007-06-19 13:40:40 +0200
commit231077a9356a95f89a12799afac9f1f730081597 (patch)
tree0208054679755b42ab35c2a4bf1a4fd9076ee5c0
parent1316e194e67dffead93388e6dcd6d86fbfe9054c (diff)
downloadag-231077a9356a95f89a12799afac9f1f730081597.tar.gz
ag-231077a9356a95f89a12799afac9f1f730081597.tar.bz2
ag-branch-ls: need not have remote branches
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
-rwxr-xr-xag-branch-ls4
1 files changed, 4 insertions, 0 deletions
diff --git a/ag-branch-ls b/ag-branch-ls
index 9e34a27..3c0f98b 100755
--- a/ag-branch-ls
+++ b/ag-branch-ls
@@ -17,6 +17,10 @@ for i in $HEADS; do
echo "$SHA $i"
done
+if [ ! -d .git/refs/remotes/origin ]; then
+ exit 0
+fi
+
HEADS=$(cd .git/refs/remotes/origin && ls)
echo "Remote branches:"
for i in $HEADS; do