guix-patches
[Top][All Lists]
Advanced

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

[bug#50363] [PATCH] Improve default diff hunk header detection.


From: Ludovic Courtès
Subject: [bug#50363] [PATCH] Improve default diff hunk header detection.
Date: Mon, 13 Sep 2021 12:24:25 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)

Hi!

Sarah Morgensen <iskarian@mgsn.dev> skribis:

> 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?

That LGTM too.  Rather than a ‘make’ target, how about a adding a line
or two under “Contributing”?

Thanks,
Ludo’.





reply via email to

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