views:

384

answers:

7

So which is it that you think is better and more intuitive?

Fixed the XXX bug in YYY
Fix the XXX bug in YYY
Fixes the XXX bug in YYY
Fixing the XXX bug in YYY

Please provide your rationales. Note I am asking from your general perspective, meaning you should not try to associate this with your preferred svn/cvs tools or programming languages, but rather think of it as something that should/can be applied to any tools and programming languages.

+3  A: 

I don't think it really matters. The purpose is to:

1) Convey what is or was being done, so bugs can be found easier, problems can be reverted easier, and generally be able to maintain the project easier.

2) Convey what tickets were fixed if any, so auditors (if they're used in you company can see what changes correspond to which tickets).

Lastly, if it's' already been fixed, "Fixing" doesn't make sense, and if you're still working on it, "Fixed" isn't correct.

Milan Ramaiya
Sure, strictly speaking, it is true that it doesn't really matter.But if you have to pick one, when you have fixed a bug in your local tree and want to commit the changes made, do you say "Fixed XXX" or "Fixes XXX" or "Fix XXX"?
I think it matters if the text is too brief. Sometimes I see commit messages that make me wonder whether 1. a bug was found or actually fixed, or 2. whether a fix was concieved or actually applied, or 3. whether complex erroneous behavior was partially or actually fully fixed. And sometimes several commits relate to the same bug. In "This commit fixes the bouncy problem in DrawBall() and closes ticket 666" the tense doesn't matter, because the text is verbose. But for "DrawBall() bounces wrong", what did the commit do?
bzlm
+3  A: 

I personally go with past tense ("fixed") since by the time I get to committing the bug is fixed (or I wouldn't be committing).

cletus
Can you give an example of this?
bzlm
Example of what?
cletus
an example of this.
Milan Ramaiya
Suddenly your avatar makes sense.
bzlm
+2  A: 

I think that writing about the current commit in present tense is a good idea, because it makes it more clear when you refer to prior commits in the past tense.

Ken Bloom
I agree. If the commit refers to itself it is also true, as in "This commit fixes the F00F bug".
bzlm
+1  A: 
Roger Pate
I remember coming across something in the git documentation strongly recommending this tense, but I still find in awkward.
keithjgrant
A: 

If it is a small commit I use present continuous:

Fixing bug 304

or

Adding comments

If it is a big commit, I do more of a change log:

  • Fixes Bug 453, 657 and 324
  • Adding Expression syntax
  • Refactored the Operator class.
tster
in other words you mix all of them willy-nilly B-)
Brian Postow
Pretty much. Because in the end, the commit messages don't need to be the queens English.
tster
A: 

"Fix bug X" is 2 characters shorter than "Fixed bug X".
And 3 shorter than "Fixing bug X".

From the point of view of writing-short-commit-messages, the present tense sometimes / usually saves a few characters?
Which I actually think matters a little little bit e.g. with Git's recommendation of less-than-50-chars-on-the-first-commit-message-line.
Also, less text --> done reading quicker?

LeoMaheo
+2  A: 

IMHO if you want it to be descriptive without need to consider the context, then "Fixed" is definitely the only right variant.

Regarding the intuitiveness - if I look at some changelog I will definitely understand that you mean the bug fixed as I know the context in which the word is used, but my brain will catch it much more quickly if the word is written in this self-specifying way.

"Fixing" is the worst choice IMHO as it can be interpreted not only as describing what the patch does (is for) but as a bug status as well which would mean that it is being worked at and is not yet solved.

Ivan