1. 07 Feb, 2020 8 commits
    • scripts: add script to create releases · 2ae45bc3
      The current release process is not documented in any way. As a result,
      it's not obvious how releases should be done at all, like e.g. which
      locations need adjusting.
      
      To fix this, let's introduce a new script that shall from now on be used
      to do all releases. As input it gets the tree that shall be released,
      the repository in which to do the release, credentials to
      authenticate against GitHub and the new version. E.g. executing the
      following will create a new release v0.32:
      
          $ ./script/release.py 0.32.0 --user pks-t --password ****
      
      While the password may currently be your usual GitLab password, it's
      recommended to use a personal access token intead.
      
      The script will then perform the following steps:
      
          1. Verify that "include/git2/version.h" matches the new version.
      
          2. Verify that "docs/changelog.md" has a section for that new
             version.
      
          3. Extract the changelog entries for the current release from
             "docs/changelog.md".
      
          4. Generate two archives in "tar.gz" and "zip" format via "git
             archive" from the tree passed by the user. If no tree was passed,
             we will use "HEAD".
      
          5. Create the GitHub release using the extracted changelog entries
             as well as tag and name information derived from the version
             passed by the used.
      
          6. Upload both code archives to that release.
      
      This should cover all steps required for a new release and thus ensures
      that nothing is missing that shouldn't be.
      Patrick Steinhardt committed
    • editorconfig: special-case Python scripts · 1e556eeb
      Python's PEP 8 specifies that one shall use spaces instead of tabs as
      coding style, and we actually honor that currently. Our EditorConfig
      does not special-case Python scripts, though, which is why we end up
      with our C coding style and thus with tabs.
      
      Special-case "*.py" files to override that default with spaces to fix
      this.
      Patrick Steinhardt committed
    • Merge pull request #5387 from pks-t/pks/transport-http-custom-headers · 03ac24b1
      transports: http: fix custom headers not being applied
      Patrick Steinhardt committed
    • Merge pull request #5382 from libgit2/pks/azure-coverity · 65ac33ae
      azure: fix Coverity pipeline
      Patrick Steinhardt committed
    • transports: http: fix custom headers not being applied · 46228d86
      In commit b9c5b15a (http: use the new httpclient, 2019-12-22), the HTTP
      code got refactored to extract a generic HTTP client that operates
      independently of the Git protocol. Part of refactoring was the creation
      of a new `git_http_request` struct that encapsulates the generation of
      requests. Our Git-specific HTTP transport was converted to use that in
      `generate_request`, but during the process we forgot to set up custom
      headers for the `git_http_request` and as a result we do not send out
      these headers anymore.
      
      Fix the issue by correctly setting up the request's custom headers and
      add a test to verify we correctly send them.
      Patrick Steinhardt committed
    • azure: coverity: fix Coverity builds due to various issues · 86c54cc8
      There's several issues with our Coverity builds, like e.g. missing wget
      in our containers. Simplify our Coverity pipeline and fix these issues.
      Patrick Steinhardt committed
    • azure: coverity: convert to use self-built containers · ccffea6b
      Back in commit 5a6740e7 (azure: build Docker images as part of the
      pipeline, 2019-08-02), we have converted our pipelines to use self-built
      Docker images to ease making changes to our Dockerfiles. The commit
      didn't adjust our Coverity pipeline, though, so let's do this now.
      Patrick Steinhardt committed
    • azure: coverity: fix invalid syntax for Docker image · b4eb0282
      In commit bbc0b20b (azure: fix Coverity's build due to wrong container
      name, 2019-08-02), Coverity builds were fixed to use the correct
      container names. Unfortunately, the "fix" completely broke our Coverity
      builds due to using wrong syntax for the Docker task. Let's fix this by
      using "imageName" instead of the Docker dict.
      Patrick Steinhardt committed
  2. 06 Feb, 2020 1 commit
  3. 04 Feb, 2020 2 commits
  4. 01 Feb, 2020 1 commit
  5. 31 Jan, 2020 3 commits
    • fetchhead: strip credentials from remote URL · 93a9044f
      If fetching from an anonymous remote via its URL, then the URL gets
      written into the FETCH_HEAD reference. This is mainly done to give
      valuable context to some commands, like for example git-merge(1), which
      will put the URL into the generated MERGE_MSG. As a result, what gets
      written into FETCH_HEAD may become public in some cases. This is
      especially important considering that URLs may contain credentials, e.g.
      when cloning 'https://foo:bar@example.com/repo' we persist the complete
      URL into FETCH_HEAD and put it without any kind of sanitization into the
      MERGE_MSG. This is obviously bad, as your login data has now just leaked
      as soon as you do git-push(1).
      
      When writing the URL into FETCH_HEAD, upstream git does strip
      credentials first. Let's do the same by trying to parse the remote URL
      as a "real" URL, removing any credentials and then re-formatting the
      URL. In case this fails, e.g. when it's a file path or not a valid URL,
      we just fall back to using the URL as-is without any sanitization. Add
      tests to verify our behaviour.
      Patrick Steinhardt committed
    • Merge pull request #5375 from pks-t/pks/test-ci · a1bff63b
      azure-pipelines: properly expand negotiate passwords
      Edward Thomson committed
    • azure-pipelines: properly expand negotiate passwords · 7aa99dd3
      To allow testing against a Kerberos instance, we have added variables
      for the Kerberos password to allow authentication against LIBGIT2.ORG in
      commit e5fb5fe5 (ci: perform SPNEGO tests, 2019-10-20). To set up the
      password, we assign
      
          "GITTEST_NEGOTIATE_PASSWORD=$(GITTEST_NEGOTIATE_PASSWORD)"
      
      in the environmentVariables section which is then passed through to a
      template. As the template does build-time expansion of the environment
      variables, it will expand the above line verbosely, and due to the
      envVar section not doing any further expansion the password variable
      will end up with the value "$(GITTEST_NEGOTIATE_PASSWORD)" in the
      container's environment.
      
      Fix this fixed by doing expansion of GITTEST_NEGOTIATE_PASSWORD at
      build-time, as well.
      Patrick Steinhardt committed
  6. 30 Jan, 2020 3 commits
  7. 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
  8. 24 Jan, 2020 21 commits