Fix refname termination.
When a new ref is being pushed, the name of it was not terminated properly. Signed-off-by: Junio C Hamano <junkio@cox.net>
This commit is contained in:
parent
b32e986cd7
commit
4fa1604f10
@ -169,7 +169,7 @@ static int match_explicit_refs(struct ref *src, struct ref *dst,
|
||||
/* pushing "master:master" when
|
||||
* remote does not have master yet.
|
||||
*/
|
||||
int len = strlen(matched_src->name);
|
||||
int len = strlen(matched_src->name) + 1;
|
||||
matched_dst = xcalloc(1, sizeof(*dst) + len);
|
||||
memcpy(matched_dst->name, matched_src->name,
|
||||
len);
|
||||
|
Loading…
Reference in New Issue
Block a user