]> git.nbdom.net Git - nb.git/commitdiff
etc/profile.d/git.sh
authorNicolas Boisselier <nicolas.boisselier@gmail.com>
Wed, 16 Oct 2024 13:04:34 +0000 (15:04 +0200)
committerNicolas Boisselier <nicolas.boisselier@gmail.com>
Wed, 16 Oct 2024 13:04:34 +0000 (15:04 +0200)
etc/profile.d/git.sh

index da3ab28cecd8a52bbc6088aeb88da1a4b84bd81d..bede08e59d5ca967a00ccf1e466c689df186ccd4 100644 (file)
@@ -273,7 +273,8 @@ git_branch_create_push() {
 
 git_name() {
 # 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,^.*/,,'
+       # NB 16.10.24 git config --local remote.origin.url | sed -E -e 's,^[^:/]+[:/],,' -e 's,(/|\.git)$,,' -e 's,^.*/,,'
+       basename "$(git config --local remote.origin.url)" .git
 }
 
 git_branch() {