1. 06 Feb, 2022 3 commits
  2. 05 Feb, 2022 2 commits
  3. 13 Jan, 2022 2 commits
  4. 06 Jan, 2022 2 commits
    • 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
    • remote: improved error reporting · f99a0d69
      Several places in the remote code identify an error and then swallow it;
      return the error.
      Edward Thomson committed
  5. 24 Dec, 2021 1 commit
  6. 11 Nov, 2021 2 commits
  7. 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
  8. 18 Sep, 2021 2 commits
  9. 16 Sep, 2021 1 commit
  10. 09 Sep, 2021 1 commit
  11. 02 Sep, 2021 2 commits
  12. 29 Aug, 2021 2 commits
  13. 27 Aug, 2021 1 commit
  14. 05 Aug, 2021 1 commit
  15. 11 Jun, 2021 1 commit
  16. 15 Feb, 2021 1 commit
  17. 07 Jan, 2021 1 commit
  18. 27 Nov, 2020 1 commit
  19. 25 Nov, 2020 1 commit
  20. 25 Oct, 2020 5 commits
  21. 03 Aug, 2020 1 commit
  22. 09 Jun, 2020 2 commits
    • tree-wide: do not compile deprecated functions with hard deprecation · c6184f0c
      When compiling libgit2 with -DDEPRECATE_HARD, we add a preprocessor
      definition `GIT_DEPRECATE_HARD` which causes the "git2/deprecated.h"
      header to be empty. As a result, no function declarations are made
      available to callers, but the implementations are still available to
      link against. This has the problem that function declarations also
      aren't visible to the implementations, meaning that the symbol's
      visibility will not be set up correctly. As a result, the resulting
      library may not expose those deprecated symbols at all on some platforms
      and thus cause linking errors.
      
      Fix the issue by conditionally compiling deprecated functions, only.
      While it becomes impossible to link against such a library in case one
      uses deprecated functions, distributors of libgit2 aren't expected to
      pass -DDEPRECATE_HARD anyway. Instead, users of libgit2 should manually
      define GIT_DEPRECATE_HARD to hide deprecated functions. Using "real"
      hard deprecation still makes sense in the context of CI to test we don't
      use deprecated symbols ourselves and in case a dependant uses libgit2 in
      a vendored way and knows it won't ever use any of the deprecated symbols
      anyway.
      Patrick Steinhardt committed
    • tree-wide: mark local functions as static · a6c9e0b3
      We've accumulated quite some functions which are never used outside of
      their respective code unit, but which are lacking the `static` keyword.
      Add it to reduce their linkage scope and allow the compiler to optimize
      better.
      Patrick Steinhardt committed
  23. 01 Jun, 2020 1 commit
  24. 26 Jan, 2020 1 commit
    • credential: change git_cred to git_credential · 3f54ba8b
      We avoid abbreviations where possible; rename git_cred to
      git_credential.
      
      In addition, we have standardized on a trailing `_t` for enum types,
      instead of using "type" in the name.  So `git_credtype_t` has become
      `git_credential_t` and its members have become `GIT_CREDENTIAL` instead
      of `GIT_CREDTYPE`.
      
      Finally, the source and header files have been renamed to `credential`
      instead of `cred`.
      
      Keep previous name and values as deprecated, and include the new header
      files from the previous ones.
      Edward Thomson committed
  25. 24 Jan, 2020 1 commit
  26. 02 Aug, 2019 1 commit
    • remote: remove unused block of code · e23c0b18
      In "remote.c", we have a chunk of code that is #ifdef'fed out via
      `#if 0` with a comment that we could export it as a helper function.
      The code was implemented in 2013 and ifdef'fed in 2014, which shows that
      there's clearly no interest in having such a helper at all.
      
      As this block has recently created some confusion about `p_getenv` due
      to it containing the only reference to that function in our codebase,
      let's remove this block altogether.
      Patrick Steinhardt committed