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: AS53758 23.128.96.0/24 X-Spam-Status: No, score=-3.8 required=3.0 tests=AWL,BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_PASS, SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by dcvr.yhbt.net (Postfix) with ESMTP id D5F401F5AE for ; Fri, 23 Apr 2021 16:41:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231345AbhDWQmY (ORCPT ); Fri, 23 Apr 2021 12:42:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43652 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229931AbhDWQmX (ORCPT ); Fri, 23 Apr 2021 12:42:23 -0400 Received: from mav.lukeshu.com (mav.lukeshu.com [IPv6:2001:19f0:5c00:8069:5400:ff:fe26:6a86]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3077CC061574 for ; Fri, 23 Apr 2021 09:41:47 -0700 (PDT) Received: from lukeshu-dw-thinkpad (unknown [IPv6:2601:281:8200:26:4e34:88ff:fe48:5521]) by mav.lukeshu.com (Postfix) with ESMTPSA id 3B14980590; Fri, 23 Apr 2021 12:41:44 -0400 (EDT) From: Luke Shumaker To: git@vger.kernel.org Cc: Junio C Hamano , Elijah Newren , Jeff King , Johannes Schindelin , =?UTF-8?q?Nguy=E1=BB=85n=20Th=C3=A1i=20Ng=E1=BB=8Dc=20Duy?= , Taylor Blau , "brian m . carlson" , Eric Sunshine , Luke Shumaker Subject: [PATCH v3 0/3] fast-export, fast-import: implement signed-commits Date: Fri, 23 Apr 2021 10:41:15 -0600 Message-Id: <20210423164118.693197-1-lukeshu@lukeshu.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210422002749.2413359-1-lukeshu@lukeshu.com> References: <20210422002749.2413359-1-lukeshu@lukeshu.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org From: Luke Shumaker (First of all, my apologies for neglecting to set the In-Reply-To on the v2 patcheset.) fast-export has an existing --signed-tags= flag that controls how to handle tag signatures. However, there is no equivalent for commit signatures; it just silently strips the signature out of the commit (analogously to --signed-tags=strip). So implement a --signed-commits= flag in fast-export, and implement the receiving side of it in fast-import. I believe that this revision addresses all of the feedback so far, with the exception that I have not implemented Elijah's suggestion to implement a flag on fast-import to validate signatures. While I agree that this would be a useful feature, I consider it to be beyond the scope of this work. This passes all of the GitHub Actions CI checks, and passes all but one of the Travis-CI checks; the failing Travis-CI check seems to be an unrelated 404 from `apt-get`. https://github.com/LukeShu/git/runs/2405123468 Luke Shumaker (3): git-fast-import.txt: add missing LF in the BNF v2: no changes v3: no changes fast-export: rename --signed-tags='warn' to 'warn-verbatim' v2: - Reword commit message, based on feedback from Taylor. - Fix copy-pasto in the test, noticed by Taylor. - Add a comment to the tests. - Fix whitespace in the tests. v3: - Document that --signed-tags='warn' is a deprecated synonym for --signed-tags='warn-verbatim', rather than leaving it undocumented, based on feedback from Eric. fast-export, fast-import: implement signed-commits v2: - Remove erroneous remark about ordering from the commit message. - Adjust the stream syntax to include the hash algorithm, as suggested by brian. - Add support for sha256 (based on lots of useful information from brian). It does not support multiply-signed commits. - Shorten the documentation, based on feedback from Taylor. - Add comments, based on feedback from Taylor. - Change the default from `--signed-commits=strip` to `--signed-commits=warn-strip`. This shouldn't break anyone, and means that users get useful feedback by default. v3: no changes Documentation/git-fast-export.txt | 13 +++- Documentation/git-fast-import.txt | 20 ++++- builtin/fast-export.c | 123 ++++++++++++++++++++++++++---- builtin/fast-import.c | 23 ++++++ t/t9350-fast-export.sh | 88 +++++++++++++++++++++ 5 files changed, 247 insertions(+), 20 deletions(-) -- 2.31.1 Happy hacking, ~ Luke Shumaker