+5

Keyword suggestions for commit messages

Alexander Miloslavskiy 8 years ago updated 8 years ago 2

Suggestion:

Commit message editor shall make suggestions while you type. Those suggestions would be based on

  • Keywords in diffs for current commit
  • Filenames affected by current commit

Rationale:

It's quite typical to list affected entity names in commit message. Like, "Moved FooBar global variable from Generic.cpp to Foo.cpp". Having commit message editor suggest those keywords will make writing commit messages easier. I heard TortoiseSVN does that.

+2

You already can complete complete file names since ages using Ctrl+Space. What do you mean with "keywords in diff"?

Wow, this feature is well-hidden! I guess I had no chance to learn about it! I believe the suggestion list shall open automatically as you type, in addition to being able to Ctrl+Space.


Keywords in diff basically means that you parse any full words from current commit's diff and suggest them. For example, I have changed the line:

void MyClassName::MyMethodName(string a_ArgumentName)
to
void MyBetterClassName::MyMethodName(string a_ArgumentName)

You will suggest every full word of non-trivial length:

  • MyClassName
  • MyBetterClassName
  • MyMethodName
  • string
  • a_ArgumentName