summaryrefslogtreecommitdiff
path: root/git.h
diff options
context:
space:
mode:
authormrb0nk500 <b0nk@b0nk.xyz>2022-07-13 15:55:56 -0300
committermrb0nk500 <b0nk@b0nk.xyz>2022-07-13 16:04:31 -0300
commitb93ca4a3a70cad569e5ab8056923f90043b4b0e9 (patch)
tree6a4ca91072e80e5dd6ae241dd91d128256a0dcd0 /git.h
parente37c23faf8f010ad9c35a29179ddefb6d34f746b (diff)
git: Add index type
An index is a type of identifier that'll be used for identifying PR's. Indexes can either be named, or numbered, and can also contain another index within them, with each subsequent index being seperated by '-'s.
Diffstat (limited to 'git.h')
-rw-r--r--git.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/git.h b/git.h
index 351b92d..9671a18 100644
--- a/git.h
+++ b/git.h
@@ -7,6 +7,7 @@
typedef struct git_repo git_repo;
typedef struct pull_request pull_request;
+typedef struct index index;
typedef struct file file;
typedef struct comment comment;
typedef struct git_branch git_branch;
@@ -48,6 +49,15 @@ struct pull_request {
git_branch *merge_branch; /* Branch to merge pull request with. */
};
+struct index {
+ uint8_t type; /* Index type. (0 = Named index, 1 = Numbered index) */
+ union {
+ char *name; /* Named index. */
+ uint64_t num; /* Numbered index. */
+ };
+ index *next; /* Next index. */
+};
+
extern void cleanup_git(git_repository **repos);
extern git_repository **init_git(config *cfg);
extern int add_comment(comment *comment, const char *pr_root);