X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=mktag.c;h=fc6a9bf5f34158605add585439848367deaefac5;hb=53909056da869eb79c2a20699794b63c8c87e7fd;hp=585677eb83cd0fd21963d21291a6af2b54fc9c84;hpb=36d277c72d90d32f99616072b64a2652248f5264;p=git.git diff --git a/mktag.c b/mktag.c index 585677eb..fc6a9bf5 100644 --- a/mktag.c +++ b/mktag.c @@ -111,17 +111,14 @@ int main(int argc, char **argv) if (argc != 1) usage("cat | git-mktag"); + setup_git_directory(); + // Read the signature size = 0; for (;;) { - int ret = read(0, buffer + size, MAXSIZE - size); - if (!ret) - break; - if (ret < 0) { - if (errno == EAGAIN) - continue; + int ret = xread(0, buffer + size, MAXSIZE - size); + if (ret <= 0) break; - } size += ret; }