X-Git-Url: http://git.ipfire.org/?a=blobdiff_plain;f=refs.c;h=7edcf6c91f38e3d07b42939e35dbcebb3662261e;hb=288a74bcd28229a00c3632f18cba92dbfdf73ee9;hp=41aec6505d1309fa2efed2bd9aca0a0ef2646444;hpb=ac86677afb12947efb32668a6ae3cf8eaa7a1627;p=thirdparty%2Fgit.git diff --git a/refs.c b/refs.c index 41aec6505d..7edcf6c91f 100644 --- a/refs.c +++ b/refs.c @@ -592,7 +592,7 @@ static int write_pseudoref(const char *pseudoref, const unsigned char *sha1, } } - if (write_in_full(fd, buf.buf, buf.len) != buf.len) { + if (write_in_full(fd, buf.buf, buf.len) < 0) { strbuf_addf(err, "could not write to '%s'", filename); rollback_lock_file(&lock); goto done;