diff options
Diffstat (limited to 'git.c')
-rw-r--r-- | git.c | 15 |
1 files changed, 15 insertions, 0 deletions
@@ -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) { |