From: Junio C Hamano Date: Thu, 6 Jul 2023 18:54:45 +0000 (-0700) Subject: Merge branch 'rs/strbuf-expand-step' X-Git-Tag: v2.42.0-rc0~73 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=da269af9207e38e820daad8aa993caa7d2fad76c;p=thirdparty%2Fgit.git Merge branch 'rs/strbuf-expand-step' Code clean-up around strbuf_expand() API. * rs/strbuf-expand-step: strbuf: simplify strbuf_expand_literal_cb() replace strbuf_expand() with strbuf_expand_step() replace strbuf_expand_dict_cb() with strbuf_expand_step() strbuf: factor out strbuf_expand_step() pretty: factor out expand_separator() --- da269af9207e38e820daad8aa993caa7d2fad76c diff --cc builtin/cat-file.c index ab8ac105e3,424f39675b..fab04310fb --- a/builtin/cat-file.c +++ b/builtin/cat-file.c @@@ -493,10 -492,10 +493,10 @@@ static void batch_object_write(const ch strbuf_reset(scratch); if (!opt->format) { - print_default_format(scratch, data); + print_default_format(scratch, data, opt); } else { - strbuf_expand(scratch, opt->format, expand_format, data); + expand_format(scratch, opt->format, data); - strbuf_addch(scratch, '\n'); + strbuf_addch(scratch, opt->output_delim); } batch_write(opt, scratch->buf, scratch->len); diff --cc merge-ll.c index 478983309d,b307ad293c..933adc3769 --- a/merge-ll.c +++ b/merge-ll.c @@@ -242,15 -247,7 +247,13 @@@ static enum ll_merge_result ll_ext_merg for (i = 0; i < 3; i++) unlink_or_warn(temp[i]); strbuf_release(&cmd); - strbuf_release(&path_sq); - - ret = (status > 0) ? LL_MERGE_CONFLICT : status; + if (!status) + ret = LL_MERGE_OK; + else if (status <= 128) + ret = LL_MERGE_CONFLICT; + else + /* died due to a signal: WTERMSIG(status) + 128 */ + ret = LL_MERGE_ERROR; return ret; }