1. 23 Feb, 2022 1 commit
  2. 06 Jan, 2022 2 commits
  3. 01 Jan, 2022 2 commits
  4. 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
  5. 01 Dec, 2018 1 commit
  6. 10 Jun, 2018 1 commit
  7. 21 Jan, 2018 1 commit
    • status::renames: write NFD instead of NFC filename · 9af7fbc3
      Update the status::renames test to create an NFD format filename in the
      core.precomposedunicode tests.
      
      Previously, we would create an NFC format filename.  This was to take
      advantage of HFS+ filesystems, which always use canonically decomposed
      formats, and would actually write the filename to disk as an NFD
      filename.  So previously, we could create an NFC filename, but read it
      normally as an NFD filename.
      
      But APFS formats do not force canonically decomposed formats for
      filenames, so creating an NFC filename does not get converted to NFD.
      Instead, the filename will be written in NFC format.  Our test,
      therefore, does not work - when we write an NFC filename, it will
      _remain_ NFC.
      
      Update the test to write NFD always.  This will ensure that the file
      will actually be canonically decomposed on all platforms:  HFS+, which
      forces NFD, and APFS, which does not.
      
      Thus, our test will continue to ensure that an NFD filename is
      canonically precomposed on all filesystems.
      Edward Thomson committed
  8. 04 May, 2015 1 commit
  9. 24 Apr, 2014 3 commits
  10. 30 Jan, 2014 1 commit
  11. 22 Jan, 2014 1 commit
  12. 14 Nov, 2013 1 commit
  13. 08 Oct, 2013 1 commit
    • Case sensitivity issues on Linux · d5e83627
      A couple of tests were actually dealing incorrectly with case
      sensitivity issues on Linux because they were relying on having
      core.ignorecase set to true.  Now that the fixture initialization
      sets the case sensitivity to be accurate for the platform, it
      exposed bugs in these tests.
      Russell Belfer committed
  14. 17 Sep, 2013 1 commit
  15. 28 Aug, 2013 1 commit
  16. 05 Aug, 2013 1 commit
  17. 17 Jun, 2013 2 commits
    • More tests and bug fixes for status with rename · a1683f28
      This changes the behavior of the status RENAMED flags so that they
      will be combined with the MODIFIED flags if appropriate.  If a file
      is modified in the index and also renamed, then the status code
      will have both the GIT_STATUS_INDEX_MODIFIED and INDEX_RENAMED bits
      set.  If it is renamed but the OID has not changed, then just the
      GIT_STATUS_INDEX_RENAMED bit will be set.  Similarly, the flags
      GIT_STATUS_WT_MODIFIED and GIT_STATUS_WT_RENAMED can both be set
      independently of one another.
      
      This fixes a serious bug where the check for unmodified files that
      was done at data load time could end up erasing the RENAMED state
      of a file that was renamed with no changes.
      
      Lastly, this contains a bunch of new tests for status with renames,
      including tests where the only rename changes are case changes.
      The expected results of these tests have to vary by whether the
      platform uses a case sensitive filesystem or not, so the expected
      data covers those platform differences separately.
      Russell Belfer committed