1. 08 Feb, 2018 6 commits
  2. 07 Feb, 2018 1 commit
  3. 05 Feb, 2018 1 commit
  4. 04 Feb, 2018 7 commits
  5. 03 Feb, 2018 5 commits
  6. 02 Feb, 2018 3 commits
  7. 01 Feb, 2018 3 commits
    • consistent header guards · abb04caa
      use consistent names for the #include / #define header guard pattern.
      Edward Thomson committed
    • attr: avoid stat'ting files for bare repositories · e28e17e6
      Depending on whether the path we want to look up an attribute for is a
      file or a directory, the fnmatch function will be called with different
      flags. Because of this, we have to first stat(3) the path to determine
      whether it is a file or directory in `git_attr_path__init`. This is
      wasteful though in bare repositories, where we can already be assured
      that the path will never exist at all due to there being no worktree. In
      this case, we will execute an unnecessary syscall, which might be
      noticeable on networked file systems.
      
      What happens right now is that we always pass the `GIT_DIR_FLAG_UNKOWN`
      flag to `git_attr_path__init`, which causes it to `stat` the file itself
      to determine its type. As it is calling `git_path_isdir` on the path,
      which will always return `false` in case the path does not exist, we end
      up with the path always being treated as a file in case of a bare
      repository. As such, we can just check the bare-repository case in all
      callers and then pass in `GIT_DIR_FLAG_FALSE` ourselves, avoiding the
      need to `stat`. While this may not always be correct, it at least is no
      different from our current behavior.
      Patrick Steinhardt committed
  8. 31 Jan, 2018 5 commits
  9. 29 Jan, 2018 3 commits
  10. 26 Jan, 2018 2 commits
    • odb: reject reading and writing null OIDs · 275f103d
      The null OID (hash with all zeroes) indicates a missing object in
      upstream git and is thus not a valid object ID. Add defensive
      measurements to avoid writing such a hash to the object database in the
      very unlikely case where some data results in the null OID. Furthermore,
      add shortcuts when reading the null OID from the ODB to avoid ever
      returning an object when a faulty repository may contain the null OID.
      Patrick Steinhardt committed
    • tree: reject writing null-OID entries to a tree · c0487bde
      In commit a96d3cc3f (cache-tree: reject entries with null sha1,
      2017-04-21), the git.git project has changed its stance on null OIDs in
      tree objects. Previously, null OIDs were accepted in tree entries to
      help tools repair broken history. This resulted in some problems though
      in that many code paths mistakenly passed null OIDs to be added to a
      tree, which was not properly detected.
      
      Align our own code base according to the upstream change and reject
      writing tree entries early when the OID is all-zero.
      Patrick Steinhardt committed
  11. 25 Jan, 2018 4 commits