1. 31 Oct, 2013 1 commit
    • Fix saving remotes with several fetch/push ref specs. · 3793fa9b
      At some moment git_config_delete_entry lost the ability to delete one entry of
      a multivar configuration. The moment you had more than one fetch or push
      ref spec for a remote you will not be able to save that remote anymore. The
      changes in network::remote::remotes::save show that problem.
      
      I needed to create a new git_config_delete_multivar because I was not able to
      remove one or several entries of a multivar config with the current API.
      Several tries modifying how git_config_set_multivar(..., NULL) behaved were
      not successful.
      
      git_config_delete_multivar is very similar to git_config_set_multivar, and
      delegates into config_delete_multivar of config_file. This function search
      for the cvar_t that will be deleted, storing them in a temporal array, and
      rebuilding the linked list. After calling config_write to delete the entries,
      the cvar_t stored in the temporal array are freed.
      
      There is a little fix in config_write, it avoids an infinite loop when using
      a regular expression (case for the multivars). This error was found by the
      test network::remote::remotes::tagopt.
      Daniel Rodríguez Troitiño committed
  2. 13 Aug, 2013 1 commit
  3. 12 Aug, 2013 5 commits
  4. 08 Aug, 2013 10 commits
  5. 09 Jul, 2013 2 commits
  6. 12 Jun, 2013 2 commits
  7. 07 Jun, 2013 1 commit
  8. 31 May, 2013 1 commit
  9. 24 May, 2013 1 commit
  10. 23 May, 2013 2 commits
  11. 15 May, 2013 1 commit
  12. 07 May, 2013 2 commits
    • config: convenience function to open global/xdg · 5d831887
      The rules for which one to open is a bit silly, so let's make it
      easier for our users.
      Carlos Martín Nieto committed
    • 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
  13. 01 May, 2013 1 commit
  14. 30 Apr, 2013 1 commit
  15. 23 Apr, 2013 2 commits
    • Clear repo config cache when cfgs are set · 6be368bf
      This is a conservative change, but it seemed like the only safe
      thing to do -- i.e. clear the cvar cache when a config gets set.
      Russell Belfer committed
    • 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
  16. 21 Apr, 2013 1 commit
  17. 18 Mar, 2013 1 commit
    • Switch search paths to classic delimited strings · 41954a49
      This switches the APIs for setting and getting the global/system
      search paths from using git_strarray to using a simple string with
      GIT_PATH_LIST_SEPARATOR delimited paths, just as the environment
      PATH variable would contain.  This makes it simpler to get and set
      the value.
      
      I also added code to expand "$PATH" when setting a new value to
      embed the old value of the path.  This means that I no longer
      require separate actions to PREPEND to the value.
      Russell Belfer committed
  18. 17 Mar, 2013 1 commit
  19. 15 Mar, 2013 1 commit
    • Implement global/system file search paths · 5540d947
      The goal of this work is to expose the search logic for "global",
      "system", and "xdg" files through the git_libgit2_opts() interface.
      
      Behind the scenes, I changed the logic for finding files to have a
      notion of a git_strarray that represents a search path and to store
      a separate search path for each of the three tiers of config file.
      For each tier, I implemented a function to initialize it to default
      values (generally based on environment variables), and then general
      interfaces to get it, set it, reset it, and prepend new directories
      to it.
      
      Next, I exposed these interfaces through the git_libgit2_opts
      interface, reusing the GIT_CONFIG_LEVEL_SYSTEM, etc., constants
      for the user to control which search path they were modifying.
      There are alternative designs for the opts interface / argument
      ordering, so I'm putting this phase out for discussion.
      
      Additionally, I ended up doing a little bit of clean up regarding
      attr.h and attr_file.h, adding a new attrcache.h so the other two
      files wouldn't have to be included in so many places.
      Russell Belfer committed
  20. 09 Mar, 2013 1 commit
  21. 01 Mar, 2013 1 commit
  22. 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