summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2010-06-16 16:36:56 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2010-06-16 16:36:56 -0700
commit7223dcafddb073d41e6a2017706cbd935c11e756 (patch)
tree221683f49c81f159b560574d5011003e1faae3d0
parentt5516-fetch-push.sh: style cleanup (diff)
parentcheck_aliased_update: strcpy() instead of strcat() to copy (diff)
downloadtgif-7223dcafddb073d41e6a2017706cbd935c11e756.tar.xz
Merge branch 'tr/receive-pack-aliased-update-fix' into js/maint-receive-pack-symref-alias
* tr/receive-pack-aliased-update-fix: check_aliased_update: strcpy() instead of strcat() to copy
-rw-r--r--builtin-receive-pack.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/builtin-receive-pack.c b/builtin-receive-pack.c
index bb34757d27..7e4129ddc8 100644
--- a/builtin-receive-pack.c
+++ b/builtin-receive-pack.c
@@ -515,9 +515,9 @@ static void check_aliased_update(struct command *cmd, struct string_list *list)
dst_cmd->skip_update = 1;
strcpy(cmd_oldh, find_unique_abbrev(cmd->old_sha1, DEFAULT_ABBREV));
- strcat(cmd_newh, find_unique_abbrev(cmd->new_sha1, DEFAULT_ABBREV));
+ strcpy(cmd_newh, find_unique_abbrev(cmd->new_sha1, DEFAULT_ABBREV));
strcpy(dst_oldh, find_unique_abbrev(dst_cmd->old_sha1, DEFAULT_ABBREV));
- strcat(dst_newh, find_unique_abbrev(dst_cmd->new_sha1, DEFAULT_ABBREV));
+ strcpy(dst_newh, find_unique_abbrev(dst_cmd->new_sha1, DEFAULT_ABBREV));
rp_error("refusing inconsistent update between symref '%s' (%s..%s) and"
" its target '%s' (%s..%s)",
cmd->ref_name, cmd_oldh, cmd_newh,