<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/git.git/config.c, branch v2.26.0-rc2</title>
<subtitle>Git
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/git.git/atom?h=v2.26.0-rc2</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/atom?h=v2.26.0-rc2'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/'/>
<updated>2020-02-25T19:18:32Z</updated>
<entry>
<title>Merge branch 'bw/remote-rename-update-config'</title>
<updated>2020-02-25T19:18:32Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2020-02-25T19:18:32Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=d0038f4b31d6ab1f0602a4d3c19e35c5004175fa'/>
<id>urn:sha1:d0038f4b31d6ab1f0602a4d3c19e35c5004175fa</id>
<content type='text'>
"git remote rename X Y" needs to adjust configuration variables
(e.g. branch.&lt;name&gt;.remote) whose value used to be X to Y.
branch.&lt;name&gt;.pushRemote is now also updated.

* bw/remote-rename-update-config:
  remote rename/remove: gently handle remote.pushDefault config
  config: provide access to the current line number
  remote rename/remove: handle branch.&lt;name&gt;.pushRemote config values
  remote: clean-up config callback
  remote: clean-up by returning early to avoid one indentation
  pull --rebase/remote rename: document and honor single-letter abbreviations rebase types
</content>
</entry>
<entry>
<title>Merge branch 'mr/show-config-scope'</title>
<updated>2020-02-17T21:22:17Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2020-02-17T21:22:17Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=5d55554b1d099f3ae5e74f6d058edb55161510de'/>
<id>urn:sha1:5d55554b1d099f3ae5e74f6d058edb55161510de</id>
<content type='text'>
"git config" learned to show in which "scope", in addition to in
which file, each config setting comes from.

* mr/show-config-scope:
  config: add '--show-scope' to print the scope of a config value
  submodule-config: add subomdule config scope
  config: teach git_config_source to remember its scope
  config: preserve scope in do_git_config_sequence
  config: clarify meaning of command line scoping
  config: split repo scope to local and worktree
  config: make scope_name non-static and rename it
  t1300: create custom config file without special characters
  t1300: fix over-indented HERE-DOCs
  config: fix typo in variable name
</content>
</entry>
<entry>
<title>config: provide access to the current line number</title>
<updated>2020-02-10T18:52:10Z</updated>
<author>
<name>Bert Wesarg</name>
<email>bert.wesarg@googlemail.com</email>
</author>
<published>2020-01-27T07:04:31Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=f2a2327a4a6a9bccade6df2bed1fdc3a8ab37f4c'/>
<id>urn:sha1:f2a2327a4a6a9bccade6df2bed1fdc3a8ab37f4c</id>
<content type='text'>
Users are nowadays trained to see message from CLI tools in the form

    &lt;file&gt;:&lt;lno&gt;: …

To be able to give such messages when notifying the user about
configurations in any config file, it is currently only possible to get
the file name (if the value originates from a file to begin with) via
`current_config_name()`. Now it is also possible to query the current line
number for the configuration.

Signed-off-by: Bert Wesarg &lt;bert.wesarg@googlemail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>submodule-config: add subomdule config scope</title>
<updated>2020-02-10T18:49:12Z</updated>
<author>
<name>Matthew Rogers</name>
<email>mattr94@gmail.com</email>
</author>
<published>2020-02-10T00:30:58Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=9a83d088ee00dcdab171b2020ab334e369437a33'/>
<id>urn:sha1:9a83d088ee00dcdab171b2020ab334e369437a33</id>
<content type='text'>
Before the changes to teach git_config_source to remember scope
information submodule-config.c never needed to consider the question of
config scope.  Even though zeroing out git_config_source is still
correct and preserved the previous behavior of setting the scope to
CONFIG_SCOPE_UNKNOWN, it's better to be explicit about such situations
by explicitly setting the scope.  As none of the current config_scope
enumerations make sense we create CONFIG_SCOPE_SUBMODULE to describe the
situation.

Signed-off-by: Matthew Rogers &lt;mattr94@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>config: teach git_config_source to remember its scope</title>
<updated>2020-02-10T18:49:10Z</updated>
<author>
<name>Matthew Rogers</name>
<email>mattr94@gmail.com</email>
</author>
<published>2020-02-10T00:30:57Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=e37efa40e122c4408c89c437e8a375df2147feac'/>
<id>urn:sha1:e37efa40e122c4408c89c437e8a375df2147feac</id>
<content type='text'>
There are many situations where the scope of a config command is known
beforehand, such as passing of '--local', '--file', etc. to an
invocation of git config.  However, this information is lost when moving
from builtin/config.c to /config.c.  This historically hasn't been a big
deal, but to prepare for the upcoming --show-scope option we teach
git_config_source to keep track of the source and the config machinery
to use that information to set current_parsing_scope appropriately.

