1. 12 Aug, 2013 2 commits
  2. 07 Aug, 2013 1 commit
  3. 07 May, 2013 1 commit
    • repo: unconditionally create a global config backend · a4b75dcf
      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
  4. 25 Jan, 2013 1 commit
  5. 03 Jan, 2013 3 commits
  6. 18 Nov, 2012 2 commits
  7. 13 Nov, 2012 3 commits
  8. 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
  9. 12 Aug, 2012 1 commit
  10. 04 Aug, 2012 1 commit
    • Update iterators for consistency across library · 5dca2010
      This updates all the `foreach()` type functions across the library
      that take callbacks from the user to have a consistent behavior.
      The rules are:
      
      * A callback terminates the loop by returning any non-zero value
      * Once the callback returns non-zero, it will not be called again
        (i.e. the loop stops all iteration regardless of state)
      * If the callback returns non-zero, the parent fn returns GIT_EUSER
      * Although the parent returns GIT_EUSER, no error will be set in
        the library and `giterr_last()` will return NULL if called.
      
      This commit makes those changes across the library and adds tests
      for most of the iteration APIs to make sure that they follow the
      above rules.
      Russell Belfer committed
  11. 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
  12. 17 May, 2012 1 commit
  13. 02 May, 2012 1 commit
  14. 25 Apr, 2012 1 commit
  15. 01 Apr, 2012 1 commit
  16. 25 Jan, 2012 1 commit
  17. 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