summaryrefslogtreecommitdiff
path: root/builtin/upload-archive.c
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2013-02-20 20:00:59 (GMT)
committerJunio C Hamano <gitster@pobox.com>2013-02-20 21:42:21 (GMT)
commit6379dd052243aa6b1cc5115b72b78aedbeeed008 (patch)
tree134401d6a7b7f974b95709275bbd44a2fefb4406 /builtin/upload-archive.c
parent8f9e3e498c113e987c2b8662485db5461cad1c36 (diff)
downloadgit-6379dd052243aa6b1cc5115b72b78aedbeeed008.zip
git-6379dd052243aa6b1cc5115b72b78aedbeeed008.tar.gz
git-6379dd052243aa6b1cc5115b72b78aedbeeed008.tar.bz2
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>
Diffstat (limited to 'builtin/upload-archive.c')
-rw-r--r--builtin/upload-archive.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/builtin/upload-archive.c b/builtin/upload-archive.c
index b928beb..c3d134e 100644
--- a/builtin/upload-archive.c
+++ b/builtin/upload-archive.c
@@ -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;