1. 22 Jan, 2019 2 commits
  2. 20 Jan, 2019 2 commits
    • deprecation: use the enum type in declaration · 1b2af79e
      The C standard does not specify whether an enum is a signed or unsigned
      type.  Obviously, any enum that includes negative values _must_ be
      signed, but if all values are positive then the compiler is free to
      choose signed or unsigned.
      
      Thus, by changing the type signatures to `git_object_t` and declaring
      the old `GIT_OBJ_` values as a signed or unsigned int, we risk a
      mismatch between what the compiler has chosen for a `git_object_t`'s
      type and our type declaration.
      
      Thus, we declare the deprecated values as the enum instead of guessing.
      Edward Thomson committed
    • deprecation: add `used` attribute · 44827b67
      Recent GCC enables `-Wunused-const-variables`, which makes output quite
      noisy.  Disable unused warnings for our deprecated variables.
      Edward Thomson committed
  3. 17 Jan, 2019 6 commits
    • Introduce GIT_CALLBACK macro to enforce cdecl · 22d2062d
      Since we now always build the library with cdecl calling conventions,
      our callbacks should be decorated as such so that users will not be able
      to provide callbacks defined with other calling conventions.
      
      The `GIT_CALLBACK` macro will inject the `__cdecl` attribute as
      appropriate.
      Edward Thomson committed
    • Use cdecl calling conventions on Win32 · a74dd39b
      The recommendation from engineers within Microsoft is that libraries
      should have a calling convention specified in the public API, and that
      calling convention should be cdecl unless there are strong reasons to
      use a different calling convention.
      
      We previously offered end-users the choice between cdecl and stdcall
      calling conventions.  We did this for presumed wider compatibility: most
      Windows applications will use cdecl, but C# and PInvoke default to
      stdcall for WINAPI compatibility.  (On Windows, the standard library
      functions are are stdcall so PInvoke also defaults to stdcall.)
      
      However, C# and PInvoke can easily call cdecl APIs by specifying an
      annotation.
      
      Thus, we will explicitly declare ourselves cdecl and remove the option
      to build as stdcall.
      Edward Thomson committed
    • buffer: wrap EXTERN in DEPRECATED · b78bcbb9
      The GIT_EXTERN macro needs to provide order-specific attributes; update
      users of the GIT_DEPRECATED macro to allow for that.
      Edward Thomson committed
    • object_type: GIT_OBJECT_BAD is now GIT_OBJECT_INVALID · cd350852
      We use the term "invalid" to refer to bad or malformed data, eg
      `GIT_REF_INVALID` and `GIT_EINVALIDSPEC`.  Since we're changing the
      names of the `git_object_t`s in this release, update it to be
      `GIT_OBJECT_INVALID` instead of `BAD`.
      Edward Thomson committed
    • object_type: mark old values as deprecated · 90046899
      Mark old object type values as `static const` so that we can mark them
      as deprecated with the `GIT_DEPRECATED` macro.
      Edward Thomson committed
    • references: use full name in type names · 87fe5788
      Update the reference type names from an abbreviation (`git_ref`) to use
      the fullname (`git_reference`).  This ensures that we are consistent
      with our naming for reference types and functions throughout the
      library.
      
      The previous names are now marked as deprecated.
      Edward Thomson committed
  4. 14 Dec, 2018 1 commit
    • refs: constify git_reference_peel · 5bd78c48
      We have no need to take a non-const reference. This does involve some other work
      to make sure we don't mix const and non-const variables, but by splitting what
      we want each variable to do we can also simplify the logic for when we do want
      to free a new reference we might have allocated.
      Carlos Martín Nieto committed
  5. 01 Dec, 2018 4 commits
    • object_type: update public API to use git_object_t · 19faf7c5
      git_object_t is the future; update the public API to use it.  This will
      also ensure that we can build our tests which make use of the old API
      without modification (and without compiler warnings).
      Edward Thomson committed
    • object_type: remove unused object type flags · 26b21b39
      The two "reserved" bits in `git_object_t` are unused.  They were
      included for completeness, but downstream users should never use them
      and they should not have been made public.
      
      These values are never set.
      
      With the refactoring of `git_otype` into `git_object_t`, we can remove
      these from the new API.  They will remain in the old (deprecated) API
      in the unlikely event that someone was using them.
      Edward Thomson committed
    • object_type: update enumeration names · 7e7859a1
      Update the `git_otype` names to reflect our current naming conventions.
      `git_otype` is now `git_object_t` and the `GIT_OBJ_*` values are now
      `GIT_OBJECT_*` values.
      
      The old macro, enumeration and structure names are retained and simply
      set to the new names.
      Edward Thomson committed
    • index: update enum and structure names · 4e892ae5
      We have various macro, enumeration and structure names that were
      introduced (very) early in the project and do not match our current
      naming conventions.  For instance: `GIT_IDXENTRY...` flags that
      correspond to a structure named `git_index_entry`.
      
      Update these to match the current guidance.  The old macros and
      enumeration names are reflected as new macros in order to support
      backward compatibility (and do so without warnings for consumers).
      Edward Thomson committed
  6. 28 Nov, 2018 4 commits
    • stream registration: take an enum type · 02bb39f4
      Accept an enum (`git_stream_t`) during custom stream registration that
      indicates whether the registration structure should be used for standard
      (non-TLS) streams or TLS streams.
      Edward Thomson committed
    • stream: provide generic registration API · df2cc108
      Update the new stream registration API to be `git_stream_register`
      which takes a registration structure and a TLS boolean.  This allows
      callers to register non-TLS streams as well as TLS streams.
      
      Provide `git_stream_register_tls` that takes just the init callback for
      backward compatibliity.
      Edward Thomson committed
    • tls: introduce a wrap function · 43b592ac
      Introduce `git_tls_stream_wrap` which will take an existing `stream`
      with an already connected socket and begin speaking TLS on top of it.
      This is useful if you've built a connection to a proxy server and you
      wish to begin CONNECT over it to tunnel a TLS connection.
      
      Also update the pluggable TLS stream layer so that it can accept a
      registration structure that provides an `init` and `wrap` function,
      instead of a single initialization function.
      Edward Thomson committed
    • revwalk: Allow changing hide_cb · 0836f069
      Since git_revwalk objects are encouraged to be reused, a public
      interface for changing hide_cb is desirable.
      Eivind Fonn committed
  7. 21 Nov, 2018 1 commit
    • transport: allow cred/cert callbacks to return GIT_PASSTHROUGH · a2e6e0ea
      Allow credential and certificate checking callbacks to return
      GIT_PASSTHROUGH, indicating that they do not want to act.
      Introduce this to support in both the http and ssh callbacks.
      Additionally, enable the same mechanism for certificate validation.
      
      This is most useful to disambiguate any meaning in the publicly exposed
      credential and certificate functions (`git_transport_smart_credentials`
      and `git_transport_smart_certificate_check`) but it may be more
      generally useful for callers to be able to defer back to libgit2.
      Edward Thomson committed
  8. 18 Nov, 2018 1 commit
  9. 15 Nov, 2018 1 commit
  10. 14 Nov, 2018 1 commit
  11. 05 Nov, 2018 3 commits
  12. 04 Nov, 2018 2 commits
  13. 03 Nov, 2018 1 commit
  14. 02 Nov, 2018 3 commits
  15. 21 Oct, 2018 1 commit
  16. 19 Oct, 2018 1 commit
  17. 15 Oct, 2018 1 commit
  18. 01 Oct, 2018 2 commits
  19. 17 Sep, 2018 1 commit
  20. 29 Aug, 2018 2 commits