()
| 309 | } |
| 310 | |
| 311 | func 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 | |
| 329 | func getAttributeLineEnding(attribs []git.AttributePath) string { |
| 330 | for _, a := range attribs { |
no test coverage detected