Commit Diff


commit - b380533788adf056655d5bdf9d7e497e53c5d85f
commit + 71392a05f2ee999ddda39f6b5eb64d0bc292c0ce
blob - 4df2db7f021912a09dd421ede13f9b680c18aa24
blob + 6d427879bfb75db1dd06c1c4b0eb326ddd18ffc0
--- got/got.c
+++ got/got.c
@@ -8024,7 +8024,10 @@ histedit_edit_logmsg(struct got_histedit_list_entry *h
 	if (err) {
 		if (err->code != GOT_ERR_COMMIT_MSG_EMPTY)
 			goto done;
-		err = got_object_commit_get_logmsg(&hle->logmsg, commit);
+		err = NULL;
+		hle->logmsg = strdup(new_msg);
+		if (hle->logmsg == NULL)
+			err = got_error_from_errno("strdup");
 	}
 done:
 	if (logmsg_path && unlink(logmsg_path) != 0 && err == NULL)