Debian Codegraph @

git/gitattr/tree.go

raw symbols SCIP
1 package gitattrscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git/gitattr`/
2
3 import (
4 "ioscip-go gomod github.com/golang/go/src go1.25.0 io/"
5 "osscip-go gomod github.com/golang/go/src go1.25.0 os/"
6 "stringsscip-go gomod github.com/golang/go/src go1.25.0 strings/"
7
8 "github.com/git-lfs/git-lfs/v3/errorsscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/errors`/"
9 "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`/"
10 "github.com/git-lfs/gitobj/v2scip-go gomod github.com/git-lfs/gitobj/v2 v2.1.1 `github.com/git-lfs/gitobj/v2`/"
11 )
12
13 // Environment is a restricted version of config.Environment that only provides
14 // a single method.
15 type Environmentscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git/gitattr`/Environment# interface {
16 // Get is shorthand for calling `e.Fetcher.Get(key)`.
17 Getscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git/gitattr`/Environment#Get.(key string) (val string, ok bool)
18 }
19
20 // Tree represents the .gitattributes file at one layer of the tree in a Git
21 // repository.
22 type Treescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git/gitattr`/Tree# struct {
23 mpscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git/gitattr`/Tree#mp. *MacroProcessorscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git/gitattr`/MacroProcessor#
24
25 systemAttributesscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git/gitattr`/Tree#systemAttributes. *Treescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git/gitattr`/Tree#
26
27 userAttributesscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git/gitattr`/Tree#userAttributes. *Treescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git/gitattr`/Tree#
28 // lines are the lines of the .gitattributes at this level of the tree.
29 linesscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git/gitattr`/Tree#lines. []Linescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git/gitattr`/Line#
30 // children are the named child directories in the repository.
31 childrenscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git/gitattr`/Tree#children. map[string]*Treescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git/gitattr`/Tree#
32
33 repoAttributesscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git/gitattr`/Tree#repoAttributes. *Treescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git/gitattr`/Tree#
34 }
35
36 // New constructs a *Tree starting at the given tree "t" and reading objects
37 // from the given ObjectDatabase. If a tree was not able to be read, an error
38 // will be propagated up accordingly.
39 func Newscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git/gitattr`/New().(db *gitobjscip-go gomod github.com/git-lfs/gitobj/v2 v2.1.1 `github.com/git-lfs/gitobj/v2`/.ObjectDatabasescip-go gomod github.com/git-lfs/gitobj/v2 v2.1.1 `github.com/git-lfs/gitobj/v2`/ObjectDatabase#, t *gitobjscip-go gomod github.com/git-lfs/gitobj/v2 v2.1.1 `github.com/git-lfs/gitobj/v2`/.Treescip-go gomod github.com/git-lfs/gitobj/v2 v2.1.1 `github.com/git-lfs/gitobj/v2`/Tree#) (*Treescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git/gitattr`/Tree#, error) {
40 processor := NewMacroProcessorscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git/gitattr`/NewMacroProcessor().()
41 return newFromGitTreescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git/gitattr`/newFromGitTree().(db, t, processor)
42 }
43
44 func newFromGitTreescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git/gitattr`/newFromGitTree().(db *gitobjscip-go gomod github.com/git-lfs/gitobj/v2 v2.1.1 `github.com/git-lfs/gitobj/v2`/.ObjectDatabasescip-go gomod github.com/git-lfs/gitobj/v2 v2.1.1 `github.com/git-lfs/gitobj/v2`/ObjectDatabase#, t *gitobjscip-go gomod github.com/git-lfs/gitobj/v2 v2.1.1 `github.com/git-lfs/gitobj/v2`/.Treescip-go gomod github.com/git-lfs/gitobj/v2 v2.1.1 `github.com/git-lfs/gitobj/v2`/Tree#, mp *MacroProcessorscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git/gitattr`/MacroProcessor#) (*Treescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git/gitattr`/Tree#, error) {
45 children := make(map[string]*Treescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git/gitattr`/Tree#)
46 tree, err := linesInTreescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git/gitattr`/linesInTree().(db, t, mp)
47
48 if err != nil {
49 return nil, err
50 }
51
52 for _, entry := range t.Entriesscip-go gomod github.com/git-lfs/gitobj/v2 v2.1.1 `github.com/git-lfs/gitobj/v2`/Tree#Entries. {
53 if entry.Typescip-go gomod github.com/git-lfs/gitobj/v2 v2.1.1 `github.com/git-lfs/gitobj/v2`/TreeEntry#Type().() != gitobjscip-go gomod github.com/git-lfs/gitobj/v2 v2.1.1 `github.com/git-lfs/gitobj/v2`/.TreeObjectTypescip-go gomod github.com/git-lfs/gitobj/v2 v2.1.1 `github.com/git-lfs/gitobj/v2`/TreeObjectType. {
54 continue
55 }
56
57 // For every entry in the current tree, parse its sub-trees to
58 // see if they might contain a .gitattributes.
59 subGitTree, err := db.Treescip-go gomod github.com/git-lfs/gitobj/v2 v2.1.1 `github.com/git-lfs/gitobj/v2`/ObjectDatabase#Tree().(entry.Oidscip-go gomod github.com/git-lfs/gitobj/v2 v2.1.1 `github.com/git-lfs/gitobj/v2`/TreeEntry#Oid.)
60 if err != nil {
61 return nil, err
62 }
63
64 subTree, err := newFromGitTreescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git/gitattr`/newFromGitTree().(db, subGitTree, mp)
65 if err != nil {
66 return nil, err
67 }
68
69 if len(subTree.childrenscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git/gitattr`/Tree#children.) > 0 || len(subTree.linesscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git/gitattr`/Tree#lines.) > 0 {
70 // Only include entries that have either (1) a
71 // .gitattributes in their tree, or (2) a .gitattributes
72 // in a sub-tree.
73 children[entry.Namescip-go gomod github.com/git-lfs/gitobj/v2 v2.1.1 `github.com/git-lfs/gitobj/v2`/TreeEntry#Name.] = subTree
74 }
75 }
76 tree.childrenscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git/gitattr`/Tree#children. = children
77
78 return tree, nil
79 }
80
81 func NewFromReaderscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git/gitattr`/NewFromReader().(mp *MacroProcessorscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git/gitattr`/MacroProcessor#, rdr ioscip-go gomod github.com/golang/go/src go1.25.0 io/.Readerscip-go gomod github.com/golang/go/src go1.25.0 io/Reader#) (*Treescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git/gitattr`/Tree#, error) {
82 lines, _, err := ParseLinesscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git/gitattr`/ParseLines().(rdr)
83 if err != nil {
84 return nil, err
85 }
86 return &Treescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git/gitattr`/Tree#{
87 mpscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git/gitattr`/Tree#mp.: mp,
88 linesscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git/gitattr`/Tree#lines.: lines,
89 }, nil
90 }
91
92 func (t *Treescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git/gitattr`/Tree#) FindSpecialAttributesscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git/gitattr`/Tree#FindSpecialAttributes().(gitEnv, osEnv Environmentscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git/gitattr`/Environment#, gitDir string) error {
93 systemPath, err := GetSystemAttributeFilePathscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git/gitattr`/GetSystemAttributeFilePath().(osEnv)
94 if err != nil {
95 return err
96 }
97
98 if len(systemPath) != 0 {
99 systemReader, err := osscip-go gomod github.com/golang/go/src go1.25.0 os/.Openscip-go gomod github.com/golang/go/src go1.25.0 os/Open().(systemPath)
100 if err != nil {
101 return err
102 }
103 defer systemReader.Closescip-go gomod github.com/golang/go/src go1.25.0 os/File#Close().()
104 t.systemAttributesscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git/gitattr`/Tree#systemAttributes., err = NewFromReaderscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git/gitattr`/NewFromReader().(t.mpscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git/gitattr`/Tree#mp., systemReader)
105
106 if err != nil {
107 return err
108 }
109 }
110
111 userPath, err := GetUserAttributeFilePathscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git/gitattr`/GetUserAttributeFilePath().(gitEnv)
112 if err != nil {
113 return err
114 }
115
116 if len(userPath) != 0 {
117 userReader, err := osscip-go gomod github.com/golang/go/src go1.25.0 os/.Openscip-go gomod github.com/golang/go/src go1.25.0 os/Open().(userPath)
118 if err != nil {
119 return err
120 }
121 defer userReader.Closescip-go gomod github.com/golang/go/src go1.25.0 os/File#Close().()
122 if t.userAttributesscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git/gitattr`/Tree#userAttributes., err = NewFromReaderscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git/gitattr`/NewFromReader().(t.mpscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git/gitattr`/Tree#mp., userReader); err != nil {
123 return err
124 }
125 }
126
127 repoPath, err := GetRepoAttributeFilePathscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git/gitattr`/GetRepoAttributeFilePath().(gitDir)
128 if err != nil {
129 return err
130 }
131
132 if len(repoPath) != 0 {
133 repoReader, err := osscip-go gomod github.com/golang/go/src go1.25.0 os/.Openscip-go gomod github.com/golang/go/src go1.25.0 os/Open().(repoPath)
134 if err != nil {
135 return err
136 }
137 defer repoReader.Closescip-go gomod github.com/golang/go/src go1.25.0 os/File#Close().()
138 t.repoAttributesscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git/gitattr`/Tree#repoAttributes., err = NewFromReaderscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git/gitattr`/NewFromReader().(t.mpscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git/gitattr`/Tree#mp., repoReader)
139 }
140
141 return err
142 }
143
144 // linesInTree parses a given tree's .gitattributes and returns a slice of lines
145 // in that .gitattributes, or an error. If no .gitattributes blob was found,
146 // return nil.
147 func linesInTreescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git/gitattr`/linesInTree().(db *gitobjscip-go gomod github.com/git-lfs/gitobj/v2 v2.1.1 `github.com/git-lfs/gitobj/v2`/.ObjectDatabasescip-go gomod github.com/git-lfs/gitobj/v2 v2.1.1 `github.com/git-lfs/gitobj/v2`/ObjectDatabase#, t *gitobjscip-go gomod github.com/git-lfs/gitobj/v2 v2.1.1 `github.com/git-lfs/gitobj/v2`/.Treescip-go gomod github.com/git-lfs/gitobj/v2 v2.1.1 `github.com/git-lfs/gitobj/v2`/Tree#, mp *MacroProcessorscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git/gitattr`/MacroProcessor#) (*Treescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git/gitattr`/Tree#, error) {
148 var at int = -1
149 for i, e := range t.Entriesscip-go gomod github.com/git-lfs/gitobj/v2 v2.1.1 `github.com/git-lfs/gitobj/v2`/Tree#Entries. {
150 if e.Namescip-go gomod github.com/git-lfs/gitobj/v2 v2.1.1 `github.com/git-lfs/gitobj/v2`/TreeEntry#Name. == ".gitattributes" {
151 if e.IsLinkscip-go gomod github.com/git-lfs/gitobj/v2 v2.1.1 `github.com/git-lfs/gitobj/v2`/TreeEntry#IsLink().() {
152 return nil, errorsscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/errors`/.Newscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/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().("expected '.gitattributes' to be a file, got a symbolic link"))
153 }
154 at = i
155 break
156 }
157 }
158
159 if at < 0 {
160 return &Treescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git/gitattr`/Tree#{mpscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git/gitattr`/Tree#mp.: mp}, nil
161 }
162
163 blob, err := db.Blobscip-go gomod github.com/git-lfs/gitobj/v2 v2.1.1 `github.com/git-lfs/gitobj/v2`/ObjectDatabase#Blob().(t.Entriesscip-go gomod github.com/git-lfs/gitobj/v2 v2.1.1 `github.com/git-lfs/gitobj/v2`/Tree#Entries.[at].Oidscip-go gomod github.com/git-lfs/gitobj/v2 v2.1.1 `github.com/git-lfs/gitobj/v2`/TreeEntry#Oid.)
164 if err != nil {
165 return nil, err
166 }
167 defer blob.Closescip-go gomod github.com/git-lfs/gitobj/v2 v2.1.1 `github.com/git-lfs/gitobj/v2`/Blob#Close().()
168
169 return NewFromReaderscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git/gitattr`/NewFromReader().(mp, blob.Contentsscip-go gomod github.com/git-lfs/gitobj/v2 v2.1.1 `github.com/git-lfs/gitobj/v2`/Blob#Contents.)
170 }
171
172 // Applied returns a slice of attributes applied to the given path, relative to
173 // the receiving tree. It traverse through sub-trees in a topological ordering,
174 // if there are relevant .gitattributes matching that path.
175 func (t *Treescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git/gitattr`/Tree#) Appliedscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git/gitattr`/Tree#Applied().(to string) []*Attrscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git/gitattr`/Attr# {
176 var attrs []*Attrscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git/gitattr`/Attr#
177 if !t.mpscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git/gitattr`/Tree#mp..didReadMacrosscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git/gitattr`/MacroProcessor#didReadMacros. {
178 if t.systemAttributesscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git/gitattr`/Tree#systemAttributes. != nil {
179 t.mpscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git/gitattr`/Tree#mp..ProcessMacrosscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git/gitattr`/MacroProcessor#ProcessMacros().(t.systemAttributesscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git/gitattr`/Tree#systemAttributes..linesscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git/gitattr`/Tree#lines.)
180 }
181 if t.userAttributesscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git/gitattr`/Tree#userAttributes. != nil {
182 t.mpscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git/gitattr`/Tree#mp..ProcessMacrosscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git/gitattr`/MacroProcessor#ProcessMacros().(t.userAttributesscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git/gitattr`/Tree#userAttributes..linesscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git/gitattr`/Tree#lines.)
183 }
184 t.mpscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git/gitattr`/Tree#mp..ProcessMacrosscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git/gitattr`/MacroProcessor#ProcessMacros().(t.linesscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git/gitattr`/Tree#lines.)
185
186 if t.repoAttributesscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git/gitattr`/Tree#repoAttributes. != nil {
187 t.mpscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git/gitattr`/Tree#mp..ProcessMacrosscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git/gitattr`/MacroProcessor#ProcessMacros().(t.repoAttributesscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git/gitattr`/Tree#repoAttributes..linesscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git/gitattr`/Tree#lines.)
188 }
189 }
190
191 if t.systemAttributesscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git/gitattr`/Tree#systemAttributes. != nil {
192 attrs = append(attrs, t.systemAttributesscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git/gitattr`/Tree#systemAttributes..appliedscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git/gitattr`/Tree#applied().(to)...)
193 }
194
195 if t.userAttributesscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git/gitattr`/Tree#userAttributes. != nil {
196 attrs = append(attrs, t.userAttributesscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git/gitattr`/Tree#userAttributes..appliedscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git/gitattr`/Tree#applied().(to)...)
197 }
198
199 attrs = append(attrs, t.appliedscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git/gitattr`/Tree#applied().(to)...)
200
201 if t.repoAttributesscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git/gitattr`/Tree#repoAttributes. != nil {
202 attrs = append(attrs, t.repoAttributesscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git/gitattr`/Tree#repoAttributes..appliedscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git/gitattr`/Tree#applied().(to)...)
203 }
204
205 return attrs
206 }
207
208 func (t *Treescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git/gitattr`/Tree#) appliedscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git/gitattr`/Tree#applied().(to string) []*Attrscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git/gitattr`/Attr# {
209 var attrs []*Attrscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git/gitattr`/Attr#
210
211 for _, line := range t.mpscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git/gitattr`/Tree#mp..ProcessLinesscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git/gitattr`/MacroProcessor#ProcessLines().(t.linesscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git/gitattr`/Tree#lines., false) {
212 if line.Patternscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git/gitattr`/PatternLine#Pattern.().Matchscip-go gomod github.com/git-lfs/wildmatch/v2 v2.0.1 `github.com/git-lfs/wildmatch/v2`/Wildmatch#Match().(to) {
213 attrs = append(attrs, line.Attrsscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git/gitattr`/Line#Attrs.()...)
214 }
215 }
216
217 dirPath, remainingPath, found := stringsscip-go gomod github.com/golang/go/src go1.25.0 strings/.Cutscip-go gomod github.com/golang/go/src go1.25.0 strings/Cut().(to, "/")
218 if found {
219 if child, ok := t.childrenscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git/gitattr`/Tree#children.[dirPath]; ok {
220 attrs = append(attrs, child.appliedscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git/gitattr`/Tree#applied().(remainingPath)...)
221 }
222 }
223
224 return attrs
225 }