emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#50363: closed ([PATCH] Improve default diff hunk header detection.)


From: GNU bug Tracking System
Subject: bug#50363: closed ([PATCH] Improve default diff hunk header detection.)
Date: Mon, 04 Oct 2021 12:27:02 +0000

Your message dated Mon, 04 Oct 2021 14:26:13 +0200
with message-id <874k9xq8m2.fsf_-_@gnu.org>
and subject line Re: bug#50363: [PATCH] Improve default diff hunk header 
detection.
has caused the debbugs.gnu.org bug report #50363,
regarding [PATCH] Improve default diff hunk header detection.
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs@gnu.org.)


-- 
50363: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=50363
GNU Bug Tracking System
Contact help-debbugs@gnu.org with problems
--- Begin Message --- Subject: [PATCH v2] Improve default diff hunk header detection. Date: Fri, 3 Sep 2021 15:39:05 -0700
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




--- End Message ---
--- Begin Message --- Subject: Re: bug#50363: [PATCH] Improve default diff hunk header detection. Date: Mon, 04 Oct 2021 14:26:13 +0200 User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)
Hi Sarah,

Sarah Morgensen <iskarian@mgsn.dev> skribis:

>> I have one last question:
>>
>>> +format-patch} sent to the @email{guix-patches@@gnu.org} mailing list
>>> +(@pxref{submitting patches,, Submitting patches to a project, git, Git
>>> +User Manual}).  Contributors are encouraged to take a moment to set some
>>
>> AFAICS, there’s no Info-format Git manual, is there?  In that case, the
>> pxref above is incorrect, but we can use @uref instead and/or suggest
>> ‘man git’ or similar.
>
> We don't currently build it, but there is.  In the git repo, in
> Documentation/Makefile:
>
> info: git.info gitman.info
> [...]
> git.info: user-manual.texi
>       $(QUIET_MAKEINFO)$(MAKEINFO) --no-split -o $@ user-manual.texi
>
> It's available online at
>
>   https://git-scm.com/docs/user-manual
>
> and
>
>   https://mirrors.edge.kernel.org/pub/software/scm/git/docs/user-manual.html
>
> My other patch, #50683, adds this reference to htmlxref.cnf.

Oh, nice; thanks for explaining.

Finally applied!

Ludo’.


--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]