1. 30 Jul, 2018 1 commit
  2. 26 Jul, 2018 2 commits
  3. 20 Jul, 2018 2 commits
  4. 15 Jul, 2018 1 commit
  5. 13 Jul, 2018 1 commit
    • treewide: remove use of C++ style comments · 9994cd3f
      C++ style comment ("//") are not specified by the ISO C90 standard and
      thus do not conform to it. While libgit2 aims to conform to C90, we did
      not enforce it until now, which is why quite a lot of these
      non-conforming comments have snuck into our codebase. Do a tree-wide
      conversion of all C++ style comments to the supported C style comments
      to allow us enforcing strict C90 compliance in a later commit.
      Patrick Steinhardt committed
  6. 06 Jul, 2018 2 commits
  7. 29 Jun, 2018 2 commits
  8. 28 Jun, 2018 1 commit
  9. 26 Jun, 2018 2 commits
  10. 25 Jun, 2018 5 commits
  11. 24 Jun, 2018 3 commits
  12. 10 Jun, 2018 1 commit
  13. 20 Apr, 2018 1 commit
    • local: fix a leaking reference when iterating over a symref · 836ec316
      Valgrind log :
      
      ==17702== 18 bytes in 1 blocks are indirectly lost in loss record 69 of 1,123
      ==17702==    at 0x4C2AB80: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
      ==17702==    by 0x5FDBB49: strdup (strdup.c:42)
      ==17702==    by 0x632B3E: git__strdup (util.h:106)
      ==17702==    by 0x632D2C: git_reference__alloc_symbolic (refs.c:64)
      ==17702==    by 0x62E0AF: loose_lookup (refdb_fs.c:408)
      ==17702==    by 0x62E636: refdb_fs_backend__iterator_next (refdb_fs.c:565)
      ==17702==    by 0x62CD8E: git_refdb_iterator_next (refdb.c:147)
      ==17702==    by 0x6347F2: git_reference_next (refs.c:838)
      ==17702==    by 0x6345CB: git_reference_foreach (refs.c:748)
      ==17702==    by 0x66BE62: local_download_pack (local.c:579)
      ==17702==    by 0x5DB48F: git_fetch_download_pack (fetch.c:148)
      ==17702==    by 0x639028: git_remote_download (remote.c:932)
      ==17702==    by 0x63919A: git_remote_fetch (remote.c:969)
      ==17702==    by 0x4ABEDD: test_fetchhead_nonetwork__fetch_into_repo_with_symrefs (nonetwork.c:362)
      ==17702==    by 0x4125D9: clar_run_test (clar.c:222)
      ==17702==    by 0x41287C: clar_run_suite (clar.c:286)
      ==17702==    by 0x412DDE: clar_test_run (clar.c:433)
      ==17702==    by 0x4105E1: main (main.c:24)
      Etienne Samson committed
  14. 11 Apr, 2018 5 commits
  15. 06 Apr, 2018 1 commit
    • transports: local: fix assert when fetching into repo with symrefs · 6c55fbf3
      When fetching into a repository which has symbolic references via the
      "local" transport we run into an assert. The assert is being triggered
      while we negotiate the packfile between the two repositories. When
      hiding known revisions from the packbuilder revwalk, we unconditionally
      hide all references of the local refdb. In case one of these references
      is a symbolic reference, though, this means we're trying to hide a
      `NULL` OID, which triggers the assert.
      
      Fix the issue by only hiding OID references from the revwalk. Add a test
      to catch this issue in the future.
      Patrick Steinhardt committed
  16. 27 Mar, 2018 2 commits
    • transports: ssh: replace deprecated function `libssh2_session_startup` · 874ce161
      The function `libssh2_session_startup` has been deprecated since libssh2
      version 1.2.8 in favor of `libssh2_session_handshake` introduced in the
      same version. libssh2 1.2.8 was released in April 2011, so it is already
      seven years old. It is available in Debian Wheezy, Ubuntu Trusty and
      CentOS 7.4, so the most important and conservative distros already have
      it available. As such, it seems safe to just use the new function.
      Patrick Steinhardt committed
    • transports: ssh: disconnect session before freeing it · 2785cc8e
      The function `ssh_stream_free` takes over the responsibility of closing
      channels and streams just before freeing their memory, but it does not
      do so for the session. In fact, we never disconnect the session
      ourselves at all, as libssh2 will not do so itself upon freeing the
      structure. Quoting the documentation of `libssh2_session_free`:
      
          > Frees all resources associated with a session instance. Typically
          > called after libssh2_session_disconnect_ex,
      
      The missing disconnect probably stems from a misunderstanding what it
      actually does. As we are already closing the TCP socket ourselves, the
      assumption was that no additional disconnect is required. But calling
      `libssh2_session_disconnect` will notify the server that we are cleanly
      closing the connection, such that the server can free his own resources.
      
      Add a call to `libssh2_session_disconnect` to fix that issue.
      
      [1]: https://www.libssh2.org/libssh2_session_free.html
      Patrick Steinhardt committed
  17. 19 Mar, 2018 2 commits
  18. 27 Feb, 2018 3 commits
    • winhttp: enable TLS 1.2 on Windows 7 and earlier · 5ecb6220
      Versions of Windows prior to Windows 8 do not enable TLS 1.2 by default,
      though support may exist.  Try to enable TLS 1.2 support explicitly on
      connections.
      
      This request may fail if the operating system does not have TLS 1.2
      support - the initial release of Vista lacks TLS 1.2 support (though
      it is available as a software update) and XP completely lacks TLS 1.2
      support.  If this request does fail, the HTTP context is still valid,
      and still maintains the original protocol support.  So we ignore the
      failure from this operation.
      Edward Thomson committed
    • winhttp: include constants for TLS 1.1/1.2 support · 934e6a3b
      For platforms that do not define `WINHTTP_FLAG_SECURE_PROTOCOL_TLS1_1`
      and/or `WINHTTP_FLAG_SECURE_PROTOCOL_TLS1_2`.
      Edward Thomson committed
    • mingw: update TLS option flags · 8c8db980
      Include the constants for `WINHTTP_FLAG_SECURE_PROTOCOL_TLS1_1` and
      `WINHTTP_FLAG_SECURE_PROTOCOL_TLS1_2` so that they can be used by mingw.
      
      This updates both the `deps/winhttp` framework (for classic mingw) and
      adds the defines for mingw64, which does not use that framework.
      Edward Thomson committed
  19. 10 Feb, 2018 1 commit
    • http: standardize user-agent addition · ee6be190
      The winhttp and posix http each need to add the user-agent to their
      requests.  Standardize on a single function to include this so that we
      do not get the version numbers we're sending out of sync.
      
      Assemble the complete user agent in `git_http__user_agent`, returning
      assembled strings.
      
      Co-authored-by: Patrick Steinhardt <ps@pks.im>
      Edward Thomson committed
  20. 01 Feb, 2018 1 commit
  21. 12 Jan, 2018 1 commit