diff options
author | Junio C Hamano <gitster@pobox.com> | 2016-05-17 14:38:28 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2016-05-17 14:38:28 -0700 |
commit | 40cfc95856594ddd04ae6ef3bfd041346c4854ec (patch) | |
tree | 13f4a476ed02d287c34a3460341deacb2dcd6a53 /unpack-trees.c | |
parent | Merge branch 'jc/test-seq' (diff) | |
parent | wrapper.c: use warning_errno() (diff) | |
download | tgif-40cfc95856594ddd04ae6ef3bfd041346c4854ec.tar.xz |
Merge branch 'nd/error-errno'
The code for warning_errno/die_errno has been refactored and a new
error_errno() reporting helper is introduced.
* nd/error-errno: (41 commits)
wrapper.c: use warning_errno()
vcs-svn: use error_errno()
upload-pack.c: use error_errno()
unpack-trees.c: use error_errno()
transport-helper.c: use error_errno()
sha1_file.c: use {error,die,warning}_errno()
server-info.c: use error_errno()
sequencer.c: use error_errno()
run-command.c: use error_errno()
rerere.c: use error_errno() and warning_errno()
reachable.c: use error_errno()
mailmap.c: use error_errno()
ident.c: use warning_errno()
http.c: use error_errno() and warning_errno()
grep.c: use error_errno()
gpg-interface.c: use error_errno()
fast-import.c: use error_errno()
entry.c: use error_errno()
editor.c: use error_errno()
diff-no-index.c: use error_errno()
...
Diffstat (limited to 'unpack-trees.c')
-rw-r--r-- | unpack-trees.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/unpack-trees.c b/unpack-trees.c index e81024bb9e..6bc9512a45 100644 --- a/unpack-trees.c +++ b/unpack-trees.c @@ -1533,8 +1533,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); @@ -1542,8 +1541,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), |