]> git.ipfire.org Git - thirdparty/git.git/blobdiff - builtin-tar-tree.c
short i/o: fix calls to read to use xread or read_in_full
[thirdparty/git.git] / builtin-tar-tree.c
index 4d4cfec878e468b8ab8a7f055c836c3569443914..ad802fc1aa7fe2b487b2ffdac68f27df82ebc941 100644 (file)
@@ -1,7 +1,6 @@
 /*
  * Copyright (c) 2005, 2006 Rene Scharfe
  */
-#include <time.h>
 #include "cache.h"
 #include "commit.h"
 #include "tar.h"
@@ -75,7 +74,7 @@ int cmd_get_tar_commit_id(int argc, const char **argv, const char *prefix)
        char *content = buffer + RECORDSIZE;
        ssize_t n;
 
-       n = xread(0, buffer, HEADERSIZE);
+       n = read_in_full(0, buffer, HEADERSIZE);
        if (n < HEADERSIZE)
                die("git-get-tar-commit-id: read error");
        if (header->typeflag[0] != 'g')