1. 24 May, 2014 1 commit
  2. 16 May, 2014 1 commit
  3. 13 May, 2014 1 commit
  4. 12 May, 2014 1 commit
  5. 08 May, 2014 1 commit
    • Pass unconverted data when iconv doesn't like it · 43a04135
      When using Iconv to convert unicode data and iconv doesn't like
      the source data (because it thinks that it's not actual UTF-8),
      instead of stopping the operation, just use the unconverted data.
      This will generally do the right thing on the filesystem, since
      that is the source of the non-UTF-8 path data anyhow.
      
      This adds some tests for creating and looking up branches with
      messy Unicode names.  Also, this takes the helper function that
      was previously internal to `git_repository_init` and makes it
      into `git_path_does_fs_decompose_unicode` which is a useful in
      tests to understand what the expected results should be.
      Russell Belfer committed
  6. 07 May, 2014 1 commit
  7. 06 May, 2014 1 commit
    • Add filter options and ALLOW_UNSAFE · 5269008c
      Diff and status do not want core.safecrlf to actually raise an
      error regardless of the setting, so this extends the filter API
      with an additional options flags parameter and adds a flag so that
      filters can be applied with GIT_FILTER_OPT_ALLOW_UNSAFE, indicating
      that unsafe filter application should be downgraded from a failure
      to a warning.
      Russell Belfer committed
  8. 02 May, 2014 1 commit
  9. 20 Apr, 2014 1 commit
  10. 18 Apr, 2014 1 commit
  11. 09 Apr, 2014 1 commit
  12. 07 Apr, 2014 1 commit
  13. 01 Apr, 2014 1 commit
  14. 06 Mar, 2014 1 commit
  15. 25 Feb, 2014 2 commits
  16. 18 Feb, 2014 2 commits
  17. 07 Feb, 2014 1 commit
  18. 05 Feb, 2014 1 commit
  19. 30 Jan, 2014 1 commit
  20. 27 Jan, 2014 2 commits
  21. 17 Jan, 2014 1 commit
  22. 15 Jan, 2014 1 commit
  23. 11 Dec, 2013 2 commits
    • Remove converting user error to GIT_EUSER · 25e0b157
      This changes the behavior of callbacks so that the callback error
      code is not converted into GIT_EUSER and instead we propagate the
      return value through to the caller.  Instead of using the
      giterr_capture and giterr_restore functions, we now rely on all
      functions to pass back the return value from a callback.
      
      To avoid having a return value with no error message, the user
      can call the public giterr_set_str or some such function to set
      an error message.  There is a new helper 'giterr_set_callback'
      that functions can invoke after making a callback which ensures
      that some error message was set in case the callback did not set
      one.
      
      In places where the sign of the callback return value is
      meaningful (e.g. positive to skip, negative to abort), only the
      negative values are returned back to the caller, obviously, since
      the other values allow for continuing the loop.
      
      The hardest parts of this were in the checkout code where positive
      return values were overloaded as meaningful values for checkout.
      I fixed this by adding an output parameter to many of the internal
      checkout functions and removing the overload.  This added some
      code, but it is probably a better implementation.
      
      There is some funkiness in the network code where user provided
      callbacks could be returning a positive or a negative value and
      we want to rely on that to cancel the loop.  There are still a
      couple places where an user error might get turned into GIT_EUSER
      there, I think, though none exercised by the tests.
      Russell Belfer committed
    • Add config read fns with controlled error behavior · 9f77b3f6
      This adds `git_config__lookup_entry` which will look up a key in
      a config and return either the entry or NULL if the key was not
      present.  Optionally, it can either suppress all errors or can
      return them (although not finding the key is not an error for this
      function).  Unlike other accessors, this does not normalize the
      config key string, so it must only be used when the key is known
      to be in normalized form (i.e. all lower-case before the first dot
      and after the last dot, with no invalid characters).
      
      This also adds three high-level helper functions to look up config
      values with no errors and a fallback value.  The three functions
      are for string, bool, and int values, and will resort to the
      fallback value for any error that arises.  They are:
      
      * `git_config__get_string_force`
      * `git_config__get_bool_force`
      * `git_config__get_int_force`
      
      None of them normalize the config `key` either, so they can only
      be used for internal cases where the key is known to be in normal
      format.
      Russell Belfer committed
  24. 02 Dec, 2013 1 commit
  25. 08 Nov, 2013 1 commit
  26. 07 Nov, 2013 1 commit
  27. 05 Nov, 2013 1 commit
  28. 08 Oct, 2013 2 commits
    • More filemode cleanups for FAT on MacOS · 14997dc5
      This cleans up some additional issues.  The main change is that
      on a filesystem that doesn't support mode bits, libgit2 will now
      create new blobs with GIT_FILEMODE_BLOB always instead of being
      at the mercy to the filesystem driver to report executable or not.
      This means that if "core.filemode" lies and claims that filemode
      is not supported, then we will ignore the executable bit from the
      filesystem.  Previously we would have allowed it.
      
      This adds an option to the new git_repository_reset_filesystem to
      recurse through submodules if desired.  There may be other types
      of APIs that would like a "recurse submodules" option, but this
      one is particularly useful.
      
      This also has a number of cleanups, etc., for related things
      including trying to give better error messages when problems come
      up from the filesystem.  For example, the FAT filesystem driver on
      MacOS appears to return errno EINVAL if you attempt to write a
      filename with invalid UTF-8 in it.  We try to capture that with a
      better error message now.
      Russell Belfer committed
  29. 04 Oct, 2013 1 commit
    • Add git_repository_reset_filesystem and fix tests · 5173ea92
      When a repository is transferred from one file system to another,
      many of the config settings that represent the properties of the
      file system may be wrong.  This adds a new public API that will
      refresh the config settings of the repository to account for the
      change of file system.  This doesn't do a full "reinitialize" and
      operates on a existing git_repository object refreshing the config
      when done.
      
      This commit then makes use of the new API in clar as each test
      repository is set up.
      
      This commit also has a number of other clar test fixes where we
      were making assumptions about the type of filesystem, either based
      on outdated config data or based on the OS instead of the FS.
      Russell Belfer committed
  30. 03 Oct, 2013 3 commits
    • Update repo init with fewer platform assumptions · 840fb4fc
      The repo init code was assuming Windows == no filemode, and
      Mac or Windows == no case sensitivity.  Those assumptions are not
      consistently true depending on the mounted file system.  This is a
      first step to removing those assumptions.  It focuses on the repo
      init code and the tests of that code.  There are still many other
      tests that are broken when those assumptions don't hold true, but
      this clears up one area of the code.
      
      Also, this moves the core.precomposeunicode logic to be closer to
      the current logic in core Git where it will be set to true on any
      filesystem where composed unicode is decomposed when read back.
      Russell Belfer committed
    • Clean up annoying warnings · af302aca
      The indexer code was generating warnings on Windows 64-bit.  I
      looked closely at the logic and was able to simplify it a bit.
      
      Also this fixes some other Windows and Linux warnings.
      Russell Belfer committed
    • Add check if we need to precompose unicode on Mac · 6b7991e2
      This adds initialization of core.precomposeunicode to repo init
      on Mac.  This is necessary because when a Mac accesses a repo on
      a VFAT or SAMBA file system, it will return directory entries in
      decomposed unicode even if the filesystem entry is precomposed.
      
      This also removes caching of a number of repo properties from the
      repo init pipeline because these are properties of the specific
      filesystem on which the repo is created, not of the system as a
      whole.
      Russell Belfer committed
  31. 24 Sep, 2013 1 commit
    • Clean up newly introduced warnings · 1ca3e49f
      The attempt to "clean up warnings" seems to have introduced some
      new warnings on compliant compilers.  This fixes those in a way
      that I suspect will also be okay for the non-compliant compilers.
      
      Also this fixes what appears to be an extra semicolon in the
      repo initialization template dir handling (and as part of that
      fix, handles the case where an error occurs correctly).
      Russell Belfer committed
  32. 20 Sep, 2013 1 commit
  33. 19 Sep, 2013 1 commit