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:
parent
8f9e3e498c
commit
6379dd0522
@ -27,13 +27,8 @@ int cmd_upload_archive_writer(int argc, const char **argv, const char *prefix)
|
|||||||
if (argc != 2)
|
if (argc != 2)
|
||||||
usage(upload_archive_usage);
|
usage(upload_archive_usage);
|
||||||
|
|
||||||
if (strlen(argv[1]) + 1 > sizeof(buf))
|
if (!enter_repo(argv[1], 0))
|
||||||
die("insanely long repository name");
|
die("'%s' does not appear to be a git repository", argv[1]);
|
||||||
|
|
||||||
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);
|
|
||||||
|
|
||||||
/* put received options in sent_argv[] */
|
/* put received options in sent_argv[] */
|
||||||
sent_argc = 1;
|
sent_argc = 1;
|
||||||
|
Loading…
Reference in New Issue
Block a user