1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-05-27 07:36:14 +02:00

builtin/fetch.c: use error_errno()

A couple of newlines are also removed, because both error() and
error_errno() automatically append a newline.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Nguyễn Thái Ngọc Duy 2016-05-08 16:47:26 +07:00 committed by Junio C Hamano
parent 896ba1d112
commit 6da31d7f75

View File

@ -607,7 +607,7 @@ static int store_updated_refs(const char *raw_url, const char *remote_name,
fp = fopen(filename, "a");
if (!fp)
return error(_("cannot open %s: %s\n"), filename, strerror(errno));
return error_errno(_("cannot open %s"), filename);
if (raw_url)
url = transport_anonymize_url(raw_url);
@ -848,7 +848,7 @@ static int truncate_fetch_head(void)
FILE *fp = fopen_for_writing(filename);
if (!fp)
return error(_("cannot open %s: %s\n"), filename, strerror(errno));
return error_errno(_("cannot open %s"), filename);
fclose(fp);
return 0;
}