diff options
author | Tom Prince <tom.prince@ualberta.net> | 2007-01-28 16:16:53 -0800 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2007-01-28 16:16:53 -0800 |
commit | e0d10e1c63bc52b37bbec99b07deee794058d9b4 (patch) | |
tree | 6fa070c660ff481e226b10aadbec5b7bb3b95cc7 /contrib | |
parent | Heavily expanded update hook to send more useful emails than the old hook (diff) | |
download | tgif-e0d10e1c63bc52b37bbec99b07deee794058d9b4.tar.xz |
[PATCH] Rename git-repo-config to git-config.
Signed-off-by: Tom Prince <tom.prince@ualberta.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'contrib')
-rwxr-xr-x | contrib/completion/git-completion.bash | 15 | ||||
-rw-r--r-- | contrib/emacs/git.el | 8 | ||||
-rwxr-xr-x | contrib/gitview/gitview | 2 | ||||
-rw-r--r-- | contrib/remotes2config.sh | 4 |
4 files changed, 15 insertions, 14 deletions
diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash index 7c7520ea29..83c69ecf48 100755 --- a/contrib/completion/git-completion.bash +++ b/contrib/completion/git-completion.bash @@ -145,7 +145,7 @@ __git_remotes () echo ${i#$d/remotes/} done [ "$ngoff" ] && shopt -u nullglob - for i in $(git --git-dir="$d" repo-config --list); do + for i in $(git --git-dir="$d" config --list); do case "$i" in remote.*.url=*) i="${i#remote.}" @@ -286,7 +286,7 @@ __git_commandlist="$(__git_commands 2>/dev/null)" __git_aliases () { local i IFS=$'\n' - for i in $(git --git-dir="$(__gitdir)" repo-config --list); do + for i in $(git --git-dir="$(__gitdir)" config --list); do case "$i" in alias.*) i="${i#alias.}" @@ -299,7 +299,7 @@ __git_aliases () __git_aliased_command () { local word cmdline=$(git --git-dir="$(__gitdir)" \ - repo-config --get "alias.$1") + config --get "alias.$1") for word in $cmdline; do if [ "${word##-*}" ]; then echo $word @@ -629,7 +629,7 @@ _git_rebase () COMPREPLY=($(compgen -W "$(__git_refs)" -- "$cur")) } -_git_repo_config () +_git_config () { local cur="${COMP_WORDS[COMP_CWORD]}" local prv="${COMP_WORDS[COMP_CWORD-1]}" @@ -806,6 +806,7 @@ _git () checkout) _git_checkout ;; cherry-pick) _git_cherry_pick ;; commit) _git_commit ;; + config) _git_config ;; diff) _git_diff ;; diff-tree) _git_diff_tree ;; fetch) _git_fetch ;; @@ -819,7 +820,7 @@ _git () pull) _git_pull ;; push) _git_push ;; rebase) _git_rebase ;; - repo-config) _git_repo_config ;; + repo-config) _git_config ;; reset) _git_reset ;; show) _git_show ;; show-branch) _git_log ;; @@ -856,7 +857,7 @@ complete -o default -F _git_name_rev git-name-rev complete -o default -o nospace -F _git_pull git-pull complete -o default -o nospace -F _git_push git-push complete -o default -F _git_rebase git-rebase -complete -o default -F _git_repo_config git-repo-config +complete -o default -F _git_config git-config complete -o default -F _git_reset git-reset complete -o default -o nospace -F _git_show git-show complete -o default -o nospace -F _git_log git-show-branch @@ -879,7 +880,7 @@ complete -o default -o nospace -F _git_ls_tree git-ls-tree.exe complete -o default -F _git_merge_base git-merge-base.exe complete -o default -F _git_name_rev git-name-rev.exe complete -o default -o nospace -F _git_push git-push.exe -complete -o default -F _git_repo_config git-repo-config +complete -o default -F _git_config git-config complete -o default -o nospace -F _git_show git-show.exe complete -o default -o nospace -F _git_log git-show-branch.exe complete -o default -o nospace -F _git_log git-whatchanged.exe diff --git a/contrib/emacs/git.el b/contrib/emacs/git.el index d90ba816e0..24629eb3e2 100644 --- a/contrib/emacs/git.el +++ b/contrib/emacs/git.el @@ -222,7 +222,7 @@ and returns the process output as a string." "Return the name to use as GIT_COMMITTER_NAME." ; copied from log-edit (or git-committer-name - (git-repo-config "user.name") + (git-config "user.name") (and (boundp 'add-log-full-name) add-log-full-name) (and (fboundp 'user-full-name) (user-full-name)) (and (boundp 'user-full-name) user-full-name))) @@ -231,7 +231,7 @@ and returns the process output as a string." "Return the email address to use as GIT_COMMITTER_EMAIL." ; copied from log-edit (or git-committer-email - (git-repo-config "user.email") + (git-config "user.email") (and (boundp 'add-log-mailing-address) add-log-mailing-address) (and (fboundp 'user-mail-address) (user-mail-address)) (and (boundp 'user-mail-address) user-mail-address))) @@ -298,9 +298,9 @@ and returns the process output as a string." (git-get-string-sha1 (git-call-process-env-string nil "rev-parse" rev))) -(defun git-repo-config (key) +(defun git-config (key) "Retrieve the value associated to KEY in the git repository config file." - (let ((str (git-call-process-env-string nil "repo-config" key))) + (let ((str (git-call-process-env-string nil "config" key))) (and str (car (split-string str "\n"))))) (defun git-symbolic-ref (ref) diff --git a/contrib/gitview/gitview b/contrib/gitview/gitview index 3b6bdceeeb..521b2fcd32 100755 --- a/contrib/gitview/gitview +++ b/contrib/gitview/gitview @@ -497,7 +497,7 @@ class GitView: fp.close() def get_encoding(self): - fp = os.popen("git repo-config --get i18n.commitencoding") + fp = os.popen("git config --get i18n.commitencoding") self.encoding=string.strip(fp.readline()) fp.close() if (self.encoding == ""): diff --git a/contrib/remotes2config.sh b/contrib/remotes2config.sh index b996996bfb..dc09eae972 100644 --- a/contrib/remotes2config.sh +++ b/contrib/remotes2config.sh @@ -26,8 +26,8 @@ if [ -d "$GIT_DIR"/remotes ]; then mv "$GIT_DIR"/remotes "$GIT_DIR"/remotes.old fi ;; *) - echo "git-repo-config $key "$value" $regex" - git-repo-config $key "$value" $regex || error=1 ;; + echo "git-config $key "$value" $regex" + git-config $key "$value" $regex || error=1 ;; esac done fi |