1. 23 Feb, 2022 1 commit
  2. 17 Oct, 2021 1 commit
    • str: introduce `git_str` for internal, `git_buf` is external · f0e693b1
      libgit2 has two distinct requirements that were previously solved by
      `git_buf`.  We require:
      
      1. A general purpose string class that provides a number of utility APIs
         for manipulating data (eg, concatenating, truncating, etc).
      2. A structure that we can use to return strings to callers that they
         can take ownership of.
      
      By using a single class (`git_buf`) for both of these purposes, we have
      confused the API to the point that refactorings are difficult and
      reasoning about correctness is also difficult.
      
      Move the utility class `git_buf` to be called `git_str`: this represents
      its general purpose, as an internal string buffer class.  The name also
      is an homage to Junio Hamano ("gitstr").
      
      The public API remains `git_buf`, and has a much smaller footprint.  It
      is generally only used as an "out" param with strict requirements that
      follow the documentation.  (Exceptions exist for some legacy APIs to
      avoid breaking callers unnecessarily.)
      
      Utility functions exist to convert a user-specified `git_buf` to a
      `git_str` so that we can call internal functions, then converting it
      back again.
      Edward Thomson committed
  3. 16 Jun, 2015 1 commit
  4. 14 Nov, 2013 1 commit
  5. 17 Sep, 2013 1 commit
    • Add clar helpers for testing file equality · 13f36ffb
      These are a couple of new clar helpers for testing that a file
      has expected contents that I extracted from the checkout code.
      
      Actually wrote this as part of an abandoned earlier attempt at a
      new filters API, but it will be useful now for some of the tests
      I'm going to write.
      Russell Belfer committed
  6. 21 Jun, 2013 1 commit
    • Fix checkout of modified file when missing from wd · 36fd9e30
      This fixes the checkout case when a file is modified between the
      baseline and the target and yet missing in the working directory.
      The logic for that case appears to have been wrong.
      
      This also adds a useful checkout notify callback to the checkout
      test helpers that will count notifications and also has a debug
      mode to visualize what checkout thinks that it's doing.
      Russell Belfer committed
  7. 25 Mar, 2013 1 commit
    • Fix up checkout file contents checks · 050ab995
      This fixes of the file contents checks in checkout to give
      slightly better error messages by directly calling the underlying
      clar assertions so the file and line number of the top level call
      can be reported correctly, and renames the helpers to not start
      with "test_" since that is kind of reserved by clar.
      
      This also enables some of the CRLF tests on all platforms that
      were previously Windows only (by pushing a check of the native
      line endings into the test body).
      Russell Belfer committed
  8. 05 Jan, 2013 1 commit