MCPcopy
hub / github.com/git-lfs/git-lfs / getAllKnownPatterns

Function getAllKnownPatterns

commands/command_track.go:311–327  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

309}
310
311func getAllKnownPatterns() ([]git.AttributePath, error) {
312 mp := gitattr.NewMacroProcessor()
313
314 // Parse these in this order so that macros in one file are properly
315 // expanded when referred to in a later file, then order them in the
316 // order we want.
317 systemPatterns, err := git.GetSystemAttributePaths(mp, cfg.Os)
318 if err != nil {
319 return nil, err
320 }
321 globalPatterns := git.GetRootAttributePaths(mp, cfg.Git)
322 knownPatterns := git.GetAttributePaths(mp, cfg.LocalWorkingDir(), cfg.LocalGitDir())
323 knownPatterns = append(knownPatterns, globalPatterns...)
324 knownPatterns = append(knownPatterns, systemPatterns...)
325
326 return knownPatterns, nil
327}
328
329func getAttributeLineEnding(attribs []git.AttributePath) string {
330 for _, a := range attribs {

Callers 1

listPatternsFunction · 0.85

Calls 6

NewMacroProcessorFunction · 0.92
GetSystemAttributePathsFunction · 0.92
GetRootAttributePathsFunction · 0.92
GetAttributePathsFunction · 0.92
LocalWorkingDirMethod · 0.80
LocalGitDirMethod · 0.80

Tested by

no test coverage detected