Debian Codegraph @

git/config.go

raw symbols SCIP
1 package gitscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git`/
2
3 import (
4 "errorsscip-go gomod github.com/golang/go/src go1.25.0 errors/"
5 "fmtscip-go gomod github.com/golang/go/src go1.25.0 fmt/"
6 "osscip-go gomod github.com/golang/go/src go1.25.0 os/"
7 "path/filepathscip-go gomod github.com/golang/go/src go1.25.0 `path/filepath`/"
8 "stringsscip-go gomod github.com/golang/go/src go1.25.0 strings/"
9 "syncscip-go gomod github.com/golang/go/src go1.25.0 sync/"
10
11 "github.com/git-lfs/git-lfs/v3/subprocessscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/subprocess`/"
12 "github.com/git-lfs/git-lfs/v3/trscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tr`/"
13 )
14
15 var (
16 ErrReadOnlyscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git`/ErrReadOnly. = errorsscip-go gomod github.com/golang/go/src go1.25.0 errors/.Newscip-go gomod github.com/golang/go/src go1.25.0 errors/New().(trscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tr`/.Trscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tr`/Tr..Getscip-go gomod github.com/leonelquinteros/gotext v1.7.2 `github.com/leonelquinteros/gotext`/Locale#Get().("configuration is read-only"))
17 )
18
19 // Environment is a restricted version of config.Environment that only provides
20 // a single method.
21 type Environmentscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git`/Environment# interface {
22 // Get is shorthand for calling `e.Fetcher.Get(key)`.
23 Getscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git`/Environment#Get.(key string) (val string, ok bool)
24 }
25
26 // Configuration can fetch or modify the current Git config and track the Git
27 // version.
28 type Configurationscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git`/Configuration# struct {
29 WorkDirscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git`/Configuration#WorkDir. string
30 GitDirscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git`/Configuration#GitDir. string
31 versionscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git`/Configuration#version. *string
32 readOnlyscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git`/Configuration#readOnly. bool
33 muscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git`/Configuration#mu. syncscip-go gomod github.com/golang/go/src go1.25.0 sync/.Mutexscip-go gomod github.com/golang/go/src go1.25.0 sync/Mutex#
34 }
35
36 func NewConfigscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git`/NewConfig().(workdir, gitdir string) *Configurationscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git`/Configuration# {
37 if len(gitdir) == 0 && len(workdir) > 0 {
38 gitdir = filepathscip-go gomod github.com/golang/go/src go1.25.0 `path/filepath`/.Joinscip-go gomod github.com/golang/go/src go1.25.0 `path/filepath`/Join().(workdir, ".git")
39 }
40 return &Configurationscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git`/Configuration#{WorkDirscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git`/Configuration#WorkDir.: workdir, GitDirscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git`/Configuration#GitDir.: gitdir}
41 }
42
43 // NewReadOnlyConfig creates a new configuration that returns an error if an
44 // attempt to write to the configuration is made.
45 func NewReadOnlyConfigscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git`/NewReadOnlyConfig().(workdir, gitdir string) *Configurationscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git`/Configuration# {
46 cfg := NewConfigscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git`/NewConfig().(workdir, gitdir)
47 cfg.readOnlyscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git`/Configuration#readOnly. = true
48 return cfg
49
50 }
51
52 func ParseConfigLinesscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git`/ParseConfigLines().(lines string, onlySafeKeys bool) *ConfigurationSourcescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git`/ConfigurationSource# {
53 return &ConfigurationSourcescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git`/ConfigurationSource#{
54 Linesscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git`/ConfigurationSource#Lines.: stringsscip-go gomod github.com/golang/go/src go1.25.0 strings/.Splitscip-go gomod github.com/golang/go/src go1.25.0 strings/Split().(lines, "\n"),
55 OnlySafeKeysscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git`/ConfigurationSource#OnlySafeKeys.: onlySafeKeys,
56 }
57 }
58
59 type ConfigurationSourcescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git`/ConfigurationSource# struct {
60 Linesscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git`/ConfigurationSource#Lines. []string
61 OnlySafeKeysscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git`/ConfigurationSource#OnlySafeKeys. bool
62 }
63
64 // Find returns the git config value for the key
65 func (c *Configurationscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git`/Configuration#) Findscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git`/Configuration#Find().(val string) string {
66 output, _ := c.gitConfigscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git`/Configuration#gitConfig().(val)
67 return output
68 }
69
70 // FindGlobal returns the git config value in global scope for the key
71 func (c *Configurationscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git`/Configuration#) FindGlobalscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git`/Configuration#FindGlobal().(key string) string {
72 output, _ := c.gitConfigscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git`/Configuration#gitConfig().("--global", key)
73 return output
74 }
75
76 // FindSystem returns the git config value in system scope for the key
77 func (c *Configurationscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git`/Configuration#) FindSystemscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git`/Configuration#FindSystem().(key string) string {
78 output, _ := c.gitConfigscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git`/Configuration#gitConfig().("--system", key)
79 return output
80 }
81
82 // FindLocal returns the git config value in local scope for the key
83 func (c *Configurationscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git`/Configuration#) FindLocalscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git`/Configuration#FindLocal().(key string) string {
84 output, _ := c.gitConfigscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git`/Configuration#gitConfig().("--local", key)
85 return output
86 }
87
88 // FindWorktree returns the git config value in worktree or local scope for the key, depending on whether multiple worktrees are in use
89 func (c *Configurationscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git`/Configuration#) FindWorktreescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git`/Configuration#FindWorktree().(key string) string {
90 output, _ := c.gitConfigscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git`/Configuration#gitConfig().("--worktree", key)
91 return output
92 }
93
94 // FindWorktree returns the git config value for the key in the given configuration file
95 func (c *Configurationscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git`/Configuration#) FindFilescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git`/Configuration#FindFile().(file, key string) string {
96 output, _ := c.gitConfigscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git`/Configuration#gitConfig().("--file", file, key)
97 return output
98 }
99
100 // SetGlobal sets the git config value for the key in the global config
101 func (c *Configurationscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git`/Configuration#) SetGlobalscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git`/Configuration#SetGlobal().(key, val string) (string, error) {
102 return c.gitConfigWritescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git`/Configuration#gitConfigWrite().("--global", "--replace-all", key, val)
103 }
104
105 // SetSystem sets the git config value for the key in the system config
106 func (c *Configurationscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git`/Configuration#) SetSystemscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git`/Configuration#SetSystem().(key, val string) (string, error) {
107 return c.gitConfigWritescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git`/Configuration#gitConfigWrite().("--system", "--replace-all", key, val)
108 }
109
110 // SetLocal sets the git config value for the key in the specified config file
111 func (c *Configurationscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git`/Configuration#) SetLocalscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git`/Configuration#SetLocal().(key, val string) (string, error) {
112 return c.gitConfigWritescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git`/Configuration#gitConfigWrite().("--replace-all", key, val)
113 }
114
115 // SetWorktree sets the git config value for the key in the worktree or local config, depending on whether multiple worktrees are in use
116 func (c *Configurationscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git`/Configuration#) SetWorktreescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git`/Configuration#SetWorktree().(key, val string) (string, error) {
117 return c.gitConfigWritescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git`/Configuration#gitConfigWrite().("--worktree", "--replace-all", key, val)
118 }
119
120 // SetFile sets the git config value for the key in the given configuration file
121 func (c *Configurationscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git`/Configuration#) SetFilescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git`/Configuration#SetFile().(file, key, val string) (string, error) {
122 return c.gitConfigWritescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git`/Configuration#gitConfigWrite().("--file", file, "--replace-all", key, val)
123 }
124
125 // UnsetGlobalSection removes the entire named section from the global config
126 func (c *Configurationscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git`/Configuration#) UnsetGlobalSectionscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git`/Configuration#UnsetGlobalSection().(key string) (string, error) {
127 return c.gitConfigWritescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git`/Configuration#gitConfigWrite().("--global", "--remove-section", key)
128 }
129
130 // UnsetSystemSection removes the entire named section from the system config
131 func (c *Configurationscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git`/Configuration#) UnsetSystemSectionscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git`/Configuration#UnsetSystemSection().(key string) (string, error) {
132 return c.gitConfigWritescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git`/Configuration#gitConfigWrite().("--system", "--remove-section", key)
133 }
134
135 // UnsetLocalSection removes the entire named section from the local config
136 func (c *Configurationscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git`/Configuration#) UnsetLocalSectionscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git`/Configuration#UnsetLocalSection().(key string) (string, error) {
137 return c.gitConfigWritescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git`/Configuration#gitConfigWrite().("--local", "--remove-section", key)
138 }
139
140 // UnsetWorktreeSection removes the entire named section from the worktree or local config, depending on whether multiple worktrees are in use
141 func (c *Configurationscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git`/Configuration#) UnsetWorktreeSectionscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git`/Configuration#UnsetWorktreeSection().(key string) (string, error) {
142 return c.gitConfigWritescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git`/Configuration#gitConfigWrite().("--worktree", "--remove-section", key)
143 }
144
145 // UnsetFileSection removes the entire named section from the given configuration file
146 func (c *Configurationscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git`/Configuration#) UnsetFileSectionscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git`/Configuration#UnsetFileSection().(file, key string) (string, error) {
147 return c.gitConfigWritescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git`/Configuration#gitConfigWrite().("--file", file, "--remove-section", key)
148 }
149
150 // UnsetLocalKey removes the git config value for the key from the specified config file
151 func (c *Configurationscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git`/Configuration#) UnsetLocalKeyscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git`/Configuration#UnsetLocalKey().(key string) (string, error) {
152 return c.gitConfigWritescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git`/Configuration#gitConfigWrite().("--unset", key)
153 }
154
155 func (c *Configurationscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git`/Configuration#) Sourcesscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git`/Configuration#Sources().(dir string, optionalFilename string) ([]*ConfigurationSourcescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git`/ConfigurationSource#, error) {
156 gitconfig, err := c.Sourcescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git`/Configuration#Source().()
157 if err != nil {
158 return nil, err
159 }
160 configs := make([]*ConfigurationSourcescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git`/ConfigurationSource#, 0, 2)
161
162 bare, err := IsBarescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git`/IsBare().()
163 if err == nil {
164 // First try to read from the working directory and then the index if
165 // the file is missing from the working directory.
166 var fileconfig *ConfigurationSourcescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git`/ConfigurationSource#
167 if !bare {
168 fileconfig, err = c.FileSourcescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git`/Configuration#FileSource().(filepathscip-go gomod github.com/golang/go/src go1.25.0 `path/filepath`/.Joinscip-go gomod github.com/golang/go/src go1.25.0 `path/filepath`/Join().(dir, optionalFilename))
169 if err != nil {
170 if !osscip-go gomod github.com/golang/go/src go1.25.0 os/.IsNotExistscip-go gomod github.com/golang/go/src go1.25.0 os/IsNotExist().(err) {
171 return nil, err
172 }
173 fileconfig, _ = c.RevisionSourcescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git`/Configuration#RevisionSource().(fmtscip-go gomod github.com/golang/go/src go1.25.0 fmt/.Sprintfscip-go gomod github.com/golang/go/src go1.25.0 fmt/Sprintf().(":%s", optionalFilename))
174 }
175 }
176 if fileconfig == nil {
177 fileconfig, _ = c.RevisionSourcescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git`/Configuration#RevisionSource().(fmtscip-go gomod github.com/golang/go/src go1.25.0 fmt/.Sprintfscip-go gomod github.com/golang/go/src go1.25.0 fmt/Sprintf().("HEAD:%s", optionalFilename))
178 }
179
180 if fileconfig != nil {
181 configs = append(configs, fileconfig)
182 }
183 }
184
185 return append(configs, gitconfig), nil
186 }
187
188 func (c *Configurationscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git`/Configuration#) FileSourcescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git`/Configuration#FileSource().(filename string) (*ConfigurationSourcescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git`/ConfigurationSource#, error) {
189 if _, err := osscip-go gomod github.com/golang/go/src go1.25.0 os/.Statscip-go gomod github.com/golang/go/src go1.25.0 os/Stat().(filename); err != nil {
190 return nil, err
191 }
192
193 out, err := c.gitConfigscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git`/Configuration#gitConfig().("-l", "-f", filename)
194 if err != nil {
195 return nil, err
196 }
197 return ParseConfigLinesscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git`/ParseConfigLines().(out, true), nil
198 }
199
200 func (c *Configurationscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git`/Configuration#) RevisionSourcescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git`/Configuration#RevisionSource().(revision string) (*ConfigurationSourcescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git`/ConfigurationSource#, error) {
201 out, err := c.gitConfigscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git`/Configuration#gitConfig().("-l", "--blob", revision)
202 if err != nil {
203 return nil, err
204 }
205 return ParseConfigLinesscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git`/ParseConfigLines().(out, true), nil
206 }
207
208 func (c *Configurationscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git`/Configuration#) Sourcescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git`/Configuration#Source().() (*ConfigurationSourcescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git`/ConfigurationSource#, error) {
209 out, err := c.gitConfigscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git`/Configuration#gitConfig().("-l")
210 if err != nil {
211 return nil, err
212 }
213 return ParseConfigLinesscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git`/ParseConfigLines().(out, false), nil
214 }
215
216 func (c *Configurationscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git`/Configuration#) gitConfigscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git`/Configuration#gitConfig().(args ...string) (string, error) {
217 args = append([]string{"config", "--includes"}, args...)
218 cmd, err := subprocessscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/subprocess`/.ExecCommandscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/subprocess`/ExecCommand().("git", args...)
219 if err != nil {
220 return "", err
221 }
222 if len(c.GitDirscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git`/Configuration#GitDir.) > 0 {
223 cmd.Dirscip-go gomod github.com/golang/go/src go1.25.0 `os/exec`/Cmd#Dir. = c.GitDirscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git`/Configuration#GitDir.
224 }
225 return subprocessscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/subprocess`/.Outputscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/subprocess`/Output().(cmd)
226 }
227
228 func (c *Configurationscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git`/Configuration#) gitConfigWritescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git`/Configuration#gitConfigWrite().(args ...string) (string, error) {
229 if c.readOnlyscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git`/Configuration#readOnly. {
230 return "", ErrReadOnlyscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git`/ErrReadOnly.
231 }
232 return c.gitConfigscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git`/Configuration#gitConfig().(args...)
233 }