summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2017-09-10 17:03:02 +0900
committerJunio C Hamano <gitster@pobox.com>2017-09-10 17:03:02 +0900
commitafa6608b930b722dbf93dfc44f4cc225862d33ed (patch)
tree311805d7eba49ea7f480134aee0d1b78b9fbe524
parentc580ce194fc1a62b676190a3300fde4c6ba58380 (diff)
parentde3ce210edb4870b082fab18148f859d2b3c9ae2 (diff)
downloadgit-afa6608b930b722dbf93dfc44f4cc225862d33ed.tar.gz
Merge branch 'rs/merge-microcleanup' into maint
Code clean-up. * rs/merge-microcleanup: merge: use skip_prefix()
-rw-r--r--builtin/merge.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/builtin/merge.c b/builtin/merge.c
index 6150571a56..23c53a3082 100644
--- a/builtin/merge.c
+++ b/builtin/merge.c
@@ -1126,8 +1126,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