Signed-off-by: Matthew Rogers &lt;mattr94@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>config: preserve scope in do_git_config_sequence</title>
<updated>2020-02-10T18:39:04Z</updated>
<author>
<name>Matthew Rogers</name>
<email>mattr94@gmail.com</email>
</author>
<published>2020-02-10T00:30:56Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=5c105a842eae59a3271f5db861ef8d85de6bc2f8'/>
<id>urn:sha1:5c105a842eae59a3271f5db861ef8d85de6bc2f8</id>
<content type='text'>
do_git_config_sequence operated under the assumption that it was correct
to set current_parsing_scope to CONFIG_SCOPE_UNKNOWN as part of the
cleanup it does after it finishes execution.  This is incorrect, as it
blows away the current_parsing_scope if do_git_config_sequence is called
recursively.  As such situations are rare (git config running with the
'--blob' option is one example) this has yet to cause a problem, but the
upcoming '--show-scope' option will experience issues in that case, lets
teach do_git_config_sequence to preserve the current_parsing_scope from
before it started execution.

Signed-off-by: Matthew Rogers &lt;mattr94@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>config: clarify meaning of command line scoping</title>
<updated>2020-02-10T18:39:02Z</updated>
<author>
<name>Matthew Rogers</name>
<email>mattr94@gmail.com</email>
</author>
<published>2020-02-10T00:30:55Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=6766e41b8aae21927625adbb8cdc87804153639a'/>
<id>urn:sha1:6766e41b8aae21927625adbb8cdc87804153639a</id>
<content type='text'>
CONFIG_SCOPE_CMDLINE is generally used in the code to refer to config
values passed in via the -c option.  Options passed in using this
mechanism share similar scoping characteristics with the --file and
--blob options of the 'config' command, namely that they are only in use
for that single invocation of git, and that they supersede the normal
system/global/local hierarchy.  This patch introduces
CONFIG_SCOPE_COMMAND to reflect this new idea, which also makes
CONFIG_SCOPE_CMDLINE redundant.

Signed-off-by: Matthew Rogers &lt;mattr94@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>config: split repo scope to local and worktree</title>
<updated>2020-02-10T18:32:20Z</updated>
<author>
<name>Matthew Rogers</name>
<email>mattr94@gmail.com</email>
</author>
<published>2020-02-10T00:30:54Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=6dc905d97431d683b418978819629a2626555b2e'/>
<id>urn:sha1:6dc905d97431d683b418978819629a2626555b2e</id>
<content type='text'>
Previously when iterating through git config variables, worktree config
and local config were both considered "CONFIG_SCOPE_REPO".  This was
never a problem before as no one had needed to differentiate between the
two cases, but future functionality may care whether or not the config
options come from a worktree or from the repository's actual local
config file.  For example, the planned feature to add a '--show-scope'
to config to allow a user to see which scope listed config options come
from would confuse users if it just printed 'repo' rather than 'local'
or 'worktree' as the documentation would lead them to expect.  As well
as the additional benefit of making the implementation look more like
how the documentation describes the interface.

To accomplish this we split out what was previously considered repo
scope to be local and worktree.

The clients of 'current_config_scope()' who cared about
CONFIG_SCOPE_REPO are also modified to similarly care about
CONFIG_SCOPE_WORKTREE and CONFIG_SCOPE_LOCAL to preserve previous behavior.

Signed-off-by: Matthew Rogers &lt;mattr94@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>config: make scope_name non-static and rename it</title>
<updated>2020-02-10T18:32:18Z</updated>
<author>
<name>Matthew Rogers</name>
<email>mattr94@gmail.com</email>
</author>
<published>2020-02-10T00:30:53Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=a5cb4204b63b57e99ae3a44f23a7945f146fe078'/>
<id>urn:sha1:a5cb4204b63b57e99ae3a44f23a7945f146fe078</id>
<content type='text'>
To prepare for the upcoming --show-scope option, we require the ability
to convert a config_scope enum to a string.  As this was originally
implemented as a static function 'scope_name()' in
t/helper/test-config.c, we expose it via config.h and give it a less
ambiguous name 'config_scope_name()'

Signed-off-by: Matthew Rogers &lt;mattr94@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>strbuf: add and use strbuf_insertstr()</title>
<updated>2020-02-10T17:04:45Z</updated>
<author>
<name>René Scharfe</name>
<email>l.s.r@web.de</email>
</author>
<published>2020-02-09T13:44:23Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=a91cc7fad0d48984135abe2fb70c41db61b500c5'/>
<id>urn:sha1:a91cc7fad0d48984135abe2fb70c41db61b500c5</id>
<content type='text'>
Add a function for inserting a C string into a strbuf.  Use it
throughout the source to get rid of magic string length constants and
explicit strlen() calls.

Like strbuf_addstr(), implement it as an inline function to avoid the
implicit strlen() calls to cause runtime overhead.

Helped-by: Taylor Blau &lt;me@ttaylorr.com&gt;
Helped-by: Eric Sunshine &lt;sunshine@sunshineco.com&gt;
Signed-off-by: René Scharfe &lt;l.s.r@web.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
