On November 15, 2016 9:42:03 AM PST, Junio C Hamano <gits...@pobox.com> wrote:
>I think you are going in the right direction.  I had a similar
>thought but built around a different axis.  I.e. if strip=1 strips
>one from the left, perhaps we want to have rstrip=1 that strips one
>from the right, and also strip=-1 to mean strip everything except
>one from the left and so on?.  I think this and your keep (and
>perhaps you'll have rkeep for completeness) have the same expressive
>power.  I do not offhand have a preference one over the other.

I prefer strip implemented with negative numbers. That is simple and expressive 
and if we need we can implement rstrip if necessary.

>
>Somehow it sounds a bit strange to me to treat 'remotes' as the same
>class of token as 'heads' and 'tags' (I'd expect 'heads' and
>'remotes/origin' would be at the same level in end-user's mind), but
>that is probably an unrelated tangent.  The reason this series wants
>to introduce :base must be to emulate an existing feature, so that
>existing feature is a concrete counter-example that argues against
>my "it sounds a bit strange" reaction.

It may be a bit strange indeed. What is the requirement for this?

I think implementing a strip and rstrip ( if necessary ) with negative numbers 
would be most ideal.

Thanks
Jake


Reply via email to