From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS54825 147.75.80.0/22 X-Spam-Status: No, score=-5.5 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A, RCVD_IN_DNSWL_LOW,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE shortcircuit=no autolearn=ham autolearn_force=no version=3.4.6 Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [147.75.80.249]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 0DE5A1F44D for ; Sat, 16 Mar 2024 19:45:05 +0000 (UTC) Authentication-Results: dcvr.yhbt.net; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=ZZqkC1kx; dkim-atps=neutral Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id A114D1F2162E for ; Sat, 16 Mar 2024 19:45:03 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0638A1C28F; Sat, 16 Mar 2024 19:44:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="ZZqkC1kx" Received: from mail-qt1-f178.google.com (mail-qt1-f178.google.com [209.85.160.178]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 48A511BC46 for ; Sat, 16 Mar 2024 19:44:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.160.178 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710618293; cv=none; b=cmR+wa+LkFiRJ35dpsxwR5gjtiHUJD8ph0/YUG5trXOr1MGbwbOzL7a7u/XpeHlaGLyMiJ/K48Q87frciRYFOtAU8IGt4iwj6FqKqMUhwXitRoxlunDioZwBVZHq+dKqvBgjf7s8VljDg1IuvF4zIg/GjMCrGlMetg//oR4Hr4M= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710618293; c=relaxed/simple; bh=pODQ1KXknIe0N0NJuUmXF8bjCLRnM96geWp+TrGNX6k=; h=Subject:To:Cc:References:From:Message-ID:Date:MIME-Version: In-Reply-To:Content-Type; b=G67vvqrPpKzQNKrW4V9iZx/ygZKzN1GL3TvY4+P1hBVePXStjobR7dKSDL4mmIm9ugledIwB8VIrifgHzzNZ2ZDYCm20B5M2pEFaeAxYj7+tyPmJJL24vH7lO4wMzLXPM3ziO2jRJ4RLa+T7xhGXRDtPA7MrCqOHdg9VxDhRMsQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=ZZqkC1kx; arc=none smtp.client-ip=209.85.160.178 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-qt1-f178.google.com with SMTP id d75a77b69052e-430acd766beso10596081cf.1 for ; Sat, 16 Mar 2024 12:44:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1710618291; x=1711223091; darn=vger.kernel.org; h=content-transfer-encoding:content-language:in-reply-to:mime-version :user-agent:date:message-id:from:references:cc:to:subject:from:to:cc :subject:date:message-id:reply-to; bh=5mESs+vmHw76A+nUygdp1DkStS72CPG44tdegunmIJ0=; b=ZZqkC1kxYSAKRA5RX3tL8Th7oYhSsqweeKNTHONA5cPPUu5KzOM+DA20Yk0x+JLpZm uvV6YKdp76Je7F3XurM3dzQIUpYVEq6gNu66bOSnORztHu517LiWgVMMY/RJzoXUwkK4 onJw+rREM6lTusAvsihXAknhHXORHPe177QM68gY5/VQhFleLdmm9gOUjjxzXV2fus+p s3M9SYbB4WouVvkib2cSB06gERwsIW8GkwKa59ADsa9NS9gU637l9S1GuXNK7ou4p7xi RtcPlU4g9cxa1r4npf7sT8yVn7c8+XTxnl35vsvHHQXFn4Jk1bm/GwI1GEko3EVME/eE 8DVQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710618291; x=1711223091; h=content-transfer-encoding:content-language:in-reply-to:mime-version :user-agent:date:message-id:from:references:cc:to:subject :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=5mESs+vmHw76A+nUygdp1DkStS72CPG44tdegunmIJ0=; b=YJ+gu1zgU5rlJqOK1yhME4D+DEC1WQCdVpbXEq01u/Qh3t48/t4jwKwaczoEDU1hOm 5b1IoTZqNvS8320HvurnfjqV+P7583lWe79npMS7XLdr1SP0rOXyg7y2L8yCZ6H2CG/5 4pAVkhC1xZKc+BqMwSlVt0Y6Sd/0rBcCfCocAaCbO5xtxAP/XoxbP5yM44TcSupiDvcJ 1KlmwcpsqEO2hHzpm7oPSsGt11CfhtsxZZQUwDINu8+VdPhktYHi9DbWYINhn+AgVssp Hmbl2cCf1i/SABo9QZ6EH4AdqcIcfNNtBycgsHh93tb8+d06k447thmuf7twKqxVy7al kz6w== X-Forwarded-Encrypted: i=1; AJvYcCXhLifovseXRFOT5OGe4dJSRYSIn1S0CdUJ+Vt6Fam3/DYu6SF6zRhQaEkPz+QyN3V+veqkFAUlnyCkE4bNi2C/j2Rz X-Gm-Message-State: AOJu0YxBO6b7svTkW4D8QeWLTp1vAGO6GNF3otjSwnGzNHegzodqBc0O Qg1F0aS/79oUmfZ5UuWwYgJeG/ixVHuJpEZRjrBxkvW7oZt26+/a+qIhLFvzkww= X-Google-Smtp-Source: AGHT+IFghrQv0uMDaRuwcNormysP92Xx6sHAzI86PLNs5jyP4bLeJXIpNv3Ndr+LtiZtY8w/h4GooQ== X-Received: by 2002:a05:622a:191e:b0:42e:d581:f735 with SMTP id w30-20020a05622a191e00b0042ed581f735mr8764983qtc.17.1710618290941; Sat, 16 Mar 2024 12:44:50 -0700 (PDT) Received: from ?IPv6:2606:6d00:15:103b:f04a:b551:cd51:32ac? ([2606:6d00:15:103b:f04a:b551:cd51:32ac]) by smtp.gmail.com with ESMTPSA id h14-20020ac8568e000000b0042f192bced9sm3107949qta.64.2024.03.16.12.44.50 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 16 Mar 2024 12:44:50 -0700 (PDT) Subject: Re: [PATCH v2 2/2] builtin/am: allow disabling conflict advice To: Junio C Hamano , phillip.wood123@gmail.com Cc: Philippe Blain via GitGitGadget , git@vger.kernel.org, Elijah Newren , Phillip Wood , Johannes Schindelin , ZheNing Hu References: <3235542cc6f77779cca1aeff65236e16b0a15d76.1710100261.git.gitgitgadget@gmail.com> From: Philippe Blain Message-ID: <1961b9dc-e372-b0f9-9185-a1c11d32f1b3@gmail.com> Date: Sat, 16 Mar 2024 15:44:49 -0400 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:78.0) Gecko/20100101 Thunderbird/78.14.0 Precedence: bulk X-Mailing-List: git@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: fr Content-Transfer-Encoding: 8bit Hi Phillip and Junio, Le 2024-03-11 à 13:49, Junio C Hamano a écrit : > Junio C Hamano writes: > >>> I think you need to append "\n" to the message strings here (and >>> below) to match the behavior of printf_ln(). >> >> Good eyes. You'll get the final "\n" but the line breaks inside the >> paragraph you give to advise*() functions are your responsibility. >> Even though advice.c:vadvise() handles multi-line message better >> (unlike usage.c:vreportf() that is used for error() and die()) by >> giving a line header for each line of the message, we do not wrap >> lines at runtime. > > Perhaps something like this. Thanks Phillip for noticing, and Junio for the fix. I should have looked at the output, apologies. I made sure that the test passed but since t/t4150-am.sh only checks for the "To record the empty patch as an empty commit" string, it still passed despite the missing newlines. Just a note if it helps anyone: I cherry-picked Junio's fixes using: b4 shazam -P _ '' Cheers, Philippe.