On Wed, 31 Aug 2011, Jeff King wrote: > On Wed, Aug 31, 2011 at 09:50:42PM -0400, Martin von Zweigbergk wrote: > > > Reduce the risk of changing incorrect sections of the refspec by > > requiring the string to be matched to have leading and trailing > > slashes, i.e. match "/<name>/" instead of just "<name>". > > Doesn't this just mean that: > > git remote rename remotes foo > > will break in the same way? Yes, "r", "ead" and such now work and only exactly "refs", "heads" and "remotes" don't work. Sorry, forgot to mention that in the commit message. > > We could have required even a leading ":refs/remotes/", but that would > > mean that we would limit the types of refspecs we could help the user > > update. > > Actually, I think it's better to be more conservative [...] I think you are right. That's what I did (match all the way from "refs/...") at first, but then I thought that maybe the reason the matching was relaxed was to allow non-default refspecs. However, as you point out in the footnote to your reply to PATCH 2/2, that case is not working consistently anyway, so it seems safe (w.r.t. backwards compatibility too) to ignore it. Will switch back to matching ":refs/remotes/$OLD". Martin -- 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