On 10/17/07, Keith R. Bennett <[EMAIL PROTECTED]> wrote:

> ...I just committed my first code change....

Congratulations!

> ...how do you feel about changing little things in the files along
> the way?  For example, my IDE, Intellij Idea, enables me to switch to Java 5
> for loop syntax by the click of a single button....

The problem is that such non-essential changes might make it harder,
when looking at the diffs, to figure out exactly what your intention
was in modifying that file.

I usuall prefer doing two commits in such a case: one for "code
cleanup, use java 5 loops" and a separate one with the actual code
changes that you're after.

But that depends on how big the actual changes vs. code cleanup
are...I don't think we can make a hard rule for that, but I'd keep in
mind the readability of the diffs when doing unrelated changes to  a
source file.

-Bertrand

Reply via email to