refactor: standardize command naming
This standardization makes it somewhat easier to read stacktraces as the command names are all uniform, so it will be slightly easier to scan trace output.
This commit is contained in:
@@ -6,15 +6,15 @@ source "$PLUGIN_AVAILABLE_PATH/git/internal-functions"
|
||||
|
||||
case "$1" in
|
||||
git-hook)
|
||||
git_hook_cmd "$@"
|
||||
cmd-git-hook "$@"
|
||||
;;
|
||||
|
||||
git-upload-pack)
|
||||
git_upload_pack_cmd "$@"
|
||||
cmd-git-upload-pack "$@"
|
||||
;;
|
||||
|
||||
git-*)
|
||||
git_glob_cmd "$@"
|
||||
cmd-git-glob "$@"
|
||||
;;
|
||||
|
||||
help | git:help)
|
||||
|
||||
@@ -123,7 +123,7 @@ git_deploy_branch() {
|
||||
fi
|
||||
}
|
||||
|
||||
git_hook_cmd() {
|
||||
cmd-git-hook() {
|
||||
declare desc="kick off receive-app trigger from git prereceive hook"
|
||||
local cmd="git-hook"
|
||||
local APP="$2"
|
||||
@@ -195,7 +195,7 @@ git_receive_app() {
|
||||
fi
|
||||
}
|
||||
|
||||
git_upload_pack_cmd() {
|
||||
cmd-git-upload-pack() {
|
||||
declare desc="executes git-upload-pack"
|
||||
declare cmd="git-upload-pack"
|
||||
declare APP="$2"
|
||||
@@ -208,7 +208,7 @@ git_upload_pack_cmd() {
|
||||
plugn trigger git-post-pull "$APP"
|
||||
}
|
||||
|
||||
git_glob_cmd() {
|
||||
cmd-git-glob() {
|
||||
declare desc="catch-all for any other git-* commands"
|
||||
local cmd="git-*"
|
||||
local APP="$(echo "$2" | perl -pe 's/(?<!\\)'\''//g' | sed 's/\\'\''/'\''/g' | sed 's/^\///g')"
|
||||
|
||||
@@ -4,7 +4,7 @@ source "$PLUGIN_AVAILABLE_PATH/git/functions"
|
||||
set -eo pipefail
|
||||
[[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
git-initialize-cmd() {
|
||||
cmd-git-initialize() {
|
||||
declare desc="initialize a git repository for an app"
|
||||
local cmd="git:initialize" argv=("$@")
|
||||
[[ ${argv[0]} == "$cmd" ]] && shift 1
|
||||
@@ -15,4 +15,4 @@ git-initialize-cmd() {
|
||||
fn-git-create-hook "$APP"
|
||||
}
|
||||
|
||||
git-initialize-cmd "$@"
|
||||
cmd-git-initialize "$@"
|
||||
|
||||
@@ -4,7 +4,7 @@ source "$PLUGIN_CORE_AVAILABLE_PATH/common/property-functions"
|
||||
set -eo pipefail
|
||||
[[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
git-set-cmd() {
|
||||
cmd-git-set() {
|
||||
declare desc="set or clear a git property for an app"
|
||||
local cmd="git:set" argv=("$@")
|
||||
[[ ${argv[0]} == "$cmd" ]] && shift 1
|
||||
@@ -33,4 +33,4 @@ git-set-cmd() {
|
||||
fi
|
||||
}
|
||||
|
||||
git-set-cmd "$@"
|
||||
cmd-git-set "$@"
|
||||
|
||||
Reference in New Issue
Block a user