1. 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
  2. 17 Dec, 2014 1 commit
  3. 30 May, 2014 1 commit
  4. 13 May, 2014 1 commit
  5. 08 Apr, 2014 1 commit
  6. 11 Dec, 2013 1 commit
    • Add config read fns with controlled error behavior · 9f77b3f6
      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
  7. 03 Oct, 2013 1 commit
  8. 23 Apr, 2013 1 commit
    • Add configs to repo config cache · ab01cbd4
      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
  9. 08 Jan, 2013 1 commit
  10. 03 Dec, 2012 1 commit
  11. 17 May, 2012 3 commits
  12. 25 Apr, 2012 1 commit
  13. 02 Mar, 2012 1 commit