Junio C Hamano <gitster@xxxxxxxxx> writes: > Junio C Hamano <gitster@xxxxxxxxx> writes: > >> I agree we do not give the "portable to version 7" prize >> anymore. But you made me realize another thing. >> >> I think it should make sure orig_namespace has one and only one >> trailing slash, because otherwise "--original refs/heads//" >> would lead you to the same disaster. > > Perhaps, > > orig_namespace=$(expr "$OPTARG/" : '\(.*[^/]\)/*$')/ > See separate proposal which I find still prettier (and which does not fork). But I really don't think we should bend over backwards: multiple end slashes have explicit manual origin. People deserve what they get then. -- David Kastrup, Kriemhildstr. 15, 44793 Bochum - 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