1. 05 Aug, 2014 1 commit
  2. 01 Jul, 2014 1 commit
  3. 15 May, 2014 1 commit
    • Better search path sandboxing · 8487e237
      There are a number of tests that modify the global or system
      search paths during the tests.  This adds a helper function to
      make it easier to restore those paths and makes sure that they
      are getting restored in a manner that preserves test isolation.
      Russell Belfer committed
  4. 02 May, 2014 1 commit
    • Improve handling of fake home directory · 0f603132
      There are a few tests that set up a fake home directory and a
      fake GLOBAL search path so that we can test things in global
      ignore or attribute or config files.  This cleans up that code to
      work more robustly even if there is a test failure.  This also
      fixes some valgrind warnings where scanning search paths for
      separators could end up doing a little bit of sketchy data access
      when coming to the end of search list.
      Russell Belfer committed
  5. 22 Apr, 2014 1 commit
  6. 17 Apr, 2014 1 commit
  7. 14 Apr, 2014 1 commit
    • Fix core.excludesfile named .gitignore · a9528b8f
      Ignore rules with slashes in them are matched using FNM_PATHNAME
      and use the path to the .gitignore file from the root of the
      repository along with the path fragment (including slashes) in
      the ignore file itself.  Unfortunately, the relative path to the
      .gitignore file was being applied to the global core.excludesfile
      if that was also named ".gitignore".
      
      This fixes that with more precise matching and includes test for
      ignore rules with leading slashes (which were the primary example
      of this being broken in the real world).
      
      This also backports an improvement to the file context logic from
      the threadsafe-iterators branch where we don't rely on mutating
      the key of the attribute file name to generate the context path.
      Russell Belfer committed
  8. 06 Apr, 2014 1 commit
  9. 09 Feb, 2014 1 commit
  10. 14 Nov, 2013 1 commit
  11. 26 Sep, 2013 1 commit
  12. 24 Sep, 2013 1 commit
  13. 17 Sep, 2013 3 commits
  14. 12 Sep, 2013 1 commit
  15. 04 Sep, 2013 2 commits
  16. 31 Jul, 2013 1 commit
    • Major rename detection changes · d730d3f4
      After doing further profiling, I found that a lot of time was
      being spent attempting to insert hashes into the file hash
      signature when using the rolling hash because the rolling hash
      approach generates a hash per byte of the file instead of one
      per run/line of data.
      
      To optimize this, I decided to convert back to a run-based file
      signature algorithm which would be more like core Git.
      
      After changing this, a number of the existing tests started to
      fail.  In some cases, this appears to have been because the test
      was coded to be too specific to the particular results of the file
      similarity metric and in some cases there appear to have been bugs
      in the core rename detection code where only by the coincidence
      of the file similarity scoring were the expected results being
      generated.
      
      This renames all the variables in the core rename detection code
      to be more consistent and hopefully easier to follow which made it
      a bit easier to reason about the behavior of that code and fix the
      problems that I was seeing.  I think it's in better shape now.
      
      There are a couple of tests now that attempt to stress test the
      rename detection code and they are quite slow.  Most of the time
      is spent setting up the test data on disk and in the index.  When
      we roll out performance improvements for index insertion, it
      should also speed up these tests I hope.
      Russell Belfer committed
  17. 10 Jul, 2013 1 commit
    • Add ignore_submodules to diff options · f9775a37
      This adds correct support for an equivalent to --ignore-submodules
      in diff, where an actual ignore value can be passed to diff to
      override the per submodule settings in the configuration.
      
      This required tweaking the constants for ignore values so that
      zero would not be used and could represent an unset option to the
      diff.  This was an opportunity to move the submodule values into
      include/git2/types.h and to rename the poorly named DEFAULT values
      for ignore and update constants to RESET instead.
      
      Now the GIT_DIFF_IGNORE_SUBMODULES flag is exactly the same as
      setting the ignore_submodules option to GIT_SUBMODULE_IGNORE_ALL
      (which is actually a minor change from the old behavior in that
      submodules will now be treated as UNMODIFIED deltas instead of
      being left out totally - if you set GIT_DIFF_INCLUDE_UNMODIFIED).
      
      This includes tests for the various new settings.
      Russell Belfer committed
  18. 10 May, 2013 1 commit
    • Improve ignore handling in git_status_file · 1f9e41ee
      The git_status_file API was doing a hack to deal with files that
      are inside ignored directories.  The status scan was not reporting
      any file in this case, so git_status_file would attempt a final
      "stat()" call, and return IGNORED if the file actually existed.
      
      On case-insensitive filesystems where core.ignorecase is set
      incorrectly, this magic check can "succeed" and report a file
      as ignored when it should actually return ENOTFOUND.
      
      Now that we have the GIT_STATUS_OPT_RECURSE_IGNORED_DIRS, we can
      use that flag to make sure that git_status_file() will look into
      ignored directories and eliminate the hack completely, so we give
      the correct error.
      Russell Belfer committed
  19. 22 Mar, 2013 2 commits
  20. 04 Jan, 2013 1 commit
  21. 03 Jan, 2013 1 commit
  22. 02 Jan, 2013 1 commit
  23. 17 Nov, 2012 1 commit
  24. 10 Nov, 2012 1 commit
  25. 18 Oct, 2012 1 commit
  26. 23 Aug, 2012 1 commit
  27. 19 Jun, 2012 1 commit
    • Make index add/append support core.filemode flag · da825c92
      This fixes git_index_add and git_index_append to behave more like
      core git, preserving old filemode data in the index when adding
      and/or appending with core.filemode = false.
      
      This also has placeholder support for core.symlinks and
      core.ignorecase, but those flags are not implemented (well,
      symlinks has partial support for preserving mode information in
      the same way that git does, but it isn't tested).
      Russell Belfer committed
  28. 08 Jun, 2012 2 commits
    • Fix filemode comparison in diffs · 0abd7244
      File modes were both not being ignored properly on platforms
      where they should be ignored, nor be diffed consistently on
      platforms where they are supported.
      
      This change adds a number of diff and status filemode change
      tests.  This also makes sure that filemode-only changes are
      included in the diff output when they occur and that filemode
      changes are ignored successfully when core.filemode is false.
      
      There is no code that automatically toggles core.filemode
      based on the capabilities of the current platform, so the user
      still needs to be careful in their .git/config file.
      Russell Belfer committed
  29. 07 May, 2012 1 commit
  30. 03 May, 2012 1 commit
  31. 17 Apr, 2012 1 commit
  32. 11 Apr, 2012 1 commit
    • Refactor git_repository_open with new options · 7784bcbb
      Add a new command `git_repository_open_ext` with extended options
      that control how searching for a repository will be done.  The
      existing `git_repository_open` and `git_repository_discover` are
      reimplemented on top of it.  We may want to change the default
      behavior of `git_repository_open` but this commit does not do that.
      
      Improve support for "gitdir" files where the work dir is separate
      from the repo and support for the "separate-git-dir" config.  Also,
      add support for opening repos created with `git-new-workdir` script
      (although I have only confirmed that they can be opened, not that
      all functions work correctly).
      
      There are also a few minor changes that came up:
      
      - Fix `git_path_prettify` to allow in-place prettifying.
      
      - Fix `git_path_root` to support backslashes on Win32.  This fix
        should help many repo open/discover scenarios - it is the one
        function called when opening before prettifying the path.
      
      - Tweak `git_config_get_string` to set the "out" pointer to NULL
        if the config value is not found.  Allows some other cleanup.
      
      - Fix a couple places that should have been calling
        `git_repository_config__weakptr` and were not.
      
      - Fix `cl_git_sandbox_init` clar helper to support bare repos.
      Russell Belfer committed
  33. 02 Mar, 2012 3 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
    • Update diff to use iterators · 74fa4bfa
      This is a major reorganization of the diff code.  This changes
      the diff functions to use the iterators for traversing the
      content.  This allowed a lot of code to be simplified.  Also,
      this moved the functions relating to outputting a diff into a
      new file (diff_output.c).
      
      This includes a number of other changes - adding utility
      functions, extending iterators, etc. plus more tests for the
      diff code.  This also takes the example diff.c program much
      further in terms of emulating git-diff command line options.
      Russell Belfer committed
    • Add filter tests and fix some bugs · ce49c7a8
      This adds some initial unit tests for file filtering and fixes
      some simple bugs in filter application.
      Russell Belfer committed