projects
/
git.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
720fe22
)
close_sha1_file(): make it easier to diagnose errors
author
Linus Torvalds
<torvalds@linux-foundation.org>
Tue, 24 Mar 2009 19:31:36 +0000
(12:31 -0700)
committer
Junio C Hamano
<gitster@pobox.com>
Tue, 24 Mar 2009 21:39:20 +0000
(14:39 -0700)
A bug report with "unable to write sha1 file" made us realize that we do
not have enough information to guess why close() is failing.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
sha1_file.c
patch
|
blob
|
history
diff --git
a/sha1_file.c
b/sha1_file.c
index bea958ec81ce1e1904b1b574348faae4eea4c3d0..bcfcab351dd9f8d5b4e1cc0d86ecd2162f46cf94 100644
(file)
--- a/
sha1_file.c
+++ b/
sha1_file.c
@@
-2241,7
+2241,7
@@
static void close_sha1_file(int fd)
fsync_or_die(fd, "sha1 file");
fchmod(fd, 0444);
if (close(fd) != 0)
- die("
unable to write sha1 file"
);
+ die("
error when closing sha1 file (%s)", strerror(errno)
);
}
/* Size of directory component, including the ending '/' */