The watchgit works but I don't think I really need libgit2 at all if I can just process the .gitignore correctly.

This commit is contained in:
Zed A. Shaw 2024-08-01 18:30:29 -04:00
parent 899e481c9d
commit f1ee5e82f4
3 changed files with 9 additions and 8 deletions

View file

@ -7,12 +7,13 @@ using namespace std;
int main(int argc, char *argv[]) {
smatch matches;
regex to_test(argv[1]);
string line(argv[2]);
if(argc != 3) {
println("USAGE: regtest <regex> <line>");
} else {
regex to_test(argv[1]);
string line(argv[2]);
if(regex_match(line, matches, to_test)) {
println("MATCHED: ");