1. 24 Nov, 2015 1 commit
  2. 30 Oct, 2015 1 commit
  3. 03 Mar, 2015 1 commit
    • config: borrow refcounted references · 9a97f49e
      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.
      Carlos Martín Nieto committed
  4. 04 Oct, 2014 1 commit
  5. 09 Aug, 2014 1 commit
    • config: a multiline var can start immediately · 9dac1f95
      In the check for multiline, we traverse the backslashes from the end
      backwards and int the end assert that we haven't gone past the beginning
      of the line. We make sure of this in the loop condition, but we also
      check in the return value.
      
      However, for certain configurations, a line in a multiline variable
      might be empty to aid formatting. In that case, 'end' == 'start', since
      we ended up looking at the first char which made it a multiline.
      
      There is no need for the (end > start) check in the return, since the
      loop guarantees we won't go further back than the first char in the
      line, and we do accept the first char to be the final backslash.
      
      This fixes #2483.
      Carlos Martín Nieto committed
  6. 14 Nov, 2013 1 commit
  7. 05 Nov, 2013 1 commit
  8. 25 Jan, 2013 2 commits
  9. 23 Oct, 2012 1 commit
    • Add config level support in the config API · a1abe66a
      Added `struct git_config_entry`: a git_config_entry contains the key, the value, and the config file level from which a config element was found.
      Added `git_config_open_level`: build a single-level focused config object from a multi-level one.
      
      We are now storing `git_config_entry`s in the khash of the config_file
      yorah committed
  10. 21 Jul, 2012 2 commits
  11. 17 May, 2012 1 commit
  12. 16 Apr, 2012 1 commit
  13. 05 Mar, 2012 1 commit
  14. 25 Jan, 2012 1 commit
  15. 17 Jan, 2012 1 commit
    • Move path related functions from fileops to path · 1744fafe
      This takes all of the functions that look up simple data about
      paths (such as `git_futils_isdir`) and moves them over to path.h
      (becoming `git_path_isdir`).  This leaves fileops.h just with
      functions that actually manipulate the filesystem or look at
      the file contents in some way.
      
      As part of this, the dir.h header which is really just for win32
      support was moved into win32 (with some minor changes).
      Russell Belfer committed
  16. 26 Nov, 2011 1 commit
    • repository: Change ownership semantics · 9462c471
      The ownership semantics have been changed all over the library to be
      consistent. There are no more "borrowed" or duplicated references.
      
      Main changes:
      
      	- `git_repository_open2` and `3` have been dropped.
      
      	- Added setters and getters to hotswap all the repository owned
      	objects:
      
      		`git_repository_index`
      		`git_repository_set_index`
      		`git_repository_odb`
      		`git_repository_set_odb`
      		`git_repository_config`
      		`git_repository_set_config`
      		`git_repository_workdir`
      		`git_repository_set_workdir`
      
      	Now working directories/index files/ODBs and so on can be
      	hot-swapped after creating a repository and between operations.
      
      	- All these objects now have proper ownership semantics with
      	refcounting: they all require freeing after they are no longer
      	needed (the repository always keeps its internal reference).
      
      	- Repository open and initialization has been updated to keep in
      	mind the configuration files. Bare repositories are now always
      	detected, and a default config file is created on init.
      
      	- All the tests affected by these changes have been dropped from the
      	old test suite and ported to the new one.
      Vicent Marti committed
  17. 22 Nov, 2011 1 commit
  18. 18 Nov, 2011 1 commit