From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id eNj0MkekMmGygAAAgWs5BA (envelope-from ) for ; Sat, 04 Sep 2021 00:40:07 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id YJxwLkekMmGuRgAA1q6Kng (envelope-from ) for ; Fri, 03 Sep 2021 22:40:07 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 97EDDB628 for ; Sat, 4 Sep 2021 00:40:07 +0200 (CEST) Received: from localhost ([::1]:55712 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mMHqw-00025L-MQ for larch@yhetil.org; Fri, 03 Sep 2021 18:40:06 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41382) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mMHqt-00025D-7i for guix-patches@gnu.org; Fri, 03 Sep 2021 18:40:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:34483) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mMHqt-0000Pz-02 for guix-patches@gnu.org; Fri, 03 Sep 2021 18:40:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mMHqr-00033A-Sp for guix-patches@gnu.org; Fri, 03 Sep 2021 18:40:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#50363] [PATCH v2] Improve default diff hunk header detection. Resent-From: Sarah Morgensen Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 03 Sep 2021 22:40:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 50363 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 50363@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.163070876411669 (code B ref -1); Fri, 03 Sep 2021 22:40:01 +0000 Received: (at submit) by debbugs.gnu.org; 3 Sep 2021 22:39:24 +0000 Received: from localhost ([127.0.0.1]:46029 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mMHqF-000329-KC for submit@debbugs.gnu.org; Fri, 03 Sep 2021 18:39:23 -0400 Received: from lists.gnu.org ([209.51.188.17]:59120) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mMHq7-00031u-67 for submit@debbugs.gnu.org; Fri, 03 Sep 2021 18:39:21 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41356) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mMHq6-00024P-Vm for guix-patches@gnu.org; Fri, 03 Sep 2021 18:39:14 -0400 Received: from out2.migadu.com ([2001:41d0:2:aacc::]:10642) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mMHq4-00085a-FU for guix-patches@gnu.org; Fri, 03 Sep 2021 18:39:14 -0400 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mgsn.dev; s=key1; t=1630708748; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=IBSs7glMitEYgu7Vy9BZBhSgGazJt+PyVtxbTTs6hSk=; b=Yn9ipum4YxeeeZOiUJ/kqcjh/1+esUbJpJ9e3E0kdJdHMk0x76uzCuRwtTCfhjTig5Pjk0 dKh1qWVCUYyNXZgMOYNUt/+ElNpDZE99R16ul18PrIX08qaJ6dAlke1O7009K0C+tVjebw de/wtr15yUMw4jw1pu0Dl+pMKajzVeU= From: Sarah Morgensen Date: Fri, 3 Sep 2021 15:39:05 -0700 Message-Id: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Migadu-Auth-User: iskarian@mgsn.dev Received-SPF: pass client-ip=2001:41d0:2:aacc::; envelope-from=iskarian@mgsn.dev; helo=out2.migadu.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1630708807; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=IBSs7glMitEYgu7Vy9BZBhSgGazJt+PyVtxbTTs6hSk=; b=NT5s1GRrP1SDiPCR3qh7ZKD8FJKdMPyVQej6g4bxuENjQ8u1+F+MZrrI7+CpMGvxhm0NpW mDG3y1RJzChKDb50aYKiMO/Mm1XwWVGhWjo9hopmD6odF/saI4ih+UTMzUShQLZ+HZpaOn MKSHe3a+qKDxlWldSxrGlJLaSZnODB+J984FdfhudgNaQ6/VeW32JtH7NfwerOUe3avNCa DeT+DPb7RmG2H9dmUUZsPhwvy/3Ey2So1PccP2632CgXrby8AInWIHNUoM0mHAKhYlU0Ng +PTxYmngelk/QIj97SgQpu74dxQjqm1mFk+NrtvUt3NE3s3GGsmsBMp/q4M8Ew== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1630708807; a=rsa-sha256; cv=none; b=TwA0J3SUxawx16cYveuzPrmd5OhzyZ76OrCqrcXCxbo05yr46nSJDekQX/OwsrdM3YGqFI K0TPvt+8KxJboPXw4qCHycZe+bKvy3bPABJ3eKjXx9ruz6bcQORsGGjNIiO9NZFyqyNTHS I2PsTeAObZQFwOifvv62r1b7uzZi0ELugOvYrRycIXntwk/0ARMWYnQzqdhsqTYd+n3Yop eCZPgZ1tC+itNv0k+6rWntQRBPVCEPo+HaUSRE1xPoYGzNgKroYOu5te4Rwk3DAN/tMZb5 S3kGkjVnKIg7UsS192HtL90e8cUcRa1Re2xFk6GpeReUPoZSGqNvV3Ojbgr5YA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=mgsn.dev header.s=key1 header.b=Yn9ipum4; dmarc=fail reason="SPF not aligned (relaxed)" header.from=mgsn.dev (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Spam-Score: 3.68 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=mgsn.dev header.s=key1 header.b=Yn9ipum4; dmarc=fail reason="SPF not aligned (relaxed)" header.from=mgsn.dev (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: 97EDDB628 X-Spam-Score: 3.68 X-Migadu-Scanner: scn1.migadu.com X-TUID: PyKs+ewovpcU Tell git to look for top-level definitions for diff hunk headers in Scheme files. .gitattributes: New file. .gitconfig: New file. --- Hello Guix, This patch improves the diff hunk headers for diffs on scheme files in this repository. These settings are always settable (and overridable) on a per-user basis, but I think having them as defaults is nice. This may help with patches applying in general, but the main goal is to make etc/committer.scm a little less brittle. The default "scheme" function regex (enabled with .gitattributes) recognizes both toplevel and non-toplevel defines. I've modified the regex in .gitconfig to only recognize the toplevel defines. I think this makes more sense for our purposes. Unfortunately, checked-in git config settings cannot be automatically used (for security reasons), and must be enabled with a once-per-clone git config --local include.path ../.gitconfig which isn't ideal. I suppose we could make a 'make' target for setup like this if we wanted to make it easy. WDYT? -- Sarah .gitattributes | 2 ++ .gitconfig | 2 ++ 2 files changed, 4 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitconfig diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000000..5c1b15e9e0 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,2 @@ +*.scm diff=scheme +*.scm.in diff=scheme diff --git a/.gitconfig b/.gitconfig new file mode 100644 index 0000000000..344d829824 --- /dev/null +++ b/.gitconfig @@ -0,0 +1,2 @@ +[diff "scheme"] + xfuncname = "^(\\(define.*)$" base-commit: 522a3bf99cbc21a9093f63280b9508cd69b94ff0 -- 2.31.1