diff --git a/builtin-clone.c b/builtin-clone.c
index c935833c6ce176caf47a14b5ad1f2848f0d1ab22..5f34414ff712afe288105ba06b7281fd649189d0 100644 (file)
--- a/builtin-clone.c
+++ b/builtin-clone.c
}
if (unlink(dest->buf) && errno != ENOENT)
}
if (unlink(dest->buf) && errno != ENOENT)
- die("failed to unlink %s: %s",
- dest->buf, strerror(errno));
+ die_errno("failed to unlink '%s'", dest->buf);
if (!option_no_hardlinks) {
if (!link(src->buf, dest->buf))
continue;
if (!option_no_hardlinks) {
if (!link(src->buf, dest->buf))
continue;
junk_pid = getpid();
junk_pid = getpid();
- argc = parse_options(argc, argv, builtin_clone_options,
+ argc = parse_options(argc, argv, prefix, builtin_clone_options,
builtin_clone_usage, 0);
if (argc == 0)
builtin_clone_usage, 0);
if (argc == 0)
if (!option_bare) {
junk_work_tree = work_tree;
if (safe_create_leading_directories_const(work_tree) < 0)
if (!option_bare) {
junk_work_tree = work_tree;
if (safe_create_leading_directories_const(work_tree) < 0)
- die("could not create leading directories of '%s': %s",
- work_tree, strerror(errno));
+ die_errno("could not create leading directories of '%s'",
+ work_tree);
if (!dest_exists && mkdir(work_tree, 0755))
if (!dest_exists && mkdir(work_tree, 0755))
- die("could not create work tree dir '%s': %s.",
- work_tree, strerror(errno));
+ die_errno("could not create work tree dir '%s'.",
+ work_tree);
set_git_work_tree(work_tree);
}
junk_git_dir = git_dir;
set_git_work_tree(work_tree);
}
junk_git_dir = git_dir;