1. 09 Oct, 2017 9 commits
    • config_file: implement "gitdir/i" conditional · f7d837c8
      Next to the "gitdir" conditional for including other configuration
      files, there's also a "gitdir/i" conditional. In contrast to the former
      one, path matching with "gitdir/i" is done case-insensitively. This
      commit implements the case-insensitive condition.
      Patrick Steinhardt committed
    • config_file: implement conditional "gitdir" includes · 071b6c06
      Upstream git.git has implemented the ability to include other
      configuration files based on conditions. Right now, this only includes
      the ability to include a file based on the gitdir-location of the
      repository the currently parsed configuration file belongs to. This
      commit implements handling these conditional includes for the
      case-sensitive "gitdir" condition.
      Patrick Steinhardt committed
    • config_file: make repo and config path accessible to reader · 9d7a75be
      The reader machinery will be extended to handle conditional includes.
      The only conditions that currently exist all match the against the git
      directory of the repository the config file belongs to. As such, we need
      to have access to the repository when reading configuration files to
      properly handle these conditions.
      
      One specialty of thes conditional includes is that the actual pattern
      may also be a relative pattern starting with "./". In this case, we have
      to match the pattern against the path relative to the config file which
      is currently being parsed. So besides the repository, we also have to
      pass down the path to the current config file that is being parsed.
      Patrick Steinhardt committed
    • config_file: extract function to parse include path · d5b9d9e9
      The logic inside this function will be required later on, when
      implementing conditional includes. Extract it into its own function to
      ease the implementation.
      Patrick Steinhardt committed
    • config: pass repository when opening config files · 529e873c
      Our current configuration logic is completely oblivious of any
      repository, but only cares for actual file paths. Unfortunately, we are
      forced to break this assumption by the introduction of conditional
      includes, which are evaluated in the context of a repository. Right now,
      only one conditional exists with "gitdir:" -- it will only include the
      configuration if the current repository's git directory matches the
      value passed to "gitdir:".
      
      To support these conditionals, we have to break our API and make the
      repository available when opening a configuration file. This commit
      extends the `open` call of configuration backends to include another
      repository and adjusts existing code to have it available. This includes
      the user-visible functions `git_config_add_file_ondisk` and
      `git_config_add_backend`.
      Patrick Steinhardt committed
    • repository: constify several repo parameters for getters · d02cf564
      Several functions to retrieve variables from a repository only return
      immutable values, which allows us to actually constify the passed-in
      repository parameter. Do so to help a later patch, which will only have
      access to a constant repository.
      Patrick Steinhardt committed
    • path: expose `git_path_is_dirsep` · f38ce9b6
      This function has previously been implemented in Windows-specific path
      handling code as `path__is_dirsep`. As we will need this functionality
      in other parts, extract the logic into "path.h" alongside with a
      non-Windows implementation.
      Patrick Steinhardt committed
    • path: expose `git_path_is_absolute` · e54cf1a3
      This function has previously been implemented in Windows-specific path
      handling code as `path__is_absolute`. As we will need this functionality
      in other parts, extract the logic into "path.h" alongside with a
      non-Windows implementation.
      Patrick Steinhardt committed
    • Merge pull request #4369 from libgit2/ethomson/checkout_typechange · 38e769cb
      Checkout typechange-only deltas
      Patrick Steinhardt committed
  2. 07 Oct, 2017 7 commits
  3. 06 Oct, 2017 9 commits
  4. 04 Oct, 2017 1 commit
  5. 28 Sep, 2017 2 commits
  6. 27 Sep, 2017 3 commits
  7. 20 Sep, 2017 7 commits
    • cmake: fix static linking for bundled deps · 8c19969a
      Our bundled deps are being built as simple static libraries which are
      then linked into the libgit2 library via `TARGET_LINK_LIBRARIES`. While
      this works for a dynamically built libgit2 library, using this function
      to link two static libraries does not have the expected outcome of
      merging those static libraries into one big library. This leads to
      symbols of our bundled deps being undefined in the resulting libgit2
      archive.
      
      As we have bumped our minimum CMake version to 2.8.11, we can now easily
      make use of object libraries for our bundled dependencies. So build
      instructions are still self-contained inside of the dependency
      directories and the resulting object libraries can just be added to the
      LIBGIT2_OBJECTS list, which will cause them to be linked into the final
      resulting static library. This fixes the issue of undefined symbols.
      Patrick Steinhardt committed
    • cmake: unify version check for target include directories · d8d2f21e
      There are two locations where we check whether CMake supports
      `TARGET_INCLUDE_DIRECTORIES`. While the first one uses `VERSION_LESS
      2.8.12`, the second one uses `VERSION_GREATER 2.8.11`, which are
      obviously equivalent to each other. It'd still be easier to grep for
      specific CMake versions being required for some features if both used
      the same conditional mentioning the actual target version required. So
      this commit refactors these conditions to make them equal.
      Patrick Steinhardt committed
    • cmake: always use object library for git2internal · 172a585f
      As we have bumped our minimum CMake version to 2.8.11, we can now
      unconditionally make use of object libraries. So remove the version
      check for the git2internal object library and always use it.
      Patrick Steinhardt committed
    • cmake: bump minimum version to 2.8.11 · cf9f3452
      Our current minimum CMake version is 2.8. This version does not yet
      allow us to use object libraries (introduced in 2.8.8) and target
      include directories (introduced in 2.8.12), which are both mechanisms we
      want to use to fix some specific problems. We previously were not able
      to bump our CMake version to a version supporting object libraries
      because Ubuntu Precise only had CMake version 2.8.7 in its repositories.
      But due to Precise being end of life now, we shouldn't need to honor it
      anymore. A current survey of some of the more conservative distributions
      brings up the following versions of CMake:
      
      - CentOS 5: 2.6.2
      - CentOS 6: 2.8.12.2
      - Debian 7: 2.8.11
      - Fedora 23: 3.3.2
      - OpenSUSE 13.2: 3.0.2
      - Ubuntu Precise: 2.8.7
      - Ubuntu Trusty: 2.8.12
      
      The only two outliers here are CentOS 5 and Ubuntu Precise. CentOS is
      currently unsupported due to our minimum version being 2.8 and Ubuntu
      Precise is not maintained anymore. So the next smallest version
      supported by all major distributions is 2.8.11. While this does not yet
      support target include directories, it at least enables us to use object
      libraries. So this becomes our new minimum required version.
      Patrick Steinhardt committed
    • cmake: distinguish libgit2 objects and sources · 1d9dd882
      Distinguish variables keeping track of our internal libgit2 sources and
      the final objects which shall be linked into the library. This will ease
      the transition to use object libraries for our bundled dependencies
      instead of linking them in.
      Patrick Steinhardt committed
    • travis: drop support for Ubuntu Precise · c17c3f8a
      Ubuntu Precise is end of life since April 2017. At that point in time,
      Precise was still the main distro on which Travis CI built upon, with
      the Trusty-based images still being in a beta state. But since June
      21st, Trusty has officially moved out of beta and is now the default
      image for all new builds. Right now, we build on both old and new images
      to assure we support both.
      
      Unfortunately, this leaves us with the highest minimum version for CMake
      being 2.8.7, as Precise has no greater version in its repositories. And
      because of this limitation, we cannot actually use object libraries in
      our build instructions. But considering Precise is end of life and
      Trusty is now the new default for Travis, we can and should drop support
      for this old and unmaintained distribution. And so we do.
      Patrick Steinhardt committed
    • Merge pull request #4334 from pks-t/pks/reproducible-builds · 524c1d3c
      Reproducible builds
      Edward Thomson committed
  8. 16 Sep, 2017 1 commit
  9. 15 Sep, 2017 1 commit