Re: [PATCH 5/9] refspec_ref_prefixes(): clean up refspec_item logic

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

 



Jeff King <peff@xxxxxxxx> writes:

>> > +		if (rs->fetch == REFSPEC_FETCH) {
>> 
>> Do you think it'd be worth handling rs->fetch in a switch/case block? At
>> least that would allow us to catch unknown values more easily, though it
>> seems unlikely we'd ever add any :-).
>
> ...this whole thing is badly named. It is called "fetch", but the only
> two values are true/false. But for some reason we named them
> REFSPEC_FETCH and REFSPEC_PUSH. Surely it should be "type" or
> "operation" or something if we were going to use an enum and switch?

Sorry, I suspect that it is my fault.  I've never been good at
naming, and if the allowed values for this member are FETCH and
PUSH, then the member itself shouldn't be called fetch or push.

Perhaps 'direction'.

But such a name improvement is clearly outside the scope of this
fix.

Thanks.




[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