Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [platform-ui-dev] Commit conventions

> > We shouldn't make this too formal. It should make our life easier, both when writing and when reading the commit messages. I suggest we start with the following:
>  
> What is wrong with formal rules, if they are clear for everyone? It is easier to follow formal rules if you start to contribute as to guess and to learn those unwritten rules by receiving "-1" review comments.

What I mean, is let's be flexible and keep it simple. If someone prefers to use the bug number + subject and someone writes what was fixed, then let both alive.

 
> > In most cases there should be one bug with one corresponding Gerrit change.
>  
> What is a "most case"? This opens a room for questions and leaves no answer to "is my case different?". I think separation between functional/non functional and trivial changes is important to mention.

Right, so does your proposed "in general" ;-).

 
> >Here the bug number and corresponding summary should be used. If the summary is not correct, then consider to fix the summary in bugzilla.
>  
> I can't agree with that, bug title is usually not a right commit subject.

What if we change it to "Fixed bug xyz: bug summary"? Then it does describes the change. Hence, again, I would be tolerant and not give a -1 if someone writes "Fixed bug xyz: ...". Which is actually the default in JDT UI.


> So taking your input into account,I propose 3 versions of commit conventions: simple, formal and "by example". For those with difficulties to follow the simple one we will have the formal one and so on.

Having 3 version is overkill. The simple one is just enough. Of course we have to add the change ID and submitted-by stuff.
 

> Simple:
>  
> In general, each commit with functional code changes requires a bug entry, and a commit with trivial changes does not.
> A commit related to an exising bug report has to start with "Bug xyz - " or "Bug xyz: ".

Add "Fixed bug xyz: summary" for less tolerant reviewers ;-)

> Don't tie unrelated changes to a bug (number) just because you are working on that bug. Simply use e.g. "Fixed typo" or "Removed trailing whitespace". Don't include such unrelated changes in the real fix/change.

> The change summary should be short, clear and concise description about the change.
> The body of the commit message should be more detailed explanatory text (if necessary), describing the change.

The above is as acceptable for me as what I proposed.

Dani

Back to the top