summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormrb0nk500 <b0nk@b0nk.xyz>2022-08-05 13:54:02 -0300
committermrb0nk500 <b0nk@b0nk.xyz>2022-08-05 13:54:02 -0300
commit93f7c56d879d0a4075b833f561b7b99fab5bd07c (patch)
treeae0f14f95f7264f07b6b70e30ff2a001e55a65b6
parentada68736474b42bffe5d8b4b2b2a4d67c738f95c (diff)
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.
-rw-r--r--git.c6
1 files 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);