1. 24 Jun, 2013 2 commits
  2. 23 Jun, 2013 2 commits
  3. 22 Jun, 2013 1 commit
  4. 21 Jun, 2013 7 commits
  5. 20 Jun, 2013 7 commits
  6. 19 Jun, 2013 7 commits
    • Merge pull request #1661 from arrbee/index-add-all · 8b2fa181
      Index operations using globs
      Vicent Martí committed
    • 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
    • Add fn to check pathspec for ignored files · 85b8b18b
      Command line Git sometimes generates an error message if given a
      pathspec that contains an exact match to an ignored file (provided
      --force isn't also given).  This adds an internal function that
      makes it easy to check it that has happened.  Right now, I'm not
      creating a public API for this because that would get a little
      more complicated with a need for callbacks for all invalid paths.
      Russell Belfer committed
    • Add higher level pathspec API · e91f9a8f
      Right now, setting up a pathspec to be parsed and processed
      requires several data structures and a couple of API calls.  This
      adds a new high level data structure that contains all the items
      that you'll need and high-level APIs that do all of the setup and
      all of the teardown.  This will make it easier to use pathspecs
      in various places with less repeated code.
      Russell Belfer committed
    • Merge pull request #1660 from trast/tr/fix-zlib-configuration · 5144850c
      CMakeLists: fix zlib linker setup
      Vicent Martí committed
    • CMakeLists: fix zlib linker setup · c41281ad
      b53671ae (Search for zlib unconditional, 2012-12-18) changed things
      around to always (even on windows, that's what the subject refers to)
      call FIND_PACKAGE(ZLIB).
      
      However, it did not correctly handle the case where ZLIB_LIBRARY is
      cached, either by the user setting it manually or by an earlier
      search.  In that case, the IF(ZLIB_FOUND) would not trigger (that
      variable is not cached) and we'd instead use the built-in version.
      
      000e6896 (CMake: don't try to use bundled zlib when the system's path
      is in the cache, 2013-05-12) tried to fix that, but it actually made
      the problem worse: now with ZLIB_LIBRARY cached, _neither_ of the
      blocks would execute, resulting in a linker error for me when trying
      to build such a doubly-configured setup.
      
      To fix the issue, we just trust CMake to do the right thing.  If
      ZLIB_LIBRARY is set (either from user or cache) then the find_library
      in FindZLIB.cmake will use that instead of searching again.  So we can
      unconditionally (for real this time) call FIND_PACKAGE(ZLIB), and just
      check its result.
      Thomas Rast committed
  7. 18 Jun, 2013 6 commits
  8. 17 Jun, 2013 8 commits
    • Merge pull request #1651 from arrbee/status_indexed_updates · c09810ee
      Status indexed updates
      Russell Belfer committed
    • Fix memory leaks in diff rename tests · de0555a3
      This fixes a couple objects I forgot to free, and also updates
      the valgrind suppressions file on the Mac to cover a few more
      cases that had crept in.
      Russell Belfer committed
    • Add test of rename with no changes · f3b5bc83
      A tree to index rename with no changes was getting erased by
      the iteration routine (if the routine actually loaded the data
      for the unmodified file).  This invokes the code path that was
      previously messing up the diff and iterates twice to make sure
      that the iteration process itself doesn't modify the data.
      Russell Belfer committed
    • More tests and bug fixes for status with rename · a1683f28
      This changes the behavior of the status RENAMED flags so that they
      will be combined with the MODIFIED flags if appropriate.  If a file
      is modified in the index and also renamed, then the status code
      will have both the GIT_STATUS_INDEX_MODIFIED and INDEX_RENAMED bits
      set.  If it is renamed but the OID has not changed, then just the
      GIT_STATUS_INDEX_RENAMED bit will be set.  Similarly, the flags
      GIT_STATUS_WT_MODIFIED and GIT_STATUS_WT_RENAMED can both be set
      independently of one another.
      
      This fixes a serious bug where the check for unmodified files that
      was done at data load time could end up erasing the RENAMED state
      of a file that was renamed with no changes.
      
      Lastly, this contains a bunch of new tests for status with renames,
      including tests where the only rename changes are case changes.
      The expected results of these tests have to vary by whether the
      platform uses a case sensitive filesystem or not, so the expected
      data covers those platform differences separately.
      Russell Belfer committed
    • Always do tree to index diffs case sensitively · eefef642
      Trees are always case sensitive.  The index is always case
      preserving and will be case sensitive when it is turned into a
      tree.  Therefore the tree and the index can and should always
      be compared to one another case sensitively.
      
      This will restore the index to case insensitive order after the
      diff has been generated.
      
      Consider this a short-term fix.  The long term fix is to have the
      index always stored both case sensitively and case insensitively
      (at least on platforms that sometimes require case insensitivity).
      Russell Belfer committed
    • Make index_insert keep existing case · 6ea999bb
      In a case insensitive index, if you attempt to add a file from
      disk with a different case pattern, the old case pattern in the
      index should be preserved.
      
      This fixes that (and a couple of minor warnings).
      Russell Belfer committed