remove trailing LF in die() messages
LF at the end of format strings given to die() is redundant because die already adds one on its own. Signed-off-by: Alexander Potashev <aspotashev@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
e89e2ed7c2
commit
d75307084d
@ -192,15 +192,15 @@ static void copy_or_link_directory(struct strbuf *src, struct strbuf *dest)
|
||||
|
||||
dir = opendir(src->buf);
|
||||
if (!dir)
|
||||
die("failed to open %s\n", src->buf);
|
||||
die("failed to open %s", src->buf);
|
||||
|
||||
if (mkdir(dest->buf, 0777)) {
|
||||
if (errno != EEXIST)
|
||||
die("failed to create directory %s\n", dest->buf);
|
||||
die("failed to create directory %s", dest->buf);
|
||||
else if (stat(dest->buf, &buf))
|
||||
die("failed to stat %s\n", dest->buf);
|
||||
die("failed to stat %s", dest->buf);
|
||||
else if (!S_ISDIR(buf.st_mode))
|
||||
die("%s exists and is not a directory\n", dest->buf);
|
||||
die("%s exists and is not a directory", dest->buf);
|
||||
}
|
||||
|
||||
strbuf_addch(src, '/');
|
||||
@ -224,16 +224,16 @@ static void copy_or_link_directory(struct strbuf *src, struct strbuf *dest)
|
||||
}
|
||||
|
||||
if (unlink(dest->buf) && errno != ENOENT)
|
||||
die("failed to unlink %s\n", dest->buf);
|
||||
die("failed to unlink %s", dest->buf);
|
||||
if (!option_no_hardlinks) {
|
||||
if (!link(src->buf, dest->buf))
|
||||
continue;
|
||||
if (option_local)
|
||||
die("failed to create link %s\n", dest->buf);
|
||||
die("failed to create link %s", dest->buf);
|
||||
option_no_hardlinks = 1;
|
||||
}
|
||||
if (copy_file(dest->buf, src->buf, 0666))
|
||||
die("failed to copy file to %s\n", dest->buf);
|
||||
die("failed to copy file to %s", dest->buf);
|
||||
}
|
||||
closedir(dir);
|
||||
}
|
||||
|
Reference in New Issue
Block a user