From a0e2fef0f164ac3da9f6fac7aea96b91ceb64fa1 Mon Sep 17 00:00:00 2001 From: mrb0nk500 Date: Tue, 15 Jun 2021 20:31:53 -0400 Subject: Added the `git_branch` struct, and replaced all instances of `git_reference` with it. --- git.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/git.h b/git.h index 26cf8eb..aa64fff 100644 --- a/git.h +++ b/git.h @@ -8,6 +8,7 @@ typedef struct git_repo git_repo; typedef struct pull_request pull_request; typedef struct file file; typedef struct comment comment; +typedef struct git_branch git_branch; struct git_repo { git_repo *next; @@ -25,6 +26,11 @@ struct comment { int date; /* Date of creation. */ }; +struct git_branch { + char *name; /* Name of branch. */ + char *repo; /* Path, or URL to local, or remote repository. */ +}; + struct pull_request { char *title; /* Title of the pull request. */ char *desc; /* Description of the pull request. */ @@ -34,9 +40,9 @@ struct pull_request { uint8_t pr_type; /* Type of pull request. (0 = individual commit patches, 1 = remote branch) */ union { file **patches; /* Patch files of pull request. */ - git_reference *branch; /* Branch of pull request. */ + git_branch *branch; /* Branch of pull request. */ }; - git_reference *merge_branch; /* Branch to merge pull request with. */ + git_branch *merge_branch; /* Branch to merge pull request with. */ }; extern void cleanup_git(git_repository **repos); -- cgit v1.2.3-13-gbd6f