summaryrefslogtreecommitdiff
path: root/git.c
diff options
context:
space:
mode:
Diffstat (limited to 'git.c')
-rw-r--r--git.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/git.c b/git.c
index 0f0c802..003d9b6 100644
--- a/git.c
+++ b/git.c
@@ -166,6 +166,21 @@ static linked_list *parse_dsv_str(const char *str, const char *delm) {
return tail;
}
+int parse_remote_branch(void *ctx, void *ret, const keyword *key, keyword_val val) {
+ if (key->type != TYPE_STRING) {
+ if (key->offsets[0] == offsetof(pull_request, branch)) {
+ if (key->offsets[1] == offsetof(git_branch, name) || key->offsets[1] == offsetof(git_branch, repo)) {
+ pull_request *pr = (pull_request *)ret;
+ if (pr->branch == NULL) {
+ pr->branch = calloc(1, sizeof(git_branch));
+ }
+ return 0;
+ }
+ }
+ }
+ return -1;
+}
+
int parse_patch_list(void *ctx, void *ret, const keyword *key, keyword_val val) {
/* Do we actually have a "patches" keyword? */
if (key->type == TYPE_STRING) {