1. 21 Feb, 2019 1 commit
    • apply: prevent OOB read when parsing source buffer · 014d4955
      When parsing the patch image from a string, we split the string
      by newlines to get a line-based view of it. To split, we use
      `memchr` on the buffer and limit the buffer length by the
      original length provided by the caller. This works just fine for
      the first line, but for every subsequent line we need to actually
      subtract the amount of bytes that we have already read.
      
      The above issue can be easily triggered by having a source buffer
      with at least two lines, where the second line does _not_ end in
      a newline. Given a string "foo\nb", we have an original length of
      five bytes. After having extracted the first line, we will point
      to 'b' and again try to `memchr(p, '\n', 5)`, resulting in an
      out-of-bounds read of four bytes.
      
      Fix the issue by correctly subtracting the amount of bytes
      already read.
      Erik Aigner committed
  2. 05 May, 2017 1 commit
    • remote: add function to create detached remotes · 4bc16c37
      Right now it is only possible to create remotes from a repository. While
      this is probably the most common use-case, there are commands which make
      sense even without a repository, e.g. the equivalence of `git
      ls-remote`. Add a new function `git_remote_create_detached`, which
      simply accepts a URL.
      Eric Myhre committed
  3. 11 May, 2015 1 commit
  4. 06 Jun, 2014 1 commit
  5. 07 Apr, 2014 1 commit
  6. 03 Oct, 2013 1 commit
  7. 31 Jan, 2013 1 commit
  8. 07 Jan, 2013 1 commit
  9. 04 Jan, 2013 1 commit
  10. 03 Jan, 2013 1 commit
  11. 16 Nov, 2012 2 commits
  12. 25 Oct, 2012 2 commits
  13. 04 Jun, 2012 1 commit
  14. 03 May, 2012 1 commit
    • Support reading attributes from index · f917481e
      Depending on the operation, we need to consider gitattributes
      in both the work dir and the index.  This adds a parameter to
      all of the gitattributes related functions that allows user
      control of attribute reading behavior (i.e. prefer workdir,
      prefer index, only use index).
      
      This fix also covers allowing us to check attributes (and
      hence do diff and status) on bare repositories.
      
      This was a somewhat larger change that I hoped because it had
      to change the cache key used for gitattributes files.
      Russell Belfer committed
  15. 01 Apr, 2012 1 commit
  16. 19 Sep, 2011 1 commit