Commits

Anonymous committed 5f7b338 Merge

Merge branch 'fg/maint-exclude-bq' into maint

* fg/maint-exclude-bq:
Support "\" in non-wildcard exclusion entries

Comments (0)

Files changed (2)

 
 static int no_wildcard(const char *string)
 {
-	return string[strcspn(string, "*?[{")] == '\0';
+	return string[strcspn(string, "*?[{\\")] == '\0';
 }
 
 void add_exclude(const char *string, const char *base,

t/t3001-ls-files-others-exclude.sh

     >$dir/a.$i
   done
 done
+>"#ignore1"
+>"#ignore2"
+>"#hidden"
 
 cat >expect <<EOF
 a.2
 EOF
 
 echo '.gitignore
+\#ignore1
+\#ignore2*
+\#hid*n
 output
 expect
 .gitignore
        >output &&
      test_cmp expect output'
 
-cat > excludes-file << EOF
+cat > excludes-file <<\EOF
 *.[1-8]
 e*
+\#*
 EOF
 
 git config core.excludesFile excludes-file