diff options
Diffstat (limited to 'git.c')
-rw-r--r-- | git.c | 17 |
1 files changed, 17 insertions, 0 deletions
@@ -64,6 +64,23 @@ void cleanup_git(git_repository **repos) { git_libgit2_shutdown(); } +void free_file(file *file) { + if (file->name != NULL) { + free(file->name); + } + if (file->buf != NULL) { + free(file->buf); + } +} + +void free_files(file **files) { + for (int i = 0; files[i] != NULL; i++) { + free_file(files[i]); + files[i] = NULL; + } + free(files); +} + pull_request *get_pull_request(int id, const char *root) { } |