pull requests: variable names

Mads Kiilerich mads at kiilerich.com
Mon Feb 16 22:13:58 EST 2015


On 02/14/2015 09:36 PM, Thomas De Schampheleire wrote:
> Hi,
>
> In the pull request code (both controllers and templates) I find the
> variable names non-intuitive and it is therefore harder to make
> changes.

I have tried to make names that was better than before ... but it seems 
like there is some way to go ;-)

> With this mail I would like to get an agreement on the terminology we
> can change to.
>
> - org vs other --> source/src and dest

Yes, that is a bit messy and could use some cleanup.

I think the main challenge is that a pull request and compare in some 
ways are looking at the same thing from different point of views and 
reuse code and templates. The names source and dest are not so obvious 
in the context of compare. But give it a try and see how it works out. 
(Consider doing the two renaming in two different changesets so it is 
easier to review.)

> - c.cs_repo: what does 'cs' stand for here? This could become src_repo

'cs' is for changesets, referring to the side where the changes happened.

I think the advantage of the current naming is that it refers to what it 
_is_ not to what we might happen to use it for or how we interpret it.

> - c.a_repo: what does 'a' stand for here?? This could become dest_repo.

The 'a' was meant to refer to the ancestor used for comparing.

> Other variable names with the same prefixes 'cs'/'a'/'org'/'other'
> would be changed too, of course.

+1 for org/other.

cs/a ... please give it a second thought ;-)

/Mads



More information about the kallithea-general mailing list