]> git.nbdom.net Git - nb.git/commitdiff
etc/profile.d/git.sh
authorNicolas Boisselier <nicolas.boisselier@gmail.com>
Tue, 1 May 2018 03:14:04 +0000 (04:14 +0100)
committerNicolas Boisselier <nicolas.boisselier@gmail.com>
Tue, 1 May 2018 03:14:04 +0000 (04:14 +0100)
etc/profile.d/git.sh

index a7c8cb90707dbc1b8885db5beaf47ed236714420..c26198f8c342da42d7b9d206b6cec1b1fa8eacfb 100644 (file)
@@ -195,7 +195,8 @@ git_branch_create_push() {
 }
 
 git_name() {
-       git config --local remote.origin.url | sed -E -e 's,^[^:/]+[:/],,'  -e 's,/.*$,,' -e 's/\.git$//'
+# NB 01.05.18  git config --local remote.origin.url | sed -E -e 's,^[^:/]+[:/],,'  -e 's,/.*$,,' -e 's/\.git$//'
+       git config --local remote.origin.url | sed -E -e 's,^[^:/]+[:/],,' -e 's,(/|\.git)$,,' -e 's,^.*/,,'
 }
 
 git_branch() {