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: AS31976 209.132.180.0/23 X-Spam-Status: No, score=-4.1 required=3.0 tests=AWL,BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI,SPF_HELO_NONE,SPF_NONE shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by dcvr.yhbt.net (Postfix) with ESMTP id D9F591F4C0 for ; Tue, 22 Oct 2019 11:48:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388843AbfJVLsW (ORCPT ); Tue, 22 Oct 2019 07:48:22 -0400 Received: from userp2130.oracle.com ([156.151.31.86]:36870 "EHLO userp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387893AbfJVLsV (ORCPT ); Tue, 22 Oct 2019 07:48:21 -0400 Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x9MBcsXp106002; Tue, 22 Oct 2019 11:48:07 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding; s=corp-2019-08-05; bh=KYzS++9lAA+38b2bQnAmAV7JCso+dWX+ChClkasrb6E=; b=LKpVDv5Da2NIGsk5HnavwmdjIle+7mbznXaBmsu0DC8OQpgLP5J3dobtHLZvJpKQhOLG rddhf6d74Ei1agjGfNnwO/myYQ7uY6UktZoDj3qD/R58lr1zQYJ0A4MeSCtur/gBStyM zDKH8sofQJh0DY60wCMta990Hb0wgCWRvNIrGinVKWmhptNBZV4yiTj24Fv55FA6YPq+ vS9SPWKMPQDoJFzOfn14E2A2vYgzPIMO2BJR4CIRFiMTe5gwoKZJ/XjaYw7rS3pm6a7f 49fm4kUAtp2G78LdUktitE0AmgCI28j2x3qPmMz0ZS5BYFuZhSJSTFHwfvokAEF7dJns yg== Received: from aserp3030.oracle.com (aserp3030.oracle.com [141.146.126.71]) by userp2130.oracle.com with ESMTP id 2vqswte57s-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 22 Oct 2019 11:48:06 +0000 Received: from pps.filterd (aserp3030.oracle.com [127.0.0.1]) by aserp3030.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x9MBcBrX092757; Tue, 22 Oct 2019 11:48:06 GMT Received: from pps.reinject (localhost [127.0.0.1]) by aserp3030.oracle.com with ESMTP id 2vsx22jnq1-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 22 Oct 2019 11:48:06 +0000 Received: from aserp3030.oracle.com (aserp3030.oracle.com [127.0.0.1]) by pps.reinject (8.16.0.27/8.16.0.27) with SMTP id x9MBm0hU115832; Tue, 22 Oct 2019 11:48:05 GMT Received: from t460.home (dhcp-10-175-28-77.vpn.oracle.com [10.175.28.77]) by aserp3030.oracle.com with ESMTP id 2vsx22jmx3-4; Tue, 22 Oct 2019 11:48:05 +0000 From: Vegard Nossum To: Junio C Hamano , git@vger.kernel.org Cc: Paolo Bonzini , Vegard Nossum , Paul Tan Subject: [RFC PATCH v2 3/3] am: add --exact Date: Tue, 22 Oct 2019 13:45:18 +0200 Message-Id: <20191022114518.32055-4-vegard.nossum@oracle.com> X-Mailer: git-send-email 2.24.0.rc0.3.g4ba423c3c2 In-Reply-To: <20191022114518.32055-1-vegard.nossum@oracle.com> References: <20191022114518.32055-1-vegard.nossum@oracle.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9417 signatures=668684 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=2 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1908290000 definitions=main-1910220107 Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org This uses exact metadata when creating the commit object, hopefully reconstructing the commit with the exact same SHA1. Note: In order to be forwards compatible with new commit formats we may want a new helper for creating a commit with the exact metadata that is present (and then validating the result) as opposed to trying to parse the metadata and pass it piecewise to commit_tree(). Previous-version: 3120370db888889f32e07a082edb4722db8feef1 Cc: Paul Tan Signed-off-by: Vegard Nossum --- Documentation/git-am.txt | 9 +++- builtin/am.c | 111 +++++++++++++++++++++++++++++++++++---- t/t4150-am.sh | 30 +++++++++++ 3 files changed, 138 insertions(+), 12 deletions(-) diff --git a/Documentation/git-am.txt b/Documentation/git-am.txt index fc3b993c33..5b75596aaf 100644 --- a/Documentation/git-am.txt +++ b/Documentation/git-am.txt @@ -9,7 +9,7 @@ git-am - Apply a series of patches from a mailbox SYNOPSIS -------- [verse] -'git am' [--signoff] [--keep] [--[no-]keep-cr] [--[no-]utf8] +'git am' [--[no-]exact] [--signoff] [--keep] [--[no-]keep-cr] [--[no-]utf8] [--[no-]3way] [--interactive] [--committer-date-is-author-date] [--ignore-date] [--ignore-space-change | --ignore-whitespace] [--whitespace=