1. 14 Feb, 2022 3 commits
  2. 13 Feb, 2022 1 commit
  3. 12 Feb, 2022 2 commits
    • merge: make the internal flags public · 0fbf62cd
      We made the flags that enable recursive merge internal, on the
      assumption that nobody would want them and they're hard to reason about.
      (Giving people an option that nobody wants is just extra noise.)
      
      However, it made it hard for _us_ to reason about.  There's no good
      reason to keep it private, let's just make it public and push that
      cognitive load onto our poor users.  But they should expect it, they're
      dealing with git, after all.
      Edward Thomson committed
    • diff: indicate when the file size is "valid" · 359240b6
      When we know the file size (because we're producing it from a working
      directory iterator, or an index with an up-to-date cache) then set a
      flag indicating as such.  This removes the ambiguity about a 0 file
      size, which could indicate that a file exists and is 0 bytes, or that we
      haven't read it yet.
      Edward Thomson committed
  4. 07 Feb, 2022 1 commit
  5. 06 Feb, 2022 2 commits
  6. 30 Jan, 2022 1 commit
  7. 28 Jan, 2022 3 commits
  8. 18 Jan, 2022 1 commit
  9. 13 Jan, 2022 1 commit
  10. 12 Jan, 2022 1 commit
  11. 11 Jan, 2022 1 commit
  12. 09 Jan, 2022 6 commits
  13. 06 Jan, 2022 1 commit
    • remote: introduce `git_remote_connect_options` · 6fc6eeb6
      The existing mechanism for providing options to remote fetch/push calls,
      and subsequently to transports, is unsatisfactory.  It requires an
      options structure to avoid breaking the API and callback signatures.
      
      1. Introduce `git_remote_connect_options` to satisfy those needs.
      
      2. Add a new remote connection API, `git_remote_connect_ext` that will
         take this new options structure.  Existing `git_remote_connect` calls
         will proxy to that.  `git_remote_fetch` and `git_remote_push` will
         proxy their fetch/push options to that as well.
      
      3. Define the interaction between `git_remote_connect` and fetch/push.
         Connect _may_ be called before fetch/push, but _need not_ be.  The
         semantics of which options would be used for these operations was
         not specified if you specify options for both connect _and_ fetch.
         Now these are defined that the fetch or push options will be used
         _if_ they were specified.  Otherwise, the connect options will be
         used if they were specified.  Otherwise, the library's defaults will
         be used.
      
      4. Update the transports to understand `git_remote_connect_options`.
         This is a breaking change to the systems API.
      Edward Thomson committed
  14. 05 Jan, 2022 1 commit
  15. 01 Jan, 2022 1 commit
  16. 23 Dec, 2021 2 commits
  17. 10 Dec, 2021 1 commit
  18. 01 Dec, 2021 2 commits
    • object: introduce a raw content validation function · 9f03ebd1
      Users may want to validate raw object content; provide them a function
      to do so.
      Edward Thomson committed
    • object: return GIT_EINVALID on parse errors · fc1a3f45
      Return `GIT_EINVALID` on parse errors so that direct callers of parse
      functions can determine when there was a failure to parse the object.
      
      The object parser functions will swallow this error code to prevent it
      from propagating down the chain to end-users.  (`git_merge` should not
      return `GIT_EINVALID` when a commit it tries to look up is not valid,
      this would be too vague to be useful.)
      
      The only public function that this affects is
      `git_signature_from_buffer`, which is now documented as returning
      `GIT_EINVALID` when appropriate.
      Edward Thomson committed
  19. 15 Nov, 2021 1 commit
  20. 08 Nov, 2021 3 commits
  21. 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
  22. 13 Oct, 2021 1 commit
  23. 26 Sep, 2021 1 commit
  24. 25 Sep, 2021 1 commit
    • repository: improve `hashfile` for absolute paths · 0f4256b8
      When `git_repository_hashfile` is handed an absolute path, it determines
      whether the path is within the repository's working directory or not.
      This is necessary when there is no `as_path` specified.
      
      If the path is within the working directory, then the given path should
      be used for attribute lookups (it is the effective `as_path`).  If it is
      not within the working directory, then it is _not_ eligible.
      
      Importantly, now we will _never_ pass an absolute path down to attribute
      lookup functions.
      Edward Thomson committed
  25. 22 Sep, 2021 1 commit