Skip to content

Commit afa6608

Browse files
committed
Merge branch 'rs/merge-microcleanup' into maint
Code clean-up. * rs/merge-microcleanup: merge: use skip_prefix()
2 parents c580ce1 + de3ce21 commit afa6608

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

builtin/merge.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1126,8 +1126,8 @@ int cmd_merge(int argc, const char **argv, const char *prefix)
11261126
* current branch.
11271127
*/
11281128
branch = branch_to_free = resolve_refdup("HEAD", 0, head_oid.hash, NULL);
1129-
if (branch && starts_with(branch, "refs/heads/"))
1130-
branch += 11;
1129+
if (branch)
1130+
skip_prefix(branch, "refs/heads/", &branch);
11311131
if (!branch || is_null_oid(&head_oid))
11321132
head_commit = NULL;
11331133
else

0 commit comments

Comments
 (0)