1. 03 Apr, 2014 1 commit
  2. 01 Apr, 2014 2 commits
    • More tests and fix submodule index refresh · 8f4e5275
      There was a little bug where the submodule cache thought that the
      index date was out of date even when it wasn't that was resulting
      in some extra scans of index data even when not needed.
      
      Mostly this commit adds a bunch of new tests including adding and
      removing submodules in the index and in the HEAD and seeing if we
      can automatically pick them up when refreshing.
      Russell Belfer committed
    • Make submodule refresh a bit smarter · db0e7878
      This makes submodule cache refresh actually look at the timestamps
      from the data sources for submodules and reload as needed if they
      have changed since the last refresh.
      Russell Belfer committed
  3. 20 Mar, 2014 1 commit
  4. 10 Mar, 2014 1 commit
  5. 24 Feb, 2014 1 commit
  6. 20 Feb, 2014 1 commit
    • Address PR comments · 72556cc6
      * Make GIT_INLINE an internal definition so it cannot be used in
        public headers
      * Fix language in CONTRIBUTING
      * Make index caps API use signed instead of unsigned values
      Russell Belfer committed
  7. 07 Feb, 2014 1 commit
  8. 04 Feb, 2014 2 commits
    • Fix typo setting sorted flag when reloading index · 43709ca8
      This fixes a typo I made for setting the sorted flag on the index
      after a reload.  That typo didn't actually cause any test failures
      so I'm also adding a test that explicitly checks that the index is
      correctly sorted after a reload when ignoring case and when not.
      Russell Belfer committed
    • Convert pqueue to just be a git_vector · 882c7742
      This updates the git_pqueue to simply be a set of specialized
      init/insert/pop functions on a git_vector.
      
      To preserve the pqueue feature of having a fixed size heap, I
      converted the "sorted" field in git_vectors to a more general
      "flags" field so that pqueue could mix in it's own flag.  This
      had a bunch of ramifications because a number of places were
      directly looking at the vector "sorted" field - I added a couple
      new git_vector helpers (is_sorted, set_sorted) so the specific
      representation of this information could be abstracted.
      Russell Belfer committed
  9. 30 Jan, 2014 1 commit
  10. 29 Jan, 2014 3 commits
  11. 25 Jan, 2014 1 commit
  12. 11 Dec, 2013 3 commits
    • Remove converting user error to GIT_EUSER · 25e0b157
      This changes the behavior of callbacks so that the callback error
      code is not converted into GIT_EUSER and instead we propagate the
      return value through to the caller.  Instead of using the
      giterr_capture and giterr_restore functions, we now rely on all
      functions to pass back the return value from a callback.
      
      To avoid having a return value with no error message, the user
      can call the public giterr_set_str or some such function to set
      an error message.  There is a new helper 'giterr_set_callback'
      that functions can invoke after making a callback which ensures
      that some error message was set in case the callback did not set
      one.
      
      In places where the sign of the callback return value is
      meaningful (e.g. positive to skip, negative to abort), only the
      negative values are returned back to the caller, obviously, since
      the other values allow for continuing the loop.
      
      The hardest parts of this were in the checkout code where positive
      return values were overloaded as meaningful values for checkout.
      I fixed this by adding an output parameter to many of the internal
      checkout functions and removing the overload.  This added some
      code, but it is probably a better implementation.
      
      There is some funkiness in the network code where user provided
      callbacks could be returning a positive or a negative value and
      we want to rely on that to cancel the loop.  There are still a
      couple places where an user error might get turned into GIT_EUSER
      there, I think, though none exercised by the tests.
      Russell Belfer committed
    • Further EUSER and error propagation fixes · dab89f9b
      This continues auditing all the places where GIT_EUSER is being
      returned and making sure to clear any existing error using the
      new giterr_user_cancel helper.  As a result, places that relied
      on intercepting GIT_EUSER but having the old error preserved also
      needed to be cleaned up to correctly stash and then retrieve the
      actual error.
      
      Additionally, as I encountered places where error codes were not
      being propagated correctly, I tried to fix them up.  A number of
      those fixes are included in the this commit as well.
      Russell Belfer committed
  13. 19 Nov, 2013 1 commit
  14. 05 Nov, 2013 1 commit
  15. 01 Nov, 2013 2 commits
    • Convert git_index_read to have a "force" flag · 8e5a8ef8
      This is a little more intuitive than the turned-around option that
      I originally wrote.
      Russell Belfer committed
    • Make diff and status perform soft index reload · 4bf630b6
      This changes `git_index_read` to have two modes - a hard index
      reload that always resets the index to match the on-disk data
      (which was the old behavior) and a soft index reload that uses
      the timestamp / file size information and only replaces the index
      data if the file on disk has been modified.
      
      This then updates the git_status code to do a soft reload unless
      the new GIT_STATUS_OPT_NO_REFRESH flag is passed in.
      
      This also changes the behavior of the git_diff functions that use
      the index so that when an index is not explicitly passed in (i.e.
      when the functions call git_repository_index for you), they will
      also do a soft reload for you.
      
      This intentionally breaks the file signature of git_index_read
      because there has been some confusion about the behavior previously
      and it seems like all existing uses of the API should probably be
      examined to select the desired behavior.
      Russell Belfer committed
  16. 08 Oct, 2013 1 commit
    • More filemode cleanups for FAT on MacOS · 14997dc5
      This cleans up some additional issues.  The main change is that
      on a filesystem that doesn't support mode bits, libgit2 will now
      create new blobs with GIT_FILEMODE_BLOB always instead of being
      at the mercy to the filesystem driver to report executable or not.
      This means that if "core.filemode" lies and claims that filemode
      is not supported, then we will ignore the executable bit from the
      filesystem.  Previously we would have allowed it.
      
      This adds an option to the new git_repository_reset_filesystem to
      recurse through submodules if desired.  There may be other types
      of APIs that would like a "recurse submodules" option, but this
      one is particularly useful.
      
      This also has a number of cleanups, etc., for related things
      including trying to give better error messages when problems come
      up from the filesystem.  For example, the FAT filesystem driver on
      MacOS appears to return errno EINVAL if you attempt to write a
      filename with invalid UTF-8 in it.  We try to capture that with a
      better error message now.
      Russell Belfer committed
  17. 04 Oct, 2013 1 commit
  18. 24 Sep, 2013 1 commit
    • Clean up newly introduced warnings · 1ca3e49f
      The attempt to "clean up warnings" seems to have introduced some
      new warnings on compliant compilers.  This fixes those in a way
      that I suspect will also be okay for the non-compliant compilers.
      
      Also this fixes what appears to be an extra semicolon in the
      repo initialization template dir handling (and as part of that
      fix, handles the case where an error occurs correctly).
      Russell Belfer committed
  19. 19 Sep, 2013 1 commit
  20. 05 Sep, 2013 1 commit
  21. 19 Aug, 2013 1 commit
  22. 08 Aug, 2013 1 commit
  23. 25 Jul, 2013 1 commit
    • Fix rename detection to use actual blob size · a16e4172
      The size data in the index may not reflect the actual size of the
      blob data from the ODB when content filtering comes into play.
      This commit fixes rename detection to use the actual blob size when
      calculating data signatures instead of the value from the index.
      
      Because of a misunderstanding on my part, I first converted the
      git_index_add_bypath API to use the post-filtered blob data size
      in creating the index entry.  I backed that change out, but I
      kept the overall refactoring of that routine and the new internal
      git_blob__create_from_paths API because it eliminates an extra
      stat() call from the code that adds a file to the index.
      
      The existing tests actually cover this code path, at least when
      running on Windows, so at this point I'm not adding new tests to
      cover the changes.
      Russell Belfer committed
  24. 15 Jul, 2013 1 commit
  25. 10 Jul, 2013 2 commits
    • Add public API for pathspec matching · d2ce27dd
      This adds a new public API for compiling pathspecs and matching
      them against the working directory, the index, or a tree from the
      repository.  This also reworks the pathspec internals to allow the
      sharing of code between the existing internal usage of pathspec
      matching and the new external API.
      
      While this is working and the new API is ready for discussion, I
      think there is still an incorrect behavior in which patterns are
      always matched against the full path of an entry without taking
      the subdirectories into account (so "s*" will match "subdir/file"
      even though it wouldn't with core Git).  Further enhancements are
      coming, but this was a good place to take a functional snapshot.
      Russell Belfer committed
  26. 03 Jul, 2013 1 commit
    • Be more thread aware with some index updates · 178aa39c
      The index isn't really thread safe for the most part, but we can
      easily be more careful and avoid double frees and the like, which
      are serious problems (as opposed to a lookup which might return
      the incorrect value but if the index in being updated, that is
      much harder to avoid).
      Russell Belfer committed
  27. 20 Jun, 2013 1 commit
    • Add status flags to force output sort order · 22b6b82f
      Files in status will, be default, be sorted according to the case
      insensitivity of the filesystem that we're running on.  However,
      in some cases, this is not desirable.  Even on case insensitive
      file systems, 'git status' at the command line will generally use
      a case sensitive sort (like 'ls').  Some GUIs prefer to display a
      list of file case insensitively even on case-sensitive platforms.
      
      This adds two new flags: GIT_STATUS_OPT_SORT_CASE_SENSITIVELY
      and GIT_STATUS_OPT_SORT_CASE_INSENSITIVELY that will override the
      default sort order of the status output and give the user control.
      This includes tests for exercising these new options and makes
      the examples/status.c program emulate core Git and always use a
      case sensitive sort.
      Russell Belfer committed
  28. 19 Jun, 2013 2 commits
    • Add tests and fix use of freed memory · 7863523a
      This adds some tests for updating the index and having it remove
      items to make sure that the iteration over the index still works
      even as earlier items are removed.
      
      In testing with valgrind, this found a path that would use the
      path string from the index entry after it had been freed.  The
      bug fix is simply to copy the path of the index entry before
      doing any actual index manipulation.
      Russell Belfer committed
    • Add index pathspec-based operations · f30fff45
      This adds three new public APIs for manipulating the index:
      
      1. `git_index_add_all` is similar to `git add -A` and will add
         files in the working directory that match a pathspec to the
         index while honoring ignores, etc.
      2. `git_index_remove_all` removes files from the index that match
         a pathspec.
      3. `git_index_update_all` updates entries in the index based on
         the current contents of the working directory, either added
         the new information or removing the entry from the index.
      Russell Belfer committed
  29. 17 Jun, 2013 1 commit
  30. 12 Jun, 2013 1 commit
  31. 10 Jun, 2013 1 commit