From patchwork Wed Mar 8 20:15:53 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alejandro Colomar X-Patchwork-Id: 13166384 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E2BEFC64EC4 for ; Wed, 8 Mar 2023 20:16:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229936AbjCHUQh (ORCPT ); Wed, 8 Mar 2023 15:16:37 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33158 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230013AbjCHUQf (ORCPT ); Wed, 8 Mar 2023 15:16:35 -0500 Received: from mail-wm1-x334.google.com (mail-wm1-x334.google.com [IPv6:2a00:1450:4864:20::334]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AC6E0D13EC for ; Wed, 8 Mar 2023 12:16:03 -0800 (PST) Received: by mail-wm1-x334.google.com with SMTP id c18so10544739wmr.3 for ; Wed, 08 Mar 2023 12:16:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1678306561; h=subject:from:to:content-language:user-agent:mime-version:date :message-id:from:to:cc:subject:date:message-id:reply-to; bh=7WQJHEhR9CFwRuMTB9Q+bWwernSaOZKh/ZEXRez9W2U=; b=IWfV8yuoOUAsjPqeUAfpxVuGgu2yLpEaNstkmd2Qah6tXXyt+U4ciUepZYC/YTNqlH EAs9n4jNTtGPWIrWNTVN/meg+SNZyng3qCG0ol1WOh8fUEBV2SlQuL6lo1z4YIK/W3uv +DDSa/Oh1IWR2KGmhS5sv+8pl2bhLxWMKrR0PyF9cUodMUsbJEEN7wxhdcmjhCd9QhtF fJZyOzJ58d0bgZOnAyQQlmi0sMXo8S3DHHdQjKlRDW3StZxbvk+KywA94tFDixFLN4OQ eaYeG9yGdJCR0uMa5AsBfKmxpHemg6rarhXkF2Kbt9o4pTJ1c+mklXbQVm4FNvm4970y eR1Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678306561; h=subject:from:to:content-language:user-agent:mime-version:date :message-id:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=7WQJHEhR9CFwRuMTB9Q+bWwernSaOZKh/ZEXRez9W2U=; b=4M9bzzPTHKzx96KavtKcDLjdpvP3I5o0NQCv4RM0gKN/yjhkcApszMXJMzlSKz9c4Y QTNHW4TiUjYy3uSvPmI6HuXC1hxwsmCcnJQG4NnoiC6nBCM6tATEKCZzXX+m/mPNhMMn 7IeCT4h+JWDzYyVenZqdYiP+lXUViGbWsDVgSJUo1nAzl1KA41bz8uI1ZJeqmbjounxI BCjN+b5ERFoi//G6b4ny6AzBc+PVGZDsnpGyarbE0KPJH2bJQ8c2+zemad9FunXNJfby YmPBiWAiWA0bywiI+7XdPNAmRqlf7qhh7nvKfTTqoa5VEbr4iECFqDc+M+oRMt2u8swY kDgg== X-Gm-Message-State: AO0yUKWxGnWlj7EQB5/2Y0wc6LlkAFVws8ROJHecFXgz0CzPVyKthc1G fb+DyaSMr2JkgDCxI/qbHmDWfe7f/uY= X-Google-Smtp-Source: AK7set80bBPRWF04/jetOb2YqZV1qTqn85QaXtfzSN2/kbiae1WDdgtulYRLx7Slmq/aeIWomor+hA== X-Received: by 2002:a05:600c:4746:b0:3eb:36fa:b791 with SMTP id w6-20020a05600c474600b003eb36fab791mr17109939wmo.31.1678306561652; Wed, 08 Mar 2023 12:16:01 -0800 (PST) Received: from [192.168.0.160] ([170.253.51.134]) by smtp.gmail.com with ESMTPSA id w9-20020a05600c474900b003df7b40f99fsm469773wmo.11.2023.03.08.12.16.00 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 08 Mar 2023 12:16:01 -0800 (PST) Message-ID: <897c200c-afb3-ceb4-bf44-9af651f5feb4@gmail.com> Date: Wed, 8 Mar 2023 21:15:53 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.8.0 Content-Language: en-US To: Git Mailing List From: Alejandro Colomar Subject: Better suggestions when git-am(1) fails Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Hi, I had the following error already a few times, when some contributors, for some reason unknown to me, remove the leading path components from the patch. Now I know that the fix is to use -p0, but the first times it wasn't obvious. And still I forget about -p0 sometimes and it's hard to find in the manual pages. I think it would be good to suggest using it when such an error appears. $ git am -s patches/\[PATCH\ 1_2\]\ CONTRIBUTING\:\ Fix\ typo\,\ there\ is\ one\ active\ maintainer\ -\ Rodrigo\ Campos\ \\ -\ 2023-03-08\ 1622.eml Applying: CONTRIBUTING: Fix typo, there is one active maintainer error: git diff header lacks filename information when removing 1 leading pathname component (line 9) Patch failed at 0001 CONTRIBUTING: Fix typo, there is one active maintainer hint: Use 'git am --show-current-patch=diff' to see the failed patch When you have resolved this problem, run "git am --continue". If you prefer to skip this patch, run "git am --skip" instead. To restore the original branch and stop patching, run "git am --abort". alx@asus5775:~/src/linux/man-pages/man-pages/main$ man git-am alx@asus5775:~/src/linux/man-pages/man-pages/main$ git am --show-current-patch=diff --- CONTRIBUTING | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git CONTRIBUTING CONTRIBUTING index 3b4408108..3bb671eca 100644 --- CONTRIBUTING +++ CONTRIBUTING @@ -8,7 +8,7 @@ Description Mailing list The main discussions regarding development of the project, patches, bugs, news, doubts, etc. happen on the mailing list. To send an email - to the project, send it to both maintainers and CC the mailing list: + to the project, send it to Alejandro and CC the mailing list: To: Alejandro Colomar Cc: