[PATCH/RFC] Add some tips for contributors.

Štěpán Němec stepnem at gmail.com
Fri Jul 23 13:27:54 CEST 2010


---
[Side note:
Committing people's patches edited is a no no. At least I strongly
prefer having a discussion and resending the patch, possibly several
times, to having my patch edited (and possibly borken, which seems to
have happened with 9b9c0298530) and committed under my name. Or being
asked "I'll commit this instead/squash these changes in, OK?".]

 .gitattributes |    1 +
 CONTRIBUTE     |   32 ++++++++++++++++++++++++++++++++
 Header         |    3 ++-
 3 files changed, 35 insertions(+), 1 deletions(-)
 create mode 100644 .gitattributes
 create mode 100644 CONTRIBUTE

diff --git a/.gitattributes b/.gitattributes
new file mode 100644
index 0000000..b362cfa
--- /dev/null
+++ b/.gitattributes
@@ -0,0 +1 @@
+*.el diff=lisp
diff --git a/CONTRIBUTE b/CONTRIBUTE
new file mode 100644
index 0000000..70988e4
--- /dev/null
+++ b/CONTRIBUTE
@@ -0,0 +1,32 @@
+So you want to contribute? That's great, thank you! Here are some tips that
+will help you make us cry with delight at the very sight of your patch:
+
+Patch format
+------------
+- it's best if the patches are directly processable by Git (such as when using
+  `git-format-patch', `git-send-email' or the ---8<--- scissors trick)
+- a nice way to have Git produce better diff hunk headers when working with
+  Lisp code is to add this to your config:
+
+[diff "lisp"]
+    xfuncname = "^\\(.*$"
+
+With this and an appropriate diff attribute definition (provided by the
+.gitattributes file in the repository), it will be immediately visible which
+top level Lisp form a particular hunk pertains to.
+
+Commit messages
+---------------
+- the first line is a commit summary, usually a single sentence in imperative
+  (starting with a capital letter and ending with a period) short enough to fit
+  in a mail subject line
+- after that and a blank line comes the commit message with a free form
+  explanation (optional for trivial patches)
+
+General coding guidelines
+-------------------------
+- keep it inside 80 columns when possible
+- avoid trailing whitespace (Git can help you with that)
+- if you're making bigger changes, it's a good idea to try byte-compiling
+  Vimpulse even though you normally don't (the compiler sometimes catches
+  issues not obvious when running uncompiled)
diff --git a/Header b/Header
index 99661ce..1b07281 100644
--- a/Header
+++ b/Header
@@ -41,5 +41,6 @@
 ;;
 ;; Vimpulse is under active development.  It works quite well with
 ;; GNU Emacs 22.3 and 23.2, as well as XEmacs 21.4.22.  Patches and
-;; feature requests are welcome.
+;; feature requests are welcome (see also the file CONTRIBUTE in the
+;; repository).
 
-- 
1.7.1




More information about the implementations-list mailing list