X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=builtin-reflog.c;h=e23b5ef979d98e5e44693345856a13485695246f;hb=14d52b28158ba7922adfc00ee488f934ef6d0593;hp=95198c5de41072bfb8adf7f29d9bbb44eec665ac;hpb=5e64650d938d7a23b73532b4a68bc6bd08cfd041;p=git.git diff --git a/builtin-reflog.c b/builtin-reflog.c index 95198c5de..e23b5ef97 100644 --- a/builtin-reflog.c +++ b/builtin-reflog.c @@ -362,7 +362,7 @@ static int expire_reflog(const char *ref, const unsigned char *sha1, int unused, } else if (cmd->updateref && (write_in_full(lock->lock_fd, sha1_to_hex(cb.last_kept_sha1), 40) != 40 || - write_in_full(lock->lock_fd, "\n", 1) != 1 || + write_str_in_full(lock->lock_fd, "\n") != 1 || close_ref(lock) < 0)) { status |= error("Couldn't write %s", lock->lk->filename);