]> git.nbdom.net Git - nb.git/commitdiff
git_list
authorNicolas Boisselier <nicolas.boisselier@semantico.com>
Fri, 19 Aug 2016 11:03:52 +0000 (12:03 +0100)
committerNicolas Boisselier <nicolas.boisselier@semantico.com>
Fri, 19 Aug 2016 11:03:52 +0000 (12:03 +0100)
etc/profile.d/git.sh

index 0c9c1fcf0ad712881c46bc36b5ff7ebf05523e6b..435bd7b34aacac8f128c61b9ff9dbdd801596f89 100644 (file)
@@ -73,9 +73,8 @@ git_commit_push_add() {
 }
 
 git_create() {
-# NB 14.04.16   shell_help_noarg "Usage: $FUNCNAME DIRECTORY" "$@" && return 1
-# NB 14.04.16   declare dir="$1"; shift
   shell_help "Usage: $FUNCNAME create git project from current dir" "$@" && return 1
+
   declare dir="$(basename $(pwd))"
   declare repo="$GIT_REPO"
   [ -n "$1" ] && repo="$1" && shift
@@ -83,7 +82,6 @@ git_create() {
   #
   # Check, create repo on server
   #
-# NB 14.04.16   [ -e "$dir" ] && echo ">$dir already exists!" 1>&2 && return 1
 
   echo ">git init --bare ${dir}.git"
   local user=${repo%@*}
@@ -111,3 +109,7 @@ git_create() {
 git_clone() {
   git clone $GIT_REPO:${1%.git}.git
 }
+
+git_list() {
+  ssh $GIT_REPO list | perl -ne '/(\S+).git/ and print "$1\n"'
+}