X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=builtin-archive.c;h=f9a4bea41e95b9a34f190fc2b696c7394d0e0971;hb=6821dee9a91131e1a003ee65b2f4218a19ea8f3d;hp=ab50cebba0e6798996cc007ced9079c3f0b94a29;hpb=75b44066f3ed7cde238cdea1f0bf9e2f1744c820;p=git.git diff --git a/builtin-archive.c b/builtin-archive.c index ab50cebba..f9a4bea41 100644 --- a/builtin-archive.c +++ b/builtin-archive.c @@ -13,10 +13,10 @@ static void create_output_file(const char *output_file) { int output_fd = open(output_file, O_CREAT | O_WRONLY | O_TRUNC, 0666); if (output_fd < 0) - die("could not create archive file: %s ", output_file); + die_errno("could not create archive file '%s'", output_file); if (output_fd != 1) { if (dup2(output_fd, 1) < 0) - die("could not redirect output"); + die_errno("could not redirect output"); else close(output_fd); } @@ -80,7 +80,8 @@ int cmd_archive(int argc, const char **argv, const char *prefix) OPT_END() }; - argc = parse_options(argc, argv, local_opts, NULL, PARSE_OPT_KEEP_ALL); + argc = parse_options(argc, argv, prefix, local_opts, NULL, + PARSE_OPT_KEEP_ALL); if (output) create_output_file(output);