diff options
Diffstat (limited to 'git.c')
-rw-r--r-- | git.c | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -576,6 +576,17 @@ file **get_branch_commits(git_branch *br) { return NULL; } +git_repo *get_repo(git_repo **repos, const char *name) { + if (!is_empty(name)) { + for (int i = 0; repos[i] != NULL; ++i) { + if (!is_empty(repos[i]->name) && !strcmp(repos[i]->name, name)) { + return repos[i]; + } + } + } + return NULL; +} + int create_pull_request_dir(pull_request *pr, index_t *idx, const char *root, const char *repo) { int ret = 0; struct stat st; |