Translate gitconfig to config inside git_command()

This consolidates calls to git_command()
This commit is contained in:
Tim Byrne 2016-02-13 17:30:33 -06:00
parent 4948f1b137
commit 431f149730
1 changed files with 5 additions and 4 deletions

9
yadm
View File

@ -43,10 +43,6 @@ function main() {
if [ -z "$*" ] ; then
#; no argumnts will result in help()
help
elif [ "$1" = "gitconfig" ] ; then
#; 'config' is used for yadm, need to use 'gitcofnig' to pass through to git
shift
git_command config "$@"
elif [[ "$1" =~ $internal_commands ]] ; then
#; for internal commands, process all of the arguments
YADM_COMMAND="$1"
@ -261,6 +257,11 @@ function git_command() {
require_repo
#; translate 'gitconfig' to 'config' -- 'config' is reserved for yadm
if [ "$1" = "gitconfig" ] ; then
set -- "config" "${@:2}"
fi
#; pass commands through to git
git "$@"