-
Notifications
You must be signed in to change notification settings - Fork 0
Add document on how to submit patches #204
Merged
Merged
Changes from 6 commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
45d62e5
Documentation: Add file `SubmittingPatches` from git project
pmenzel 5828d92
Documentation: Remove passages unrelated to bee files
pmenzel 8bb1972
Documentation: Clarify commit message summary format
pmenzel b586e8a
Documentation: Remove paragraph *Decide what to base your work on.*
pmenzel 3dea0c8
Documentation: Remove *GitHub-Travis CI hints*
pmenzel 93c2810
Documentation: Use Markdown as markup
pmenzel 152bf2d
Documentation: Rephrase first sentence
donald 9c70490
Documentation: Remove paragraphs which don't apply here
donald 0fc13f2
Documentation: Move paragraphs to better places
donald 997c4d5
Documentation: Convert header into paragraph
donald 02ac363
Documentation: Rephrase header
donald File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,122 @@ | ||
Here are some guidelines for people who want to contribute their code | ||
to this software. | ||
|
||
Make separate commits for logically separate changes. | ||
===================================================== | ||
|
||
Unless your patch is really trivial, you should not be sending | ||
out a patch that was generated between your working tree and | ||
your commit head. Instead, always make a commit with complete | ||
commit message and generate a series of patches from your | ||
repository. It is a good discipline. | ||
|
||
Give an explanation for the change(s) that is detailed enough so | ||
that people can judge if it is good thing to do, without reading | ||
the actual patch text to determine how well the code does what | ||
the explanation promises to do. | ||
|
||
If your description starts to get too long, that's a sign that you | ||
probably need to split up your commit to finer grained pieces. | ||
That being said, patches which plainly describe the things that | ||
help reviewers check the patch, and future maintainers understand | ||
the code, are the most beautiful patches. Descriptions that summarise | ||
the point in the subject well, and describe the motivation for the | ||
change, the approach taken by the change, and if relevant how this | ||
differs substantially from the prior version, are all good things | ||
to have. | ||
|
||
Make sure that you have tests for the bug you are fixing. See | ||
t/README for guidance. | ||
|
||
When adding a new feature, make sure that you have new tests to show | ||
the feature triggers the new behavior when it should, and to show the | ||
feature does not trigger when it shouldn't. After any code change, make | ||
sure that the entire test suite passes. | ||
|
||
If you have an account at GitHub (and you can get one for free to work | ||
on open source projects), you can use their Travis CI integration to | ||
test your changes on Linux, Mac (and hopefully soon Windows). See | ||
GitHub-Travis CI hints section for details. | ||
|
||
Do not forget to update the documentation to describe the updated | ||
behavior and make sure that the resulting documentation set formats | ||
well. It is currently a liberal mixture of US and UK English norms for | ||
spelling and grammar, which is somewhat unfortunate. A huge patch that | ||
touches the files all over the place only to correct the inconsistency | ||
is not welcome, though. Potential clashes with other changes that can | ||
result from such a patch are not worth it. We prefer to gradually | ||
reconcile the inconsistencies in favor of US English, with small and | ||
easily digestible patches, as a side effect of doing some other real | ||
work in the vicinity (e.g. rewriting a paragraph for clarity, while | ||
turning en_UK spelling to en_US). Obvious typographical fixes are much | ||
more welcomed ("teh -> "the"), preferably submitted as independent | ||
patches separate from other documentation changes. | ||
|
||
Oh, another thing. We are picky about whitespaces. Make sure your | ||
changes do not trigger errors with the sample pre-commit hook shipped | ||
in templates/hooks--pre-commit. To help ensure this does not happen, | ||
run git diff --check on your changes before you commit. | ||
|
||
|
||
Describe your changes well. | ||
=========================== | ||
|
||
The first line of the commit message should be a short description (50 | ||
characters is the soft limit, see DISCUSSION in git-commit(1)), and | ||
should skip the full stop. It is also conventional in most cases to | ||
prefix the first line with "project: " where the project is a filename | ||
or identifier for the project, the Bee file is for, e.g. | ||
|
||
* vlc: Enable awesome feature | ||
* linux-4.9-rc5: Add a patch | ||
|
||
The description is a summary, and should be a statement, that means, it | ||
has to contain a verb. Best, start the statement with a verb in | ||
imperative mood. | ||
|
||
If in doubt which identifier to use, run "git log --no-merges" on the | ||
files you are modifying to see the current conventions. | ||
|
||
The body should provide a meaningful commit message, which: | ||
|
||
* explains the problem the change tries to solve, iow, what is wrong | ||
with the current code without the change. | ||
|
||
* justifies the way the change solves the problem, iow, why the | ||
result with the change is better. | ||
|
||
* alternate solutions considered but discarded, if any. | ||
|
||
Describe your changes in imperative mood, e.g. "make xyzzy do frotz" | ||
instead of "[This patch] makes xyzzy do frotz" or "[I] changed xyzzy | ||
to do frotz", as if you are giving orders to the codebase to change | ||
its behaviour. Try to make sure your explanation can be understood | ||
without external resources. Instead of giving a URL to a mailing list | ||
archive, summarize the relevant points of the discussion. | ||
|
||
If you want to reference a previous commit in the history of a stable | ||
branch, use the format "abbreviated sha1 (subject, date)", | ||
with the subject enclosed in a pair of double-quotes, like this: | ||
|
||
Commit f86a374 ("pack-bitmap.c: fix a memleak", 2015-03-30) | ||
noticed that ... | ||
|
||
The "Copy commit summary" command of gitk can be used to obtain this | ||
format. | ||
|
||
|
||
Publish your work in a separate branch. | ||
======================================= | ||
|
||
Please make sure your patch does not add commented out debugging code, | ||
or include any extra files which do not relate to what your patch | ||
is trying to achieve. Make sure to review | ||
your patch after generating it, to ensure accuracy. Before | ||
sending out, please make sure it cleanly applies to the "master" | ||
branch head. | ||
|
||
Creating a merge/pull request | ||
============================= | ||
|
||
You often want to add additional explanation about the patch, | ||
other than the commit message itself. |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"this software" ? A bunch of bee-files isn't software. 'bee-files' is not a software project but a collection of bee-files.
also I find the name
SubmittingPatches
misleading. "Hey, your bee-file is buggy, take this patch and fix it".There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I totally agree. Looking at the userbase, I’d argue the document is good enough for a start, and can be improved over the time.