- 31 Oct, 2013 1 commit
-
-
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
-
- 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 5 commits
-
-
When the glob iterator is passed NULL regexp, call the non-globbing iterator so we don't have to special-case which functions to call.
Carlos Martín Nieto committed -
Carlos Martín Nieto committed
-
Use a glob iterator instead of going through git_config_backend_foreach_match. This function is left as it's exposed in the API.
Carlos Martín Nieto committed -
Carlos Martín Nieto committed
-
As the name suggests, it iterates over all the entries
Carlos Martín Nieto committed
-
- 08 Aug, 2013 10 commits
-
-
Carlos Martín Nieto committed
-
Make it look like the refs iterator API.
Carlos Martín Nieto committed -
Implement the foreach version as a wrapper around the iterator.
Carlos Martín Nieto committed -
Carlos Martín Nieto committed
-
Carlos Martín Nieto committed
-
Like we have in the references iterator, next and free belong in the iterator itself.
Carlos Martín Nieto committed -
The plain function will return an iterator, so move this one out of the way.
Carlos Martín Nieto committed -
Really report an error in foreach if we fail to allocate the iterator, and don't fail if the config is emtpy.
Carlos Martín Nieto committed -
Make the iterator structure opaque and make sure it compiles.
Carlos Martín Nieto committed -
new functions in struct git_config_backend: * iterator_new(...) * iterator_free(...) * next(...) The old callback based foreach style can still be used with `git_config_backend_foreach_match`
Nico von Geyso committed
-
- 09 Jul, 2013 2 commits
-
-
Russell Belfer committed
-
If there is not an error, the return value was always the return value of the last call to file->get_multivar With this commit GIT_ENOTFOUND is only returned if all the calls to filge-get_multivar return GIT_ENOTFOUND.
J. David Ibáñez committed
-
- 12 Jun, 2013 2 commits
-
-
Vicent Marti committed
-
This fixes problems with missing function prototypes and 64-bit data issues on Windows.
Russell Belfer committed
-
- 07 Jun, 2013 1 commit
-
-
This adds a `git__memset` routine that will not be optimized away and updates the places where I memset() right before a free() call to use it.
Russell Belfer committed
-
- 31 May, 2013 1 commit
-
-
By zeroing out the memory when we free larger objects (i.e. those that serve as collections of other data, such as repos, odb, refdb), I'm hoping that it will be easier for libgit2 bindings to find errors in their object management code.
Russell Belfer committed
-
- 24 May, 2013 1 commit
-
-
The GIT_CONFIG_LEVEL constants actually work well as an enum because they are mutually exclusive, so this adds a typedef to the enum and uses that everywhere that one of these constants are expected, instead of the old code that typically used an unsigned int.
Russell Belfer committed
-
- 23 May, 2013 2 commits
-
-
Russell Belfer committed
-
Plus a bit of extra paranoia to ensure config object has valid contents.
Russell Belfer committed
-
- 15 May, 2013 1 commit
-
-
Linquize committed
-
- 07 May, 2013 2 commits
-
-
The rules for which one to open is a bit silly, so let's make it easier for our users.
Carlos Martín Nieto committed -
When a repository is initialised, we need to probe to see if there is a global config to load. If this is not the case, the user isn't able to write to the global config without creating the backend and adding it themselves, which is inconvenient and overly complex. Unconditionally create and add a backend for the global config file regardless of whether it exists as a convenience for users. To enable this, we allow creating backends to files that do not exist yet, changing the semantics somewhat, and making some tests invalid.
Carlos Martín Nieto committed
-
- 01 May, 2013 1 commit
-
-
Russell Belfer committed
-
- 30 Apr, 2013 1 commit
-
-
This prevents a segfault when setting a value in the config of a repository that doesn't have a config file.
Russell Belfer committed
-
- 23 Apr, 2013 2 commits
-
-
This is a conservative change, but it seemed like the only safe thing to do -- i.e. clear the cvar cache when a config gets set.
Russell Belfer committed -
This adds a bunch of additional config values to the repository config value cache and makes it easier to add a simple boolean config without creating enum values for each possible setting. Also, this fixes a bug in git_config_refresh where the config cache was not being cleared which could lead to potential incorrect values. The work to start using the new cached configs will come in the next couple of commits...
Russell Belfer committed
-
- 21 Apr, 2013 1 commit
-
-
Moving backend implementor objects into include/git2/sys so the APIs can be isolated from the ones that normal libgit2 users would be likely to use.
Russell Belfer committed
-
- 18 Mar, 2013 1 commit
-
-
This switches the APIs for setting and getting the global/system search paths from using git_strarray to using a simple string with GIT_PATH_LIST_SEPARATOR delimited paths, just as the environment PATH variable would contain. This makes it simpler to get and set the value. I also added code to expand "$PATH" when setting a new value to embed the old value of the path. This means that I no longer require separate actions to PREPEND to the value.
Russell Belfer committed
-
- 17 Mar, 2013 1 commit
-
-
Implicit type conversion argument of function to size_t type Suspicious sequence of types castings: size_t -> int -> size_t Consider reviewing the expression of the 'A = B == C' kind. The expression is calculated as following: 'A = (B == C)' Unsigned type is never < 0
Arkadiy Shapkin committed
-
- 15 Mar, 2013 1 commit
-
-
The goal of this work is to expose the search logic for "global", "system", and "xdg" files through the git_libgit2_opts() interface. Behind the scenes, I changed the logic for finding files to have a notion of a git_strarray that represents a search path and to store a separate search path for each of the three tiers of config file. For each tier, I implemented a function to initialize it to default values (generally based on environment variables), and then general interfaces to get it, set it, reset it, and prepend new directories to it. Next, I exposed these interfaces through the git_libgit2_opts interface, reusing the GIT_CONFIG_LEVEL_SYSTEM, etc., constants for the user to control which search path they were modifying. There are alternative designs for the opts interface / argument ordering, so I'm putting this phase out for discussion. Additionally, I ended up doing a little bit of clean up regarding attr.h and attr_file.h, adding a new attrcache.h so the other two files wouldn't have to be included in so many places.
Russell Belfer committed
-
- 09 Mar, 2013 1 commit
-
-
Passing NULL is non-sensical. The error message leaves to be desired, though, as it leaks internal implementation details. Catch it at the `git_config_set_string` level and set an appropriate error message.
Carlos Martín Nieto committed
-
- 01 Mar, 2013 1 commit
-
-
This removes assertions that prevent us from having an empty git_config object and then updates some tests that were dependent on global config state to use an empty config before running anything.
Russell Belfer committed
-
- 29 Jan, 2013 1 commit
-
-
This is a new implementation of core git's config key checking rules that prevents non-alphanumeric characters (and '-') for the top-level section and key names inside of config files. This also validates the target section name when renaming sections.
Russell Belfer committed
-