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>

Jeff King committed Feb 20, 2013 at 15:00 UTC 6379dd052243aa6b1cc5115b72b78aedbeeed008
1 file changed +2 -7
builtin/upload-archive.c
+2 -7
@@ -27,13 +27,8 @@ int cmd_upload_archive_writer(int argc, const char **argv, const char *prefix)
27 if (argc != 2)
28 usage(upload_archive_usage);
29
30 - if (strlen(argv[1]) + 1 > sizeof(buf))
31 - die("insanely long repository name");
32 -
33 - strcpy(buf, argv[1]); /* enter-repo smudges its argument */
34 -
35 - if (!enter_repo(buf, 0))
36 - die("'%s' does not appear to be a git repository", buf);
30 + if (!enter_repo(argv[1], 0))
31 + die("'%s' does not appear to be a git repository", argv[1]);
32
33 /* put received options in sent_argv[] */
34 sent_argc = 1;