Thread (1 message) 1 message, 1 author, 2016-06-15

Re: [RFC/PATCH] Remove repo-config

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:44:05

Dan McGee [off-list ref] writes:
'git config' has been used in place of 'git repo-config' for some time in
the documentation and most of the tools, so remove traces of repo-config
from the source.

Signed-off-by: Dan McGee <redacted>
I'd agree with the deprecation.  We stopped advertising it long
time ago (1.5.0 I think).
quoted hunk
diff --git a/Documentation/git-repo-config.txt b/Documentation/git-repo-config.txt
Let's defer the removal til post 1.5.4.
quoted hunk
diff --git a/Makefile b/Makefile
Likewise.
quoted hunk
diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
Likewise.
quoted hunk
diff --git a/contrib/examples/git-tag.sh b/contrib/examples/git-tag.sh
index ae7c531..a3182df 100755
--- a/contrib/examples/git-tag.sh
+++ b/contrib/examples/git-tag.sh
@@ -167,6 +167,7 @@ type=$(git cat-file -t $object) || exit 1
 tagger=$(git-var GIT_COMMITTER_IDENT) || exit 1
 
 test -n "$username" ||
+	#NOTE: 'git repo-config' has since been replaced by 'git config'
 	username=$(git repo-config user.signingkey) ||
 	username=$(expr "z$tagger" : 'z\(.*>\)')
Good.
quoted hunk
diff --git a/git.c b/git.c
Deferred.
quoted hunk
diff --git a/t/t0020-crlf.sh b/t/t0020-crlf.sh
diff --git a/t/t9200-git-cvsexportcommit.sh b/t/t9200-git-cvsexportcommit.sh
Doing s/repo-config/config/ in test scripts is good.
quoted hunk
diff --git a/templates/hooks--update b/templates/hooks--update
index bd93dd1..09a99ff 100644
--- a/templates/hooks--update
+++ b/templates/hooks--update
@@ -37,9 +37,9 @@ if [ -z "$refname" -o -z "$oldrev" -o -z "$newrev" ]; then
 fi
 
 # --- Config
-allowunannotated=$(git-repo-config --bool hooks.allowunannotated)
-allowdeletebranch=$(git-repo-config --bool hooks.allowdeletebranch)
-allowdeletetag=$(git-repo-config --bool hooks.allowdeletetag)
+allowunannotated=$(git config --bool hooks.allowunannotated)
+allowdeletebranch=$(git config --bool hooks.allowdeletebranch)
+allowdeletetag=$(git config --bool hooks.allowdeletetag)
 
 # check for no description
 projectdesc=$(sed -e '1q' "$GIT_DIR/description")
Good.

quoted hunk
@@ -53,7 +53,7 @@ fi
 if [ "$newrev" = "0000000000000000000000000000000000000000" ]; then
 	newrev_type=delete
 else
-	newrev_type=$(git-cat-file -t $newrev)
+	newrev_type=$(git cat-file -t $newrev)
 fi
 
 case "$refname","$newrev_type" in
Good but does not belong to the topic.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help