Sync with 2.14.2
[gitweb.git] / builtin / receive-pack.c
index 52c63ebfdc737688a7d99f6be34c43cf80b1d011..dd06b3fb4f9ee3e4da46d807b183541ec14c5481 100644 (file)
@@ -743,7 +743,7 @@ static int run_and_feed_hook(const char *hook_name, feed_fn feed,
                size_t n;
                if (feed(feed_state, &buf, &n))
                        break;
-               if (write_in_full(proc.in, buf, n) != n)
+               if (write_in_full(proc.in, buf, n) < 0)
                        break;
        }
        close(proc.in);