1. 11 Aug, 2019 9 commits
  2. 21 Jul, 2019 1 commit
  3. 20 Jul, 2019 17 commits
  4. 19 Jul, 2019 7 commits
    • repository: do not initialize HEAD if it's provided by templates · 9d46f167
      When using templates to initialize a git repository, then git-init(1)
      will copy over all contents of the template directory. These will be
      preferred over the default ones created by git-init(1). While we mostly
      do the same, there is the exception of "HEAD". While we do copy over the
      template's HEAD file, afterwards we'll immediately re-initialize its
      contents with either the default "ref: refs/origin/master" or the init
      option's `initial_head` field.
      
      Let's fix the inconsistency with upstream git-init(1) by not overwriting
      the template HEAD, but only if the user hasn't set `opts.initial_head`.
      If the `initial_head` field has been supplied, we should use that
      indifferent from whether the template contained a HEAD file or not. Add
      tests to verify we correctly use the template directory's HEAD file and
      that `initial_head` overrides the template.
      Patrick Steinhardt committed
    • repository: update error handling in `init_ext` · f3134a84
      Update `git_repository_init_ext` to use our typical style of error
      handling. The function had multiple statements which didn't `goto out`
      immediately but instead deferred it to later calls combined with `if`
      statements.
      Patrick Steinhardt committed
    • repository: avoid swallowing error codes in `create_head` · 869ae5a3
      The error handling in `git_repository_create_head` completely swallows
      all error codes. While probably not too much of a problem, this also
      violates our usual coding style.
      
      Refactor the code to use a local `error` variable with the typical `goto
      out` statements.
      Patrick Steinhardt committed
    • tests: repo: refactor setup of templates and repos · 0d12b8dd
      All tests in repo::template have a common pattern of first setting up
      templates, then settung up the repository that makes use of those
      templates via several init options. Refactor this pattern into two
      functions `setup_templates` and `setup_repo` that handle most of that
      logic to make it easier to spot what a test actually wants to check.
      
      Furthermore, this also refactors how we clean up after the tests.
      Previously, it was a combination of manually calling
      `cl_fixture_cleanup` and `cl_set_cleanup`, which really is kind of hard
      to read. This commit refactors this to instead provide the cleaning
      parameters in the setup functions. All cleanups are then performed in
      the suite's cleanup function.
      Patrick Steinhardt committed
    • tests: repo: refactor template path handling · 3b79ceaf
      The repo::template test suite makes use of quite a few local variables
      that could be consolidated. Do so to make the code easier to read.
      Patrick Steinhardt committed
    • tests: repo: move template tests into their own suite · ee193480
      There's quite a lot of supporting code for our templates and they are an
      obvious standalone feature. Thus, let's extract those tests into their
      own suite to also make refactoring of them easier.
      Patrick Steinhardt committed
    • Merge pull request #5138 from libgit2/ethomson/cvar · 3424c210
      configuration: cvar -> configmap
      Patrick Steinhardt committed
  5. 18 Jul, 2019 6 commits