Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Attr ¶
type Attr struct { // K is the name of the attribute. It is commonly, "filter", "diff", // "merge", or "text". // // It will never contain the special "false" shorthand ("-"), or the // unspecify declarative ("!"). K string // V is the value held by that attribute. It is commonly "lfs", or // "false", indicating the special value given by a "-"-prefixed name. V string // Unspecified indicates whether or not this attribute was explicitly // unset by prefixing the keyname with "!". Unspecified bool }
Attr is a single attribute that may be applied to a file.
type MacroProcessor ¶
type MacroProcessor struct {
// contains filtered or unexported fields
}
func NewMacroProcessor ¶
func NewMacroProcessor() *MacroProcessor
NewMacroProcessor returns a new MacroProcessor object for parsing macros.
func (*MacroProcessor) ProcessLines ¶
func (mp *MacroProcessor) ProcessLines(lines []Line, readMacros bool) []PatternLine
ProcessLines reads the specified lines, returning a new set of lines which all have a valid pattern. If readMacros is true, it additionally loads any macro lines as it reads them.
type PatternLine ¶ added in v3.4.0
type PatternLine interface { Pattern() *wildmatch.Wildmatch Line }
type Tree ¶
type Tree struct { // Lines are the lines of the .gitattributes at this level of the tree. Lines []Line // Children are the named child directories in the repository. Children map[string]*Tree }
Tree represents the .gitattributes file at one layer of the tree in a Git repository.
Click to show internal directories.
Click to hide internal directories.