config/git: update url generation via git-repo

This commit is contained in:
xeruf 2022-08-16 14:17:25 +02:00
parent 4893de59ac
commit 41aea07a8c
3 changed files with 4 additions and 7 deletions

View File

@ -106,7 +106,7 @@
lgr = log --pretty=tformat:'%C(auto)%h%d %s %Cgreen(%cd) %Cblue<%an>%Creset' --date=human --graph lgr = log --pretty=tformat:'%C(auto)%h%d %s %Cgreen(%cd) %Cblue<%an>%Creset' --date=human --graph
lg = lgr HEAD @{push} lg = lgr HEAD @{push}
lo = log --pretty=tformat:'%C(auto)%h%d %s %Cgreen(%cd) %Cblue<%an>%Creset' --date=human --no-merges lo = log --pretty=tformat:'%C(auto)%h%d %s %Cgreen(%cd) %Cblue<%an>%Creset' --date=human --no-merges
lp = log -p --date=local lp = log -p --date=local # Like --full-diff
my = lo --author "xeru\\|anek" my = lo --author "xeru\\|anek"
standup = my --since yesterday --all standup = my --since yesterday --all

View File

@ -8,9 +8,6 @@
# message's source. The hook's purpose is to edit the commit # message's source. The hook's purpose is to edit the commit
# message file. If the hook fails with a non-zero status, # message file. If the hook fails with a non-zero status,
# the commit is aborted. # the commit is aborted.
#
# To enable this hook, set the hooksPath in git:
# git config core.hooksPath .dev/githooks
COMMIT_MSG_FILE=$1 COMMIT_MSG_FILE=$1
COMMIT_SOURCE=$2 COMMIT_SOURCE=$2
@ -31,7 +28,7 @@ if beginswith $'\n#' "$original"; then
case "$path" in ([0-9]*) path="${path#*/}";; esac case "$path" in ([0-9]*) path="${path#*/}";; esac
path="${path#.}" path="${path#.}"
{ {
echo "${path%/}:" echo "${path%-}:"
echo "$original" echo "$original"
} > "$COMMIT_MSG_FILE" } > "$COMMIT_MSG_FILE"
fi fi

View File

@ -12,12 +12,12 @@ case "$1" in
(socha) user=software-challenge; host=git@github.com;; (socha) user=software-challenge; host=git@github.com;;
(hub) host=git@github.com;; (hub) host=git@github.com;;
(lab) host=git@gitlab.com;; (lab) host=git@gitlab.com;;
(*) host=${1:-gitea@git.jfischer.org};; (*) host=${1:-gitea@git.jfischer.org};;
esac esac
user=${3:-${user:-$(git config user.name)}} user=${3:-${user:-$(git config user.name)}}
repo=${2:-$(basename $PWD)} repo=${2:-$(basename $PWD)}
if test "$https" if test "$https"
then echo "https://${host#git*@}/$user/$repo" then echo "https://${host#git*@}/$user/$repo.git"
else echo "$host:$user/$repo.git" else echo "$host:$user/$repo.git"
fi fi
esac esac