You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/mcl/src/src/mcl/commands/dev_commit.d
+11-12Lines changed: 11 additions & 12 deletions
Original file line number
Diff line number
Diff line change
@@ -35,12 +35,15 @@ bool inGitIgnore(string file)
35
35
{
36
36
foreach (string line; gitIgnore)
37
37
{
38
-
writeln("Comparing: "~ file ~" with "~ line);
39
-
if (line.startsWith("#") || line =="")
40
-
continue;
41
-
elseif (globMatch(file, line))
38
+
if (file.strip ==".direnv")
39
+
writeln("file: ", file, " line: ", line);
40
+
if (file.strip == line.strip)
42
41
returntrue;
43
-
elseif (file.startsWith(line.strip ~"/"))
42
+
elseif (file.strip == (line.strip ~"/"))
43
+
returntrue;
44
+
elseif (globMatch(file.strip, line.strip))
45
+
returntrue;
46
+
elseif (globMatch(file.strip, line.strip ~"/**"))
44
47
returntrue;
45
48
}
46
49
returnfalse;
@@ -51,11 +54,9 @@ void initGitDiff()
51
54
// auto status = execute("git diff --name-only -- cached", false).split("\n");
52
55
auto status = dirEntries("", SpanMode.depth).map!(a => a.name.strip).array
53
56
.filter!(a =>
57
+
!inGitIgnore(a) &&
54
58
!a.startsWith("node_modules") &&
55
-
!a.startsWith(".direnv") &&
56
59
!a.startsWith("vendor") &&
57
-
!a.startsWith("result") &&
58
-
!a.startsWith(".result") &&
59
60
!a.startsWith("dist") &&
60
61
!a.startsWith(".yarn/") &&
61
62
!a.startsWith(".git/") &&
@@ -70,8 +71,7 @@ void initGitDiff()
70
71
!(a =="libs") &&
71
72
!(a =="modules") &&
72
73
!(a =="services")&&
73
-
!(a ==".git") &&
74
-
!inGitIgnore(a)
74
+
!(a ==".git")
75
75
).array;
76
76
if (status.length)
77
77
{
@@ -132,9 +132,8 @@ string[] getAuthors()
132
132
133
133
export voiddev_commit()
134
134
{
135
-
writeln("It's Supercalifragilisticexpialidocious! Even though the sound of it is something quite atrocious! If you say it loud enough, you'll always sound precocious! Supercalifragilisticexpialidocious!");
0 commit comments