Take the 2-minute tour ×
English Language & Usage Stack Exchange is a question and answer site for linguists, etymologists, and serious English language enthusiasts. It's 100% free, no registration required.

This question already has an answer here:

This question is quite specific but I am not sure which verb tense I should use when committing/checking in code.

If I fix a bug and checking in the code, should I write:

  1. Fixes bug on feature A
  2. Fixed bug on feature A

I always use past tense because the bug was fixed before I check in but it looks a bit strange when I look at file history.

Should I use one over the other and why?

share|improve this question

marked as duplicate by Hugo, oerkelens, medica, Josh61, John Y Jun 18 at 11:31

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

    
2  
Use Biblical tense. And I will strike down upon the exploit with great vengeance and furious anger those who would attempt to SQL inject and pawn my brothers. –  dotancohen Jun 18 at 8:00
    
1  
It is totally down to the way you decide to do things in your team. Some people prefer to use the present tense for the things that are in the check-in, and the past tense to describe how things were beforehand (ie describing the bug). –  Rupe Jun 18 at 10:23

3 Answers 3

Both are appropriate, it actually depends on the way you want the user to read it.

1. Fixes bug on feature A - This is more universal, this will let people know that the check in has feature A bug fixed. So, this is the tone of the check-in and not that of the user.

2. Fixed bug on feature A - This has more to do with the tone of the user who is checking in.

So, in case you are working on an open source project with lots of people reading about the check-in, and they like to know about the check-in more than the user who did it, try to go with option 1, else, go with option 2

share|improve this answer

The following convention for commit messages works well for me:

  • Describing what changes were made to the code in the commit: Past tense.
  • Describing what the code was doing before the change: Past continuous.
  • Describing what the code does, especially after the change: Present tense.

Encoding the distinction between the three kinds of actions using the tense of the verb keeps the messages compact.

Example:

Fixed bug 178508 (Wrong permissions on keydir)

Exclude the base directory from rsync -a, so that the permissions of the destination directory remain unchanged. Previously, rsync -a was clobbering / would clobber the destination directory's permissions.

share|improve this answer

I don't understand what you felt strange about it. That sounds appropriate to me.

"Fixed bug on feature A" should be correct as you already said bug has already been fixed at the time when your where committing your code.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.