<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/libgit2.git/src/config_cache.c, branch ethomson/proxy</title>
<subtitle>github.com: libgit2/libgit2.git
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/'/>
<entry>
<title>refs: add support for core.logAllRefUpdates=always</title>
<updated>2018-11-18T23:39:10+00:00</updated>
<author>
<name>Etienne Samson</name>
<email>samson.etienne@gmail.com</email>
</author>
<published>2018-11-17T16:55:10+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=e226ad8f2fd76211809cf7b381fb55bb600df82f'/>
<id>e226ad8f2fd76211809cf7b381fb55bb600df82f</id>
<content type='text'>
Since we were not expecting this config entry to contain a string, we
would fail as soon as its (cached) value would be accessed. Hence,
provide some constants for the 4 states we use, and account for "always"
when we decide to reflog changes.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Since we were not expecting this config entry to contain a string, we
would fail as soon as its (cached) value would be accessed. Hence,
provide some constants for the 4 states we use, and account for "always"
when we decide to reflog changes.
</pre>
</div>
</content>
</entry>
<entry>
<title>Make sure to always include "common.h" first</title>
<updated>2017-07-03T08:51:48+00:00</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2017-06-30T11:39:01+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=0c7f49dd4316b332f30b4ea72a657bace41e1245'/>
<id>0c7f49dd4316b332f30b4ea72a657bace41e1245</id>
<content type='text'>
Next to including several files, our "common.h" header also declares
various macros which are then used throughout the project. As such, we
have to make sure to always include this file first in all
implementation files. Otherwise, we might encounter problems or even
silent behavioural differences due to macros or defines not being
defined as they should be. So in fact, our header and implementation
files should make sure to always include "common.h" first.

This commit does so by establishing a common include pattern. Header
files inside of "src" will now always include "common.h" as its first
other file, separated by a newline from all the other includes to make
it stand out as special. There are two cases for the implementation
files. If they do have a matching header file, they will always include
this one first, leading to "common.h" being transitively included as
first file. If they do not have a matching header file, they instead
include "common.h" as first file themselves.

This fixes the outlined problems and will become our standard practice
for header and source files inside of the "src/" from now on.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Next to including several files, our "common.h" header also declares
various macros which are then used throughout the project. As such, we
have to make sure to always include this file first in all
implementation files. Otherwise, we might encounter problems or even
silent behavioural differences due to macros or defines not being
defined as they should be. So in fact, our header and implementation
files should make sure to always include "common.h" first.

This commit does so by establishing a common include pattern. Header
files inside of "src" will now always include "common.h" as its first
other file, separated by a newline from all the other includes to make
it stand out as special. There are two cases for the implementation
files. If they do have a matching header file, they will always include
this one first, leading to "common.h" being transitively included as
first file. If they do not have a matching header file, they instead
include "common.h" as first file themselves.

This fixes the outlined problems and will become our standard practice
for header and source files inside of the "src/" from now on.
</pre>
</div>
</content>
</entry>
<entry>
<title>Honor `core.fsyncObjectFiles`</title>
<updated>2017-03-02T09:11:33+00:00</updated>
<author>
<name>Edward Thomson</name>
<email>ethomson@github.com</email>
</author>
<published>2017-02-28T12:29:29+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=1c04a96b25da048221f31ecee0227d960dc00489'/>
<id>1c04a96b25da048221f31ecee0227d960dc00489</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>config_cache: check return value of `git_config__lookup_entry`</title>
<updated>2016-03-11T13:20:15+00:00</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2016-03-10T16:21:02+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=13c371dc10f8b5696b5728c9824d155ef9ad2f81'/>
<id>13c371dc10f8b5696b5728c9824d155ef9ad2f81</id>
<content type='text'>
Callers of `git_config__cvar` already handle the case where the
function returns an error due to a failed configuration variable
lookup, but we are actually swallowing errors when calling
`git_config__lookup_entry` inside of the function.

Fix this by returning early when `git_config__lookup_entry`
returns an error. As we call `git_config__lookup_entry` with
`no_errors == false` which leads us to call `get_entry` with
`GET_NO_MISSING` we will not return early when the lookup fails
due to a missing entry. Like this we are still able to set the
default value of the cvar and exit successfully.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Callers of `git_config__cvar` already handle the case where the
function returns an error due to a failed configuration variable
lookup, but we are actually swallowing errors when calling
`git_config__lookup_entry` inside of the function.

Fix this by returning early when `git_config__lookup_entry`
returns an error. As we call `git_config__lookup_entry` with
`no_errors == false` which leads us to call `get_entry` with
`GET_NO_MISSING` we will not return early when the lookup fails
due to a missing entry. Like this we are still able to set the
default value of the cvar and exit successfully.
</pre>
</div>
</content>
</entry>
<entry>
<title>config: borrow refcounted references</title>
<updated>2015-03-03T17:35:12+00:00</updated>
<author>
<name>Carlos Martín Nieto</name>
<email>cmn@dwim.me</email>
</author>
<published>2014-12-21T15:31:03+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=9a97f49e3aa15edc479fc590f4b28fc44c155c40'/>
<id>9a97f49e3aa15edc479fc590f4b28fc44c155c40</id>
<content type='text'>
This changes the get_entry() method to return a refcounted version of
the config entry, which you have to free when you're done.

