projects
/
git.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add git-shortlog perl script
[git.git]
/
mktag.c
diff --git
a/mktag.c
b/mktag.c
index
aa4a6d8
..
8cbbef6
100644
(file)
--- a/
mktag.c
+++ b/
mktag.c
@@
-106,7
+106,18
@@
int main(int argc, char **argv)
usage("cat <signaturefile> | git-mktag");
// Read the signature
usage("cat <signaturefile> | git-mktag");
// Read the signature
- size = read(0, buffer, MAXSIZE);
+ size = 0;
+ for (;;) {
+ int ret = read(0, buffer + size, MAXSIZE - size);
+ if (!ret)
+ break;
+ if (ret < 0) {
+ if (errno == EAGAIN)
+ continue;
+ break;
+ }
+ size += ret;
+ }
// Verify it for some basic sanity: it needs to start with "object <sha1>\ntype "
if (verify_tag(buffer, size) < 0)
// Verify it for some basic sanity: it needs to start with "object <sha1>\ntype "
if (verify_tag(buffer, size) < 0)