Re: [PATCH v2] completion: add new git_complete helper

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

 



2012/4/18 SZEDER Gábor <szeder@xxxxxxxxxx>:
> On Tue, Apr 17, 2012 at 11:53:08PM +0300, Felipe Contreras wrote:
>> Are you saying that even if there are no real clashes, only
>> hypothetical ones, you would still prefer __git_complete?
>
> Can you ascertain that there are no real clashes?

After having this code for a certain amount of time, yeah:

if ! type git_complete >/dev/null 2>&1; then
git_complete ()
{
       echo "WARNING: This function is not meant for public use; the name" \
               "might change. Use __git_complete for now."
       __git_complete "$@"
}
else
type git_complete | grep -q "WARNING" ||
echo "git_complete is already being used, please notify
git@xxxxxxxxxxxxxxx, to" \
       "avoid overriding this function in the future."
fi

>> How are people going to distinguish between public and private functions?
>
> By reading the documentation, perhaps?  It was not a problem for
> __git_ps1(), so I guess it won't be a problem for __git_complete()
> either.  Assuming that it will be documented eventually, of course.

I guess that would do it. I would still prefer to have a different
convention for public functions. I feel we are being paranoid here.

Cheers.

-- 
Felipe Contreras
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[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]