From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id 6X6uEknAR2HxrgAAgWs5BA (envelope-from ) for ; Mon, 20 Sep 2021 00:57:13 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id cMfiDUnAR2FLJQAAB5/wlQ (envelope-from ) for ; Sun, 19 Sep 2021 22:57:13 +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 DB71716AB1 for ; Mon, 20 Sep 2021 00:57:12 +0200 (CEST) Received: from localhost ([::1]:49410 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mS5kF-0004tb-VO for larch@yhetil.org; Sun, 19 Sep 2021 18:57:11 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37136) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mS5k5-0004tL-Ty for guix-patches@gnu.org; Sun, 19 Sep 2021 18:57:05 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:56937) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mS5k5-00063S-Ma for guix-patches@gnu.org; Sun, 19 Sep 2021 18:57:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mS5k5-0004Hl-M0 for guix-patches@gnu.org; Sun, 19 Sep 2021 18:57:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#50363] [PATCH v3] Improve default diff hunk header detection. Resent-From: Sarah Morgensen Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 19 Sep 2021 22:57:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 50363 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Kyle Meyer Cc: 50363@debbugs.gnu.org, ludo@gnu.org, maximedevos@telenet.be Received: via spool by 50363-submit@debbugs.gnu.org id=B50363.163209221516462 (code B ref 50363); Sun, 19 Sep 2021 22:57:01 +0000 Received: (at 50363) by debbugs.gnu.org; 19 Sep 2021 22:56:55 +0000 Received: from localhost ([127.0.0.1]:40250 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mS5jz-0004HS-Dd for submit@debbugs.gnu.org; Sun, 19 Sep 2021 18:56:55 -0400 Received: from out2.migadu.com ([188.165.223.204]:33663) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mS5jw-0004HI-Do for 50363@debbugs.gnu.org; Sun, 19 Sep 2021 18:56:54 -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=1632092210; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=mjPYkoxXE+LKBDfaG6ZEdELZ88F5MY+W+zq1sHtCtDo=; b=epLAnPmQ2DZcDqzuSiHvoL7+sT9nD+D3w+WSD+mfcuKYf4+aNSBPNoVfMcjxdPOPVBkuxW J+whwWOWTvOwtF3V4P9v0ixVoVgZc9d95KgHt9yoCTk5qP8mIlT7H4IL/5sTxJYWaDRuOJ xCk7gNldAt9bMnMqbVEXTScaI65vhao= From: Sarah Morgensen References: <58187bb9c61bc7599cde31b52a5dd58e90c1f78f.1632076068.git.iskarian@mgsn.dev> <87o88o8bf8.fsf@kyleam.com> Date: Sun, 19 Sep 2021 15:56:43 -0700 In-Reply-To: <87o88o8bf8.fsf@kyleam.com> (Kyle Meyer's message of "Sun, 19 Sep 2021 18:09:47 -0400 (21 minutes, 1 second ago)") Message-ID: <86ee9kgono.fsf@mgsn.dev> MIME-Version: 1.0 Content-Type: text/plain 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=1632092233; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:resent-cc:resent-from:resent-sender: resent-message-id:in-reply-to:in-reply-to:references:references: list-id:list-help:list-unsubscribe:list-subscribe:list-post: dkim-signature; bh=mjPYkoxXE+LKBDfaG6ZEdELZ88F5MY+W+zq1sHtCtDo=; b=Jit3ynnqBHfuWmannGnZ32V8w56L3pYr8DBD5QxC5hzFQWUPxTo5odvCJEmTDNW/f4GHcn F28el6avN/it7M897UUMNzeh5v7pT2rwybK73LkZQ/QzrzSv1EfFECtciZpl/CWWX6v6OD DgIiKZOX+nZhlp8+sRZYW3D6uzwOv8YyjU9RhROHT66m11yxIEu6B1Ts+pHCNxqrWoy72r gEXgkkmEONWvOykCIKtkC/HdDzqDz6DAbD9eHVM3LFbfMePszy1GVTRNxzBT6AUVOmT4qi IdjnJ12W1ye90qKsICU1NMESw1Z1mbpKj9lT+c/uona4lrlSHa+cCeXIxXjQpQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1632092233; a=rsa-sha256; cv=none; b=m2faEy4doiHSNWdiGVIPki+7mIxxk4oSdYx5clmXezEZ0Vd2YZtUq223fDRJyL5yJTYCQl lAjQBpsSo33khtH1T96FjpzjFijK4OUbKr2Y8hwEiCN4AEZGYSWFZJyVWrFgfviklGO3nZ wpKIPKWfVh2cX7u89tY5FL9UFXFxgzfEVFcOngL7D45KoHWMBlCLDuBUQNxW2rt0o+mWy/ 8VZPyXOizl19QK5fhXFvJUaWiTzOQnUiNboZoLiRol9nznxuucA1rM4oUs8lhhdyQEAXi1 ewPvw9c4P7AoOlU1+vgr1y3DeZwJABZ4VNfKCYFJj9jKgEgSFjjrR8B1ivysAA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=mgsn.dev header.s=key1 header.b=epLAnPmQ; 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: 0.21 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=mgsn.dev header.s=key1 header.b=epLAnPmQ; 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: DB71716AB1 X-Spam-Score: 0.21 X-Migadu-Scanner: scn0.migadu.com X-TUID: N6ewXrNV97iP Hello Kyle, Thanks for taking a look and trying this out! Kyle Meyer writes: > Sarah Morgensen writes: > >> diff --git a/.gitattributes b/.gitattributes >> new file mode 100644 >> index 0000000000..51f29b8a48 >> --- /dev/null >> +++ b/.gitattributes >> @@ -0,0 +1,3 @@ >> +*.scm diff=scheme >> +*.scm.in diff=scheme >> +*.texi diff=tex > > "tex" is a built-in pattern for LaTeX. To avoid confusion, I suggest > "texinfo", which is what the Emacs repo uses. Good point. I was trying to use the built-in because it has a whitespace regex defined in userdiff.c, but I just found that I can set that with wordRegex, so I'll do that. I'll take a look at the Emacs repo as well. > >> diff --git a/doc/contributing.texi b/doc/contributing.texi > [...] >> +@example >> +git config --local include.path=../etc/git/gitconfig >> +@end example > > The '=' above should be a space: > > $ git config --local include.path=../etc/git/gitconfig > error: invalid key: include.path=../etc/git/gitconfig > > (This is true in the other examples as well.) Thanks for catching this. > > Just thinking aloud: the include.path approach above assumes a clone > with the standard $GIT_DIR and working tree layout, but that seems fine > because users with more unusual setups would know how to adjust it for > their case. Also, for git-worktree users, the etc/git/gitconfig file in > the main worktree would be used within other worktrees, but for this use > case I doubt that will cause confusion. I actually wrote about the worktree limitation at first, but I thought including it would be more confusing to people who don't use them than it would be helpful to people who do. >> @unnumberedsubsec Sending a Patch Series >> @anchor{Sending a Patch Series} >> @cindex patch series >> @cindex @code{git send-email} >> -@cindex @code{git-send-email} > > I suspect the second variant was included to help those that are using > the git- variant to search (perhaps because that's how they'd refer to > the manpage or because they know about Git's exec path). Not a big deal > either way, but keeping it around seems okay to me. Hmmm. I originally removed it because it results in two entries in the index. Perhaps I can index them as @cindex @code{git send-email} (or @code{git-send-email}) or similar. What do you think? >> diff --git a/etc/git/gitconfig b/etc/git/gitconfig >> new file mode 100644 >> index 0000000000..290006816f >> --- /dev/null >> +++ b/etc/git/gitconfig >> @@ -0,0 +1,5 @@ >> +[diff "scheme"] >> + xfuncname = "^(\\(define.*)$" >> + >> +[diff "tex"] >> + xfuncname = "^(@((|sub|subsub)section|(unnumbered|appendix)((|sub|subsub)sec)|(|major|chap|sub|subsub)heading|chapter|part|titlepage|top)[ \t]+.*)$" > > Fwiw the Emacs repo sets a simpler value (via autogen.sh): > > ^@node[[:space:]]+([^,[:space:]][^,]+) I made this choice because we have several unnumbered subsections without nodes that are fairly long. Otherwise, nodes make a good choice. Also, their xfuncname will only show the node name as the diff hunk header--not the whole line. I also considered this (I think it's cleaner) but I thought it might be confusing. If others like it, let's do it. -- Sarah