From 431f1497301acc23db52c6bb6ea954dc219fab01 Mon Sep 17 00:00:00 2001 From: Tim Byrne Date: Sat, 13 Feb 2016 17:30:33 -0600 Subject: [PATCH] Translate gitconfig to config inside git_command() This consolidates calls to git_command() --- yadm | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/yadm b/yadm index 429f3d3..c698d93 100755 --- a/yadm +++ b/yadm @@ -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 "$@"