Merge branch 'rs/merge-microcleanup' into maint

Code clean-up.

* rs/merge-microcleanup:
  merge: use skip_prefix()
maint
Junio C Hamano 2017-09-10 17:03:02 +09:00
commit afa6608b93
1 changed files with 2 additions and 2 deletions

View File

@ -1126,8 +1126,8 @@ int cmd_merge(int argc, const char **argv, const char *prefix)
* current branch. * current branch.
*/ */
branch = branch_to_free = resolve_refdup("HEAD", 0, head_oid.hash, NULL); branch = branch_to_free = resolve_refdup("HEAD", 0, head_oid.hash, NULL);
if (branch && starts_with(branch, "refs/heads/")) if (branch)
branch += 11; skip_prefix(branch, "refs/heads/", &branch);
if (!branch || is_null_oid(&head_oid)) if (!branch || is_null_oid(&head_oid))
head_commit = NULL; head_commit = NULL;
else else