summaryrefslogtreecommitdiff
path: root/builtin/merge.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2017-08-22 17:29:14 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-08-22 17:29:14 (GMT)
commite2a2a1daacb43d8296baf155ae6ea0ec6e2f2b8d (patch)
treecdeb97b55d8ffff4588948cabd31e9df135c3ba0 /builtin/merge.c
parent2d68161a230a6a713ac0f4ad68c51cc856e83338 (diff)
parentde3ce210edb4870b082fab18148f859d2b3c9ae2 (diff)
downloadgit-e2a2a1daacb43d8296baf155ae6ea0ec6e2f2b8d.zip
git-e2a2a1daacb43d8296baf155ae6ea0ec6e2f2b8d.tar.gz
git-e2a2a1daacb43d8296baf155ae6ea0ec6e2f2b8d.tar.bz2
Merge branch 'rs/merge-microcleanup'
Code clean-up. * rs/merge-microcleanup: merge: use skip_prefix()
Diffstat (limited to 'builtin/merge.c')
-rw-r--r--builtin/merge.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/builtin/merge.c b/builtin/merge.c
index e15f008..328945d 100644
--- a/builtin/merge.c
+++ b/builtin/merge.c
@@ -1117,8 +1117,8 @@ int cmd_merge(int argc, const char **argv, const char *prefix)
* current branch.
*/
branch = branch_to_free = resolve_refdup("HEAD", 0, head_oid.hash, NULL);
- if (branch && starts_with(branch, "refs/heads/"))
- branch += 11;
+ if (branch)
+ skip_prefix(branch, "refs/heads/", &branch);
if (!branch || is_null_oid(&head_oid))
head_commit = NULL;
else