One commit = one change

Yves de Champlain yves at macports.org
Mon Mar 5 19:22:35 PST 2007


Le 07-03-05 à 20:27, Ryan Schmidt a écrit :

> Dear MacPorts committers,
>
> I've seen a lot of commits to portfiles that do more than one  
> thing. For example, a commit that updates the port to a new  
> version, adds a new variant, and changes the indentation of the  
> entire file. This makes it incredibly difficult to see what  
> actually changed, and I would very much appreciate it if we could  
> get into the habit of committing each logical change separately.
>
> For example, if you want to change the indentation of the file, do  
> only that, then commit it, with a log message that says you're  
> changing the whitespace. If you want to upgrade to a new version,  
> do just that, and commit it with an appropriate log message. If you  
> want to add a variant, do that, and commit it. This way it is much  
> easier to look through the Subversion log and especially the diffs  
> and see what was changed and why. If you do it all at once in a  
> single commit, especially whitespace changes which like to affect  
> every line, it's very difficult to see what was really changed, and  
> this hinders people like me who are trying to learn more about  
> MacPorts, portfiles, and compiling software in general.
>
> Hand in hand with the idea of one change per commit is the idea of  
> accurate log messages. Your Subversion log message should say  
> exactly what you changed. Don't omit anything!

Hi

This sure makes sense, but it does not really fit with how a Portfile  
is worked.  For example, I recently updated e17 stuff and had to  
change versions, dependencies, configure environment and arguments,  
and I finally decided to also opt in as maintainer.  But there is no  
"logical order" to do this.  1 commit / change would have meant  
artificially creating many versions of the Portfiles afterwards with  
a few changes in each one.

However, it is true log messages should be very clear as to what is  
happening. i.e.

bump to version ...

change configure.env ...

change deps ...

change configure.args ...

change maintainer ...

Lots of changes, but everything is written clearly.

yves




More information about the macports-dev mailing list