From patchwork Fri Nov 11 19:30:58 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Strawbridge X-Patchwork-Id: 13040727 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 DDB39C4332F for ; Fri, 11 Nov 2022 19:31:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233943AbiKKTbE (ORCPT ); Fri, 11 Nov 2022 14:31:04 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34172 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233900AbiKKTbB (ORCPT ); Fri, 11 Nov 2022 14:31:01 -0500 Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on2089.outbound.protection.outlook.com [40.107.223.89]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 692ED716C4 for ; Fri, 11 Nov 2022 11:31:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gGIJCM8fJCCs04fKXbFccH0KTgeI3eklzAJKzWU+jJtX96gJgydQCyDDBbSLRrAoRQkOmsaIqUHViVNTs9FGXJLA5yZN4mj4JIYDPpUbhEqGjN5Dp3q3vHEAkl2FDe3KgAdwvdMR9cIYjqLyDTk3SVrqvNdD8iS2Tz0XfiXfvzIToImFRdXW5uCIJ1gJABIpsPpO6yqQ0UpYuQcptsIG/YbVo/rjSpJO35BYvCEHRG/WM1UmmasWbWJQlbOKUZ519nUiyB8iPk/Uc1zTjdXEJvDuSDGtPU/6YCBbdHQWfLMKU7MyBkn7TW0pIFB3Pqc54IT2rGfKj3WyGYMY0xxlhg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=6muwiSv8ww/DveJxWuQhvAHWxHo+KiAUuWXJuzJB1to=; b=CXd6/i+MT9no+e9BboHLKLT8QBNBnJnUpbeJ7aI77eWuQbrbEiZsYp1ewNvYKT93zFHOYCyC2/uX13rdamD5iYUjmgjNfoaeHvj/E7W3R+oKGry3T6Cpi7jVRl6XDQnV8IZcM+hcNIm96BxdZc7Y24PzRFAsNszmgX/Y4y4ZdaGNotbYsF38AZcyTVDX8YfDmKBoljXYbJJqqh60Y227TddSQOSOnnMUoLrQ9/MAGVznaRPOgFPtySNwuth1+Z+R0JRnfQjPBDr5OBZBAbEo3Kolc5OZnS5LdiqpRHDrlfgsuaFGHd/oZslsmgyJeiamYtsPs5f9onDUkCX0fc37VQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=6muwiSv8ww/DveJxWuQhvAHWxHo+KiAUuWXJuzJB1to=; b=A+5QcD7LT5SKHUpCcgB5z6gJsPhb10iB7RmBPeuhM6H+G2svq98izjK2ranHq00yUssLOzrnNR7x3RjjI6coevSAetGtHfhTUEHsIH6uf2cn7t+ZDvGrjuwvEayjZkpcShzbM+1W6bQOLWp6x3Zm8vc49IJdwEn4wdZg2S0VKSo= Received: from DM6PR12MB4356.namprd12.prod.outlook.com (2603:10b6:5:2aa::8) by BY5PR12MB4291.namprd12.prod.outlook.com (2603:10b6:a03:20c::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5791.27; Fri, 11 Nov 2022 19:30:58 +0000 Received: from DM6PR12MB4356.namprd12.prod.outlook.com ([fe80::70fe:fd7e:da10:fd66]) by DM6PR12MB4356.namprd12.prod.outlook.com ([fe80::70fe:fd7e:da10:fd66%6]) with mapi id 15.20.5813.013; Fri, 11 Nov 2022 19:30:58 +0000 From: "Strawbridge, Michael" To: "git@vger.kernel.org" CC: "Strawbridge, Michael" , "Tuikov, Luben" , "brian m . carlson" Subject: [PATCH v2 1/2] Expose header information to git-send-email's sendemail-validate hook Thread-Topic: [PATCH v2 1/2] Expose header information to git-send-email's sendemail-validate hook Thread-Index: AQHY9gQge+czSpbllkurICGmw4j1EQ== Date: Fri, 11 Nov 2022 19:30:58 +0000 Message-ID: <20221111193042.641898-2-michael.strawbridge@amd.com> References: <20221111193042.641898-1-michael.strawbridge@amd.com> In-Reply-To: <20221111193042.641898-1-michael.strawbridge@amd.com> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-mailer: git-send-email 2.34.1 authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: DM6PR12MB4356:EE_|BY5PR12MB4291:EE_ x-ms-office365-filtering-correlation-id: 2691c82b-c4bb-49fb-ef72-08dac41b4291 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: eXfMUjAjvvm9iLk7sYF79JK9PHLu690HGRuPwX9lEG9sETq0Jo+4ntVIVzhSKhtMCJKMVZyI4RF3+n6cGIrNSa6vmFYt1tA4+ZbdciQh2HUqEvBAS6Sdx5qTwpU8NPM0BrYvEd2gPy0xB9EkG2yPttRtI8DysTOURHj1xy1m0uCQDHvXV1MjxR4+Y8NeV51UdOWHTmfKhAv1n3yHVxsVoao8SzkiDor4Zv5mcVIk/oTDDOcMl4wfjSkcozYRk3KvqTg3HpCOftPg/9TJk4rORfXIQ7CMxZOXO61NodNLoGvQERQavabO/h7wmy1MYTHuwJlNub0/GfEyi1gkRC7Hr1Mt6uleDwiuTxQP1K52EdsVgpVGIpOKBQ8YZgaVGYBOpmL7aRBuvwIJMNBGPbRZ4n8YIwBCzKBRoS5vvUVsrpmvSs4P+h2N58DloZ4b0vn/pAF5PytxX7GEgscabqXT8xMaJkNi5Nl/orqR+I9mR0M0NftastmcBWlMwdvKEkYw7rLIungCmE2y5cWgH9VMh08BsYZzHB+NRqxGPAt7Cf3Ic+gTfWU0Nh3d1exZFo8FeLu0c8jdwxFjhQuLJEDOFuou6zgNm5tj7+hABcv3tC5LUb0i9SYzEMWEXwv/d+H0crmuRn+3EMQFXct5B+qAP9XT0UAs25UuRPo5A5nrY7t1U9VBjMAFx2pbzcG0LZokbTOV5NZy65z3HBdg+cFV5PCFyevgefE/fQM7bxvC29SJzqqjDfrKbW98HB8OvsEzeqfTwLZAOVH65yzmGbzCSg== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM6PR12MB4356.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230022)(4636009)(136003)(39860400002)(346002)(376002)(366004)(396003)(451199015)(36756003)(83380400001)(122000001)(6486002)(38070700005)(6512007)(478600001)(86362001)(1076003)(91956017)(15650500001)(6506007)(71200400001)(38100700002)(76116006)(41300700001)(66946007)(2906002)(26005)(6916009)(66446008)(66556008)(66476007)(8676002)(8936002)(4326008)(2616005)(316002)(186003)(5660300002)(64756008)(54906003);DIR:OUT;SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?iso-8859-1?q?Hbd6z/decB6Jp0SWClXFo03?= =?iso-8859-1?q?Cl3DyUMya0CoHTdQG1XzVPygSXTZlR3IOEokkoHd+1Z9VyIZRCdDDwyGUN8l?= =?iso-8859-1?q?pDww1RZcQC+SktfXhrFKb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if8RM/s2c3Qb?= =?iso-8859-1?q?/NTrstM5PcH0i2vXWRHkz2vaHXuGc7mkCLj/u2Qeg5FtTi4eXK9nIDixsEzg?= =?iso-8859-1?q?C2BA8foPLYCs34VafTALpclVujuJgmZTXdvH9gJaqFa1Tlc4zpDveZ03t1eh?= =?iso-8859-1?q?qQU2v9A+Uml6NWjqawYbLQ+4S2xy9oCBBWM04v7eEqABexOj1WWBhLsOt6U3?= =?iso-8859-1?q?WHC8aUMsKcLv2c7g+B26wZDVhnqr4f7EmDh6hqTkpxTn+tJZ+C2+A9z1/edD?= =?iso-8859-1?q?bjkS7aoU1Cga+5txbD3pzIV9+I8q6SZS15vdQsseRXo3m0gPPYsPwSuJ0LVm?= =?iso-8859-1?q?1cwERUoNil6jgnLp+7i9jlh/bih69WTqK56ZtkWMuRSDmpQV6GomJQZq7BbW?= =?iso-8859-1?q?eK5Ok3cKQHUlnRvBY1MM0DIqgiCSKlWJj28uGD7wxzYvtnpLdi5vzbwwijUY?= =?iso-8859-1?q?T0V1VbZ7Sq+oecbdtGZVBfpZQjfU+GCfQpHY8PDMKZbTrehcuhYFlrk+nZmn?= =?iso-8859-1?q?soPjdB6SXWlEXcQeGz/N9La5gayorGanztPplwGAJaUceROM46XkpQh1J4t8?= =?iso-8859-1?q?iIniDkpuzak7I/zEbELs0SqpeSLbI9WjPyt3l9NJZx6qyvIUjcMOwWGPJCTK?= =?iso-8859-1?q?fZQN6RdPeZ6VVW+8B?= MIME-Version: 1.0 X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DM6PR12MB4356.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2691c82b-c4bb-49fb-ef72-08dac41b4291 X-MS-Exchange-CrossTenant-originalarrivaltime: 11 Nov 2022 19:30:58.5742 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: qHsxiGVeKQD5A5KYYeLnQ5UZfKc7Uz63WeIUdX9gt87pDypz85rdCe4/eBP+RM8hf0uPfy7S1GbHZf+Rut3Jlw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY5PR12MB4291 Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org To allow further flexibility in the git hook, the smtp header information of the email that git-send-email intends to send, is now passed as a 2nd argument to the sendemail-validate hook. As an example, this can be useful for acting upon keywords in the subject or specific email addresses. Cc: Luben Tuikov Cc: brian m. carlson Signed-off-by: Michael Strawbridge --- git-send-email.perl | 57 +++++++++++++++++++++++++++++---------------- 1 file changed, 37 insertions(+), 20 deletions(-) diff --git a/git-send-email.perl b/git-send-email.perl index 5861e99a6e..3ce5b1aad3 100755 --- a/git-send-email.perl +++ b/git-send-email.perl @@ -787,14 +787,6 @@ sub is_format_patch_arg { @files = handle_backup_files(@files); -if ($validate) { - foreach my $f (@files) { - unless (-p $f) { - validate_patch($f, $target_xfer_encoding); - } - } -} - if (@files) { unless ($quiet) { print $_,"\n" for (@files); @@ -1495,16 +1487,7 @@ sub file_name_is_absolute { return File::Spec::Functions::file_name_is_absolute($path); } -# Prepares the email, then asks the user what to do. -# -# If the user chooses to send the email, it's sent and 1 is returned. -# If the user chooses not to send the email, 0 is returned. -# If the user decides they want to make further edits, -1 is returned and the -# caller is expected to call send_message again after the edits are performed. -# -# If an error occurs sending the email, this just dies. - -sub send_message { +sub gen_header { my @recipients = unique_email_list(@to); @cc = (grep { my $cc = extract_valid_address_or_die($_); not grep { $cc eq $_ || $_ =~ /<\Q${cc}\E>$/ } @recipients @@ -1546,6 +1529,22 @@ sub send_message { if (@xh) { $header .= join("\n", @xh) . "\n"; } + return $header; +} + +# Prepares the email, then asks the user what to do. +# +# If the user chooses to send the email, it's sent and 1 is returned. +# If the user chooses not to send the email, 0 is returned. +# If the user decides they want to make further edits, -1 is returned and the +# caller is expected to call send_message again after the edits are performed. +# +# If an error occurs sending the email, this just dies. + +sub send_message { + my @recipients = unique_email_list(@to); + + my $header = gen_header(); my @sendmail_parameters = ('-i', @recipients); my $raw_from = $sender; @@ -1955,6 +1954,15 @@ sub process_file { } } + + if ($validate) { + foreach my $f (@files) { + unless (-p $f) { + validate_patch($f, $target_xfer_encoding); + } + } + } + my $message_was_sent = send_message(); if ($message_was_sent == -1) { do_edit($t); @@ -2088,11 +2096,20 @@ sub validate_patch { chdir($repo->wc_path() or $repo->repo_path()) or die("chdir: $!"); local $ENV{"GIT_DIR"} = $repo->repo_path(); + + my $header = gen_header(); + + require File::Temp; + my ($header_filehandle, $header_filename) = File::Temp::tempfile( + ".gitsendemail.header.XXXXXX", DIR => $repo->repo_path()); + print $header_filehandle $header; + my @cmd = ("git", "hook", "run", "--ignore-missing", $hook_name, "--"); - my @cmd_msg = (@cmd, ""); - my @cmd_run = (@cmd, $target); + my @cmd_msg = (@cmd, "", "
"); + my @cmd_run = (@cmd, $target, $header_filename); $hook_error = system_or_msg(\@cmd_run, undef, "@cmd_msg"); + unlink($header_filehandle); chdir($cwd_save) or die("chdir: $!"); } if ($hook_error) { From patchwork Fri Nov 11 19:31:00 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Strawbridge X-Patchwork-Id: 13040728 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 0A0C4C433FE for ; Fri, 11 Nov 2022 19:31:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233965AbiKKTbG (ORCPT ); Fri, 11 Nov 2022 14:31:06 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34204 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233972AbiKKTbD (ORCPT ); Fri, 11 Nov 2022 14:31:03 -0500 Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on2089.outbound.protection.outlook.com [40.107.223.89]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9CDEB73402 for ; Fri, 11 Nov 2022 11:31:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=GsIjHSkAIWXiLzgkdcHdeNTWjvzz3IP6cMKecI3Ggfej3q8Z5LCrn0JIvS1OrIFexY4Obo/oiRgQkSlddminC4x4U0Hbw+q/eBiZRQvOqRiOc9QlNxv9RidaKmHz67JRWJTr50h8AKH6JyW1Uz++nVYW7UmQuw62t+LDPOJI/ACfAfGQv5JJm8fh6L9Kf5gX/A362VGmAXKkdhWG0fQWlOmcWxjwG1T8DO5H2iyhD0N4Bg44IbUwCIySngmYrGQwQd0ej80PwJzRbdiDQxHFLwo45Jb6NJsRMjGQnJ0ARR+R8+dU+4r+owO2M/hLWU9MQ+Byi6Ra3uWi34AibLD6ZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=277fXvbJeQOLBRc+D61r5ggryIah40+28hxx2hqR2bs=; b=Gdcq3YNiC8tfAs5V3ttxguBux11G7NWbO2EuTLWC5yqK6D3R6syblPel+LduBMJsdh/aLUUqpFvOaEoyklg5AcijUHtZmuihEKgSrcQ66VEaJEEGulphguXaU6CgGH8rf3u/cTa9XLirlssrK164okLOcQArFVj6iWI7S08dSXFHX4r3Y1v4jlnptV4XTmYF6kc7EKNA9Bs216vLObE5TMhgK7yHGiMlK1+H34nBk8VjxtbYlYzW5ig2kry5RofNB2wymu47GQbep0NclD3Mz4q5kAWZSLcHVTXVOQ/TLUHoV+MkfxH6tArEsDHMEwbtHGIof6CmgcHfaCViTZeBCA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=277fXvbJeQOLBRc+D61r5ggryIah40+28hxx2hqR2bs=; b=ZqB6FYfvMXS+R/FecMFoBa59Ltw9ES5N0hi77PU9FuiCVNQCca+zAcm3ArAKLH+CbPurp7UBvrWuGTDgHQ4OHfL0s9oHOKBDcJiycXUS/x7nkwHtsD9aG4t5/ZCQVo9vNzoDa00h7+aUE/YmDS0Lz2uyX2/DoAHpmBcezKnHNto= Received: from DM6PR12MB4356.namprd12.prod.outlook.com (2603:10b6:5:2aa::8) by BY5PR12MB4291.namprd12.prod.outlook.com (2603:10b6:a03:20c::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5791.27; Fri, 11 Nov 2022 19:31:00 +0000 Received: from DM6PR12MB4356.namprd12.prod.outlook.com ([fe80::70fe:fd7e:da10:fd66]) by DM6PR12MB4356.namprd12.prod.outlook.com ([fe80::70fe:fd7e:da10:fd66%6]) with mapi id 15.20.5813.013; Fri, 11 Nov 2022 19:31:00 +0000 From: "Strawbridge, Michael" To: "git@vger.kernel.org" CC: "Strawbridge, Michael" , "Tuikov, Luben" , "brian m . carlson" Subject: [PATCH v2 2/2] Update sendemail-validate hook docs to add header file parameter Thread-Topic: [PATCH v2 2/2] Update sendemail-validate hook docs to add header file parameter Thread-Index: AQHY9gQh8iPOs+HV7UiZkiz7py3dIA== Date: Fri, 11 Nov 2022 19:31:00 +0000 Message-ID: <20221111193042.641898-3-michael.strawbridge@amd.com> References: <20221111193042.641898-1-michael.strawbridge@amd.com> In-Reply-To: <20221111193042.641898-1-michael.strawbridge@amd.com> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-mailer: git-send-email 2.34.1 authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: DM6PR12MB4356:EE_|BY5PR12MB4291:EE_ x-ms-office365-filtering-correlation-id: 11343d2d-fdac-4817-a04b-08dac41b4393 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: UCXZvf3CRFTZzR2E4SxXVn4lFoe0cppxYJAUndXh/eA8ZCwCLxydBJsfT5+JEZbXlP51VY+FJm/q4jvFt6HXFFO2S0jLor8iJk53fEJ6/8tUHuQDuE13PxJ+pqFo02Rr5TgcV4mepUs1EiBHfsv8fCReRIVDAEtCSCjyYVPw++i+q/CczUaFE3EyNmw2f/m0vFbDGaE8Kt+UbJr4bHu+zrpgSuTL5u8CvEzH4vc1AYGM/JoOvvYgwekUAfeyGxhLYC8a2xuKLcQToaVC0xrW+FuxgiQ5JWakTxtLLgYZxgjfvuAsyDLWuP+rYKStkH24jslTroGxCYeNsJaoEMp4oO32rTQANvRyMss2Zj4XGfOol7YzyWXdPA+is2c9Xr7ZmdwTgLCdpyCh7dIUFRxvF1ayvvqt/GgIWdzK/FJsxkQUO3P4ad/qj+XJdqU68GajiflpobjLdNwDuMAZKbUuS2YJ0xSLJDmDeaBMFadDOYxfpzZ3kL7ESaGPCEYeM1cvPhbHlSN6ereLOr3JhsBFke9Jx5Kessw8cPoe9yJZoHT7kCqyj7LPjtuBOqtWvy67oFlbd+tuEK7nyG1FQzEJamkgQE4rf4QTdJifiv7XGkjT7pNtQhKM6T2K0HQ5kqKiAAfhVOTlmr+qykfF7N79fI9deCKnS7/lcSfGnrwiy0GcxgLn5NmOtuIM2RmLxcgX65Krgp430Sj0OoqHhFyNb/AJSajXad++1gg05y1birvwbGBsFa8c0NtS6Z3v8kGp6TnMQTvvD4462e9S+WYtSg== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM6PR12MB4356.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230022)(4636009)(136003)(39860400002)(346002)(376002)(366004)(396003)(451199015)(36756003)(83380400001)(122000001)(6486002)(38070700005)(6512007)(478600001)(86362001)(1076003)(91956017)(15650500001)(6506007)(71200400001)(38100700002)(76116006)(41300700001)(66946007)(2906002)(26005)(6916009)(66446008)(66556008)(66476007)(8676002)(8936002)(4326008)(2616005)(316002)(186003)(5660300002)(64756008)(54906003);DIR:OUT;SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?iso-8859-1?q?Hk6lwSgkZwjPrRW4P2g2k6j?= =?iso-8859-1?q?Ye7H8gScOIJapgBkIbEOlJidJzjfr4hihzRv1dFhTDo9pmBlv8xAztLx7sIq?= =?iso-8859-1?q?/zm+aVIFW7moiOZRumt6fX+RMOyJP5u654gUf+UyKROiBeDM7fJtKsuTTQ2g?= =?iso-8859-1?q?6UWXLzYOn1vP5YzXX3ezi0bACsnbMkZtVr4+ieqDBIT2BXcoMsbNZA7DWM1Q?= =?iso-8859-1?q?TJn9kUERDM7ycDVRZ+vm1xslRD3Mlh6k/0obH13QpB+dXqSLYVlXpoXbpd+Y?= =?iso-8859-1?q?AgJ0cgpS4RrNsZ3zEOF4rwQUx9+Du0kbXucSl4CnpcY+bZGkMKnmcqPQMzWq?= =?iso-8859-1?q?+cwLHqNPIFndN9tJCCy0vYfD13nPFKN+UK6+St9U+lbdG0Qah041YsZ7N5bE?= =?iso-8859-1?q?o2itj7iMiqQFMUy4fqfLiHAWKKk6hm5zExUgzctvpIGJjyGdfwPZrUafQ6OB?= =?iso-8859-1?q?O3GHgbY+LjOp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VIuNA0LOa9ZNKkI/pDL3jEU7?= =?iso-8859-1?q?jfW1sc9Vct+z/6kpKe3MrPMUc7rRshX8Xdzq3MOySf3d/heN67mYOwUa2k0+?= =?iso-8859-1?q?hiz7QD/0hLkmiJSr0jjQKttu/tPuaKbu2IHsOw9hcbMUlSlSDYCh7bQWceat?= =?iso-8859-1?q?7gTviGn1In1lcFjkcpi4mtBeYV/sMpRUl9gC2+1gtdlcTGMVJlOWhhmgp79W?= =?iso-8859-1?q?Ax586X3SmFlZvv8FwOX72LIra6lmSNgob49ul4bUlGshNbpAA1h4o3Gg1bRU?= =?iso-8859-1?q?bJW2jWncoykyQkQ0/?= MIME-Version: 1.0 X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DM6PR12MB4356.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 11343d2d-fdac-4817-a04b-08dac41b4393 X-MS-Exchange-CrossTenant-originalarrivaltime: 11 Nov 2022 19:31:00.2943 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: r+kKL8Hg1zq7ATLEeXrVlS3z108Su1fhgDLyh4IJnZveTGdqZvF1RH3paccDQck+KPiUAZuhORT/EbCAFYAEHQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY5PR12MB4291 Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Add documentation for the new SMTP header file parameter used by the sendemail-validate git-send-email hook. sendemail-validate accepts the patch file as the first parameter (same as before) and now also adds the SMTP header information as the second parameter. Cc: Luben Tuikov Cc: brian m. carlson Signed-off-by: Michael Strawbridge --- Documentation/githooks.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Documentation/githooks.txt b/Documentation/githooks.txt index a16e62bc8c..346e536cbe 100644 --- a/Documentation/githooks.txt +++ b/Documentation/githooks.txt @@ -583,10 +583,10 @@ processed by rebase. sendemail-validate ~~~~~~~~~~~~~~~~~~ -This hook is invoked by linkgit:git-send-email[1]. It takes a single parameter, -the name of the file that holds the e-mail to be sent. Exiting with a -non-zero status causes `git send-email` to abort before sending any -e-mails. +This hook is invoked by linkgit:git-send-email[1]. It takes two parameters, +the name of a file that holds the patch and the name of a file that holds the +SMTP headers. Exiting with a non-zero status causes `git send-email` to abort +before sending any e-mails. fsmonitor-watchman ~~~~~~~~~~~~~~~~~~