From 93f7c56d879d0a4075b833f561b7b99fab5bd07c Mon Sep 17 00:00:00 2001 From: mrb0nk500 Date: Fri, 5 Aug 2022 13:54:02 -0300 Subject: git: Don't check if `pr->branch->name` isn't empty in `create_pull_request_branch()` We don't need to do this anymore, since `dir_path_name()` now does that. --- git.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/git.c b/git.c index cbc72d0..a903495 100644 --- a/git.c +++ b/git.c @@ -605,9 +605,9 @@ int create_pull_request_branch(pull_request *pr, index_t *idx, git_repo *repo) { } else { /* Create the PR branch by just using the PR branch index. */ char *pr_branch = pr_branch_index; - /* Are we using a remote branch, and is the name of that branch non-empty? */ - if (pr->pr_type && !is_empty(pr->branch->name)) { - /* Append the branch name to the PR branch index. */ + /* Are we using a remote branch? */ + if (pr->pr_type) { + /* Append the branch name to the PR branch index, if it isn't empty. */ pr_branch = dir_path_name((const char *)pr_branch_index, pr->branch->name); /* Free the PR branch index */ free(pr_branch_index); -- cgit v1.2.3-13-gbd6f