From 695afed65ec107a638e17cb8b37c2e64f86065d3 Mon Sep 17 00:00:00 2001 From: Nicolas Boisselier Date: Wed, 16 Oct 2024 15:04:34 +0200 Subject: [PATCH] etc/profile.d/git.sh --- etc/profile.d/git.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/etc/profile.d/git.sh b/etc/profile.d/git.sh index da3ab28c..bede08e5 100644 --- a/etc/profile.d/git.sh +++ b/etc/profile.d/git.sh @@ -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() { -- 2.47.3