sm-commit AT lists.ibiblio.org
Subject: Source Mage code commit list
List archive
[SM-Commit] GIT changes to master sorcery by Ismael Luceno (9ffa97a1a1c8772dbb0bbc6758801435f8886401)
- From: Ismael Luceno <scm AT sourcemage.org>
- To: sm-commit AT lists.ibiblio.org
- Subject: [SM-Commit] GIT changes to master sorcery by Ismael Luceno (9ffa97a1a1c8772dbb0bbc6758801435f8886401)
- Date: Thu, 24 Feb 2022 22:35:32 +0000
GIT changes to master sorcery by Ismael Luceno <ismael AT sourcemage.org>:
var/lib/sorcery/modules/url_handlers/url_git | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
New commits:
commit 9ffa97a1a1c8772dbb0bbc6758801435f8886401
Author: Ismael Luceno <ismael AT sourcemage.org>
Commit: Ismael Luceno <ismael AT sourcemage.org>
url_git: Simplify url_git_crack
diff --git a/var/lib/sorcery/modules/url_handlers/url_git
b/var/lib/sorcery/modules/url_handlers/url_git
index 47636e6..356b515 100755
--- a/var/lib/sorcery/modules/url_handlers/url_git
+++ b/var/lib/sorcery/modules/url_handlers/url_git
@@ -33,12 +33,10 @@
#---------------------------------------------------------------------
url_git_crack() {
URL=$(url_strip_prefix "$1" git)
- GIT_ROOT=git://$(sed "s#\(^[^/]*[^:]*\):.*#\1#" <<< "$URL")
- local GIT_DIRECTORY_TAG=$(sed "s#^[^/]*[^:]*\(.*\)#\1#" <<< "$URL")
- GIT_DIRECTORY=$(cut -d : -f2 <<< "$GIT_DIRECTORY_TAG")
- local GIT_TAGNAME=$(cut -d : -f3 <<< "$GIT_DIRECTORY_TAG")
- GIT_TAG=${GIT_TAGNAME:=master}
-
+ GIT_ROOT="git://${URL%%:*}"
+ GIT_DIRECTORY=$(cut -d : -f2 <<< "$URL")
+ GIT_TAG=$(cut -d : -f3 <<< "$URL")
+ : ${GIT_TAG:=master}
}
#---------------------------------------------------------------------
- [SM-Commit] GIT changes to master sorcery by Ismael Luceno (9ffa97a1a1c8772dbb0bbc6758801435f8886401), Ismael Luceno, 02/24/2022
Archive powered by MHonArc 2.6.24.