1. 03 Jul, 2017 2 commits
    • Make sure to always include "common.h" first · 0c7f49dd
      Next to including several files, our "common.h" header also declares
      various macros which are then used throughout the project. As such, we
      have to make sure to always include this file first in all
      implementation files. Otherwise, we might encounter problems or even
      silent behavioural differences due to macros or defines not being
      defined as they should be. So in fact, our header and implementation
      files should make sure to always include "common.h" first.
      
      This commit does so by establishing a common include pattern. Header
      files inside of "src" will now always include "common.h" as its first
      other file, separated by a newline from all the other includes to make
      it stand out as special. There are two cases for the implementation
      files. If they do have a matching header file, they will always include
      this one first, leading to "common.h" being transitively included as
      first file. If they do not have a matching header file, they instead
      include "common.h" as first file themselves.
      
      This fixes the outlined problems and will become our standard practice
      for header and source files inside of the "src/" from now on.
      Patrick Steinhardt committed
    • Add missing license headers · 2480d0eb
      Some implementation files were missing the license headers. This commit
      adds them.
      Patrick Steinhardt committed
  2. 23 Mar, 2017 1 commit
    • config, attrcache: don't fallback to dirs literally named `~` · 29aef948
      The config and attrcache file reading code would attempt to load a file
      in a home directory by expanding the `~` and looking for the file, using
      `git_sysdir_find_global_file`.  If the file was not found, the error
      handling would look for the literal path, eg `~/filename.txt`.
      
      Use the new `git_config_expand_global_file` instead, which allows us to
      get the path to the file separately, when the path is prefixed with
      `~/`, and fail with a not found error without falling back to looking
      for the literal path.
      Edward Thomson committed
  3. 21 Feb, 2017 3 commits
  4. 17 Feb, 2017 2 commits
  5. 23 Jan, 2017 1 commit
  6. 29 Dec, 2016 1 commit
  7. 28 Oct, 2015 1 commit
  8. 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
  9. 15 Feb, 2015 1 commit
  10. 04 Feb, 2015 1 commit
  11. 03 Feb, 2015 1 commit
    • attrcache: don't re-read attrs during checkout · 9f779aac
      During checkout, assume that the .gitattributes files aren't
      modified during the checkout.  Instead, create an "attribute session"
      during checkout.  Assume that attribute data read in the same
      checkout "session" hasn't been modified since the checkout started.
      (But allow subsequent checkouts to invalidate the cache.)
      
      Further, cache nonexistent git_attr_file data even when .gitattributes
      files are not found to prevent re-scanning for nonexistent files.
      Edward Thomson committed
  12. 13 May, 2014 1 commit
  13. 01 May, 2014 1 commit
  14. 21 Apr, 2014 2 commits
  15. 17 Apr, 2014 4 commits