]> git.ipfire.org Git - thirdparty/git.git/blobdiff - refs.c
is_ntfs_dotgit(): only verify the leading segment
[thirdparty/git.git] / refs.c
diff --git a/refs.c b/refs.c
index 41aec6505d1309fa2efed2bd9aca0a0ef2646444..7edcf6c91f38e3d07b42939e35dbcebb3662261e 100644 (file)
--- 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;