skip comments in .gitignore download

fixes #16
This commit is contained in:
maia arson crimew 2022-12-19 19:39:44 +01:00
parent 51f64086f6
commit bd382f5c51
1 changed files with 1 additions and 1 deletions

View File

@ -583,7 +583,7 @@ func fetchIgnored(baseDir, baseUrl string) error {
line := strings.TrimSpace(scanner.Text())
commentStrip := strings.SplitN(line, "#", 1)
line = commentStrip[0]
if line == "" || strings.HasPrefix(line, "!") || strings.HasSuffix(line, "/") || strings.ContainsRune(line, '*') || strings.HasSuffix(line, ".php") {
if line == "" || strings.HasPrefix(line, "!") || strings.HasSuffix(line, "/") || strings.ContainsRune(line, '*') || strings.HasSuffix(line, ".php") || strings.HasPrefix(line, "#") {
continue
}
jt.AddJob(line)