This allows us to avoid freeing the memory in which the entry is stored
on a refresh, which may happen at any time for a live config.

For this reason, get_string() has been forbidden on live configs and a
new function get_string_buf() has been added, which stores the string in
a git_buf which the user then owns.

The functions which parse the string value takea advantage of the
borrowing to parse safely and then release the entry.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This changes the get_entry() method to return a refcounted version of
the config entry, which you have to free when you're done.

This allows us to avoid freeing the memory in which the entry is stored
on a refresh, which may happen at any time for a live config.

For this reason, get_string() has been forbidden on live configs and a
new function get_string_buf() has been added, which stores the string in
a git_buf which the user then owns.

The functions which parse the string value takea advantage of the
borrowing to parse safely and then release the entry.
</pre>
</div>
</content>
</entry>
<entry>
<title>Introduce core.protectHFS and core.protectNTFS</title>
<updated>2014-12-17T17:52:07+00:00</updated>
<author>
<name>Edward Thomson</name>
<email>ethomson@microsoft.com</email>
</author>
<published>2014-12-17T00:53:55+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=ec74b40ceef3dc3892c7d84bb4f5d99bab504ba4'/>
<id>ec74b40ceef3dc3892c7d84bb4f5d99bab504ba4</id>
<content type='text'>
Validate HFS ignored char ".git" paths when `core.protectHFS` is
specified.  Validate NTFS invalid ".git" paths when `core.protectNTFS`
is specified.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Validate HFS ignored char ".git" paths when `core.protectHFS` is
specified.  Validate NTFS invalid ".git" paths when `core.protectNTFS`
is specified.
</pre>
</div>
</content>
</entry>
<entry>
<title>Ignore core.safecrlf=warn until we have a warn infrastructure</title>
<updated>2014-05-30T16:30:53+00:00</updated>
<author>
<name>Edward Thomson</name>
<email>ethomson@microsoft.com</email>
</author>
<published>2014-05-30T16:30:53+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=49837fd49fb9de999be5add82a12bf6332d4703f'/>
<id>49837fd49fb9de999be5add82a12bf6332d4703f</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Increase use of config snapshots</title>
<updated>2014-05-13T23:32:27+00:00</updated>
<author>
<name>Russell Belfer</name>
<email>rb@github.com</email>
</author>
<published>2014-05-13T23:32:27+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=2b52a0bfaedf7571e7ecd706947f5865d513760c'/>
<id>2b52a0bfaedf7571e7ecd706947f5865d513760c</id>
<content type='text'>
And decrease extra reload checks of config data.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
And decrease extra reload checks of config data.
</pre>
</div>
</content>
</entry>
<entry>
<title>Introduce core.safecrlf handling</title>
<updated>2014-04-08T04:09:09+00:00</updated>
<author>
<name>Edward Thomson</name>
<email>ethomson@microsoft.com</email>
</author>
<published>2014-03-27T23:34:20+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=855c66de66fe39fe219c6dab9d614c6e9d633d9c'/>
<id>855c66de66fe39fe219c6dab9d614c6e9d633d9c</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Add config read fns with controlled error behavior</title>
<updated>2013-12-11T18:57:49+00:00</updated>
<author>
<name>Russell Belfer</name>
<email>rb@github.com</email>
</author>
<published>2013-11-25T22:21:34+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=9f77b3f6f5ce6944ec49dfc666ef6b8df0af0c6b'/>
<id>9f77b3f6f5ce6944ec49dfc666ef6b8df0af0c6b</id>
<content type='text'>
This adds `git_config__lookup_entry` which will look up a key in
a config and return either the entry or NULL if the key was not
present.  Optionally, it can either suppress all errors or can
return them (although not finding the key is not an error for this
function).  Unlike other accessors, this does not normalize the
config key string, so it must only be used when the key is known
to be in normalized form (i.e. all lower-case before the first dot
and after the last dot, with no invalid characters).

This also adds three high-level helper functions to look up config
values with no errors and a fallback value.  The three functions
are for string, bool, and int values, and will resort to the
fallback value for any error that arises.  They are:

* `git_config__get_string_force`
* `git_config__get_bool_force`
* `git_config__get_int_force`

None of them normalize the config `key` either, so they can only
be used for internal cases where the key is known to be in normal
format.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This adds `git_config__lookup_entry` which will look up a key in
a config and return either the entry or NULL if the key was not
present.  Optionally, it can either suppress all errors or can
return them (although not finding the key is not an error for this
function).  Unlike other accessors, this does not normalize the
config key string, so it must only be used when the key is known
to be in normalized form (i.e. all lower-case before the first dot
and after the last dot, with no invalid characters).

This also adds three high-level helper functions to look up config
values with no errors and a fallback value.  The three functions
are for string, bool, and int values, and will resort to the
fallback value for any error that arises.  They are:

* `git_config__get_string_force`
* `git_config__get_bool_force`
* `git_config__get_int_force`

None of them normalize the config `key` either, so they can only
be used for internal cases where the key is known to be in normal
format.
</pre>
</div>
</content>
</entry>
</feed>
