1. 02 Mar, 2012 3 commits
    • config: Add missing file · 97da3eae
      Vicent Martí committed
    • attr: Change the attribute check macros · c63793ee
      The point of having `GIT_ATTR_TRUE` and `GIT_ATTR_FALSE` macros is to be
      able to change the way that true and false values are stored inside of
      the returned gitattributes value pointer.
      
      However, if these macros are implemented as a simple rename for the
      `git_attr__true` pointer, they will always be used with the `==`
      operator, and hence we cannot really change the implementation to any
      other way that doesn't imply using special pointer values and comparing
      them!
      
      We need to do the same thing that core Git does, which is using a
      function macro. With `GIT_ATTR_TRUE(attr)`, we can change
      internally the way that these values are stored to anything we want.
      
      This commit does that, and rewrites a large chunk of the attributes test
      suite to remove duplicated code for expected attributes, and to
      properly test the function macro behavior instead of comparing
      pointers.
      Vicent Martí committed
  2. 01 Mar, 2012 3 commits
  3. 29 Feb, 2012 2 commits
  4. 28 Feb, 2012 1 commit
  5. 27 Feb, 2012 3 commits
    • filter: Apply filters before writing a file to the ODB · 44b1ff4c
      Initial implementation. The relevant code is in `blob.c`: the blob write
      function has been split into smaller functions.
      
      	- Directly write a file to the ODB in streaming mode
      
      	- Directly write a symlink to the ODB in direct mode
      
      	- Apply a filter, and write a file to the ODB in direct mode
      
      When trying to write a file, we first call `git_filter__load_for_file`,
      which populates a filters array with the required filters based on the
      filename.
      
      If no filters are resolved to the filename, we can write to the ODB in
      streaming mode straight from disk. Otherwise, we load the whole file in
      memory and use double-buffering to apply the filter chain. We finish
      by writing the file as a whole to the ODB.
      Vicent Martí committed
    • buffer: Unify `git_fbuffer` and `git_buf` · 13224ea4
      This makes so much sense that I can't believe it hasn't been done
      before. Kill the old `git_fbuffer` and read files straight into
      `git_buf` objects.
      
      Also: In order to fully support 4GB files in 32-bit systems, the
      `git_buf` implementation has been changed from using `ssize_t` for
      storage and storing negative values on allocation failure, to using
      `size_t` and changing the buffer pointer to a magical pointer on
      allocation failure.
      
      Hopefully this won't break anything.
      Vicent Martí committed
  6. 26 Feb, 2012 2 commits
  7. 25 Feb, 2012 2 commits
  8. 24 Feb, 2012 2 commits
    • A remote exists with an URL alone · 9554cd51
      We used to consider it an error if a remote didn't have at least a
      fetch refspec. This was too much checking, as a remote doesn't in fact
      need to have anything other than an URL configured to be considered
      a remote.
      Carlos Martín Nieto committed
    • Ensure that commits don't fail if committing content that already exists · 1db9d2c3
      Making a commit that results in a blob that already exists in the ODB (i.e.
      committing something, then making a revert commit) will result in us trying
      to p_rename -> MoveFileExW a temp file into the existing ODB entry. Despite
      the MOVEFILE_REPLACE_EXISTING flag is passed in, Win32 does not care and
      fails it with STATUS_ACCESS_DENIED.
      
      To fix this, we p_unlink the ODB entry before attempting to rename it. This
      call will typically fail, but we don't care, we'll let the p_rename fail if
      the file actually does exist and we couldn't delete it for some reason (ACLs,
      etc).
      Paul Betts committed
  9. 23 Feb, 2012 9 commits
  10. 22 Feb, 2012 5 commits
  11. 21 Feb, 2012 2 commits
  12. 20 Feb, 2012 4 commits
  13. 18 Feb, 2012 2 commits