• Show log

    Commit

  • Hash : 529e873c
    Author : Patrick Steinhardt
    Date : 2017-05-23T11:51:00

    config: pass repository when opening config files
    
    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`.