From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS3215 2.6.0.0/16 X-Spam-Status: No, score=-3.8 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE, URIBL_CSS,URIBL_CSS_A shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by dcvr.yhbt.net (Postfix) with ESMTP id 187931F54E for ; Tue, 16 Aug 2022 18:59:24 +0000 (UTC) Authentication-Results: dcvr.yhbt.net; dkim=pass (1024-bit key; unprotected) header.d=pobox.com header.i=@pobox.com header.b="chj1k4CX"; dkim-atps=neutral Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236690AbiHPS6O (ORCPT ); Tue, 16 Aug 2022 14:58:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50924 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236684AbiHPS6N (ORCPT ); Tue, 16 Aug 2022 14:58:13 -0400 Received: from pb-smtp20.pobox.com (pb-smtp20.pobox.com [173.228.157.52]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 43F1D20F5A for ; Tue, 16 Aug 2022 11:58:12 -0700 (PDT) Received: from pb-smtp20.pobox.com (unknown [127.0.0.1]) by pb-smtp20.pobox.com (Postfix) with ESMTP id B640C1A5AD5; Tue, 16 Aug 2022 14:58:11 -0400 (EDT) (envelope-from junio@pobox.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; s=sasl; bh=hntcjST+IRAQopeTMov4bpP+zg2BdzilIyfk7v 0/xiY=; b=chj1k4CX4MU6cQ/78nNkttaqBX8uTIzDijIhvemDNUT7CZyDP1bey+ 0+43iM4ht89X4qUrPmxtUsaflYhlhx9yZnF0lVLHwnVHENaJN5P4NMWF7Rx3OjZY LEdMluJN46bpBRgic3YvxP+A8VwS5/eh0sotZ064jbtg8CsTuzInM= Received: from pb-smtp20.sea.icgroup.com (unknown [127.0.0.1]) by pb-smtp20.pobox.com (Postfix) with ESMTP id ADF691A5AD4; Tue, 16 Aug 2022 14:58:11 -0400 (EDT) (envelope-from junio@pobox.com) Received: from pobox.com (unknown [34.83.5.33]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pb-smtp20.pobox.com (Postfix) with ESMTPSA id 789681A5AD3; Tue, 16 Aug 2022 14:58:06 -0400 (EDT) (envelope-from junio@pobox.com) From: Junio C Hamano To: Calvin Wan Cc: git@vger.kernel.org, newren@gmail.com, Johannes.Schindelin@gmx.de, avarab@gmail.com Subject: Re: [PATCH v8] submodule merge: update conflict error message References: <20220728211221.2913928-1-calvinwan@google.com> <20220804195105.1303455-1-calvinwan@google.com> Date: Tue, 16 Aug 2022 11:58:05 -0700 In-Reply-To: (Junio C. Hamano's message of "Tue, 16 Aug 2022 08:58:34 -0700") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Pobox-Relay-ID: 5CF26F90-1D95-11ED-AE36-C85A9F429DF0-77302942!pb-smtp20.pobox.com Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Junio C Hamano writes: >> + * languages, the following swap is suggested: >> + * " %s\n" -> "%s \n" >> + */ >> + strbuf_addf(&tmp, _(" %s\n"), msg_list.items[i].string); >> + } >> + strbuf_reset(msg); >> + strbuf_add(msg, tmp.buf, tmp.len); >> +} > > Here, tmp is not released, and mst_list holds the words split out of msg. FWIW, with this fixed, the tip of 'seen' passes the linux-leaks CI job. > merge-ort.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git i/merge-ort.c w/merge-ort.c > index 4cb92bdff8..cdb53770be 100644 > --- i/merge-ort.c > +++ w/merge-ort.c > @@ -4507,6 +4507,8 @@ static void format_submodule_conflict_suggestion(struct strbuf *msg) { > } > strbuf_reset(msg); > strbuf_add(msg, tmp.buf, tmp.len); > + string_list_clear(&msg_list, 0); > + strbuf_release(&tmp); > } > > static void print_submodule_conflict_suggestion(struct string_list *csub) {