pull requests: variable names
Mads Kiilerich
mads at kiilerich.com
Mon Feb 16 22:21:44 EST 2015
On 02/15/2015 10:07 PM, Thomas De Schampheleire wrote:
> On Sun, Feb 15, 2015 at 5:50 AM, Nick Coghlan <ncoghlan at gmail.com> wrote:
>> On 15 February 2015 at 06:36, Thomas De Schampheleire
>> <patrickdepinguin at gmail.com> 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.
>>>
>>> With this mail I would like to get an agreement on the terminology we
>>> can change to.
>>>
>>> - org vs other --> source/src and dest
>>> - c.cs_repo: what does 'cs' stand for here? This could become src_repo
>>> - c.a_repo: what does 'a' stand for here?? This could become dest_repo.
>>>
>>> Other variable names with the same prefixes 'cs'/'a'/'org'/'other'
>>> would be changed too, of course.
>> +1 from me for the general idea of having PR code focus on "src ->
>> dest", without making assumptions about the "src" being outside the
>> organisation and the "dest" being inside.
> Thanks Nick.
> Note that it's unclear to me whether 'org' refers to 'organization' or
> 'original'. I was thinking the latter, actually. But all the more a
> reason to clarify things.
I have no doubt it is a reference to 'original'.
> Besides pull requests, this terminology is also used for the compare
> controller, and also used in several models. I assume we don't want to
> change the models unnecessarily, so we should stick to fixing the
> controllers, is that correct?
It would prefer to be as consistent as possible. Inconsistency is just
technical debt.
However, for now I would prefer to avoid changing the actual database
field names, so a TODO comment there would be fine.
/Mads
More information about the kallithea-general
mailing list