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

Function NewMacroProcessor

git/gitattr/macro.go:8–21  ·  view source on GitHub ↗

NewMacroProcessor returns a new MacroProcessor object for parsing macros.

()

Source from the content-addressed store, hash-verified

6
7// NewMacroProcessor returns a new MacroProcessor object for parsing macros.
8func NewMacroProcessor() *MacroProcessor {
9 macros := make(map[string][]*Attr)
10
11 // This is built into Git.
12 macros["binary"] = []*Attr{
13 &Attr{K: "diff", V: "false"},
14 &Attr{K: "merge", V: "false"},
15 &Attr{K: "text", V: "false"},
16 }
17
18 return &MacroProcessor{
19 macros: macros,
20 }
21}
22
23// ProcessLines reads the specified lines, returning a new set of lines which
24// all have a valid pattern. If readMacros is true, it additionally loads any

Calls

no outgoing calls