- 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
-
- 08 Aug, 2013 11 commits
-
-
`git_config_set_string(config, "config.section", "")` fails when escaping the value. The buffer in `escape_value` is allocated without NULL-termination. And in case of empty string 0 is passed for buffer size in `git_buf_grow`. `git_buf_detach` returns NULL when the allocated size is 0 and that leads to an error return in `GITERR_CHECK_ALLOC` called after `escape_value` The change in `config_file.c` was suggested by Russell Belfer <rb@github.com>
Nikolai Vladimirov 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 -
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 -
This step is needed to easily add iterators to git_config_backend As well use these new git_strmap functions to implement foreach * git_strmap_iter * git_strmap_has_data(...) * git_strmap_begin(...) * git_strmap_end(...) * git_strmap_next(...)
Nico von Geyso committed
-
- 07 Aug, 2013 1 commit
-
-
Parse config headers that have the last quote on the line quoted instead of walking off the end.
Edward Thomson committed
-
- 01 Jul, 2013 1 commit
-
-
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
-
- 11 May, 2013 1 commit
-
-
Linquize 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
-
- 20 Apr, 2013 1 commit
-
-
Adding a multivar when there are no variables with that name set should set the variable instead of failing.
Carlos Martín Nieto 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
-
- 25 Jan, 2013 1 commit
-
-
Check whether the backslash at the end of the line is being escaped or not so as not to consider it a continuation marker when it's e.g. a Windows-style path.
Carlos Martín Nieto committed
-
- 08 Jan, 2013 1 commit
-
-
Edward Thomson committed
-
- 30 Nov, 2012 1 commit
-
-
Ben Straub committed
-
- 28 Nov, 2012 1 commit
-
-
There are many scattered functions that look into the contents of buffers to do various text manipulations (such as escaping or unescaping data, calculating text stats, guessing if content is binary, etc). This groups all those functions together into a new file and converts the code to use that. This has two enhancements to existing functionality. The old text stats function is significantly rewritten and the BOM detection code was extended (although largely we can't deal with anything other than a UTF8 BOM).
Russell Belfer committed
-
- 27 Nov, 2012 1 commit
-
-
Ben Straub committed
-
- 26 Nov, 2012 1 commit
-
-
delanne committed
-
- 23 Nov, 2012 1 commit
-
-
Remove words such as fuck, crap, shit etc. Remove other potentially offensive words from comments. Tidy up other geopolicital terms in comments.
Martin Woodward committed
-
- 13 Nov, 2012 1 commit
-
-
'[section] variable' and '[section] variable =' behave differently when parsed as booleans, so we need to store that distinction internally.
Carlos Martín Nieto committed
-
- 08 Nov, 2012 1 commit
-
-
- Update 'tests-clar/resources/config/config11' in order to reproduce the invalidread with the unittest (just added some \n at the end of the file) - Fix config_file.c
delanne committed
-
- 30 Oct, 2012 1 commit
-
-
This adds a new API that allows users to reload the config if the file has changed on disk. A new config callback function to refresh the config was added. The modified time and file size are used to test if the file needs to be reloaded (and are now stored in the disk backend object). In writing tests, just using mtime was a problem / race, so I wanted to check file size as well. To support that, I extended `git_futils_readbuffer_updated` to optionally check file size in addition to mtime, and I added a new function `git_filebuf_stats` to fetch the mtime and size for an open filebuf (so that the config could be easily refreshed after a write). Lastly, I moved some similar file checking code for attributes into filebuf. It is still only being used for attrs, but it seems potentially reusable, so I thought I'd move it over.
Russell Belfer committed
-