]> git.ipfire.org Git - thirdparty/git.git/blobdiff - builtin/blame.c
logmsg_reencode: return const buffer
[thirdparty/git.git] / builtin / blame.c
index e5b5d71bad8653f4b9d19044c3c36dc2ab8b42f1..85a36813069f91e3a9b8ea5aa172d015265b9385 100644 (file)
@@ -74,7 +74,7 @@ static unsigned blame_copy_score;
 #define BLAME_DEFAULT_MOVE_SCORE       20
 #define BLAME_DEFAULT_COPY_SCORE       40
 
-/* bits #0..7 in revision.h, #8..11 used for merge_bases() in commit.c */
+/* Remember to update object flag allocation in object.h */
 #define METAINFO_SHOWN         (1u<<12)
 #define MORE_THAN_ONE_PATH     (1u<<13)
 
@@ -1405,7 +1405,7 @@ static void get_commit_info(struct commit *commit,
 {
        int len;
        const char *subject, *encoding;
-       char *message;
+       const char *message;
 
        commit_info_init(ret);
 
@@ -2019,7 +2019,7 @@ static struct commit *fake_working_tree_commit(struct diff_options *opt,
        struct strbuf msg = STRBUF_INIT;
 
        time(&now);
-       commit = xcalloc(1, sizeof(*commit));
+       commit = alloc_commit_node();
        commit->object.parsed = 1;
        commit->date = now;
        commit->object.type = OBJ_COMMIT;