summaryrefslogtreecommitdiff
path: root/g.c
diff options
context:
space:
mode:
authorczjstmax <jstmaxlol@disroot.org>2025-11-22 17:40:50 +0100
committerczjstmax <jstmaxlol@disroot.org>2025-11-22 17:40:50 +0100
commitd883c838a77a430ada17e2e199ba5172dc4b5b35 (patch)
treea953ca74331b3498b3fffbd2b2e4097151e9028d /g.c
parentbbebaed4e18196326e3541ef9bf683d7dc26e687 (diff)
test
Diffstat (limited to 'g.c')
-rw-r--r--g.c33
1 files changed, 19 insertions, 14 deletions
diff --git a/g.c b/g.c
index 0727d28..e00aa49 100644
--- a/g.c
+++ b/g.c
@@ -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) {
+ //
+ }
}
}
}