зеркало из https://github.com/microsoft/git.git
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:
Родитель
8f9e3e498c
Коммит
6379dd0522
|
@ -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;
|
||||
|
|
Загрузка…
Ссылка в новой задаче