зеркало из https://github.com/microsoft/git.git
Merge branch 'rs/range-diff-avoid-segfault-with-I'
"git range-diff -I... <range> <range>" segfaulted, which has been corrected. * rs/range-diff-avoid-segfault-with-I: range-diff: avoid segfault with -I
This commit is contained in:
Коммит
3d141d8789
|
@ -482,6 +482,7 @@ static void output(struct string_list *a, struct string_list *b,
|
|||
else
|
||||
diff_setup(&opts);
|
||||
|
||||
opts.no_free = 1;
|
||||
if (!opts.output_format)
|
||||
opts.output_format = DIFF_FORMAT_PATCH;
|
||||
opts.flags.suppress_diff_headers = 1;
|
||||
|
@ -542,6 +543,8 @@ static void output(struct string_list *a, struct string_list *b,
|
|||
strbuf_release(&buf);
|
||||
strbuf_release(&dashes);
|
||||
strbuf_release(&indent);
|
||||
opts.no_free = 0;
|
||||
diff_free(&opts);
|
||||
}
|
||||
|
||||
int show_range_diff(const char *range1, const char *range2,
|
||||
|
|
Загрузка…
Ссылка в новой задаче