Skip to content

Commit e2a2a1d

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

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
@@ -1117,8 +1117,8 @@ int cmd_merge(int argc, const char **argv, const char *prefix)
11171117
* current branch.
11181118
*/
11191119
branch = branch_to_free = resolve_refdup("HEAD", 0, head_oid.hash, NULL);
1120-
if (branch && starts_with(branch, "refs/heads/"))
1121-
branch += 11;
1120+
if (branch)
1121+
skip_prefix(branch, "refs/heads/", &branch);
11221122
if (!branch || is_null_oid(&head_oid))
11231123
head_commit = NULL;
11241124
else

0 commit comments

Comments
 (0)