summaryrefslogtreecommitdiff
path: root/git.h
diff options
context:
space:
mode:
authormrb0nk500 <b0nk@b0nk.xyz>2021-06-15 20:31:53 -0400
committermrb0nk500 <b0nk@b0nk.xyz>2021-06-15 20:31:53 -0400
commita0e2fef0f164ac3da9f6fac7aea96b91ceb64fa1 (patch)
tree69fefdf14d2a84b04275718b1d60bf6280d0f5c5 /git.h
parent129fcfb0e8f955970c9f82a0fcabcb8c6f2a1a0a (diff)
Added the `git_branch` struct, and replaced all
instances of `git_reference` with it.
Diffstat (limited to 'git.h')
-rw-r--r--git.h10
1 files 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);