diff options
author | Junio C Hamano <gitster@pobox.com> | 2017-08-22 10:29:14 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-08-22 10:29:14 -0700 |
commit | e2a2a1daacb43d8296baf155ae6ea0ec6e2f2b8d (patch) | |
tree | cdeb97b55d8ffff4588948cabd31e9df135c3ba0 | |
parent | 2d68161a230a6a713ac0f4ad68c51cc856e83338 (diff) | |
parent | de3ce210edb4870b082fab18148f859d2b3c9ae2 (diff) | |
download | git-e2a2a1daacb43d8296baf155ae6ea0ec6e2f2b8d.tar.gz |
Merge branch 'rs/merge-microcleanup'
Code clean-up.
* rs/merge-microcleanup:
merge: use skip_prefix()
-rw-r--r-- | builtin/merge.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/builtin/merge.c b/builtin/merge.c index e15f008950..328945d609 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 |