Merge branch 'js/rebase-i-commentchar-fix'
[gitweb.git] / refs.c
diff --git a/refs.c b/refs.c
index abc721b607cd8ff4916cce7f8381521fbb58fb5d..9bd0bc177bb8298148577ce0c3e52134452d6e51 100644 (file)
--- a/refs.c
+++ b/refs.c
@@ -816,8 +816,7 @@ struct ref_update *ref_transaction_add_update(
                hashcpy(update->new_sha1, new_sha1);
        if (flags & REF_HAVE_OLD)
                hashcpy(update->old_sha1, old_sha1);
-       if (msg)
-               update->msg = xstrdup(msg);
+       update->msg = xstrdup_or_null(msg);
        return update;
 }