1. 10 Apr, 2023 1 commit
  2. 14 Jul, 2022 1 commit
  3. 20 Jun, 2022 1 commit
  4. 23 Feb, 2022 1 commit
  5. 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
  6. 28 Apr, 2021 1 commit
  7. 27 Nov, 2020 1 commit
  8. 22 Nov, 2019 1 commit
  9. 20 Jul, 2019 1 commit
  10. 25 Jan, 2019 1 commit
  11. 22 Jan, 2019 1 commit
  12. 01 Dec, 2018 1 commit
  13. 05 Nov, 2018 6 commits
    • apply: handle exact renames · 6fecf4d1
      Deltas containing exact renames are special; they simple indicate that a
      file was renamed without providing additional metadata (like the
      filemode).  Teach the reader to provide the file mode and use the
      preimage's filemode in the case that the delta does not provide one.)
      Edward Thomson committed
    • apply: validate unchanged mode when applying both · 12f9ac17
      When applying to both the index and the working directory, ensure that
      the working directory's mode matches the index's mode.  It's not
      sufficient to look only at the hashed object id to determine that the
      file is unchanged, git also takes the mode into account.
      Edward Thomson committed
    • reader: free is unused and unnecessary · 52e27b84
      None of the reader implementations actually allocate anything
      themselves, so they don't need a free function.  Remove it.
      Edward Thomson committed
    • reader: apply working directory filters · 9be89bbd
      When reading a file from the working directory, ensure that we apply any
      necessary filters to the item.  This ensures that we get the
      repository-normalized data as the preimage, and further ensures that we
      can accurately compare the working directory contents to the index
      contents for accurate safety validation in the `BOTH` case.
      Edward Thomson committed
    • reader: optionally validate index matches workdir · 0f4b2f02
      When using a workdir reader, optionally validate that the index contents
      match the working directory contents.
      Edward Thomson committed
    • apply: use preimage as the checkout baseline · 5b8d5a22
      Use the preimage as the checkout's baseline.  This allows us to support
      applying patches to files that are modified in the working directory
      (those that differ from the HEAD and index).  Without this, files will
      be reported as (checkout) conflicts.  With this, we expect the on-disk
      data when we began the patch application (the "preimage") to be on-disk
      during checkout.
      
      We could have also simply used the `FORCE` flag to checkout to
      accomplish a similar mechanism.  However, `FORCE` ignores all
      differences, while providing a preimage ensures that we will only
      overwrite the file contents that we actually read.
      
      Modify the reader interface to provide the OID to support this.
      Edward Thomson committed
  14. 04 Nov, 2018 1 commit