- 15 May, 2014 1 commit
-
-
Philip Kelley committed
-
- 13 May, 2014 1 commit
-
-
Russell Belfer committed
-
- 12 May, 2014 1 commit
-
-
Russell Belfer committed
-
- 18 Apr, 2014 9 commits
-
-
Now that our strmap is no longer modified but replaced, we can use the same strmap for the snapshot's values and it will be freed when we don't need it anymore.
Carlos Martín Nieto committed -
This is mostly groundwork to let us re-use the map in the snapshots.
Carlos Martín Nieto committed -
When we delete an entry, we also want to refresh the configuration to catch any changes that happened externally. This allows us to simplify the logic, as we no longer need to delete these variables internally. The whole state will be refreshed and the deleted entries won't be there.
Carlos Martín Nieto committed -
With the isolation of complex reads, we can now try to refresh the on-disk file before reading a value from it. This changes the semantics a bit, as before we could be sure that a string we got from the configuration was valid until we wrote or refreshed. This is no longer the case, as a read can also invalidate the pointer.
Carlos Martín Nieto committed -
When writing out, parse the resulting file instead of adding or replacing the value locally. This has the effect of reading external changes as well.
Carlos Martín Nieto committed -
Carlos Martín Nieto committed
-
This will be used by the writing commands in a later step.
Carlos Martín Nieto committed -
Current code sets the active map to a new one and builds it whilst it's active. This is a race condition with someone else trying to access the same config. Instead, let's build up our new map and swap the active and new one.
Carlos Martín Nieto committed -
In order to have consistent views of the config files for remotes, submodules et al. and a configuration that represents what is currently stored on-disk, we need a way to provide a view of the configuration that does not change. The goal here is to provide the snapshotting part by creating a read-only copy of the state of the configuration at a particular point in time, which does not change when a repository's main config changes.
Carlos Martín Nieto committed
-
- 17 Apr, 2014 1 commit
-
-
This adds a basic test of doing simultaneous diffs on multiple threads and adds basic locking for the attr file cache because that was the immediate problem that arose from these tests.
Russell Belfer committed
-
- 25 Feb, 2014 1 commit
-
-
Edward Thomson committed
-
- 13 Jan, 2014 1 commit
-
-
Arthur Schreiber committed
-
- 02 Jan, 2014 1 commit
-
-
Robert Konrad committed
-
- 11 Dec, 2013 1 commit
-
-
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.
Russell Belfer committed
-
- 10 Nov, 2013 1 commit
-
-
Vicent Marti committed
-
- 07 Nov, 2013 2 commits
-
-
Signed-off-by: Sven Strickroth <email@cs-ware.de>
Sven Strickroth committed -
If the value contains a command (; or #) char or starts or ends with space it needs to be quoted. Signed-off-by: Sven Strickroth <email@cs-ware.de>
Sven Strickroth committed
-
- 05 Nov, 2013 3 commits
-
-
nulltoken committed
-
nulltoken committed
-
Edward Thomson committed
-
- 02 Nov, 2013 1 commit
-
-
We used to move `data_start` forward, which is wrong as that needs to point to the beginning of the buffer in order to perform size calculations. Introduce a `write_start` variable which indicates where we should start writing from, which is what the `data_start` was being wrongly reused to be.
Carlos Martín Nieto committed
-
- 01 Nov, 2013 1 commit
-
-
Vicent Marti committed
-
- 31 Oct, 2013 2 commits
-
-
Daniel Rodríguez Troitiño committed
-
At some moment git_config_delete_entry lost the ability to delete one entry of a multivar configuration. The moment you had more than one fetch or push ref spec for a remote you will not be able to save that remote anymore. The changes in network::remote::remotes::save show that problem. I needed to create a new git_config_delete_multivar because I was not able to remove one or several entries of a multivar config with the current API. Several tries modifying how git_config_set_multivar(..., NULL) behaved were not successful. git_config_delete_multivar is very similar to git_config_set_multivar, and delegates into config_delete_multivar of config_file. This function search for the cvar_t that will be deleted, storing them in a temporal array, and rebuilding the linked list. After calling config_write to delete the entries, the cvar_t stored in the temporal array are freed. There is a little fix in config_write, it avoids an infinite loop when using a regular expression (case for the multivars). This error was found by the test network::remote::remotes::tagopt.
Daniel Rodríguez Troitiño committed
-
- 01 Oct, 2013 1 commit
-
-
Linquize committed
-
- 19 Sep, 2013 1 commit
-
-
Linquize committed
-
- 17 Sep, 2013 1 commit
-
-
This makes the git_buf struct that was used internally into an externally available structure and eliminates the git_buffer. As part of that, some of the special cases that arose with the externally used git_buffer were blended into the git_buf, such as being careful about git_buf objects that may have a NULL ptr and allowing for bufs with a valid ptr and size but zero asize as a way of referring to externally owned data.
Russell Belfer committed
-
- 07 Sep, 2013 6 commits
-
-
As the include depth increases, the chance of a realloc increases. This means that whenever we run git_array_alloc() or call config_parse(), we need to remember what our reader's index is so we can look it up again.
Carlos Martín Nieto committed -
Carlos Martín Nieto committed
-
When two or more variables of the same name exist and the user asks for a scalar, we must return the latest value assign to it.
Carlos Martín Nieto committed -
We need to refresh the variables from the included files if they are changed, so loop over all included files and re-parse the files if any of them has changed.
Carlos Martín Nieto committed -
When refreshing we need to refresh if any of the files have been touched, so we need to keep the list.
Carlos Martín Nieto committed -
Relative, absolute and home-relative paths are supported. The recursion limit it set at 10, just like in git.
Carlos Martín Nieto committed
-
- 05 Sep, 2013 1 commit
-
-
In order to support config includes, we must differentiate between the backend's main file and the file we are currently parsing. This lays the groundwork for includes, keeping the current behaviours.
Carlos Martín Nieto committed
-
- 13 Aug, 2013 1 commit
-
-
Build it on top of the normal iterator instead, which lets use re-use a lot of code.
Carlos Martín Nieto committed
-
- 12 Aug, 2013 2 commits
-
-
Carlos Martín Nieto committed
-
As the name suggests, it iterates over all the entries
Carlos Martín Nieto committed
-