summaryrefslogtreecommitdiff
path: root/commit.c
diff options
context:
space:
mode:
Diffstat (limited to 'commit.c')
-rw-r--r--commit.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/commit.c b/commit.c
index 2a58175aca..9ce45cec25 100644
--- a/commit.c
+++ b/commit.c
@@ -249,8 +249,10 @@ int write_shallow_commits(int fd, int use_pack_protocol)
if (use_pack_protocol)
packet_write(fd, "shallow %s", hex);
else {
- write(fd, hex, 40);
- write(fd, "\n", 1);
+ if (write_in_full(fd, hex, 40) != 40)
+ break;
+ if (write_in_full(fd, "\n", 1) != 1)
+ break;
}
}
return count;