diff options
author | Junio C Hamano <gitster@pobox.com> | 2008-04-23 00:03:56 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2008-04-23 00:03:56 -0700 |
commit | 57cf5ca3058b4086744f59f1f520a15dfc040bbb (patch) | |
tree | b89a069c701db1d5eb64d7c74928b2f66db9833d /copy.c | |
parent | bdb87afb4b425d97f7b5e957cbed1589969d9a24 (diff) | |
parent | d6958a1a32814af69a7571daa45252018c61f969 (diff) | |
download | git-57cf5ca3058b4086744f59f1f520a15dfc040bbb.tar.gz git-57cf5ca3058b4086744f59f1f520a15dfc040bbb.tar.xz |
Merge branch 'maint'
* maint:
Amend git-push refspec documentation
git-gc --prune is deprecated
svn-git: Use binmode for reading/writing binary rev maps
diff options documentation: refer to --diff-filter in --name-status
Don't force imap.host to be set when imap.tunnel is set
git-clone.txt: Adjust note to --shared for new pruning behavior of git-gc
git-svn bug with blank commits and author file
archive.c: format_subst - fixed bogus argument to memchr
copy.c: copy_fd - correctly report write errors
gitattributes: Fix subdirectory attributes specified from root directory
Diffstat (limited to 'copy.c')
-rw-r--r-- | copy.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -9,8 +9,7 @@ int copy_fd(int ifd, int ofd) if (!len) break; if (len < 0) { - int read_error; - read_error = errno; + int read_error = errno; close(ifd); return error("copy-fd: read returned %s", strerror(read_error)); @@ -25,9 +24,10 @@ int copy_fd(int ifd, int ofd) close(ifd); return error("copy-fd: write returned 0"); } else { + int write_error = errno; close(ifd); return error("copy-fd: write returned %s", - strerror(errno)); + strerror(write_error)); } } } @@ -48,7 +48,7 @@ int copy_file(const char *dst, const char *src, int mode) } status = copy_fd(fdi, fdo); if (close(fdo) != 0) - return error("%s: write error: %s", dst, strerror(errno)); + return error("%s: close error: %s", dst, strerror(errno)); if (!status && adjust_shared_perm(dst)) return -1; |