0

Currently I'm trying to write a good commit comment for a code refactoring I've made. And I feel like I'm missing a word to sum up what I did instead of describing it.

Right now my description is: "Code refactor to improve decoupling inside the generator class."

But IMO, it's not really decoupling as it's only inside a class itself. It doesn't have any strong link to the code responsibility. It's more to improve testability of the class by having more smaller methods instead of few big one.

So that led me to a quite simple question:
What are the most common terms you use in your commit messages to describe a code refactoring ?

Stanislav Kralin
  • 11,070
  • 4
  • 35
  • 58
FMaz008
  • 11,161
  • 19
  • 68
  • 100

2 Answers2

1

http://www.amazon.com/Refactoring-Improving-Design-Existing-Code/dp/0201485672

Is the defacto standard for basic refactoring vocabulary everywhere I've worked.

Bueller
  • 2,336
  • 17
  • 11
  • Hey thanks for the book, it seem really interesting. But for the purpose of the question, do you have some specific vocabulary to share ? – FMaz008 Dec 07 '11 at 15:28
  • No specific suggestions for what you describe. But, with most of the commit comments I've seen being absolutely useless whatever helpful information you put in a comment would be greatly appreciated by anyone researching the repository in the future. – Bueller Dec 07 '11 at 15:34
  • 1
    Haha, that is so true :) -- and I'm not excluding myself from this affirmation; Last week I had to figure out what I did on a commit I've described as "Changes of the evening." ... brilliant. And it always happen on commit that has 30 files and hundreds of modified lines. – FMaz008 Dec 07 '11 at 15:41
  • My favorites are the one letter commit comment that just bypasses the requirement to have a comment. – Bueller Dec 07 '11 at 15:43
0

Cleaned up implementation of function x within class y, by breaking it into functions a, b & c to make unit testing easier.

Rocklan
  • 7,888
  • 3
  • 34
  • 49