1. 03 Dec, 2012 1 commit
  2. 30 Nov, 2012 1 commit
  3. 27 Nov, 2012 2 commits
  4. 09 Nov, 2012 1 commit
    • Extensions to rmdir and mkdir utilities · 331e7de9
      * Rework GIT_DIRREMOVAL values to GIT_RMDIR flags, allowing
        combinations of flags
      * Add GIT_RMDIR_EMPTY_PARENTS flag to remove parent dirs that
        are left empty after removal
      * Add GIT_MKDIR_VERIFY_DIR to give an error if item is a file,
        not a dir (previously an EEXISTS error was ignored, even for
        files) and enable this flag for git_futils_mkpath2file call
      * Improve accuracy of error messages from git_futils_mkdir
      Russell Belfer committed
  5. 30 Oct, 2012 1 commit
  6. 20 Oct, 2012 1 commit
    • index: remove read_tree() progress indicator · 0ae81fc4
      git_index_read_tree() was exposing a parameter to provide the user with
      a progress indicator. Unfortunately, due to the recursive nature of the
      tree walk, the maximum number of items to process was unknown. Thus,
      the indicator was only counting processed entries, without providing
      any information how the number of remaining items.
      nulltoken committed
  7. 19 Oct, 2012 1 commit
  8. 18 Oct, 2012 1 commit
  9. 09 Oct, 2012 1 commit
    • Add complex checkout test and then fix checkout · 0d64bef9
      This started as a complex new test for checkout going through the
      "typechanges" test repository, but that revealed numerous issues
      with checkout, including:
      
      * complete failure with submodules
      * failure to create blobs with exec bits
      * problems when replacing a tree with a blob because the tree
        "example/" sorts after the blob "example" so the delete was
        being processed after the single file blob was created
      
      This fixes most of those problems and includes a number of other
      minor changes that made it easier to do that, including improving
      the TYPECHANGE support in diff/status, etc.
      Russell Belfer committed
  10. 17 Sep, 2012 1 commit
  11. 06 Sep, 2012 3 commits
    • Implement filters for status/diff blobs · 60b9d3fc
      This adds support to diff and status for running filters (a la crlf)
      on blobs in the workdir before computing SHAs and before generating
      text diffs.  This ended up being a bit more code change than I had
      thought since I had to reorganize some of the diff logic to minimize
      peak memory use when filtering blobs in a diff.
      
      This also adds a cap on the maximum size of data that will be loaded
      to diff.  I set it at 512Mb which should match core git.  Right now
      it is a #define in src/diff.h but it could be moved into the public
      API if desired.
      Russell Belfer committed
    • Alternate test for autocrlf with status · f8e2cc9a
      I couldn't get the last failing test to actually fail.  This
      is a different test suggested by @nulltoken which should fail.
      Russell Belfer committed
    • Test case to reproduce issue #690. · 52462e1c
      Staged file status does not handle CRLF correctly. Ensures that the test repo has core.autocrlf=true for the test to fail.
      pontusm committed
  12. 23 Aug, 2012 1 commit
  13. 04 Aug, 2012 1 commit
    • Update iterators for consistency across library · 5dca2010
      This updates all the `foreach()` type functions across the library
      that take callbacks from the user to have a consistent behavior.
      The rules are:
      
      * A callback terminates the loop by returning any non-zero value
      * Once the callback returns non-zero, it will not be called again
        (i.e. the loop stops all iteration regardless of state)
      * If the callback returns non-zero, the parent fn returns GIT_EUSER
      * Although the parent returns GIT_EUSER, no error will be set in
        the library and `giterr_last()` will return NULL if called.
      
      This commit makes those changes across the library and adds tests
      for most of the iteration APIs to make sure that they follow the
      above rules.
      Russell Belfer committed
  14. 30 Jul, 2012 1 commit
  15. 25 Jul, 2012 1 commit
  16. 24 Jul, 2012 3 commits
  17. 11 Jul, 2012 1 commit
    • Add flag to write gitlink on setting repo workdir · 991a56c7
      This added a flag to the `git_repository_set_workdir()` function
      that enables generation of a `.git` gitlink file that links the
      new workdir to the parent repository.  Essentially, the flag tells
      the function to write out the changes to disk to permanently set
      the workdir of the repository to the new path.
      
      If you pass this flag as true, then setting the workdir to something
      other than the default workdir (i.e. the parent of the .git repo
      directory), will create a plain file named ".git" with the standard
      gitlink contents "gitdir: <repo-path>", and also update the
      "core.worktree" and "core.bare" config values.
      
      Setting the workdir to the default repo workdir will clear the
      core.worktree flag (but still permanently set core.bare to false).
      
      BTW, the libgit2 API does not currently provide a function for
      clearing the workdir and converting a non-bare repo into a bare one.
      Russell Belfer committed
  18. 08 Jun, 2012 1 commit
    • 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
  19. 25 May, 2012 1 commit
    • Fix bugs for status with spaces and reloaded attrs · 2a99df69
      This fixes two bugs:
      
      * Issue #728 where git_status_file was not working for files
        that contain spaces.  This was caused by reusing the "fnmatch"
        parsing code from ignore and attribute files to interpret the
        "pathspec" that constrained the files to apply the status to.
        In that code, unescaped whitespace was considered terminal to
        the pattern, so a file with internal whitespace was excluded
        from the matched files.  The fix was to add a mode to that code
        that allows spaces and tabs inside patterns.  This mode only
        comes into play when parsing in-memory strings.
      
      * The other issue was undetected, but it was in the recently
        added code to reload gitattributes / gitignores when they were
        changed on disk.  That code was not clearing out the old values
        from the cached file content before reparsing which meant that
        newly added patterns would be read in, but deleted patterns
        would not be removed.  The fix was to clear the vector of
        patterns in a cached file before reparsing the file.
      Russell Belfer committed
  20. 17 May, 2012 4 commits
    • errors: Rename error codes · 904b67e6
      Vicent Martí committed
    • Fix workdir iterators on empty directories · 6e5c4af0
      Creating a workdir iterator on a directory with absolutely
      no files was returning an error (GIT_ENOTFOUND) instead of
      an iterator for nothing.  This fixes that and includes two
      new tests that cover that case.
      Russell Belfer committed
    • Fix status for files under ignored dirs · bd4ca902
      There was a bug where tracked files inside directories that were
      inside ignored directories where not being found by status.  To
      make that a little clearer, if you have a .gitignore with:
      
          ignore/
      
      And then have the following files:
      
          ignore/dir/tracked     <-- actually a tracked file
          ignore/dir/untracked   <-- should be ignored
      
      Then we would show the tracked file as being removed (because
      when we got the to contained item "dir/" inside the ignored
      directory, we decided it was safe to skip -- bzzt, wrong!).
      
      This update is much more careful about checking that we are
      not skipping over any prefix of a tracked item, regardless of
      whether it is ignored or not.
      
      As documented in diff.c, this commit does create behavior that
      still differs from core git with regards to the handling of
      untracked files contained inside ignored directories.  With
      libgit2, those files will just not show up in status or diff.
      With core git, those files don't show up in status or diff
      either *unless* they are explicitly ignored by a .gitignore
      pattern in which case they show up as ignored files.
      
      Needless to say, this is a local behavior difference only, so
      it should not be important and (to me) the libgit2 behavior
      seems more consistent.
      Russell Belfer committed
  21. 10 May, 2012 1 commit
    • Add cache busting to attribute cache · dc13f1f7
      This makes the git attributes and git ignores cache check
      stat information before using the file contents from the
      cache.  For cached files from the index, it checks the SHA
      of the file instead.  This should reduce the need to ever
      call `git_attr_cache_flush()` in most situations.
      
      This commit also fixes the `git_status_should_ignore` API
      to use the libgit2 standard parameter ordering.
      Russell Belfer committed
  22. 08 May, 2012 3 commits
  23. 10 Apr, 2012 1 commit
  24. 04 Apr, 2012 1 commit
  25. 23 Mar, 2012 2 commits
    • Restore default status recursion behavior · c8838ee9
      This gives `git_status_foreach()` back its old behavior of
      emulating the "--untracked=all" behavior of git.  You can
      get any of the various --untracked options by passing flags
      to `git_status_foreach_ext()` but the basic version will
      keep the behavior it has always had.
      Russell Belfer committed
    • Fix crash in new status and add recurse option · 4b136a94
      This fixes the bug that @nulltoken found (thank you!) where
      if there were untracked directories alphabetically after the
      last tracked item, the diff implementation would deref a NULL
      pointer.
      
      The fix involved the code which decides if it is necessary
      to recurse into a directory in the working dir, so it was
      easy to add a new option `GIT_STATUS_OPT_RECURSE_UNTRACKED_DIRS`
      to control if the contents of untracked directories should be
      included in status.
      Russell Belfer committed
  26. 22 Mar, 2012 3 commits
    • Migrate remaining status tests to Clar · 98c4613e
      This finishes up the migration of remaining tests from
      tests/t18-status.c over the tests-clar/status/worktree.c.
      Russell Belfer committed
    • More status testing · a56aacf4
      This "fixes" the broken t18 status tests to accurately reflect
      the new behavior for "created" untracked subdirectories.  See
      discussion in the PR for more details.
      
      This also contains the submodules unit test that I forgot to
      git add, and ports most of the t18-status.c tests to clar (still
      missing a couple of the git_status_file() single file tests).
      Russell Belfer committed
    • Adding new tests for new status command · 95340398
      This is a work in progress.  This adds two new sets of tests,
      the issue_592 tests from @nulltoken's pull request #601 and
      some new tests for submodules.  The submodule tests still have
      issues where the status is not reported correctly.  That needs
      to be fixed before merge.
      Russell Belfer committed
  27. 16 Mar, 2012 1 commit