From abba51f80a0c86684d4e7baf30b16c80fe0820ef Mon Sep 17 00:00:00 2001 From: mrb0nk500 Date: Fri, 25 Jun 2021 22:16:17 -0400 Subject: Added some more log messages in `create_pull_request_dir()`. --- git.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/git.c b/git.c index 1f8eefc..9632d21 100644 --- a/git.c +++ b/git.c @@ -156,16 +156,19 @@ int create_pull_request_dir(pull_request *pr, int id, const char *root) { if (access(commits[i]->name, F_OK) == 0) { long size = 0; char *buf = read_file(commits[i]->name, &size); + log(LOG_NOTICE, "Patch file %s already exists.", commits[i]->name); /* Did we read the file? */ if (buf != NULL) { /* Are the contents of the patch file the same? */ if (strcmp(commits[i]->buf, buf) == 0) { /* Skip creating this patch file. */ + log(LOG_NOTICE, "Patch file %s is the same as the new one.", commits[i]->name); free(buf); continue; } free(buf); } else { + log(LOG_WARNING, "Couldn't open patch file %s.", commits[i]->name); continue; } } -- cgit v1.2.3-13-gbd6f