pull requests: variable names

Mads Kiilerich mads at kiilerich.com
Thu Feb 19 10:32:04 EST 2015


On 02/19/2015 11:07 AM, Nick Coghlan wrote:
>
>>> - 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.
> Would "changed_repo" be OK?
>
>>> - 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.
> And expanding this out to "ancestor_repo"?
>
> Now you've explained them, I think changed & ancestor make sense as
> terminology, but the "cs" and "a" abbreviations are arguably a bit
> *too* abbreviated for clarity.

They are also used in a lot of places where it is nice to keep it brief. 
We could perhaps just make it more clear what it is an abbreviation of.

Btw: Another "interpretation" of 'a' is as the 'a' side of a diff.

/Mads


More information about the kallithea-general mailing list