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. 01 Apr, 2014 1 commit
  3. 08 Aug, 2013 1 commit
  4. 29 Jan, 2013 1 commit
    • Implement config key validation rules · 1e7799e8
      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
  5. 08 Jan, 2013 1 commit
  6. 27 Nov, 2012 1 commit
  7. 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
  8. 24 Aug, 2012 1 commit
  9. 11 Jul, 2012 1 commit
    • Adding git_config_foreach_match() iteration fn · b3ff1dab
      Adding a new config iteration function that let's you iterate
      over just the config entries that match a particular regular
      expression.  The old foreach becomes a simple use of this with
      an empty pattern.
      
      This also fixes an apparent bug in the existing `git_config_foreach`
      where returning a non-zero value from the iteration callback was
      not correctly aborting the iteration and the returned value was
      not being propogated back to the caller of foreach.
      
      Added to tests to cover all these changes.
      Russell Belfer committed
  10. 28 Mar, 2012 1 commit
    • Added submodule API and use in status · bfc9ca59
      When processing status for a newly checked out repo, it is
      possible that there will be submodules that have not yet been
      initialized.  The only way to distinguish these from untracked
      directories is to have some knowledge of submodules.  This
      commit adds a new submodule API which, given a name or path,
      can determine if it appears to be a submodule and can give
      information about the submodule.
      Russell Belfer committed