1Config::GitLike::Git(3)User Contributed Perl DocumentatioCnonfig::GitLike::Git(3)
2
3
4
6 Config::GitLike::Git - load Git configuration files
7
9 use Config::GitLike::Git;
10 my $config = Config::GitLike::Git->new;
11 $config->load("/path/to/repo");
12
14 This is a modification of Config::GitLike to look at the same locations
15 that Git writes to. Unlike with Config::GitLike, you do not need to
16 pass a confname to its constructor. This module also enables the
17 Config::GitLike option to maintain git compatibility when reading and
18 writing variables.
19
20 "load" in Config::GitLike should be passed path to the top level of a
21 git repository -- this defaults to the current directory. It will
22 append ".git" as necessary. It supports both bare and non-bare
23 repositories.
24
26 This module overrides these methods from "Config::GitLike":
27
28 dir_file
29 The per-directory configuration file is .git/config. With an optional
30 directory argument, will return a fully-qualified path to the
31 configuration file, as git would edit with "git config --local -C
32 path".
33
34 user_file
35 The per-user configuration file is ~/.gitconfig
36
37 global_file
38 The per-host configuration file is /etc/gitconfig
39
40 is_git_dir
41 Returns true if a file contains the necessary files (as git would
42 reckon it) for the path to be a git repository.
43
44 load_dirs
45 Loads the relevant .git/config file.
46
48 Config::GitLike
49
51 You may modify and/or redistribute this software under the same terms
52 as Perl 5.8.8.
53
55 Copyright 2010 Best Practical Solutions, LLC
56
58 Alex Vandiver <alexmv@bestpractical.com>, Christine Spang
59 <spang@bestpractical.com>
60
61
62
63perl v5.32.0 2020-07-28 Config::GitLike::Git(3)