1. 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
  2. 30 Apr, 2012 1 commit
  3. 26 Apr, 2012 1 commit
  4. 25 Apr, 2012 1 commit
  5. 17 Apr, 2012 1 commit
  6. 13 Apr, 2012 1 commit
  7. 16 Mar, 2012 1 commit
  8. 13 Mar, 2012 1 commit
    • Migrate ODB files to new error handling · e1de726c
      This migrates odb.c, odb_loose.c, odb_pack.c and pack.c to
      the new style of error handling.  Also got the unix and win32
      versions of map.c.  There are some minor changes to other
      files but no others were completely converted.
      
      This also contains an update to filebuf so that a zeroed out
      filebuf will not think that the fd (== 0) is actually open
      (and inadvertently call close() on fd 0 if cleaned up).
      
      Lastly, this was built and tested on win32 and contains a
      bunch of fixes for the win32 build which was pretty broken.
      Russell Belfer committed
  9. 09 Mar, 2012 1 commit
  10. 02 Mar, 2012 5 commits
    • Clean up GIT_UNUSED macros on all platforms · 854eccbb
      It turns out that commit 31e9cfc4cbcaf1b38cdd3dbe3282a8f57e5366a5
      did not fix the GIT_USUSED behavior on all platforms.  This commit
      walks through and really cleans things up more thoroughly, getting
      rid of the unnecessary stuff.
      
      To remove the use of some GIT_UNUSED, I ended up adding a couple
      of new iterators for hashtables that allow you to iterator just
      over keys or just over values.
      
      In making this change, I found a bug in the clar tests (where we
      were doing *count++ but meant to do (*count)++ to increment the
      value).  I fixed that but then found the test failing because it
      was not really using an empty repo.  So, I took some of the code
      that I wrote for iterator testing and moved it to clar_helpers.c,
      then made use of that to make it easier to open fixtures on a
      per test basis even within a single test file.
      Russell Belfer committed
    • Add test for possible attr bug · 7e3fc623
      This is a test that should replicate an issue that Peff
      is setting with git attributes.  But the test doesn't fail.
      Russell Belfer 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
  11. 01 Feb, 2012 1 commit
  12. 31 Jan, 2012 1 commit
    • Fix attr path is_dir check · adc9bdb3
      When building an attr path object, the code that checks if the
      file is a directory was evaluating the file as a relative path
      to the current working directory, instead of using the repo root.
      This lead to inconsistent behavior.
      Russell Belfer committed
  13. 25 Jan, 2012 1 commit