[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>
Tom Prince committed
Jan 28, 2007 at 16:16 UTC
e0d10e1c63bc52b37bbec99b07deee794058d9b4
58 files changed
+460
-439
.gitignore
+1
@@ -23,6 +23,7 @@ git-clean
23
git-clone
24
git-commit
25
git-commit-tree
26
+git-config
27
git-convert-objects
28
git-count-objects
29
git-cvsexportcommit
Documentation/cmd-list.perl
+1
-1
@@ -144,7 +144,7 @@ git-receive-pack synchelpers
144
git-reflog ancillarymanipulators
145
git-relink ancillarymanipulators
146
git-repack ancillarymanipulators
147
-git-repo-config ancillarymanipulators
147
+git-config ancillarymanipulators
148
git-request-pull foreignscminterface
149
git-rerere ancillaryinterrogators
150
git-reset mainporcelain
Documentation/config.txt
+1
-1
@@ -62,7 +62,7 @@ The values following the equals sign in variable assign are all either
62
a string, an integer, or a boolean. Boolean values may be given as yes/no,
63
0/1 or true/false. Case is not significant in boolean values, when
64
converting value to the canonical form using '--bool' type specifier;
65
-`git-repo-config` will ensure that the output is "true" or "false".
65
+`git-config` will ensure that the output is "true" or "false".
66
67
String values may be entirely or partially enclosed in double quotes.
68
You need to enclose variable value in double quotes if you want to
Documentation/core-tutorial.txt
+1
-1
@@ -1130,7 +1130,7 @@ the remote repository URL in the local repository's config file
1130
like this:
1131
1132
------------------------------------------------
1133
-$ git repo-config remote.linus.url http://www.kernel.org/pub/scm/git/git.git/
1133
+$ git config remote.linus.url http://www.kernel.org/pub/scm/git/git.git/
1134
------------------------------------------------
1135
1136
and use the "linus" keyword with `git pull` instead of the full URL.
Documentation/cvs-migration.txt
+1
-1
@@ -36,7 +36,7 @@ them first before running git pull.
36
================================
37
The `pull` command knows where to get updates from because of certain
38
configuration variables that were set by the first `git clone`
39
-command; see `git repo-config -l` and the gitlink:git-repo-config[1] man
39
+command; see `git config -l` and the gitlink:git-config[1] man
40
page for details.
41
================================
42
Documentation/everyday.txt
+2
-2
@@ -212,12 +212,12 @@ Push into another repository.::
212
------------
213
satellite$ git clone mothership:frotz frotz <1>
214
satellite$ cd frotz
215
-satellite$ git repo-config --get-regexp '^(remote|branch)\.' <2>
215
+satellite$ git config --get-regexp '^(remote|branch)\.' <2>
216
remote.origin.url mothership:frotz
217
remote.origin.fetch refs/heads/*:refs/remotes/origin/*
218
branch.master.remote origin
219
branch.master.merge refs/heads/master
220
-satellite$ git repo-config remote.origin.push \
220
+satellite$ git config remote.origin.push \
221
master:refs/remotes/satellite/master <3>
222
satellite$ edit/compile/test/commit
223
satellite$ git push origin <4>
Documentation/git-config.txt
new
+227
@@ -0,0 +1,227 @@
1
+git-config(1)
2
+=============
3
+
4
+NAME
5
+----
6
+git-config - Get and set repository or global options
7
+
8
+
9
+SYNOPSIS
10
+--------
11
+[verse]
12
+'git-config' [--global] [type] name [value [value_regex]]
13
+'git-config' [--global] [type] --add name value
14
+'git-config' [--global] [type] --replace-all name [value [value_regex]]
15
+'git-config' [--global] [type] --get name [value_regex]
16
+'git-config' [--global] [type] --get-all name [value_regex]
17
+'git-config' [--global] [type] --unset name [value_regex]
18
+'git-config' [--global] [type] --unset-all name [value_regex]
19
+'git-config' [--global] -l | --list
20
+
21
+DESCRIPTION
22
+-----------
23
+You can query/set/replace/unset options with this command. The name is
24
+actually the section and the key separated by a dot, and the value will be
25
+escaped.
26
+
27
+Multiple lines can be added to an option by using the '--add' option.
28
+If you want to update or unset an option which can occur on multiple
29
+lines, a POSIX regexp `value_regex` needs to be given. Only the
30
+existing values that match the regexp are updated or unset. If
31
+you want to handle the lines that do *not* match the regex, just
32
+prepend a single exclamation mark in front (see EXAMPLES).
33
+
34
+The type specifier can be either '--int' or '--bool', which will make
35
+'git-config' ensure that the variable(s) are of the given type and
36
+convert the value to the canonical form (simple decimal number for int,
37
+a "true" or "false" string for bool). If no type specifier is passed,
38
+no checks or transformations are performed on the value.
39
+
40
+This command will fail if:
41
+
42
+. The .git/config file is invalid,
43
+. Can not write to .git/config,
44
+. no section was provided,
45
+. the section or key is invalid,
46
+. you try to unset an option which does not exist,
47
+. you try to unset/set an option for which multiple lines match, or
48
+. you use --global option without $HOME being properly set.
49
+
50
+
51
+OPTIONS
52
+-------
53
+
54
+--replace-all::
55
+ Default behavior is to replace at most one line. This replaces
56
+ all lines matching the key (and optionally the value_regex).
57
+
58
+--add::
59
+ Adds a new line to the option without altering any existing
60
+ values. This is the same as providing '^$' as the value_regex.
61
+
62
+--get::
63
+ Get the value for a given key (optionally filtered by a regex
64
+ matching the value). Returns error code 1 if the key was not
65
+ found and error code 2 if multiple key values were found.
66
+
67
+--get-all::
68
+ Like get, but does not fail if the number of values for the key
69
+ is not exactly one.
70
+
71
+--get-regexp::
72
+ Like --get-all, but interprets the name as a regular expression.
73
+
74
+--global::
75
+ Use global ~/.gitconfig file rather than the repository .git/config.
76
+
77
+--unset::
78
+ Remove the line matching the key from config file.
79
+
80
+--unset-all::
81
+ Remove all matching lines from config file.
82
+
83
+-l, --list::
84
+ List all variables set in config file.
85
+
86
+--bool::
87
+ git-config will ensure that the output is "true" or "false"
88
+
89
+--int::
90
+ git-config will ensure that the output is a simple
91
+ decimal number. An optional value suffix of 'k', 'm', or 'g'
92
+ in the config file will cause the value to be multiplied
93
+ by 1024, 1048576, or 1073741824 prior to output.
94
+
95
+
96
+ENVIRONMENT
97
+-----------
98
+
99
+GIT_CONFIG::
100
+ Take the configuration from the given file instead of .git/config.
101
+ Using the "--global" option forces this to ~/.gitconfig.
102
+
103
+GIT_CONFIG_LOCAL::
104
+ Currently the same as $GIT_CONFIG; when Git will support global
105
+ configuration files, this will cause it to take the configuration
106
+ from the global configuration file in addition to the given file.
107
+
108
+
109
+EXAMPLE
110
+-------
111
+
112
+Given a .git/config like this:
113
+
114
+ #
115
+ # This is the config file, and
116
+ # a '#' or ';' character indicates
117
+ # a comment
118
+ #
119
+
120
+ ; core variables
121
+ [core]
122
+ ; Don't trust file modes
123
+ filemode = false
124
+
125
+ ; Our diff algorithm
126
+ [diff]
127
+ external = "/usr/local/bin/gnu-diff -u"
128
+ renames = true
129
+
130
+ ; Proxy settings
131
+ [core]
132
+ gitproxy="ssh" for "ssh://kernel.org/"
133
+ gitproxy="proxy-command" for kernel.org
134
+ gitproxy="myprotocol-command" for "my://"
135
+ gitproxy=default-proxy ; for all the rest
136
+
137
+you can set the filemode to true with
138
+
139
+------------
140
+% git config core.filemode true
141
+------------
142
+
143
+The hypothetical proxy command entries actually have a postfix to discern
144
+what URL they apply to. Here is how to change the entry for kernel.org
145
+to "ssh".
146
+
147
+------------
148
+% git config core.gitproxy '"ssh" for kernel.org' 'for kernel.org$'
149
+------------
150
+
151
+This makes sure that only the key/value pair for kernel.org is replaced.
152
+
153
+To delete the entry for renames, do
154
+
155
+------------
156
+% git config --unset diff.renames
157
+------------
158
+
159
+If you want to delete an entry for a multivar (like core.gitproxy above),
160
+you have to provide a regex matching the value of exactly one line.
161
+
162
+To query the value for a given key, do
163
+
164
+------------
165
+% git config --get core.filemode
166
+------------
167
+
168
+or
169
+
170
+------------
171
+% git config core.filemode
172
+------------
173
+
174
+or, to query a multivar:
175
+
176
+------------
177
+% git config --get core.gitproxy "for kernel.org$"
178
+------------
179
+
180
+If you want to know all the values for a multivar, do:
181
+
182
+------------
183
+% git config --get-all core.gitproxy
184
+------------
185
+
186
+If you like to live dangerous, you can replace *all* core.gitproxy by a
187
+new one with
188
+
189
+------------
190
+% git config --replace-all core.gitproxy ssh
191
+------------
192
+
193
+However, if you really only want to replace the line for the default proxy,
194
+i.e. the one without a "for ..." postfix, do something like this:
195
+
196
+------------
197
+% git config core.gitproxy ssh '! for '
198
+------------
199
+
200
+To actually match only values with an exclamation mark, you have to
201
+
202
+------------
203
+% git config section.key value '[!]'
204
+------------
205
+
206
+To add a new proxy, without altering any of the existing ones, use
207
+
208
+------------
209
+% git config core.gitproxy '"proxy" for example.com'
210
+------------
211
+
212
+
213
+include::config.txt[]
214
+
215
+
216
+Author
217
+------
218
+Written by Johannes Schindelin <Johannes.Schindelin@gmx.de>
219
+
220
+Documentation
221
+--------------
222
+Documentation by Johannes Schindelin, Petr Baudis and the git-list <git@vger.kernel.org>.
223
+
224
+GIT
225
+---
226
+Part of the gitlink:git[7] suite
227
+
Documentation/git-pull.txt
+2
-2
@@ -42,7 +42,7 @@ git pull, git pull origin::
42
current branch. Normally the branch merged in is
43
the HEAD of the remote repository, but the choice is
44
determined by the branch.<name>.remote and
45
- branch.<name>.merge options; see gitlink:git-repo-config[1]
45
+ branch.<name>.merge options; see gitlink:git-config[1]
46
for details.
47
48
git pull origin next::
@@ -94,7 +94,7 @@ gitlink:git-reset[1].
94
95
SEE ALSO
96
--------
97
-gitlink:git-fetch[1], gitlink:git-merge[1], gitlink:git-repo-config[1]
97
+gitlink:git-fetch[1], gitlink:git-merge[1], gitlink:git-config[1]
98
99
100
Author
Documentation/git-remote.txt
+2
-2
@@ -28,7 +28,7 @@ In the third form, gives some information about the remote <name>.
28
29
The remote configuration is achieved using the `remote.origin.url` and
30
`remote.origin.fetch` configuration variables. (See
31
-gitlink:git-repo-config[1]).
31
+gitlink:git-config[1]).
32
33
Examples
34
--------
@@ -58,7 +58,7 @@ See Also
58
--------
59
gitlink:git-fetch[1]
60
gitlink:git-branch[1]
61
-gitlink:git-repo-config[1]
61
+gitlink:git-config[1]
62
63
Author
64
------
Documentation/git-repo-config.txt
+4
-213
@@ -8,220 +8,11 @@ git-repo-config - Get and set repository or global options
8
9
SYNOPSIS
10
--------
11
-[verse]
12
-'git-repo-config' [--global] [type] name [value [value_regex]]
13
-'git-repo-config' [--global] [type] --add name value
14
-'git-repo-config' [--global] [type] --replace-all name [value [value_regex]]
15
-'git-repo-config' [--global] [type] --get name [value_regex]
16
-'git-repo-config' [--global] [type] --get-all name [value_regex]
17
-'git-repo-config' [--global] [type] --unset name [value_regex]
18
-'git-repo-config' [--global] [type] --unset-all name [value_regex]
19
-'git-repo-config' [--global] -l | --list
11
+'git-repo-config' ...
12
21
-DESCRIPTION
22
------------
23
-You can query/set/replace/unset options with this command. The name is
24
-actually the section and the key separated by a dot, and the value will be
25
-escaped.
26
-
27
-Multiple lines can be added to an option by using the '--add' option.
28
-If you want to update or unset an option which can occur on multiple
29
-lines, a POSIX regexp `value_regex` needs to be given. Only the
30
-existing values that match the regexp are updated or unset. If
31
-you want to handle the lines that do *not* match the regex, just
32
-prepend a single exclamation mark in front (see EXAMPLES).
33
-
34
-The type specifier can be either '--int' or '--bool', which will make
35
-'git-repo-config' ensure that the variable(s) are of the given type and
36
-convert the value to the canonical form (simple decimal number for int,
37
-a "true" or "false" string for bool). If no type specifier is passed,
38
-no checks or transformations are performed on the value.
39
-
40
-This command will fail if:
41
-
42
-. The .git/config file is invalid,
43
-. Can not write to .git/config,
44
-. no section was provided,
45
-. the section or key is invalid,
46
-. you try to unset an option which does not exist,
47
-. you try to unset/set an option for which multiple lines match, or
48
-. you use --global option without $HOME being properly set.
49
-
50
-
51
-OPTIONS
52
--------
53
-
54
---replace-all::
55
- Default behavior is to replace at most one line. This replaces
56
- all lines matching the key (and optionally the value_regex).
57
-
58
---add::
59
- Adds a new line to the option without altering any existing
60
- values. This is the same as providing '^$' as the value_regex.
61
-
62
---get::
63
- Get the value for a given key (optionally filtered by a regex
64
- matching the value). Returns error code 1 if the key was not
65
- found and error code 2 if multiple key values were found.
66
-
67
---get-all::
68
- Like get, but does not fail if the number of values for the key
69
- is not exactly one.
70
-
71
---get-regexp::
72
- Like --get-all, but interprets the name as a regular expression.
73
-
74
---global::
75
- Use global ~/.gitconfig file rather than the repository .git/config.
76
-
77
---unset::
78
- Remove the line matching the key from config file.
13
80
---unset-all::
81
- Remove all matching lines from config file.
82
-
83
--l, --list::
84
- List all variables set in config file.
85
-
86
---bool::
87
- git-repo-config will ensure that the output is "true" or "false"
88
-
89
---int::
90
- git-repo-config will ensure that the output is a simple
91
- decimal number. An optional value suffix of 'k', 'm', or 'g'
92
- in the config file will cause the value to be multiplied
93
- by 1024, 1048576, or 1073741824 prior to output.
94
-
95
-
96
-ENVIRONMENT
14
+DESCRIPTION
15
-----------
16
99
-GIT_CONFIG::
100
- Take the configuration from the given file instead of .git/config.
101
- Using the "--global" option forces this to ~/.gitconfig.
102
-
103
-GIT_CONFIG_LOCAL::
104
- Currently the same as $GIT_CONFIG; when Git will support global
105
- configuration files, this will cause it to take the configuration
106
- from the global configuration file in addition to the given file.
107
-
108
-
109
-EXAMPLE
110
--------
111
-
112
-Given a .git/config like this:
113
-
114
- #
115
- # This is the config file, and
116
- # a '#' or ';' character indicates
117
- # a comment
118
- #
119
-
120
- ; core variables
121
- [core]
122
- ; Don't trust file modes
123
- filemode = false
124
-
125
- ; Our diff algorithm
126
- [diff]
127
- external = "/usr/local/bin/gnu-diff -u"
128
- renames = true
129
-
130
- ; Proxy settings
131
- [core]
132
- gitproxy="ssh" for "ssh://kernel.org/"
133
- gitproxy="proxy-command" for kernel.org
134
- gitproxy="myprotocol-command" for "my://"
135
- gitproxy=default-proxy ; for all the rest
136
-
137
-you can set the filemode to true with
138
-
139
-------------
140
-% git repo-config core.filemode true
141
-------------
142
-
143
-The hypothetical proxy command entries actually have a postfix to discern
144
-what URL they apply to. Here is how to change the entry for kernel.org
145
-to "ssh".
146
-
147
-------------
148
-% git repo-config core.gitproxy '"ssh" for kernel.org' 'for kernel.org$'
149
-------------
150
-
151
-This makes sure that only the key/value pair for kernel.org is replaced.
152
-
153
-To delete the entry for renames, do
154
-
155
-------------
156
-% git repo-config --unset diff.renames
157
-------------
158
-
159
-If you want to delete an entry for a multivar (like core.gitproxy above),
160
-you have to provide a regex matching the value of exactly one line.
161
-
162
-To query the value for a given key, do
163
-
164
-------------
165
-% git repo-config --get core.filemode
166
-------------
167
-
168
-or
169
-
170
-------------
171
-% git repo-config core.filemode
172
-------------
173
-
174
-or, to query a multivar:
175
-
176
-------------
177
-% git repo-config --get core.gitproxy "for kernel.org$"
178
-------------
179
-
180
-If you want to know all the values for a multivar, do:
181
-
182
-------------
183
-% git repo-config --get-all core.gitproxy
184
-------------
185
-
186
-If you like to live dangerous, you can replace *all* core.gitproxy by a
187
-new one with
188
-
189
-------------
190
-% git repo-config --replace-all core.gitproxy ssh
191
-------------
192
-
193
-However, if you really only want to replace the line for the default proxy,
194
-i.e. the one without a "for ..." postfix, do something like this:
195
-
196
-------------
197
-% git repo-config core.gitproxy ssh '! for '
198
-------------
199
-
200
-To actually match only values with an exclamation mark, you have to
201
-
202
-------------
203
-% git repo-config section.key value '[!]'
204
-------------
205
-
206
-To add a new proxy, without altering any of the existing ones, use
207
-
208
-------------
209
-% git repo-config core.gitproxy '"proxy" for example.com'
210
-------------
211
-
212
-
213
-include::config.txt[]
214
-
215
-
216
-Author
217
-------
218
-Written by Johannes Schindelin <Johannes.Schindelin@gmx.de>
219
-
220
-Documentation
221
---------------
222
-Documentation by Johannes Schindelin, Petr Baudis and the git-list <git@vger.kernel.org>.
223
-
224
-GIT
225
----
226
-Part of the gitlink:git[7] suite
227
-
17
+This is a synonym for gitlink:git-config[1]. Please refer to the
18
+documentation of that command.
Documentation/git-svn.txt
+10
-10
@@ -204,7 +204,7 @@ removed by default if there are no files left in them. git
204
cannot version empty directories. Enabling this flag will make
205
the commit to SVN act like git.
206
207
-repo-config key: svn.rmdir
207
+config key: svn.rmdir
208
209
-e::
210
--edit::
@@ -215,7 +215,7 @@ Edit the commit message before committing to SVN. This is off by
215
default for objects that are commits, and forced on when committing
216
tree objects.
217
218
-repo-config key: svn.edit
218
+config key: svn.edit
219
220
-l<num>::
221
--find-copies-harder::
@@ -226,8 +226,8 @@ They are both passed directly to git-diff-tree see
226
gitlink:git-diff-tree[1] for more information.
227
228
[verse]
229
-repo-config key: svn.l
230
-repo-config key: svn.findcopiesharder
229
+config key: svn.l
230
+config key: svn.findcopiesharder
231
232
-A<filename>::
233
--authors-file=<filename>::
@@ -245,7 +245,7 @@ will abort operation. The user will then have to add the
245
appropriate entry. Re-running the previous git-svn command
246
after the authors-file is modified should continue operation.
247
248
-repo-config key: svn.authorsfile
248
+config key: svn.authorsfile
249
250
-q::
251
--quiet::
@@ -262,8 +262,8 @@ repo-config key: svn.authorsfile
262
263
--repack-flags are passed directly to gitlink:git-repack[1].
264
265
-repo-config key: svn.repack
266
-repo-config key: svn.repackflags
265
+config key: svn.repack
266
+config key: svn.repackflags
267
268
-m::
269
--merge::
@@ -304,7 +304,7 @@ used to track branches across multiple SVN _repositories_.
304
This option may be specified multiple times, once for each
305
branch.
306
307
-repo-config key: svn.branch
307
+config key: svn.branch
308
309
-i<GIT_SVN_ID>::
310
--id <GIT_SVN_ID>::
@@ -320,7 +320,7 @@ for more information on using GIT_SVN_ID.
320
started tracking a branch and never tracked the trunk it was
321
descended from.
322
323
-repo-config key: svn.followparent
323
+config key: svn.followparent
324
325
--no-metadata::
326
This gets rid of the git-svn-id: lines at the end of every commit.
@@ -332,7 +332,7 @@ repo-config key: svn.followparent
332
The 'git-svn log' command will not work on repositories using this,
333
either.
334
335
-repo-config key: svn.nometadata
335
+config key: svn.nometadata
336
337
--
338
Documentation/git-update-index.txt
+2
-2
@@ -289,7 +289,7 @@ Configuration
289
290
The command honors `core.filemode` configuration variable. If
291
your repository is on an filesystem whose executable bits are
292
-unreliable, this should be set to 'false' (see gitlink:git-repo-config[1]).
292
+unreliable, this should be set to 'false' (see gitlink:git-config[1]).
293
This causes the command to ignore differences in file modes recorded
294
in the index and the file mode on the filesystem if they differ only on
295
executable bit. On such an unfortunate filesystem, you may
@@ -301,7 +301,7 @@ The command looks at `core.ignorestat` configuration variable. See
301
302
See Also
303
--------
304
-gitlink:git-repo-config[1]
304
+gitlink:git-config[1]
305
306
307
Author
Documentation/git-var.txt
+2
-2
@@ -20,7 +20,7 @@ OPTIONS
20
Cause the logical variables to be listed. In addition, all the
21
variables of the git configuration file .git/config are listed
22
as well. (However, the configuration variables listing functionality
23
- is deprecated in favor of `git-repo-config -l`.)
23
+ is deprecated in favor of `git-config -l`.)
24
25
EXAMPLE
26
--------
@@ -49,7 +49,7 @@ See Also
49
--------
50
gitlink:git-commit-tree[1]
51
gitlink:git-tag[1]
52
-gitlink:git-repo-config[1]
52
+gitlink:git-config[1]
53
54
Author
55
------
Documentation/git.txt
+1
-1
@@ -24,7 +24,7 @@ link:everyday.html[Everyday Git] for a useful minimum set of commands, and
24
also want to read link:cvs-migration.html[CVS migration].
25
26
The COMMAND is either a name of a Git command (see below) or an alias
27
-as defined in the configuration file (see gitlink:git-repo-config[1]).
27
+as defined in the configuration file (see gitlink:git-config[1]).
28
29
OPTIONS
30
-------
Documentation/howto/setup-git-server-over-http.txt
+2
-2
@@ -205,7 +205,7 @@ To check whether all is OK, do:
205
Now, add the remote in your existing repository which contains the project
206
you want to export:
207
208
- $ git-repo-config remote.upload.url \
208
+ $ git-config remote.upload.url \
209
http://<username>@<servername>/my-new-repo.git/
210
211
It is important to put the last '/'; Without it, the server will send
@@ -222,7 +222,7 @@ From your client repository, do
222
223
This pushes branch 'master' (which is assumed to be the branch you
224
want to export) to repository called 'upload', which we previously
225
-defined with git-repo-config.
225
+defined with git-config.
226
227
228
Troubleshooting:
Documentation/tutorial.txt
+4
-4
@@ -16,8 +16,8 @@ public email address before doing any operation. The easiest
16
way to do so is:
17
18
------------------------------------------------
19
-$ git repo-config --global user.name "Your Name Comes Here"
20
-$ git repo-config --global user.email you@yourdomain.example.com
19
+$ git config --global user.name "Your Name Comes Here"
20
+$ git config --global user.email you@yourdomain.example.com
21
------------------------------------------------
22
23
@@ -353,12 +353,12 @@ repository in the repository configuration, and that location is
353
used for pulls:
354
355
-------------------------------------
356
-$ git repo-config --get remote.origin.url
356
+$ git config --get remote.origin.url
357
/home/bob/myrepo
358
-------------------------------------
359
360
(The complete configuration created by git-clone is visible using
361
-"git repo-config -l", and the gitlink:git-repo-config[1] man page
361
+"git config -l", and the gitlink:git-config[1] man page
362
explains the meaning of each option.)
363
364
Git also keeps a pristine copy of Alice's master branch under the
Makefile
+2
-2
@@ -213,7 +213,7 @@ EXTRA_PROGRAMS =
213
214
BUILT_INS = \
215
git-format-patch$X git-show$X git-whatchanged$X git-cherry$X \
216
- git-get-tar-commit-id$X git-init$X \
216
+ git-get-tar-commit-id$X git-init$X git-repo-config$X \
217
$(patsubst builtin-%.o,git-%$X,$(BUILTIN_OBJS))
218
219
# what 'all' will build and 'install' will install, in gitexecdir
@@ -299,7 +299,7 @@ BUILTIN_OBJS = \
299
builtin-push.o \
300
builtin-read-tree.o \
301
builtin-reflog.o \
302
- builtin-repo-config.o \
302
+ builtin-config.o \
303
builtin-rerere.o \
304
builtin-rev-list.o \
305
builtin-rev-parse.o \
builtin-config.c
renamed
+2
-2
@@ -2,7 +2,7 @@
2
#include "cache.h"
3
4
static const char git_config_set_usage[] =
5
-"git-repo-config [ --global ] [ --bool | --int ] [--get | --get-all | --get-regexp | --replace-all | --add | --unset | --unset-all] name [value [value_regex]] | --rename-section old_name new_name | --list";
5
+"git-config [ --global ] [ --bool | --int ] [--get | --get-all | --get-regexp | --replace-all | --add | --unset | --unset-all] name [value [value_regex]] | --rename-section old_name new_name | --list";
6
7
static char *key;
8
static regex_t *key_regexp;
@@ -126,7 +126,7 @@ free_strings:
126
return ret;
127
}
128
129
-int cmd_repo_config(int argc, const char **argv, const char *prefix)
129
+int cmd_config(int argc, const char **argv, const char *prefix)
130
{
131
int nongit = 0;
132
setup_git_directory_gently(&nongit);
builtin.h
+1
-1
@@ -53,7 +53,7 @@ extern int cmd_prune_packed(int argc, const char **argv, const char *prefix);
53
extern int cmd_push(int argc, const char **argv, const char *prefix);
54
extern int cmd_read_tree(int argc, const char **argv, const char *prefix);
55
extern int cmd_reflog(int argc, const char **argv, const char *prefix);
56
-extern int cmd_repo_config(int argc, const char **argv, const char *prefix);
56
+extern int cmd_config(int argc, const char **argv, const char *prefix);
57
extern int cmd_rerere(int argc, const char **argv, const char *prefix);
58
extern int cmd_rev_list(int argc, const char **argv, const char *prefix);
59
extern int cmd_rev_parse(int argc, const char **argv, const char *prefix);
contrib/completion/git-completion.bash
+8
-7
@@ -145,7 +145,7 @@ __git_remotes ()
145
echo ${i#$d/remotes/}
146
done
147
[ "$ngoff" ] && shopt -u nullglob
148
- for i in $(git --git-dir="$d" repo-config --list); do
148
+ for i in $(git --git-dir="$d" config --list); do
149
case "$i" in
150
remote.*.url=*)
151
i="${i#remote.}"
@@ -286,7 +286,7 @@ __git_commandlist="$(__git_commands 2>/dev/null)"
286
__git_aliases ()
287
{
288
local i IFS=$'\n'
289
- for i in $(git --git-dir="$(__gitdir)" repo-config --list); do
289
+ for i in $(git --git-dir="$(__gitdir)" config --list); do
290
case "$i" in
291
alias.*)
292
i="${i#alias.}"
@@ -299,7 +299,7 @@ __git_aliases ()
299
__git_aliased_command ()
300
{
301
local word cmdline=$(git --git-dir="$(__gitdir)" \
302
- repo-config --get "alias.$1")
302
+ config --get "alias.$1")
303
for word in $cmdline; do
304
if [ "${word##-*}" ]; then
305
echo $word
@@ -629,7 +629,7 @@ _git_rebase ()
629
COMPREPLY=($(compgen -W "$(__git_refs)" -- "$cur"))
630
}
631
632
-_git_repo_config ()
632
+_git_config ()
633
{
634
local cur="${COMP_WORDS[COMP_CWORD]}"
635
local prv="${COMP_WORDS[COMP_CWORD-1]}"
@@ -806,6 +806,7 @@ _git ()
806
checkout) _git_checkout ;;
807
cherry-pick) _git_cherry_pick ;;
808
commit) _git_commit ;;
809
+ config) _git_config ;;
810
diff) _git_diff ;;
811
diff-tree) _git_diff_tree ;;
812
fetch) _git_fetch ;;
@@ -819,7 +820,7 @@ _git ()
820
pull) _git_pull ;;
821
push) _git_push ;;
822
rebase) _git_rebase ;;
822
- repo-config) _git_repo_config ;;
823
+ repo-config) _git_config ;;
824
reset) _git_reset ;;
825
show) _git_show ;;
826
show-branch) _git_log ;;
@@ -856,7 +857,7 @@ complete -o default -F _git_name_rev git-name-rev
857
complete -o default -o nospace -F _git_pull git-pull
858
complete -o default -o nospace -F _git_push git-push
859
complete -o default -F _git_rebase git-rebase
859
-complete -o default -F _git_repo_config git-repo-config
860
+complete -o default -F _git_config git-config
861
complete -o default -F _git_reset git-reset
862
complete -o default -o nospace -F _git_show git-show
863
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
880
complete -o default -F _git_merge_base git-merge-base.exe
881
complete -o default -F _git_name_rev git-name-rev.exe
882
complete -o default -o nospace -F _git_push git-push.exe
882
-complete -o default -F _git_repo_config git-repo-config
883
+complete -o default -F _git_config git-config
884
complete -o default -o nospace -F _git_show git-show.exe
885
complete -o default -o nospace -F _git_log git-show-branch.exe
886
complete -o default -o nospace -F _git_log git-whatchanged.exe
contrib/emacs/git.el
+4
-4
@@ -222,7 +222,7 @@ and returns the process output as a string."
222
"Return the name to use as GIT_COMMITTER_NAME."
223
; copied from log-edit
224
(or git-committer-name
225
- (git-repo-config "user.name")
225
+ (git-config "user.name")
226
(and (boundp 'add-log-full-name) add-log-full-name)
227
(and (fboundp 'user-full-name) (user-full-name))
228
(and (boundp 'user-full-name) user-full-name)))
@@ -231,7 +231,7 @@ and returns the process output as a string."
231
"Return the email address to use as GIT_COMMITTER_EMAIL."
232
; copied from log-edit
233
(or git-committer-email
234
- (git-repo-config "user.email")
234
+ (git-config "user.email")
235
(and (boundp 'add-log-mailing-address) add-log-mailing-address)
236
(and (fboundp 'user-mail-address) (user-mail-address))
237
(and (boundp 'user-mail-address) user-mail-address)))
@@ -298,9 +298,9 @@ and returns the process output as a string."
298
(git-get-string-sha1
299
(git-call-process-env-string nil "rev-parse" rev)))
300
301
-(defun git-repo-config (key)
301
+(defun git-config (key)
302
"Retrieve the value associated to KEY in the git repository config file."
303
- (let ((str (git-call-process-env-string nil "repo-config" key)))
303
+ (let ((str (git-call-process-env-string nil "config" key)))
304
(and str (car (split-string str "\n")))))
305
306
(defun git-symbolic-ref (ref)
contrib/gitview/gitview
+1
-1
@@ -497,7 +497,7 @@ class GitView:
497
fp.close()
498
499
def get_encoding(self):
500
- fp = os.popen("git repo-config --get i18n.commitencoding")
500
+ fp = os.popen("git config --get i18n.commitencoding")
501
self.encoding=string.strip(fp.readline())
502
fp.close()
503
if (self.encoding == ""):
contrib/remotes2config.sh
+2
-2
@@ -26,8 +26,8 @@ if [ -d "$GIT_DIR"/remotes ]; then
26
mv "$GIT_DIR"/remotes "$GIT_DIR"/remotes.old
27
fi ;;
28
*)
29
- echo "git-repo-config $key "$value" $regex"
30
- git-repo-config $key "$value" $regex || error=1 ;;
29
+ echo "git-config $key "$value" $regex"
30
+ git-config $key "$value" $regex || error=1 ;;
31
esac
32
done
33
fi
git-clone.sh
+5
-5
@@ -36,7 +36,7 @@ clone_dumb_http () {
36
clone_tmp="$GIT_DIR/clone-tmp" &&
37
mkdir -p "$clone_tmp" || exit 1
38
if [ -n "$GIT_CURL_FTP_NO_EPSV" -o \
39
- "`git-repo-config --bool http.noEPSV`" = true ]; then
39
+ "`git-config --bool http.noEPSV`" = true ]; then
40
curl_extra_args="${curl_extra_args} --disable-epsv"
41
fi
42
http_fetch "$1/info/refs" "$clone_tmp/refs" ||
@@ -386,17 +386,17 @@ then
386
git-update-ref HEAD "$head_sha1" &&
387
388
# Upstream URL
389
- git-repo-config remote."$origin".url "$repo" &&
389
+ git-config remote."$origin".url "$repo" &&
390
391
# Set up the mappings to track the remote branches.
392
- git-repo-config remote."$origin".fetch \
392
+ git-config remote."$origin".fetch \
393
"+refs/heads/*:$remote_top/*" '^$' &&
394
rm -f "refs/remotes/$origin/HEAD"
395
git-symbolic-ref "refs/remotes/$origin/HEAD" \
396
"refs/remotes/$origin/$head_points_at" &&
397
398
- git-repo-config branch."$head_points_at".remote "$origin" &&
399
- git-repo-config branch."$head_points_at".merge "refs/heads/$head_points_at"
398
+ git-config branch."$head_points_at".remote "$origin" &&
399
+ git-config branch."$head_points_at".merge "refs/heads/$head_points_at"
400
esac
401
402
case "$no_checkout" in
git-commit.sh
+2
-2
@@ -429,7 +429,7 @@ then
429
fi
430
elif test "$use_commit" != ""
431
then
432
- encoding=$(git repo-config i18n.commitencoding || echo UTF-8)
432
+ encoding=$(git config i18n.commitencoding || echo UTF-8)
433
git show -s --pretty=raw --encoding="$encoding" "$use_commit" |
434
sed -e '1,/^$/d' -e 's/^ //'
435
elif test -f "$GIT_DIR/MERGE_MSG"
@@ -485,7 +485,7 @@ then
485
q
486
}
487
'
488
- encoding=$(git repo-config i18n.commitencoding || echo UTF-8)
488
+ encoding=$(git config i18n.commitencoding || echo UTF-8)
489
set_author_env=`git show -s --pretty=raw --encoding="$encoding" "$use_commit" |
490
LANG=C LC_ALL=C sed -ne "$pick_author_script"`
491
eval "$set_author_env"
git-cvsserver.perl
+3
-3
@@ -172,11 +172,11 @@ sub req_Root
172
return 0;
173
}
174
175
- my @gitvars = `git-repo-config -l`;
175
+ my @gitvars = `git-config -l`;
176
if ($?) {
177
- print "E problems executing git-repo-config on the server -- this is not a git repository or the PATH is not set correctly.\n";
177
+ print "E problems executing git-config on the server -- this is not a git repository or the PATH is not set correctly.\n";
178
print "E \n";
179
- print "error 1 - problem executing git-repo-config\n";
179
+ print "error 1 - problem executing git-config\n";
180
return 0;
181
}
182
foreach my $line ( @gitvars )
git-fetch.sh
+1
-1
@@ -321,7 +321,7 @@ fetch_main () {
321
curl_extra_args="-k"
322
fi
323
if [ -n "$GIT_CURL_FTP_NO_EPSV" -o \
324
- "`git-repo-config --bool http.noEPSV`" = true ]; then
324
+ "`git-config --bool http.noEPSV`" = true ]; then
325
noepsv_opt="--disable-epsv"
326
fi
327
git-instaweb.sh
+5
-5
@@ -15,11 +15,11 @@ case "$GIT_DIR" in
15
fqgitdir="$PWD/$GIT_DIR" ;;
16
esac
17
18
-local="`git repo-config --bool --get instaweb.local`"
19
-httpd="`git repo-config --get instaweb.httpd`"
20
-browser="`git repo-config --get instaweb.browser`"
21
-port=`git repo-config --get instaweb.port`
22
-module_path="`git repo-config --get instaweb.modulepath`"
18
+local="`git config --bool --get instaweb.local`"
19
+httpd="`git config --get instaweb.httpd`"
20
+browser="`git config --get instaweb.browser`"
21
+port=`git config --get instaweb.port`
22
+module_path="`git config --get instaweb.modulepath`"
23
24
conf=$GIT_DIR/gitweb/httpd.conf
25
git-ls-remote.sh
+1
-1
@@ -58,7 +58,7 @@ http://* | https://* | ftp://* )
58
curl_extra_args="-k"
59
fi
60
if [ -n "$GIT_CURL_FTP_NO_EPSV" -o \
61
- "`git-repo-config --bool http.noEPSV`" = true ]; then
61
+ "`git-config --bool http.noEPSV`" = true ]; then
62
curl_extra_args="${curl_extra_args} --disable-epsv"
63
fi
64
curl -nsf $curl_extra_args --header "Pragma: no-cache" "$peek_repo/info/refs" ||
git-merge.sh
+2
-2
@@ -233,7 +233,7 @@ case "$use_strategies" in
233
'')
234
case "$#" in
235
1)
236
- var="`git-repo-config --get pull.twohead`"
236
+ var="`git-config --get pull.twohead`"
237
if test -n "$var"
238
then
239
use_strategies="$var"
@@ -241,7 +241,7 @@ case "$use_strategies" in
241
use_strategies="$default_twohead_strategies"
242
fi ;;
243
*)
244
- var="`git-repo-config --get pull.octopus`"
244
+ var="`git-config --get pull.octopus`"
245
if test -n "$var"
246
then
247
use_strategies="$var"
git-p4import.py
+2
-2
@@ -193,13 +193,13 @@ class git_command:
193
194
def get_config(self, variable):
195
try:
196
- return self.git("repo-config --get %s" % variable)[0].rstrip()
196
+ return self.git("config --get %s" % variable)[0].rstrip()
197
except:
198
return None
199
200
def set_config(self, variable, value):
201
try:
202
- self.git("repo-config %s %s"%(variable, value) )
202
+ self.git("config %s %s"%(variable, value) )
203
except:
204
die("Could not set %s to " % variable, value)
205
git-parse-remote.sh
+7
-7
@@ -10,7 +10,7 @@ get_data_source () {
10
echo ''
11
;;
12
*)
13
- if test "$(git-repo-config --get "remote.$1.url")"
13
+ if test "$(git-config --get "remote.$1.url")"
14
then
15
echo config
16
elif test -f "$GIT_DIR/remotes/$1"
@@ -32,7 +32,7 @@ get_remote_url () {
32
echo "$1"
33
;;
34
config)
35
- git-repo-config --get "remote.$1.url"
35
+ git-config --get "remote.$1.url"
36
;;
37
remotes)
38
sed -ne '/^URL: */{
@@ -50,7 +50,7 @@ get_remote_url () {
50
51
get_default_remote () {
52
curr_branch=$(git-symbolic-ref -q HEAD | sed -e 's|^refs/heads/||')
53
- origin=$(git-repo-config --get "branch.$curr_branch.remote")
53
+ origin=$(git-config --get "branch.$curr_branch.remote")
54
echo ${origin:-origin}
55
}
56
@@ -60,7 +60,7 @@ get_remote_default_refs_for_push () {
60
'' | branches)
61
;; # no default push mapping, just send matching refs.
62
config)
63
- git-repo-config --get-all "remote.$1.push" ;;
63
+ git-config --get-all "remote.$1.push" ;;
64
remotes)
65
sed -ne '/^Push: */{
66
s///p
@@ -146,7 +146,7 @@ canon_refs_list_for_fetch () {
146
then
147
curr_branch=$(git-symbolic-ref -q HEAD | \
148
sed -e 's|^refs/heads/||')
149
- merge_branches=$(git-repo-config \
149
+ merge_branches=$(git-config \
150
--get-all "branch.${curr_branch}.merge")
151
fi
152
if test -z "$merge_branches" && test $is_explicit != explicit
@@ -212,7 +212,7 @@ get_remote_default_refs_for_fetch () {
212
echo "HEAD:" ;;
213
config)
214
canon_refs_list_for_fetch -d "$1" \
215
- $(git-repo-config --get-all "remote.$1.fetch") ;;
215
+ $(git-config --get-all "remote.$1.fetch") ;;
216
branches)
217
remote_branch=$(sed -ne '/#/s/.*#//p' "$GIT_DIR/branches/$1")
218
case "$remote_branch" in '') remote_branch=master ;; esac
@@ -291,7 +291,7 @@ get_uploadpack () {
291
data_source=$(get_data_source "$1")
292
case "$data_source" in
293
config)
294
- uplp=$(git-repo-config --get "remote.$1.uploadpack")
294
+ uplp=$(git-config --get "remote.$1.uploadpack")
295
echo ${uplp:-git-upload-pack}
296
;;
297
*)
git-remote.perl
+4
-4
@@ -64,7 +64,7 @@ sub list_remote {
64
my ($git) = @_;
65
my %seen = ();
66
my @remotes = eval {
67
- $git->command(qw(repo-config --get-regexp), '^remote\.');
67
+ $git->command(qw(config --get-regexp), '^remote\.');
68
};
69
for (@remotes) {
70
if (/^remote\.([^.]*)\.(\S*)\s+(.*)$/) {
@@ -103,7 +103,7 @@ sub list_branch {
103
my ($git) = @_;
104
my %seen = ();
105
my @branches = eval {
106
- $git->command(qw(repo-config --get-regexp), '^branch\.');
106
+ $git->command(qw(config --get-regexp), '^branch\.');
107
};
108
for (@branches) {
109
if (/^branch\.([^.]*)\.(\S*)\s+(.*)$/) {
@@ -238,8 +238,8 @@ sub add_remote {
238
print STDERR "remote $name already exists.\n";
239
exit(1);
240
}
241
- $git->command('repo-config', "remote.$name.url", $url);
242
- $git->command('repo-config', "remote.$name.fetch",
241
+ $git->command('config', "remote.$name.url", $url);
242
+ $git->command('config', "remote.$name.fetch",
243
"+refs/heads/*:refs/remotes/$name/*");
244
}
245
git-repack.sh
+1
-1
@@ -28,7 +28,7 @@ done
28
# Later we will default repack.UseDeltaBaseOffset to true
29
default_dbo=false
30
31
-case "`git repo-config --bool repack.usedeltabaseoffset ||
31
+case "`git config --bool repack.usedeltabaseoffset ||
32
echo $default_dbo`" in
33
true)
34
extra="$extra --delta-base-offset" ;;
git-revert.sh
+1
-1
@@ -81,7 +81,7 @@ prev=$(git-rev-parse --verify "$commit^1" 2>/dev/null) ||
81
git-rev-parse --verify "$commit^2" >/dev/null 2>&1 &&
82
die "Cannot run $me a multi-parent commit."
83
84
-encoding=$(git repo-config i18n.commitencoding || echo UTF-8)
84
+encoding=$(git config i18n.commitencoding || echo UTF-8)
85
86
# "commit" is an existing commit. We would want to apply
87
# the difference it introduces since its first parent "prev"
git-sh-setup.sh
+1
-1
@@ -29,7 +29,7 @@ set_reflog_action() {
29
}
30
31
is_bare_repository () {
32
- git-repo-config --bool --get core.bare ||
32
+ git-config --bool --get core.bare ||
33
case "$GIT_DIR" in
34
.git | */.git) echo false ;;
35
*) echo true ;;
git-svn.perl
+10
-10
@@ -593,7 +593,7 @@ sub multi_init {
593
"$trunk_url ($_trunk)\n";
594
}
595
init($trunk_url);
596
- command_noisy('repo-config', 'svn.trunk', $trunk_url);
596
+ command_noisy('config', 'svn.trunk', $trunk_url);
597
}
598
}
599
$_prefix = '' unless defined $_prefix;
@@ -772,22 +772,22 @@ sub log_use_color {
772
return 1 if $_color;
773
my ($dc, $dcvar);
774
$dcvar = 'color.diff';
775
- $dc = `git-repo-config --get $dcvar`;
775
+ $dc = `git-config --get $dcvar`;
776
if ($dc eq '') {
777
# nothing at all; fallback to "diff.color"
778
$dcvar = 'diff.color';
779
- $dc = `git-repo-config --get $dcvar`;
779
+ $dc = `git-config --get $dcvar`;
780
}
781
chomp($dc);
782
if ($dc eq 'auto') {
783
my $pc;
784
- $pc = `git-repo-config --get color.pager`;
784
+ $pc = `git-config --get color.pager`;
785
if ($pc eq '') {
786
# does not have it -- fallback to pager.color
787
- $pc = `git-repo-config --bool --get pager.color`;
787
+ $pc = `git-config --bool --get pager.color`;
788
}
789
else {
790
- $pc = `git-repo-config --bool --get color.pager`;
790
+ $pc = `git-config --bool --get color.pager`;
791
if ($?) {
792
$pc = 'false';
793
}
@@ -800,7 +800,7 @@ sub log_use_color {
800
}
801
return 0 if $dc eq 'never';
802
return 1 if $dc eq 'always';
803
- chomp($dc = `git-repo-config --bool --get $dcvar`);
803
+ chomp($dc = `git-config --bool --get $dcvar`);
804
return ($dc eq 'true');
805
}
806
@@ -919,7 +919,7 @@ sub complete_url_ls_init {
919
waitpid $pid, 0;
920
croak $? if $?;
921
my ($n) = ($switch =~ /^--(\w+)/);
922
- command_noisy('repo-config', "svn.$n", $full_url);
922
+ command_noisy('config', "svn.$n", $full_url);
923
}
924
925
sub common_prefix {
@@ -1594,7 +1594,7 @@ sub init_vars {
1594
%tree_map = ();
1595
}
1596
1597
-# convert GetOpt::Long specs for use by git-repo-config
1597
+# convert GetOpt::Long specs for use by git-config
1598
sub read_repo_config {
1599
return unless -d $GIT_DIR;
1600
my $opts = shift;
@@ -1602,7 +1602,7 @@ sub read_repo_config {
1602
my $v = $opts->{$o};
1603
my ($key) = ($o =~ /^([a-z\-]+)/);
1604
$key =~ s/-//g;
1605
- my $arg = 'git-repo-config';
1605
+ my $arg = 'git-config';
1606
$arg .= ' --int' if ($o =~ /[:=]i$/);
1607
$arg .= ' --bool' if ($o !~ /[:=][sfi]$/);
1608
if (ref $v eq 'ARRAY') {
git.c
+2
-1
@@ -224,6 +224,7 @@ static void handle_internal_command(int argc, const char **argv, char **envp)
224
{ "check-ref-format", cmd_check_ref_format },
225
{ "cherry", cmd_cherry, RUN_SETUP },
226
{ "commit-tree", cmd_commit_tree, RUN_SETUP },
227
+ { "config", cmd_config },
228
{ "count-objects", cmd_count_objects, RUN_SETUP },
229
{ "describe", cmd_describe, RUN_SETUP },
230
{ "diff", cmd_diff, RUN_SETUP | USE_PAGER },
@@ -254,7 +255,7 @@ static void handle_internal_command(int argc, const char **argv, char **envp)
255
{ "push", cmd_push, RUN_SETUP },
256
{ "read-tree", cmd_read_tree, RUN_SETUP },
257
{ "reflog", cmd_reflog, RUN_SETUP },
257
- { "repo-config", cmd_repo_config },
258
+ { "repo-config", cmd_config },
259
{ "rerere", cmd_rerere, RUN_SETUP },
260
{ "rev-list", cmd_rev_list, RUN_SETUP },
261
{ "rev-parse", cmd_rev_parse, RUN_SETUP },
gitk
+1
-1
@@ -6193,7 +6193,7 @@ set wrcomcmd "git diff-tree --stdin -p --pretty"
6193
6194
set gitencoding {}
6195
catch {
6196
- set gitencoding [exec git repo-config --get i18n.commitencoding]
6196
+ set gitencoding [exec git config --get i18n.commitencoding]
6197
}
6198
if {$gitencoding == ""} {
6199
set gitencoding "utf-8"
gitweb/gitweb.perl
+1
-1
@@ -986,7 +986,7 @@ sub git_get_project_config {
986
$key =~ s/^gitweb\.//;
987
return if ($key =~ m/\W/);
988
989
- my @x = (git_cmd(), 'repo-config');
989
+ my @x = (git_cmd(), 'config');
990
if (defined $type) { push @x, $type; }
991
push @x, "--get";
992
push @x, "gitweb.$key";
ident.c
+2
-2
@@ -178,8 +178,8 @@ static const char *env_hint =
178
"\n"
179
"Run\n"
180
"\n"
181
-" git repo-config user.email \"you@email.com\"\n"
182
-" git repo-config user.name \"Your Name\"\n"
181
+" git config user.email \"you@email.com\"\n"
182
+" git config user.name \"Your Name\"\n"
183
"\n"
184
"To set the identity in this repository.\n"
185
"Add --global to set your account\'s default\n"
perl/Git.pm
+4
-4
@@ -482,14 +482,14 @@ sub wc_chdir {
482
483
=item config ( VARIABLE )
484
485
-Retrieve the configuration C<VARIABLE> in the same manner as C<repo-config>
485
+Retrieve the configuration C<VARIABLE> in the same manner as C<config>
486
does. In scalar context requires the variable to be set only one time
487
(exception is thrown otherwise), in array context returns allows the
488
variable to be set multiple times and returns all the values.
489
490
Must be called on a repository instance.
491
492
-This currently wraps command('repo-config') so it is not so fast.
492
+This currently wraps command('config') so it is not so fast.
493
494
=cut
495
@@ -500,9 +500,9 @@ sub config {
500
501
try {
502
if (wantarray) {
503
- return $self->command('repo-config', '--get-all', $var);
503
+ return $self->command('config', '--get-all', $var);
504
} else {
505
- return $self->command_oneline('repo-config', '--get', $var);
505
+ return $self->command_oneline('config', '--get', $var);
506
}
507
} catch Git::Error::Command with {
508
my $E = shift;
t/t1300-repo-config.sh
+51
-51
@@ -3,13 +3,13 @@
3
# Copyright (c) 2005 Johannes Schindelin
4
#
5
6
-test_description='Test git-repo-config in different settings'
6
+test_description='Test git-config in different settings'
7
8
. ./test-lib.sh
9
10
test -f .git/config && rm .git/config
11
12
-git-repo-config core.penguin "little blue"
12
+git-config core.penguin "little blue"
13
14
cat > expect << EOF
15
[core]
@@ -18,7 +18,7 @@ EOF
18
19
test_expect_success 'initial' 'cmp .git/config expect'
20
21
-git-repo-config Core.Movie BadPhysics
21
+git-config Core.Movie BadPhysics
22
23
cat > expect << EOF
24
[core]
@@ -28,7 +28,7 @@ EOF
28
29
test_expect_success 'mixed case' 'cmp .git/config expect'
30
31
-git-repo-config Cores.WhatEver Second
31
+git-config Cores.WhatEver Second
32
33
cat > expect << EOF
34
[core]
@@ -40,7 +40,7 @@ EOF
40
41
test_expect_success 'similar section' 'cmp .git/config expect'
42
43
-git-repo-config CORE.UPPERCASE true
43
+git-config CORE.UPPERCASE true
44
45
cat > expect << EOF
46
[core]
@@ -54,10 +54,10 @@ EOF
54
test_expect_success 'similar section' 'cmp .git/config expect'
55
56
test_expect_success 'replace with non-match' \
57
- 'git-repo-config core.penguin kingpin !blue'
57
+ 'git-config core.penguin kingpin !blue'
58
59
test_expect_success 'replace with non-match (actually matching)' \
60
- 'git-repo-config core.penguin "very blue" !kingpin'
60
+ 'git-config core.penguin "very blue" !kingpin'
61
62
cat > expect << EOF
63
[core]
@@ -86,7 +86,7 @@ EOF
86
cp .git/config .git/config2
87
88
test_expect_success 'multiple unset' \
89
- 'git-repo-config --unset-all beta.haha'
89
+ 'git-config --unset-all beta.haha'
90
91
cat > expect << EOF
92
[beta] ; silly comment # another comment
@@ -102,7 +102,7 @@ test_expect_success 'multiple unset is correct' 'cmp .git/config expect'
102
mv .git/config2 .git/config
103
104
test_expect_success '--replace-all' \
105
- 'git-repo-config --replace-all beta.haha gamma'
105
+ 'git-config --replace-all beta.haha gamma'
106
107
cat > expect << EOF
108
[beta] ; silly comment # another comment
@@ -116,7 +116,7 @@ EOF
116
117
test_expect_success 'all replaced' 'cmp .git/config expect'
118
119
-git-repo-config beta.haha alpha
119
+git-config beta.haha alpha
120
121
cat > expect << EOF
122
[beta] ; silly comment # another comment
@@ -130,7 +130,7 @@ EOF
130
131
test_expect_success 'really mean test' 'cmp .git/config expect'
132
133
-git-repo-config nextsection.nonewline wow
133
+git-config nextsection.nonewline wow
134
135
cat > expect << EOF
136
[beta] ; silly comment # another comment
@@ -145,8 +145,8 @@ EOF
145
146
test_expect_success 'really really mean test' 'cmp .git/config expect'
147
148
-test_expect_success 'get value' 'test alpha = $(git-repo-config beta.haha)'
149
-git-repo-config --unset beta.haha
148
+test_expect_success 'get value' 'test alpha = $(git-config beta.haha)'
149
+git-config --unset beta.haha
150
151
cat > expect << EOF
152
[beta] ; silly comment # another comment
@@ -160,7 +160,7 @@ EOF
160
161
test_expect_success 'unset' 'cmp .git/config expect'
162
163
-git-repo-config nextsection.NoNewLine "wow2 for me" "for me$"
163
+git-config nextsection.NoNewLine "wow2 for me" "for me$"
164
165
cat > expect << EOF
166
[beta] ; silly comment # another comment
@@ -176,18 +176,18 @@ EOF
176
test_expect_success 'multivar' 'cmp .git/config expect'
177
178
test_expect_success 'non-match' \
179
- 'git-repo-config --get nextsection.nonewline !for'
179
+ 'git-config --get nextsection.nonewline !for'
180
181
test_expect_success 'non-match value' \
182
- 'test wow = $(git-repo-config --get nextsection.nonewline !for)'
182
+ 'test wow = $(git-config --get nextsection.nonewline !for)'
183
184
test_expect_failure 'ambiguous get' \
185
- 'git-repo-config --get nextsection.nonewline'
185
+ 'git-config --get nextsection.nonewline'
186
187
test_expect_success 'get multivar' \
188
- 'git-repo-config --get-all nextsection.nonewline'
188
+ 'git-config --get-all nextsection.nonewline'
189
190
-git-repo-config nextsection.nonewline "wow3" "wow$"
190
+git-config nextsection.nonewline "wow3" "wow$"
191
192
cat > expect << EOF
193
[beta] ; silly comment # another comment
@@ -202,15 +202,15 @@ EOF
202
203
test_expect_success 'multivar replace' 'cmp .git/config expect'
204
205
-test_expect_failure 'ambiguous value' 'git-repo-config nextsection.nonewline'
205
+test_expect_failure 'ambiguous value' 'git-config nextsection.nonewline'
206
207
test_expect_failure 'ambiguous unset' \
208
- 'git-repo-config --unset nextsection.nonewline'
208
+ 'git-config --unset nextsection.nonewline'
209
210
test_expect_failure 'invalid unset' \
211
- 'git-repo-config --unset somesection.nonewline'
211
+ 'git-config --unset somesection.nonewline'
212
213
-git-repo-config --unset nextsection.nonewline "wow3$"
213
+git-config --unset nextsection.nonewline "wow3$"
214
215
cat > expect << EOF
216
[beta] ; silly comment # another comment
@@ -224,12 +224,12 @@ EOF
224
225
test_expect_success 'multivar unset' 'cmp .git/config expect'
226
227
-test_expect_failure 'invalid key' 'git-repo-config inval.2key blabla'
227
+test_expect_failure 'invalid key' 'git-config inval.2key blabla'
228
229
-test_expect_success 'correct key' 'git-repo-config 123456.a123 987'
229
+test_expect_success 'correct key' 'git-config 123456.a123 987'
230
231
test_expect_success 'hierarchical section' \
232
- 'git-repo-config Version.1.2.3eX.Alpha beta'
232
+ 'git-config Version.1.2.3eX.Alpha beta'
233
234
cat > expect << EOF
235
[beta] ; silly comment # another comment
@@ -255,7 +255,7 @@ version.1.2.3eX.alpha=beta
255
EOF
256
257
test_expect_success 'working --list' \
258
- 'git-repo-config --list > output && cmp output expect'
258
+ 'git-config --list > output && cmp output expect'
259
260
cat > expect << EOF
261
beta.noindent sillyValue
@@ -263,9 +263,9 @@ nextsection.nonewline wow2 for me
263
EOF
264
265
test_expect_success '--get-regexp' \
266
- 'git-repo-config --get-regexp in > output && cmp output expect'
266
+ 'git-config --get-regexp in > output && cmp output expect'
267
268
-git-repo-config --add nextsection.nonewline "wow4 for you"
268
+git-config --add nextsection.nonewline "wow4 for you"
269
270
cat > expect << EOF
271
wow2 for me
@@ -273,7 +273,7 @@ wow4 for you
273
EOF
274
275
test_expect_success '--add' \
276
- 'git-repo-config --get-all nextsection.nonewline > output && cmp output expect'
276
+ 'git-config --get-all nextsection.nonewline > output && cmp output expect'
277
278
cat > .git/config << EOF
279
[novalue]
@@ -281,9 +281,9 @@ cat > .git/config << EOF
281
EOF
282
283
test_expect_success 'get variable with no value' \
284
- 'git-repo-config --get novalue.variable ^$'
284
+ 'git-config --get novalue.variable ^$'
285
286
-git-repo-config > output 2>&1
286
+git-config > output 2>&1
287
288
test_expect_success 'no arguments, but no crash' \
289
"test $? = 129 && grep usage output"
@@ -293,7 +293,7 @@ cat > .git/config << EOF
293
c = d
294
EOF
295
296
-git-repo-config a.x y
296
+git-config a.x y
297
298
cat > expect << EOF
299
[a.b]
@@ -304,8 +304,8 @@ EOF
304
305
test_expect_success 'new section is partial match of another' 'cmp .git/config expect'
306
307
-git-repo-config b.x y
308
-git-repo-config a.b c
307
+git-config b.x y
308
+git-config a.b c
309
310
cat > expect << EOF
311
[a.b]
@@ -328,11 +328,11 @@ cat > expect << EOF
328
ein.bahn=strasse
329
EOF
330
331
-GIT_CONFIG=other-config git-repo-config -l > output
331
+GIT_CONFIG=other-config git-config -l > output
332
333
test_expect_success 'alternative GIT_CONFIG' 'cmp output expect'
334
335
-GIT_CONFIG=other-config git-repo-config anwohner.park ausweis
335
+GIT_CONFIG=other-config git-config anwohner.park ausweis
336
337
cat > expect << EOF
338
[ein]
@@ -355,7 +355,7 @@ weird
355
EOF
356
357
test_expect_success "rename section" \
358
- "git-repo-config --rename-section branch.eins branch.zwei"
358
+ "git-config --rename-section branch.eins branch.zwei"
359
360
cat > expect << EOF
361
# Hallo
@@ -371,12 +371,12 @@ EOF
371
test_expect_success "rename succeeded" "diff -u expect .git/config"
372
373
test_expect_failure "rename non-existing section" \
374
- 'git-repo-config --rename-section branch."world domination" branch.drei'
374
+ 'git-config --rename-section branch."world domination" branch.drei'
375
376
test_expect_success "rename succeeded" "diff -u expect .git/config"
377
378
test_expect_success "rename another section" \
379
- 'git-repo-config --rename-section branch."1 234 blabl/a" branch.drei'
379
+ 'git-config --rename-section branch."1 234 blabl/a" branch.drei'
380
381
cat > expect << EOF
382
# Hallo
@@ -393,20 +393,20 @@ test_expect_success "rename succeeded" "diff -u expect .git/config"
393
394
test_expect_success numbers '
395
396
- git-repo-config kilo.gram 1k &&
397
- git-repo-config mega.ton 1m &&
398
- k=$(git-repo-config --int --get kilo.gram) &&
396
+ git-config kilo.gram 1k &&
397
+ git-config mega.ton 1m &&
398
+ k=$(git-config --int --get kilo.gram) &&
399
test z1024 = "z$k" &&
400
- m=$(git-repo-config --int --get mega.ton) &&
400
+ m=$(git-config --int --get mega.ton) &&
401
test z1048576 = "z$m"
402
'
403
404
rm .git/config
405
406
-git-repo-config quote.leading " test"
407
-git-repo-config quote.ending "test "
408
-git-repo-config quote.semicolon "test;test"
409
-git-repo-config quote.hash "test#test"
406
+git-config quote.leading " test"
407
+git-config quote.ending "test "
408
+git-config quote.semicolon "test;test"
409
+git-config quote.hash "test#test"
410
411
cat > expect << EOF
412
[quote]
@@ -418,10 +418,10 @@ EOF
418
419
test_expect_success 'quoting' 'cmp .git/config expect'
420
421
-test_expect_failure 'key with newline' 'git repo-config key.with\\\
421
+test_expect_failure 'key with newline' 'git config key.with\\\
422
newline 123'
423
424
-test_expect_success 'value with newline' 'git repo-config key.sub value.with\\\
424
+test_expect_success 'value with newline' 'git config key.sub value.with\\\
425
newline'
426
427
cat > .git/config <<\EOF
@@ -440,7 +440,7 @@ section.noncont=not continued
440
section.quotecont=cont;inued
441
EOF
442
443
-git repo-config --list > result
443
+git config --list > result
444
445
test_expect_success 'value continued on next line' 'cmp result expect'
446
t/t1400-update-ref.sh
+2
-2
@@ -93,8 +93,8 @@ rm -rf .git/$m .git/logs expect
93
94
test_expect_success \
95
'enable core.logAllRefUpdates' \
96
- 'git-repo-config core.logAllRefUpdates true &&
97
- test true = $(git-repo-config --bool --get core.logAllRefUpdates)'
96
+ 'git-config core.logAllRefUpdates true &&
97
+ test true = $(git-config --bool --get core.logAllRefUpdates)'
98
99
test_expect_success \
100
"create $m (logged by config)" \
t/t1410-reflog.sh
+1
-1
@@ -71,7 +71,7 @@ test_expect_success setup '
71
check_fsck &&
72
73
chmod +x C &&
74
- ( test "`git repo-config --bool core.filemode`" != false ||
74
+ ( test "`git config --bool core.filemode`" != false ||
75
echo executable >>C ) &&
76
git add C &&
77
test_tick && git commit -m dragon &&
t/t3200-branch.sh
+3
-3
@@ -94,7 +94,7 @@ test_expect_failure \
94
git-branch r &&
95
git-branch -m q r/q'
96
97
-git-repo-config branch.s/s.dummy Hello
97
+git-config branch.s/s.dummy Hello
98
99
test_expect_success \
100
'git branch -m s/s s should work when s/t is deleted' \
@@ -107,8 +107,8 @@ test_expect_success \
107
test -f .git/logs/refs/heads/s'
108
109
test_expect_success 'config information was renamed, too' \
110
- "test $(git-repo-config branch.s.dummy) = Hello &&
111
- ! git-repo-config branch.s/s/dummy"
110
+ "test $(git-config branch.s.dummy) = Hello &&
111
+ ! git-config branch.s/s/dummy"
112
113
test_expect_failure \
114
'git-branch -m u v should fail when the reflog for u is a symlink' \
t/t3700-add.sh
+3
-3
@@ -21,7 +21,7 @@ test_expect_success \
21
22
test_expect_success \
23
'git-add: Test that executable bit is not used if core.filemode=0' \
24
- 'git repo-config core.filemode 0 &&
24
+ 'git config core.filemode 0 &&
25
echo foo >xfoo1 &&
26
chmod 755 xfoo1 &&
27
git-add xfoo1 &&
@@ -32,7 +32,7 @@ test_expect_success \
32
33
test_expect_success \
34
'git-update-index --add: Test that executable bit is not used...' \
35
- 'git repo-config core.filemode 0 &&
35
+ 'git config core.filemode 0 &&
36
echo foo >xfoo2 &&
37
chmod 755 xfoo2 &&
38
git-update-index --add xfoo2 &&
@@ -43,7 +43,7 @@ test_expect_success \
43
44
test_expect_success \
45
'git-update-index --add: Test that executable bit is not used...' \
46
- 'git repo-config core.filemode 0 &&
46
+ 'git config core.filemode 0 &&
47
ln -s xfoo2 xfoo3 &&
48
git-update-index --add xfoo3 &&
49
case "`git-ls-files --stage xfoo3`" in
t/t3900-i18n-commit.sh
+12
-12
@@ -29,7 +29,7 @@ test_expect_success 'no encoding header for base case' '
29
for H in ISO-8859-1 EUCJP ISO-2022-JP
30
do
31
test_expect_success "$H setup" '
32
- git-repo-config i18n.commitencoding $H &&
32
+ git-config i18n.commitencoding $H &&
33
git-checkout -b $H C0 &&
34
echo $H >F &&
35
git-commit -a -F ../t3900/$H.txt
@@ -44,16 +44,16 @@ do
44
'
45
done
46
47
-test_expect_success 'repo-config to remove customization' '
48
- git-repo-config --unset-all i18n.commitencoding &&
49
- if Z=$(git-repo-config --get-all i18n.commitencoding)
47
+test_expect_success 'config to remove customization' '
48
+ git-config --unset-all i18n.commitencoding &&
49
+ if Z=$(git-config --get-all i18n.commitencoding)
50
then
51
echo Oops, should have failed.
52
false
53
else
54
test z = "z$Z"
55
fi &&
56
- git-repo-config i18n.commitencoding utf-8
56
+ git-config i18n.commitencoding utf-8
57
'
58
59
test_expect_success 'ISO-8859-1 should be shown in UTF-8 now' '
@@ -67,9 +67,9 @@ do
67
'
68
done
69
70
-test_expect_success 'repo-config to add customization' '
71
- git-repo-config --unset-all i18n.commitencoding &&
72
- if Z=$(git-repo-config --get-all i18n.commitencoding)
70
+test_expect_success 'config to add customization' '
71
+ git-config --unset-all i18n.commitencoding &&
72
+ if Z=$(git-config --get-all i18n.commitencoding)
73
then
74
echo Oops, should have failed.
75
false
@@ -81,13 +81,13 @@ test_expect_success 'repo-config to add customization' '
81
for H in ISO-8859-1 EUCJP ISO-2022-JP
82
do
83
test_expect_success "$H should be shown in itself now" '
84
- git-repo-config i18n.commitencoding '$H' &&
84
+ git-config i18n.commitencoding '$H' &&
85
compare_with '$H' ../t3900/'$H'.txt
86
'
87
done
88
89
-test_expect_success 'repo-config to tweak customization' '
90
- git-repo-config i18n.logoutputencoding utf-8
89
+test_expect_success 'config to tweak customization' '
90
+ git-config i18n.logoutputencoding utf-8
91
'
92
93
test_expect_success 'ISO-8859-1 should be shown in UTF-8 now' '
@@ -103,7 +103,7 @@ done
103
104
for J in EUCJP ISO-2022-JP
105
do
106
- git-repo-config i18n.logoutputencoding $J
106
+ git-config i18n.logoutputencoding $J
107
for H in EUCJP ISO-2022-JP
108
do
109
test_expect_success "$H should be shown in $J now" '
t/t3901-i18n-patch.sh
+29
-29
@@ -31,7 +31,7 @@ check_encoding () {
31
}
32
33
test_expect_success setup '
34
- git-repo-config i18n.commitencoding UTF-8 &&
34
+ git-config i18n.commitencoding UTF-8 &&
35
36
# use UTF-8 in author and committer name to match the
37
# i18n.commitencoding settings
@@ -55,7 +55,7 @@ test_expect_success setup '
55
git commit -s -m "Second on side" &&
56
57
# the second one on the side branch is ISO-8859-1
58
- git-repo-config i18n.commitencoding ISO-8859-1 &&
58
+ git-config i18n.commitencoding ISO-8859-1 &&
59
# use author and committer name in ISO-8859-1 to match it.
60
. ../t3901-8859-1.txt &&
61
test_tick &&
@@ -64,11 +64,11 @@ test_expect_success setup '
64
git commit -s -m "Third on side" &&
65
66
# Back to default
67
- git-repo-config i18n.commitencoding UTF-8
67
+ git-config i18n.commitencoding UTF-8
68
'
69
70
test_expect_success 'format-patch output (ISO-8859-1)' '
71
- git-repo-config i18n.logoutputencoding ISO-8859-1 &&
71
+ git-config i18n.logoutputencoding ISO-8859-1 &&
72
73
git format-patch --stdout master..HEAD^ >out-l1 &&
74
git format-patch --stdout HEAD^ >out-l2 &&
@@ -79,7 +79,7 @@ test_expect_success 'format-patch output (ISO-8859-1)' '
79
'
80
81
test_expect_success 'format-patch output (UTF-8)' '
82
- git repo-config i18n.logoutputencoding UTF-8 &&
82
+ git config i18n.logoutputencoding UTF-8 &&
83
84
git format-patch --stdout master..HEAD^ >out-u1 &&
85
git format-patch --stdout HEAD^ >out-u2 &&
@@ -91,13 +91,13 @@ test_expect_success 'format-patch output (UTF-8)' '
91
92
test_expect_success 'rebase (U/U)' '
93
# We want the result of rebase in UTF-8
94
- git-repo-config i18n.commitencoding UTF-8 &&
94
+ git-config i18n.commitencoding UTF-8 &&
95
96
# The test is about logoutputencoding not affecting the
97
# final outcome -- it is used internally to generate the
98
# patch and the log.
99
100
- git repo-config i18n.logoutputencoding UTF-8 &&
100
+ git config i18n.logoutputencoding UTF-8 &&
101
102
# The result will be committed by GIT_COMMITTER_NAME --
103
# we want UTF-8 encoded name.
@@ -109,8 +109,8 @@ test_expect_success 'rebase (U/U)' '
109
'
110
111
test_expect_success 'rebase (U/L)' '
112
- git-repo-config i18n.commitencoding UTF-8 &&
113
- git repo-config i18n.logoutputencoding ISO-8859-1 &&
112
+ git-config i18n.commitencoding UTF-8 &&
113
+ git config i18n.logoutputencoding ISO-8859-1 &&
114
. ../t3901-utf8.txt &&
115
116
git reset --hard side &&
@@ -121,8 +121,8 @@ test_expect_success 'rebase (U/L)' '
121
122
test_expect_success 'rebase (L/L)' '
123
# In this test we want ISO-8859-1 encoded commits as the result
124
- git-repo-config i18n.commitencoding ISO-8859-1 &&
125
- git repo-config i18n.logoutputencoding ISO-8859-1 &&
124
+ git-config i18n.commitencoding ISO-8859-1 &&
125
+ git config i18n.logoutputencoding ISO-8859-1 &&
126
. ../t3901-8859-1.txt &&
127
128
git reset --hard side &&
@@ -134,8 +134,8 @@ test_expect_success 'rebase (L/L)' '
134
test_expect_success 'rebase (L/U)' '
135
# This is pathological -- use UTF-8 as intermediate form
136
# to get ISO-8859-1 results.
137
- git-repo-config i18n.commitencoding ISO-8859-1 &&
138
- git repo-config i18n.logoutputencoding UTF-8 &&
137
+ git-config i18n.commitencoding ISO-8859-1 &&
138
+ git config i18n.logoutputencoding UTF-8 &&
139
. ../t3901-8859-1.txt &&
140
141
git reset --hard side &&
@@ -147,8 +147,8 @@ test_expect_success 'rebase (L/U)' '
147
test_expect_success 'cherry-pick(U/U)' '
148
# Both the commitencoding and logoutputencoding is set to UTF-8.
149
150
- git-repo-config i18n.commitencoding UTF-8 &&
151
- git repo-config i18n.logoutputencoding UTF-8 &&
150
+ git-config i18n.commitencoding UTF-8 &&
151
+ git config i18n.logoutputencoding UTF-8 &&
152
. ../t3901-utf8.txt &&
153
154
git reset --hard master &&
@@ -162,8 +162,8 @@ test_expect_success 'cherry-pick(U/U)' '
162
test_expect_success 'cherry-pick(L/L)' '
163
# Both the commitencoding and logoutputencoding is set to ISO-8859-1
164
165
- git-repo-config i18n.commitencoding ISO-8859-1 &&
166
- git repo-config i18n.logoutputencoding ISO-8859-1 &&
165
+ git-config i18n.commitencoding ISO-8859-1 &&
166
+ git config i18n.logoutputencoding ISO-8859-1 &&
167
. ../t3901-8859-1.txt &&
168
169
git reset --hard master &&
@@ -177,8 +177,8 @@ test_expect_success 'cherry-pick(L/L)' '
177
test_expect_success 'cherry-pick(U/L)' '
178
# Commitencoding is set to UTF-8 but logoutputencoding is ISO-8859-1
179
180
- git-repo-config i18n.commitencoding UTF-8 &&
181
- git repo-config i18n.logoutputencoding ISO-8859-1 &&
180
+ git-config i18n.commitencoding UTF-8 &&
181
+ git config i18n.logoutputencoding ISO-8859-1 &&
182
. ../t3901-utf8.txt &&
183
184
git reset --hard master &&
@@ -193,8 +193,8 @@ test_expect_success 'cherry-pick(L/U)' '
193
# Again, the commitencoding is set to ISO-8859-1 but
194
# logoutputencoding is set to UTF-8.
195
196
- git-repo-config i18n.commitencoding ISO-8859-1 &&
197
- git repo-config i18n.logoutputencoding UTF-8 &&
196
+ git-config i18n.commitencoding ISO-8859-1 &&
197
+ git config i18n.logoutputencoding UTF-8 &&
198
. ../t3901-8859-1.txt &&
199
200
git reset --hard master &&
@@ -206,8 +206,8 @@ test_expect_success 'cherry-pick(L/U)' '
206
'
207
208
test_expect_success 'rebase --merge (U/U)' '
209
- git-repo-config i18n.commitencoding UTF-8 &&
210
- git repo-config i18n.logoutputencoding UTF-8 &&
209
+ git-config i18n.commitencoding UTF-8 &&
210
+ git config i18n.logoutputencoding UTF-8 &&
211
. ../t3901-utf8.txt &&
212
213
git reset --hard side &&
@@ -217,8 +217,8 @@ test_expect_success 'rebase --merge (U/U)' '
217
'
218
219
test_expect_success 'rebase --merge (U/L)' '
220
- git-repo-config i18n.commitencoding UTF-8 &&
221
- git repo-config i18n.logoutputencoding ISO-8859-1 &&
220
+ git-config i18n.commitencoding UTF-8 &&
221
+ git config i18n.logoutputencoding ISO-8859-1 &&
222
. ../t3901-utf8.txt &&
223
224
git reset --hard side &&
@@ -229,8 +229,8 @@ test_expect_success 'rebase --merge (U/L)' '
229
230
test_expect_success 'rebase --merge (L/L)' '
231
# In this test we want ISO-8859-1 encoded commits as the result
232
- git-repo-config i18n.commitencoding ISO-8859-1 &&
233
- git repo-config i18n.logoutputencoding ISO-8859-1 &&
232
+ git-config i18n.commitencoding ISO-8859-1 &&
233
+ git config i18n.logoutputencoding ISO-8859-1 &&
234
. ../t3901-8859-1.txt &&
235
236
git reset --hard side &&
@@ -242,8 +242,8 @@ test_expect_success 'rebase --merge (L/L)' '
242
test_expect_success 'rebase --merge (L/U)' '
243
# This is pathological -- use UTF-8 as intermediate form
244
# to get ISO-8859-1 results.
245
- git-repo-config i18n.commitencoding ISO-8859-1 &&
246
- git repo-config i18n.logoutputencoding UTF-8 &&
245
+ git-config i18n.commitencoding ISO-8859-1 &&
246
+ git config i18n.logoutputencoding UTF-8 &&
247
. ../t3901-8859-1.txt &&
248
249
git reset --hard side &&
t/t4000-diff-format.sh
+1
-1
@@ -28,7 +28,7 @@ test_expect_success \
28
'git-diff-files -p >current'
29
30
# that's as far as it comes
31
-if [ "$(git repo-config --get core.filemode)" = false ]
31
+if [ "$(git config --get core.filemode)" = false ]
32
then
33
say 'filemode disabled on the filesystem'
34
test_done
t/t4006-diff-mode.sh
+1
-1
@@ -15,7 +15,7 @@ test_expect_success \
15
tree=`git-write-tree` &&
16
echo $tree'
17
18
-if [ "$(git repo-config --get core.filemode)" = false ]
18
+if [ "$(git config --get core.filemode)" = false ]
19
then
20
say 'filemode disabled on the filesystem, using update-index --chmod=+x'
21
test_expect_success \
t/t4013-diff-various.sh
+1
-1
@@ -73,7 +73,7 @@ test_expect_success setup '
73
for i in 1 2; do echo $i; done >>dir/sub &&
74
git update-index file0 dir/sub &&
75
76
- git repo-config log.showroot false &&
76
+ git config log.showroot false &&
77
git commit --amend &&
78
git show-branch
79
'
t/t4102-apply-rename.sh
+1
-1
@@ -31,7 +31,7 @@ test_expect_success setup \
31
test_expect_success apply \
32
'git-apply --index --stat --summary --apply test-patch'
33
34
-if [ "$(git repo-config --get core.filemode)" = false ]
34
+if [ "$(git config --get core.filemode)" = false ]
35
then
36
say 'filemode disabled on the filesystem'
37
else
t/t5301-sliding-window.sh
+7
-7
@@ -30,19 +30,19 @@ test_expect_success \
30
31
test_expect_success \
32
'verify-pack -v, packedGitWindowSize == 1 page' \
33
- 'git-repo-config core.packedGitWindowSize 512 &&
33
+ 'git-config core.packedGitWindowSize 512 &&
34
git-verify-pack -v "$pack1"'
35
36
test_expect_success \
37
'verify-pack -v, packedGit{WindowSize,Limit} == 1 page' \
38
- 'git-repo-config core.packedGitWindowSize 512 &&
39
- git-repo-config core.packedGitLimit 512 &&
38
+ 'git-config core.packedGitWindowSize 512 &&
39
+ git-config core.packedGitLimit 512 &&
40
git-verify-pack -v "$pack1"'
41
42
test_expect_success \
43
'repack -a -d, packedGit{WindowSize,Limit} == 1 page' \
44
- 'git-repo-config core.packedGitWindowSize 512 &&
45
- git-repo-config core.packedGitLimit 512 &&
44
+ 'git-config core.packedGitWindowSize 512 &&
45
+ git-config core.packedGitLimit 512 &&
46
commit2=`git-commit-tree $tree -p $commit1 </dev/null` &&
47
git-update-ref HEAD $commit2 &&
48
git-repack -a -d &&
@@ -53,8 +53,8 @@ test_expect_success \
53
54
test_expect_success \
55
'verify-pack -v, defaults' \
56
- 'git-repo-config --unset core.packedGitWindowSize &&
57
- git-repo-config --unset core.packedGitLimit &&
56
+ 'git-config --unset core.packedGitWindowSize &&
57
+ git-config --unset core.packedGitLimit &&
58
git-verify-pack -v "$pack2"'
59
60
test_done
t/t5400-send-pack.sh
+1
-1
@@ -106,7 +106,7 @@ export HOME ;# this way we force the victim/.git/config to be used.
106
test_expect_success \
107
'pushing with --force should be denied with denyNonFastforwards' '
108
cd victim &&
109
- git-repo-config receive.denyNonFastforwards true &&
109
+ git-config receive.denyNonFastforwards true &&
110
cd .. &&
111
git-update-ref refs/heads/master master^ &&
112
git-send-pack --force ./victim/.git/ master &&
t/t5500-fetch-pack.sh
+1
-1
@@ -98,7 +98,7 @@ pull_to_client () {
98
mkdir client &&
99
cd client &&
100
git-init 2>> log2.txt &&
101
- git repo-config transfer.unpacklimit 0
101
+ git config transfer.unpacklimit 0
102
)
103
104
add A1
t/t5510-fetch.sh
+5
-5
@@ -22,14 +22,14 @@ test_expect_success "clone and setup child repos" '
22
cd .. &&
23
git clone . two &&
24
cd two &&
25
- git repo-config branch.master.remote one &&
26
- git repo-config remote.one.url ../one/.git/ &&
27
- git repo-config remote.one.fetch refs/heads/master:refs/heads/one &&
25
+ git config branch.master.remote one &&
26
+ git config remote.one.url ../one/.git/ &&
27
+ git config remote.one.fetch refs/heads/master:refs/heads/one &&
28
cd .. &&
29
git clone . three &&
30
cd three &&
31
- git repo-config branch.master.remote two &&
32
- git repo-config branch.master.merge refs/heads/one &&
31
+ git config branch.master.remote two &&
32
+ git config branch.master.merge refs/heads/one &&
33
mkdir -p .git/remotes &&
34
{
35
echo "URL: ../two/.git/"
t/t6200-fmt-merge-msg.sh
+3
-3
@@ -108,7 +108,7 @@ EOF
108
109
test_expect_success 'merge-msg test #3' '
110
111
- git repo-config merge.summary true &&
111
+ git config merge.summary true &&
112
113
git checkout master &&
114
setdate &&
@@ -138,7 +138,7 @@ EOF
138
139
test_expect_success 'merge-msg test #4' '
140
141
- git repo-config merge.summary true &&
141
+ git config merge.summary true &&
142
143
git checkout master &&
144
setdate &&
@@ -150,7 +150,7 @@ test_expect_success 'merge-msg test #4' '
150
151
test_expect_success 'merge-msg test #5' '
152
153
- git repo-config merge.summary yes &&
153
+ git config merge.summary yes &&
154
155
git checkout master &&
156
setdate &&