Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
Merge branch 'rs/merge-microcleanup' into next
author
Junio C Hamano
<gitster@pobox.com>
Fri, 18 Aug 2017 20:53:00 +0000
(13:53 -0700)
committer
Junio C Hamano
<gitster@pobox.com>
Fri, 18 Aug 2017 20:53:00 +0000
(13:53 -0700)
Code clean-up.
* rs/merge-microcleanup:
merge: use skip_prefix()
builtin/merge.c
patch
|
blob
|
history
raw
(from parent 1:
77e3d11
)
diff --git
a/builtin/merge.c
b/builtin/merge.c
index e15f00895043081441ed3a64128515d6a7251e22..328945d6093aae40410b0c437a21c588ac6d6692 100644
(file)
--- 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