guix-commits
[Top][All Lists]
Advanced

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

01/09: maint: Improve default diff hunk header detection.


From: guix-commits
Subject: 01/09: maint: Improve default diff hunk header detection.
Date: Mon, 4 Oct 2021 10:39:37 -0400 (EDT)

civodul pushed a commit to branch master
in repository guix.

commit 9fc8ae4171e5da4939a64fc6d684c8b9d85bbe84
Author: Sarah Morgensen <iskarian@mgsn.dev>
AuthorDate: Mon Sep 20 16:37:44 2021 -0700

    maint: Improve default diff hunk header detection.
    
    Tell git where to look for diff hunk headers: top-level definitions for
    Scheme files, and (sub)section headers for texi files.
    
    * .gitattributes, etc/git/gitconfig: New files.
    * doc/contributing.texi ("Submitting Patches"): Add subsection
    "Configuring Git".  Document etc/git/gitconfig.
    
    Signed-off-by: Ludovic Courtès <ludo@gnu.org>
---
 doc/contributing.texi | 46 ++++++++++++++++++++++++++++++++++++++++++----
 doc/guix.texi         |  1 +
 2 files changed, 43 insertions(+), 4 deletions(-)

diff --git a/doc/contributing.texi b/doc/contributing.texi
index fbb3c47..21caa9c 100644
--- a/doc/contributing.texi
+++ b/doc/contributing.texi
@@ -992,9 +992,12 @@ keyword parameters for procedures that take more than four 
parameters.
 Development is done using the Git distributed version control system.
 Thus, access to the repository is not strictly necessary.  We welcome
 contributions in the form of patches as produced by @code{git
-format-patch} sent to the @email{guix-patches@@gnu.org} mailing list.
-Seasoned Guix developers may also want to look at the section on commit
-access (@pxref{Commit Access}).
+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
+Git repository options (@pxref{Configuring Git}) first, which can
+improve the readability of patches.  Seasoned Guix developers may also
+want to look at the section on commit access (@pxref{Commit Access}).
 
 This mailing list is backed by a Debbugs instance, which allows us to
 keep track of submissions (@pxref{Tracking Bugs and Patches}).  Each
@@ -1211,11 +1214,46 @@ should not be delayed.
 When a bug is resolved, please close the thread by sending an email to
 @email{@var{NNN}-done@@debbugs.gnu.org}.
 
+@node Configuring Git
+@subsection Configuring Git
+@cindex git configuration
+@cindex @code{git format-patch}
+@cindex @code{git send-email}
+
+If you have not done so already, you may wish to set a name and email
+that will be associated with your commits (@pxref{telling git your name,
+, Telling Git your name, git, Git User Manual}).  If you wish to use a
+different name or email just for commits in this respository, you can
+use @command{git config --local}, or edit @file{.git/config} in the
+repository instead of @file{~/.gitconfig}.
+
+We provide some default settings in @file{etc/git/gitconfig} which
+modify how patches are generated, making them easier to read and apply.
+These settings can be applied by manually copying them to
+@file{.git/config} in your checkout, or by telling Git to include the
+whole file:
+
+@example
+git config --local include.path ../etc/git/gitconfig
+@end example
+
+From then on, any changes to @file{etc/git/gitconfig} would
+automatically take effect.
+
+Since the first patch in a series must be sent separately
+(@pxref{Sending a Patch Series}), it can also be helpful to tell
+@command{git format-patch} to handle the e-mail threading instead of
+@command{git send-email}:
+
+@example
+git config --local format.thread shallow
+git config --local sendemail.thread no
+@end example
+
 @unnumberedsubsec Sending a Patch Series
 @anchor{Sending a Patch Series}
 @cindex patch series
 @cindex @code{git send-email}
-@cindex @code{git-send-email}
 
 When sending a patch series (e.g., using @code{git send-email}), please
 first send one message to @email{guix-patches@@gnu.org}, and then send
diff --git a/doc/guix.texi b/doc/guix.texi
index 2728f34..a9d6146 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -97,6 +97,7 @@ Copyright @copyright{} 2021 Hui Lu@*
 Copyright @copyright{} 2021 pukkamustard@*
 Copyright @copyright{} 2021 Alice Brenon@*
 Copyright @copyright{} 2021 Andrew Tropin@*
+Copyright @copyright{} 2021 Sarah Morgensen@*
 
 Permission is granted to copy, distribute and/or modify this document
 under the terms of the GNU Free Documentation License, Version 1.3 or



reply via email to

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