fd = open(path, O_RDONLY);
if (fd < 0)
return -1;
- len = read(fd, buffer, sizeof(buffer)-1);
+ len = read_in_full(fd, buffer, sizeof(buffer)-1);
close(fd);
/*
if (access("objects", X_OK) == 0 && access("refs", X_OK) == 0 &&
validate_headref("HEAD") == 0) {
- putenv("GIT_DIR=.");
+ setenv("GIT_DIR", ".", 1);
check_repository_format();
return path;
}