]> git.nbdom.net Git - nb.git/commitdiff
git.sh
authorNicolas Boisselier <nicolas.boisselier@gmail.com>
Thu, 1 Dec 2016 15:42:47 +0000 (15:42 +0000)
committerNicolas Boisselier <nicolas.boisselier@gmail.com>
Thu, 1 Dec 2016 15:42:47 +0000 (15:42 +0000)
etc/profile.d/functions
etc/profile.d/git.sh

index 200660038491fb2c67a14da8b03928d0c3695898..7ca51cf6ada0d6106422edf970f1ff44fe900a28 100644 (file)
@@ -643,6 +643,7 @@ url2nc() {
       s,:([a-zAZ]),/$1,;
       m,^\w+://, or $_="ssh://$_";
       @_ = URI::Split::uri_split($_) or next;
+      $_[1] =~ s/:(.*$)// and $_[2] = $1.$_[2];
     }
 
     $_=$_[1];
index a2d82381d9e9666735260ad4b35a1557cb9d899d..d3f5142d27395e8f7220d65badf3fd37f08c5b0f 100644 (file)
@@ -133,7 +133,8 @@ git_conn_check() {
     logger -t $NAME -s "Can't get url from \`git config --het remote.origin.url\` in `pwd`"
     return 1
   fi
-  #[ "$1" = "TEST" ] &&
+
+  echo "$dest" | grep -qm1 '^[a-z]\+:' || dest="ssh://$dest"
   dest=$(url2nc "$dest")
 
   local ok