t4150: test applying StGit patch
[gitweb.git] / branch.c
index 4bab55a9a85e187e2a3906312f1e771f4a214f45..b0024353f4409c8b54c4b569b8fb7c435b26cdae 100644 (file)
--- a/branch.c
+++ b/branch.c
@@ -284,8 +284,9 @@ void create_branch(const char *head,
 
                transaction = ref_transaction_begin(&err);
                if (!transaction ||
-                   ref_transaction_update(transaction, ref.buf, sha1,
-                                          null_sha1, 0, !forcing, msg, &err) ||
+                   ref_transaction_update(transaction, ref.buf,
+                                          sha1, forcing ? NULL : null_sha1,
+                                          0, msg, &err) ||
                    ref_transaction_commit(transaction, &err))
                        die("%s", err.buf);
                ref_transaction_free(transaction);