Add #include directive to .stignore (fixes #424)
Though breaks #502 in a way, as .stignore is not the only place where stuff gets defined anymore. Though it never was, as .stignore can be placed in each dir, but I think we should phase that out in favor of globbing which means that we can then have a single file, which means that we can have a UI for editing that. Alternative would be as suggested to include a .stglobalignore which is then synced as a normal file, but gets included by default. Then when the UI would have two editors, a local ignore, and a global ignore.
This commit is contained in:
@@ -128,20 +128,20 @@ func TestIgnore(t *testing.T) {
|
||||
*/other/test
|
||||
**/deep
|
||||
`)
|
||||
patterns := parseIgnoreFile(patStr, "")
|
||||
patterns := parseIgnoreFile(patStr, "", "")
|
||||
|
||||
patStr = bytes.NewBufferString(`
|
||||
bar
|
||||
z*
|
||||
q[abc]x
|
||||
`)
|
||||
patterns = append(patterns, parseIgnoreFile(patStr, "foo")...)
|
||||
patterns = append(patterns, parseIgnoreFile(patStr, "foo", "")...)
|
||||
|
||||
patStr = bytes.NewBufferString(`
|
||||
quux
|
||||
.*
|
||||
`)
|
||||
patterns = append(patterns, parseIgnoreFile(patStr, "foo/baz")...)
|
||||
patterns = append(patterns, parseIgnoreFile(patStr, "foo/baz", "")...)
|
||||
|
||||
var tests = []struct {
|
||||
f string
|
||||
|
||||
Reference in New Issue
Block a user