1. 28 May, 2014 1 commit
  2. 17 Apr, 2014 2 commits
    • Fix broken logic for attr cache invalidation · 823c0e9c
      The checks to see if files were out of date in the attibute cache
      was wrong because the cache-breaker data wasn't getting stored
      correctly.  Additionally, when the cache-breaker triggered, the
      old file data was being leaked.
      Russell Belfer committed
    • Attribute file cache refactor · 7d490872
      This is a big refactoring of the attribute file cache to be a bit
      simpler which in turn makes it easier to enforce a lock around any
      updates to the cache so that it can be used in a threaded env.
      Tons of changes to the attributes and ignores code.
      Russell Belfer committed
  3. 25 Feb, 2014 1 commit
  4. 05 Nov, 2013 2 commits
  5. 03 Oct, 2013 1 commit
    • Initial iconv hookup for precomposed unicode · 219d3457
      This hooks up git_path_direach and git_path_dirload so that they
      will take a flag indicating if directory entry names should be
      tested and converted from decomposed unicode to precomposed form.
      This code will only come into play on the Apple platform and even
      then, only when certain types of filesystems are used.
      
      This involved adding a flag to these functions which involved
      changing a lot of places in the code.
      
      This was an opportunity to do a bit of code cleanup here and there,
      for example, getting rid of the git_futils_cleanupdir_r function in
      favor of a simple flag to git_futils_rmdir_r to not remove the top
      level entry.  That ended up adding depth tracking during rmdir_r
      which led to a safety check for infinite directory recursion.  Yay.
      
      This hasn't actually been tested on the Mac filesystems where the
      issue occurs.  I still need to get test environment for that.
      Russell Belfer committed
  6. 17 Sep, 2013 3 commits
  7. 05 Sep, 2013 3 commits
  8. 23 Jul, 2013 1 commit
  9. 11 Jul, 2013 1 commit
  10. 20 May, 2013 2 commits
    • Add more diff rename detection tests · 4742148d
      This adds a bunch more rename detection tests including checks
      vs the working directory, the new exact match options, some more
      whitespace variants, etc.
      
      This also adds a git_futils_writebuffer helper function and uses
      it in checkout.  This is mainly added because I wanted an easy
      way to write out a git_buf to disk inside my test code.
      Russell Belfer committed
    • More git_diff_find_similar improvements · 9be5be47
      - Add new GIT_DIFF_FIND_EXACT_MATCH_ONLY flag to do similarity
        matching without using the similarity metric (i.e. only compare
        the SHA).
      - Clean up the similarity measurement code to more rigorously
        distinguish between files that are not similar and files that
        are not comparable (previously, a 0 could either mean that the
        files could not be compared or that they were totally different)
      - When splitting a MODIFIED file into a DELETE/ADD pair, actually
        make a DELETED/UNTRACKED pair if the right side of the diff is
        from the working directory.  This prevents an odd mix of ADDED
        and UNTRACKED files on workdir diffs.
      Russell Belfer committed
  11. 18 Mar, 2013 1 commit
    • Switch search paths to classic delimited strings · 41954a49
      This switches the APIs for setting and getting the global/system
      search paths from using git_strarray to using a simple string with
      GIT_PATH_LIST_SEPARATOR delimited paths, just as the environment
      PATH variable would contain.  This makes it simpler to get and set
      the value.
      
      I also added code to expand "$PATH" when setting a new value to
      embed the old value of the path.  This means that I no longer
      require separate actions to PREPEND to the value.
      Russell Belfer committed
  12. 15 Mar, 2013 1 commit
    • Implement global/system file search paths · 5540d947
      The goal of this work is to expose the search logic for "global",
      "system", and "xdg" files through the git_libgit2_opts() interface.
      
      Behind the scenes, I changed the logic for finding files to have a
      notion of a git_strarray that represents a search path and to store
      a separate search path for each of the three tiers of config file.
      For each tier, I implemented a function to initialize it to default
      values (generally based on environment variables), and then general
      interfaces to get it, set it, reset it, and prepend new directories
      to it.
      
      Next, I exposed these interfaces through the git_libgit2_opts
      interface, reusing the GIT_CONFIG_LEVEL_SYSTEM, etc., constants
      for the user to control which search path they were modifying.
      There are alternative designs for the opts interface / argument
      ordering, so I'm putting this phase out for discussion.
      
      Additionally, I ended up doing a little bit of clean up regarding
      attr.h and attr_file.h, adding a new attrcache.h so the other two
      files wouldn't have to be included in so many places.
      Russell Belfer committed
  13. 01 Mar, 2013 1 commit
  14. 27 Feb, 2013 1 commit
    • Make mode handling during init more like git · 18f08264
      When creating files, instead of actually using GIT_FILEMODE_BLOB
      and the other various constants that happen to correspond to
      mode values, apparently I should be just using 0666 and 0777, and
      relying on the umask to clear bits and make the value sane.
      
      This fixes the rules for copying a template directory and fixes
      the checks to match that new behavior.  (Further changes to the
      checkout logic to follow separately.)
      Russell Belfer committed
  15. 26 Feb, 2013 1 commit
    • Fix initialization of repo directories · 3c42e4ef
      When PR #1359 removed the hooks from the test resources/template
      directory, it made me realize that the tests for
      git_repository_init_ext using templates must be pretty shabby
      because we could not have been testing if the hooks were getting
      created correctly.
      
      So, this started with me recreating a couple of hooks, including
      a sample and symlink, and adding tests that they got created
      correctly in the various circumstances, including with the SHARED
      modes, etc.  Unfortunately this uncovered some issues with how
      directories and symlinks were copied and chmod'ed.  Also, there
      was a FIXME in the code related to the chmod behavior as well.
      
      Going back over the directory creation logic for setting up a
      repository, I found it was a little difficult to read and could
      result in creating and/or chmod'ing directories that the user
      almost certainly didn't intend.
      
      So that let to this work which makes repo initialization much
      more careful (and hopefully easier to follow).  It required a
      couple of extensions / changes to core fileops utilities, but I
      also think those are for the better, at least for git_futils_cp_r
      in terms of being careful about what actions it takes.
      Russell Belfer committed
  16. 08 Jan, 2013 1 commit
  17. 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
  18. 31 Oct, 2012 2 commits
  19. 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
  20. 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
  21. 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
  22. 22 Aug, 2012 3 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
  23. 18 Jul, 2012 1 commit
  24. 23 May, 2012 1 commit
  25. 17 May, 2012 2 commits
  26. 11 Apr, 2012 1 commit
  27. 10 Apr, 2012 1 commit
  28. 16 Mar, 2012 1 commit