Config::GitLike::Git(3pm)

Config::GitLike::Git3pm

Load git configuration files

Usage

    use Config::GitLike::Git;
    my $config = Config::GitLike::Git->new;
    $config->load("/path/to/repo");

Overview

This is a modification of Config::GitLike to look at the same locations that Git writes to. Unlike with Config::GitLike, you do not need to pass a confname to its constructor. This module also enables the Config::GitLike option to maintain git compatibility when reading and writing variables.

"load" in Config::GitLike should be passed path to the top level of a git repository -- this defaults to the current directory. It will append ".git" as necessary. It supports both bare and non-bare repositories.

Methods

This module overrides these methods from "Config::GitLike":

dir_file

The per-directory configuration file is .git/config. With an optional directory argument, will return a fully-qualified path to the configuration file, as git would edit with "git config --local -C path".

user_file

The per-user configuration file is ~/.gitconfig

global_file

The per-host configuration file is /etc/gitconfig

is_git_dir

Returns true if a file contains the necessary files (as git would reckon it) for the path to be a git repository.

load_dirs

Loads the relevant .git/config file.

Releases

8 releases since Debian 6.0 (Squeeze); the text changed 6 times.

  1. 6.0
  2. 7
  3. 8
  4. 9
  5. 10
  6. 11
  7. 12–13

License

You may modify and/or redistribute this software under the same terms as Perl 5.8.8.

Authors

Alex Vandiver <[email protected]>, Christine Spang <[email protected]>

From libconfig-gitlike-perl 1.18-2 in Debian 13 (Trixie). Parsed by carta from the page's man source.