X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=local-fetch.c;h=7cfe8b3587c10bf0791c066a72482771e7daae77;hb=10e8d68820db9c7b6412d5a553a93fd200388f30;hp=7b6875cce6c5a08db06e637abc48ce8f26216db4;hpb=1e49cb8ad44cfb926b719061fa41f42e62291560;p=git.git diff --git a/local-fetch.c b/local-fetch.c index 7b6875cce..7cfe8b358 100644 --- a/local-fetch.c +++ b/local-fetch.c @@ -184,7 +184,7 @@ int fetch_ref(char *ref, unsigned char *sha1) fprintf(stderr, "cannot open %s\n", filename); return -1; } - if (read(ifd, hex, 40) != 40 || get_sha1_hex(hex, sha1)) { + if (read_in_full(ifd, hex, 40) != 40 || get_sha1_hex(hex, sha1)) { close(ifd); fprintf(stderr, "cannot read from %s\n", filename); return -1; @@ -210,7 +210,6 @@ int main(int argc, const char **argv) char **commit_id; int arg = 1; - setup_ident(); setup_git_directory(); git_config(git_default_config);