Staging
v0.7.0
v0.7.0
Revision f37d0cc3ff6ef565f961a0d3741ba016e1ceb31d authored by Luck, Tony on 08 November 2005, 23:52:02 UTC, committed by Junio C Hamano on 09 November 2005, 05:33:36 UTC
"git resolve" is being deprecated in favour of "git merge". Update the documentation to reflect this. Signed-off-by: Tony Luck <tony.luck@intel.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
1 parent f4f440a
copy.c
#include "cache.h"
int copy_fd(int ifd, int ofd)
{
while (1) {
int len;
char buffer[8192];
char *buf = buffer;
len = read(ifd, buffer, sizeof(buffer));
if (!len)
break;
if (len < 0) {
int read_error;
if (errno == EAGAIN)
continue;
read_error = errno;
close(ifd);
return error("copy-fd: read returned %s",
strerror(read_error));
}
while (1) {
int written = write(ofd, buf, len);
if (written > 0) {
buf += written;
len -= written;
if (!len)
break;
}
if (!written)
return error("copy-fd: write returned 0");
if (errno == EAGAIN || errno == EINTR)
continue;
return error("copy-fd: write returned %s",
strerror(errno));
}
}
close(ifd);
return 0;
}
Computing file changes ...