diff options
| author | Jason A. Donenfeld <Jason@zx2c4.com> | 2026-02-24 02:35:18 +0100 |
|---|---|---|
| committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2026-02-24 02:36:59 +0100 |
| commit | 29d8c62437c71410061daa6a1b3ec0ec566eb559 (patch) | |
| tree | 315f39fb0450d0d81a4a804b03b632cf66f8dbf9 | |
| parent | 7fee3f699226a476a754fab7e1f0be5a559388da (diff) | |
| download | cgit-29d8c62437c71410061daa6a1b3ec0ec566eb559.tar.xz | |
ui-log: don't free diff object when outputting diff
In git 2.36, the logic for diff_flush() changed, resulting in our object
getting freed, which led to following renames producing garbage commits
until it eventually crashed.
Fixes: bb02e24 ("git: update to v2.36.0")
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
| -rw-r--r-- | ui-log.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -167,6 +167,7 @@ static int show_commit(struct commit *commit, struct rev_info *revs) revs->diffopt.output_format = DIFF_FORMAT_CALLBACK; revs->diffopt.format_callback = cgit_diff_tree_cb; revs->diffopt.format_callback_data = handle_rename; + revs->diffopt.no_free = 1; diff_flush(&revs->diffopt); revs->diffopt.output_format = saved_fmt; revs->diffopt.flags = saved_flags; |
