1. 24 Jan, 2015 1 commit
  2. 23 Jan, 2015 1 commit
  3. 20 Jan, 2015 1 commit
  4. 30 Dec, 2014 1 commit
  5. 16 Dec, 2014 1 commit
    • checkout: disallow bad paths on win32 · a64119e3
      Disallow:
       1. paths with trailing dot
       2. paths with trailing space
       3. paths with trailing colon
       4. paths that are 8.3 short names of .git folders ("GIT~1")
       5. paths that are reserved path names (COM1, LPT1, etc).
       6. paths with reserved DOS characters (colons, asterisks, etc)
      
      These paths would (without \\?\ syntax) be elided to other paths - for
      example, ".git." would be written as ".git".  As a result, writing these
      paths literally (using \\?\ syntax) makes them hard to operate with from
      the shell, Windows Explorer or other tools.  Disallow these.
      Edward Thomson committed
  6. 27 Oct, 2014 1 commit
  7. 03 Oct, 2014 1 commit
  8. 17 Sep, 2014 1 commit
  9. 16 Sep, 2014 1 commit
    • Fix attribute lookup in index for bare repos · 1fbeb2f0
      When using a bare repo with an index, libgit2 attempts to read
      files from the index.  It caches those files based on the path
      to the file, specifically the path to the directory that contains
      the file.
      
      If there is no working directory, we use `git_path_dirname_r` to
      get the path to the containing directory.  However, for the
      `.gitattributes` file in the root of the repository, this ends up
      normalizing the containing path to `"."` instead of the empty
      string and the lookup the `.gitattributes` data fails.
      
      This adds a test of attribute lookups on bare repos and also
      fixes the problem by simply rewriting `"."` to be `""`.
      Russell Belfer committed
  10. 03 Sep, 2014 1 commit
  11. 22 Jul, 2014 1 commit
  12. 24 May, 2014 1 commit
  13. 16 May, 2014 1 commit
  14. 13 May, 2014 1 commit
  15. 12 May, 2014 1 commit
  16. 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
  17. 07 May, 2014 1 commit
  18. 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
  19. 02 May, 2014 1 commit
  20. 20 Apr, 2014 1 commit
  21. 18 Apr, 2014 1 commit
  22. 09 Apr, 2014 1 commit
  23. 07 Apr, 2014 1 commit
  24. 01 Apr, 2014 1 commit
  25. 06 Mar, 2014 1 commit
  26. 25 Feb, 2014 2 commits
  27. 18 Feb, 2014 2 commits
  28. 07 Feb, 2014 1 commit
  29. 05 Feb, 2014 1 commit
  30. 30 Jan, 2014 1 commit
  31. 27 Jan, 2014 2 commits
  32. 17 Jan, 2014 1 commit
  33. 15 Jan, 2014 1 commit
  34. 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
  35. 02 Dec, 2013 1 commit
  36. 08 Nov, 2013 1 commit