diff options
| author | czjstmax <jstmaxlol@disroot.org> | 2025-11-22 17:40:50 +0100 |
|---|---|---|
| committer | czjstmax <jstmaxlol@disroot.org> | 2025-11-22 17:40:50 +0100 |
| commit | d883c838a77a430ada17e2e199ba5172dc4b5b35 (patch) | |
| tree | a953ca74331b3498b3fffbd2b2e4097151e9028d /g.c | |
| parent | bbebaed4e18196326e3541ef9bf683d7dc26e687 (diff) | |
test
Diffstat (limited to 'g.c')
| -rw-r--r-- | g.c | 33 |
1 files changed, 19 insertions, 14 deletions
@@ -387,21 +387,26 @@ int main(int argc, char **argv) { } } else if (matches(strn1, commit_vars) == 0) { if (strlen(strn2) == 0) { - // + system("git commit"); + return 0; } else if (strlen(strn2) > 0) { - // - } - if (matches(strn2, message_vars) == 0) { - if (strlen(strn3) == 0) { - // - } else if (strlen(strn3) > 0) { - // - } - } else if (matches(strn2, add_vars) == 0) { - if (strlen(strn3) == 0) { - // - } else if (strlen(strn3) > 0) { - // + if (matches(strn2, message_vars) == 0) { + if (strlen(strn3) == 0) { + // + } else if (strlen(strn3) > 0) { + char command_buffer[8192] = "git commit -m \""; + char command_buffer_post[] = "\""; + strcat(command_buffer, strn3); // git commit -m "msg + strcat(command_buffer, command_buffer_post); + system(command_buffer); // git commit -m "msg" + return 0; + } + } else if (matches(strn2, add_vars) == 0) { + if (strlen(strn3) == 0) { + // + } else if (strlen(strn3) > 0) { + // + } } } } |