upload-archive: do not copy repo name

According to the comment, enter_repo will modify its input.
However, this has not been the case since 1c64b48
(enter_repo: do not modify input, 2011-10-04). Drop the
now-useless copy.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Jeff King 2013-02-20 15:00:59 -05:00 коммит произвёл Junio C Hamano
Родитель 8f9e3e498c
Коммит 6379dd0522
1 изменённых файлов: 2 добавлений и 7 удалений

Просмотреть файл

@ -27,13 +27,8 @@ int cmd_upload_archive_writer(int argc, const char **argv, const char *prefix)
if (argc != 2)
usage(upload_archive_usage);
if (strlen(argv[1]) + 1 > sizeof(buf))
die("insanely long repository name");
strcpy(buf, argv[1]); /* enter-repo smudges its argument */
if (!enter_repo(buf, 0))
die("'%s' does not appear to be a git repository", buf);
if (!enter_repo(argv[1], 0))
die("'%s' does not appear to be a git repository", argv[1]);
/* put received options in sent_argv[] */
sent_argc = 1;