summaryrefslogtreecommitdiff
path: root/unpack-trees.c
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2016-05-08 09:47:58 (GMT)
committerJunio C Hamano <gitster@pobox.com>2016-05-09 19:29:08 (GMT)
commit43c728e2c2fe81cf401f39a60ab167a9ed542428 (patch)
treea889771dd039cbfd6f696a65aa041f1c0d5c312f /unpack-trees.c
parent1fee1dce711327811956bd78ad1f7270a3e2d824 (diff)
downloadgit-43c728e2c2fe81cf401f39a60ab167a9ed542428.zip
git-43c728e2c2fe81cf401f39a60ab167a9ed542428.tar.gz
git-43c728e2c2fe81cf401f39a60ab167a9ed542428.tar.bz2
unpack-trees.c: use error_errno()
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'unpack-trees.c')
-rw-r--r--unpack-trees.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/unpack-trees.c b/unpack-trees.c
index 9f55cc2..bb0d142 100644
--- a/unpack-trees.c
+++ b/unpack-trees.c
@@ -1499,8 +1499,7 @@ static int verify_absent_1(const struct cache_entry *ce,
path = xmemdupz(ce->name, len);
if (lstat(path, &st))
- ret = error("cannot stat '%s': %s", path,
- strerror(errno));
+ ret = error_errno("cannot stat '%s'", path);
else
ret = check_ok_to_remove(path, len, DT_UNKNOWN, NULL,
&st, error_type, o);
@@ -1508,8 +1507,7 @@ static int verify_absent_1(const struct cache_entry *ce,
return ret;
} else if (lstat(ce->name, &st)) {
if (errno != ENOENT)
- return error("cannot stat '%s': %s", ce->name,
- strerror(errno));
+ return error_errno("cannot stat '%s'", ce->name);
return 0;
} else {
return check_ok_to_remove(ce->name, ce_namelen(ce),