Re: [RFC PATCH 3/5] branch: cleanup branch name validation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thursday 21 September 2017 07:07 AM, Junio C Hamano wrote:
Kaartic Sivaraam <kaarticsivaraam91196@xxxxxxxxx> writes:

Thanks for giving a better alternative. Sounds catchy. How about
`validate_branch_creation`?
I do not know what you meant by "catchy",

I was intending that 'ok_to_create_branch' was a "nice alternative" when I
said catchy (I should better be more clear in the future).

but "git grep ok_to_" will
tell you that ok-to-$do-something is quite an establish phrasing (if
I thought it was a bad way to name it, I would have explicitly said
so).


Well, it might be an established phrase but I feel that the 'ok_to' part of the
name implies that it returns some sort of boolean value ('ok' or 'not ok')
rather than the status. This doesn't seem to be the case for the
`validate_new_branchname` which returns values only upon success
and dies in case of failure (Note: only the PATCH 4/5 in the series adds the
logic to return a value in case of failure; when requested). So, I find the
name "ok_to_create_branch" to be less communicative. Though I don't find
the name "validate_branch_creation" to be conveys this meaning any better;
I thought of using it as it doesn't seem to be implying a boolean return value.

---
Kaartic



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux