1. 22 Feb, 2013 1 commit
  2. 01 Feb, 2013 1 commit
  3. 09 Jan, 2013 1 commit
    • Resolve crash with diff against empty file · de590550
      It is not legal inside our `p_mmap` function to mmap a zero length
      file.  This adds a test that exercises that case inside diff and
      fixes the code path where we would try to do that.
      
      The fix turns out not to be a lot of code since our default file
      content is already initialized to "" which works in this case.
      
      Fixes #1210
      Russell Belfer committed
  4. 08 Jan, 2013 1 commit
  5. 04 Jan, 2013 1 commit
    • More checkout improvements · 7e5c8a5b
      This flips checkout back to be driven off the changes between
      the baseline and the target trees.  This reinstates the complex
      code for tracking the contents of the working directory, but
      overall, I think the resulting logic is easier to follow.
      Russell Belfer committed
  6. 15 Nov, 2012 1 commit
    • Add POSIX compat lstat() variant for win32 · cccacac5
      The existing p_lstat implementation on win32 is not quite POSIX
      compliant when setting errno to ENOTDIR.  This adds an option to
      make is be compliant so that code (such as checkout) that cares
      to have separate behavior for ENOTDIR can use it portably.
      
      This also contains a couple of other minor cleanups in the
      posix_w32.c implementations to avoid unnecessary work.
      Russell Belfer committed
  7. 09 Nov, 2012 2 commits
    • Rework checkout with new strategy options · ad9a921b
      This is a major reworking of checkout strategy options.  The
      checkout code is now sensitive to the contents of the HEAD tree
      and the new options allow you to update the working tree so that
      it will match the index content only when it previously matched
      the contents of the HEAD.  This allows you to, for example, to
      distinguish between removing files that are in the HEAD but not
      in the index, vs just removing all untracked files.
      
      Because of various corner cases that arise, etc., this required
      some additional capabilities in rmdir and other utility functions.
      
      This includes the beginnings of an implementation of code to read
      a partial tree into the index based on a pathspec, but that is
      not enabled because of the possibility of creating conflicting
      index entries.
      Russell Belfer committed
    • 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
  8. 31 Oct, 2012 2 commits
  9. 30 Oct, 2012 1 commit
    • Add git_config_refresh() API to reload config · 744cc03e
      This adds a new API that allows users to reload the config if the
      file has changed on disk.  A new config callback function to
      refresh the config was added.
      
      The modified time and file size are used to test if the file needs
      to be reloaded (and are now stored in the disk backend object).
      
      In writing tests, just using mtime was a problem / race, so I
      wanted to check file size as well.  To support that, I extended
      `git_futils_readbuffer_updated` to optionally check file size in
      addition to mtime, and I added a new function `git_filebuf_stats`
      to fetch the mtime and size for an open filebuf (so that the
      config could be easily refreshed after a write).
      
      Lastly, I moved some similar file checking code for attributes
      into filebuf.  It is still only being used for attrs, but it
      seems potentially reusable, so I thought I'd move it over.
      Russell Belfer committed
  10. 19 Oct, 2012 1 commit
    • Fix env variable tests with new Win32 path rules · 0d422ec9
      The new Win32 global path search was not working with the
      environment variable tests.  But when I fixed the test, the new
      codes use of getenv() was causing more failures (presumably because
      of caching on Windows ???).  This fixes the global file lookup to
      always go directly to the Win32 API in a predictable way.
      Russell Belfer committed
  11. 16 Oct, 2012 1 commit
  12. 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
  13. 02 Oct, 2012 2 commits
  14. 29 Sep, 2012 5 commits
  15. 24 Sep, 2012 4 commits
  16. 11 Sep, 2012 2 commits
    • Properly handle p_reads · c859184b
      Vicent Marti committed
    • Fix diff binary file detection · 1f35e89d
      In the process of adding tests for the max file size threshold
      (which treats files over a certain size as binary) there seem to
      be a number of problems in the new code with detecting binaries.
      This should fix those up, as well as add a test for the file
      size threshold stuff.
      
      Also, this un-deprecates `GIT_DIFF_LINE_ADD_EOFNL`, since I
      finally found a legitimate situation where it would be returned.
      Russell Belfer committed
  17. 06 Sep, 2012 1 commit
    • 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
  18. 29 Aug, 2012 2 commits
  19. 24 Aug, 2012 3 commits
  20. 22 Aug, 2012 4 commits
    • Some cleanup suggested during review · 85bd1746
      This cleans up a number of items suggested during code review
      with @vmg, including:
      
      * renaming "outside repo" config API to `git_config_open_default`
      * killing the `git_config_open_global` API
      * removing the `git_` prefix from the static functions in fileops
      * removing some unnecessary functionality from the "cp" command
      Russell Belfer committed
    • Add template dir and set gid to repo init · ca1b6e54
      This extends git_repository_init_ext further with support for
      initializing the repository from an external template directory
      and with support for the "create shared" type flags that make a
      set GID repository directory.
      
      This also adds tests for much of the new functionality to the
      existing `repo/init.c` test suite.
      
      Also, this adds a bunch of new utility functions including a
      very general purpose `git_futils_mkdir` (with the ability to
      make paths and to chmod the paths post-creation) and a file
      tree copying function `git_futils_cp_r`.  Also, this includes
      some new path functions that were useful to keep the code
      simple.
      Russell Belfer committed
    • Add git_repository_init_ext for power initters · 662880ca
      The extended version of repository init adds support for many
      of the things that you can do with `git init` and sets up
      structures that will make it easier to extend further in the
      future.
      Russell Belfer committed
  21. 23 Jul, 2012 1 commit
  22. 18 Jul, 2012 1 commit
  23. 07 Jul, 2012 1 commit