1. 20 Oct, 2018 5 commits
    • win32: add symbolic link support · 204cce66
      Enable `p_symlink` to actually create symbolic links, not just create a
      fake link (a text file containing the link target).
      
      This now means that `core.symlinks=true` works on Windows platforms
      where symbolic links are enabled (likely due to running in Developer
      Mode).
      Edward Thomson committed
    • checkout tests: test symlinks based on support, not platform · e4ac4000
      When testing whether symlinks are correctly checked out, examine the
      `core.symlinks` configuration option to determine if symlinks are
      supported in a repository, don't simply assume that Windows means that
      symbolic links are not supported.
      
      Further, when testing the expected default behavior of `core.symlinks`,
      test the filesystem's support to determine if symlinks are supported.
      
      Finally, ensure that `core.symlinks=true` fails on a system where
      symlinks are actually not supported.  This aligns with the behavior of
      Git for Windows.
      Edward Thomson committed
    • checkout tests: don't use GetFinalPathNameByHandle · 7b6875f4
      To determine the canonical filename for a given path, we previously
      looked at the directory entries on POSIX systems and used
      GetFinalPathNameByHandle on Windows.  However, GetFinalPathNameByHandle
      requires a HANDLE - the results of CreateFile - and you cannot
      CreateFile on a symbolic link.
      
      To support finding the canonical path of a symbolic link, simply use the
      existing POSIX code to look at the directory entries.
      Edward Thomson committed
    • win32: use GetFinalPathNameByHandle directly · 30771261
      Now that we've updated to WIN32_WINNT version of Vista or better, we
      don't need to dynamically load GetFinalPathNameByHandle and can simply
      invoke it directly.
      Edward Thomson committed
    • cmake: increase WIN32_WINNT to Vista · b8bdffb5
      Increase the WIN32_WINNT level to 0x0600, which enables support for new
      APIs from Windows 6.0 (Vista).  We had previously set this to 0x0501,
      which was Windows XP.  Although we removed XP support many years ago,
      there was no need to update this level previously.  We're doing so now
      explicitly so that we can get support for the `CreateSymbolicLink` API.
      Edward Thomson committed
  2. 19 Oct, 2018 3 commits
  3. 17 Oct, 2018 3 commits
  4. 15 Oct, 2018 5 commits
  5. 13 Oct, 2018 1 commit
  6. 12 Oct, 2018 1 commit
  7. 11 Oct, 2018 4 commits
    • Apply code review feedback · 463c21e2
      Nelson Elhage committed
    • fuzzers: add object parsing fuzzer · a1d5fd06
      Add a simple fuzzer that exercises our object parser code. The fuzzer
      is quite trivial in that it simply passes the input data directly to
      `git_object__from_raw` for each of the four object types.
      Patrick Steinhardt committed
    • object: properly propagate errors on parsing failures · 6562cdda
      When failing to parse a raw object fromits data, we free the
      partially parsed object but then fail to propagate the error to the
      caller. This may lead callers to operate on objects with invalid memory,
      which will sooner or later cause the program to segfault.
      
      Fix the issue by passing up the error code returned by `parse_raw`.
      Patrick Steinhardt committed
    • fuzzers: initialize libgit2 in standalone driver · 6956a954
      The standalone driver for libgit2's fuzzing targets makes use of
      functions from libgit2 itself. While this is totally fine to do, we need
      to make sure to always have libgit2 initialized via `git_libgit2_init`
      before we call out to any of these. While this happens in most cases as
      we call `LLVMFuzzerInitialize`, which is provided by our fuzzers and
      which right now always calls `git_libgit2_init`, one exception to this
      rule is our error path when not enough arguments have been given. In
      this case, we will call `git_vector_free_deep` without libgit2 having
      been initialized. As we did not set up our allocation functions in that
      case, this will lead to a segmentation fault.
      
      Fix the issue by always initializing and shutting down libgit2 in the
      standalone driver. Note that we cannot let this replace the
      initialization in `LLVMFuzzerInitialize`, as it is required when using
      the "real" fuzzers by LLVM without our standalone driver. It's no
      problem to call the initialization and deinitialization functions
      multiple times, though.
      Patrick Steinhardt committed
  8. 09 Oct, 2018 2 commits
  9. 07 Oct, 2018 3 commits
  10. 06 Oct, 2018 1 commit
    • ignore unsupported http authentication schemes · 475db39b
      auth_context_match returns 0 instead of -1 for unknown schemes to
      not fail in situations where some authentication schemes are supported
      and others are not.
      
      apply_credentials is adjusted to handle auth_context_match returning
      0 without producing authentication context.
      Anders Borum committed
  11. 05 Oct, 2018 12 commits