[BioRuby] Code cleanup: expanded tabs into spaces.
pjotr.public14 at thebird.nl
Sat Apr 17 07:29:50 UTC 2010
On Sat, Apr 17, 2010 at 08:28:56AM +0900, Naohisa Goto wrote:
> Please avoid single big commit. This makes hard if we need
> to revert few files due to unexpected regressions.
> In this case, because changes in each file are independent
> each other, one file one commit would be good. (This is rare
> special case. Usually, a commit can contain changes across
> two or more files if they are strongly related, e.g. when
> we move a method from a file to another, the changes of two
> files should be included in a single commit.)
>From the git suggestions I give my collaborators. Small commits not
only help cherry-picking, but also help people understand what you
== Using descriptive commits ==
When other people view your changes it is important the description
is, eh, descriptive. So using a message like 'source change', or 'bug
fix' is not really helpful - it is what one would expect. Better would
be 'refactored variable names in func.c', or 'changed variable names
to improved readability in func.c'.
! Use good patch descriptions when committing changes
My suggestion is to start the description with a keyword, a colon,
followed by the description. So this could work:
Admintool: show import/export of tasks/assignments
display XP version
Look at it this way: if you were to read someone else's descriptions,
would it be descriptive enough without starting to browse the code?
Related is to commit often, and do small commits. This helps more
writing focussed descriptions.
! Commit after small changes that can be described together
when you need multiple keywords you should have used multiple
Another tip is to mark patches that have all tests succeed. Before
a commit run all the tests. When the tests are OK - that is the
system is in a consistent state - I mark the patch by adding an
ampersand. For example:
git commit -a -m "Fixed missing link &"
That way it is clear when the system is broken in the patch record
(some people say it should never be broken, but I think that defeats
the purpose of small incremental patches).
! Add a marker to a commit message when all tests succeed
More information about the BioRuby