Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
builtin/fetch.c: use error_errno()
author
Nguyễn Thái Ngọc Duy
<pclouds@gmail.com>
Sun, 8 May 2016 09:47:26 +0000
(16:47 +0700)
committer
Junio C Hamano
<gitster@pobox.com>
Mon, 9 May 2016 19:29:08 +0000
(12:29 -0700)
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>
builtin/fetch.c
patch
|
blob
|
history
raw
|
patch
| inline |
side by side
(parent:
896ba1d
)
diff --git
a/builtin/fetch.c
b/builtin/fetch.c
index e4639d8eb1d5fda586520f10271c05a0897f2ea5..4227a40c67ae7fc653e57b049a9fd9e93ca4e3dd 100644
(file)
--- a/
builtin/fetch.c
+++ b/
builtin/fetch.c
@@
-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;
}