Subject: Re: [PATCH v2] cvsserver: avoid precedence problem between ! and %s

From: Junio C Hamano <[email-masked]>
Date: Thu, 22 May 2025 11:51:25 -0700

Todd Zullinger <[email-masked]> writes:

> Just for curiosity, the only commit found with escapeRefName
> is when it was added:
>
>     $ git log -G '\bescapeRefName\b' -- git-cvsserver.perl
>     commit 51a7e6dbc9
>     Author: Matthew Ogilvie <[email-masked]>
>     Date:   Sat Oct 13 23:42:26 2012 -0600
>
> 	cvsserver: define a tag name character escape mechanism
> 	
> 	CVS tags are officially only allowed to use [-_0-9A-Za-f].  Git
> 	refs commonly uses other characters, especially [./].  Such characters
> 	need to be escaped from CVS in order to be referenced.
> 	
> 	This just defines functions to escape/unescape names.  The functions
> 	are not used yet.
> 	
> 	Signed-off-by: Matthew Ogilvie <[email-masked]>
> 	Signed-off-by: Junio C Hamano <[email-masked]>
>
> A subsequent commit, 658b57ad52 (cvsserver: add misc commit
> lookup, file meta data, and file listing functions,
> 2012-10-13), made use of unescapeRefName; escapeRefName
> seems to have _never_ been used.

OK, so we can safely remove it, it seems ;-)  I wonder what, if any,
the unescaping side is unescaping, if we are not doing the escaping.

Thanks for digging.