On Wed, Dec 19, 2007 at 04:21:30PM -0800, Junio C Hamano wrote: > > By the way, how does this rewrite look? > It looks good and the test works on my fedora and Mac OS X boxes. (Just for reference I'm on 10.4.3, not 'Leopard'.) I've snipped everything except zc that I wanted to comment on. The only two really minor nits I have is that zc does bizarre things without warning for more than 9999 "z" ( e.g. 17000 = 9000 + 8000 = 98000 (!) ) and that, from a function responsibility point of view, the /^index/d looks rather out of place. Perhaps a comment saying tha zc is designed for <= 9999 z's? Given this, a lot of the /g are redundant. But hey, it's a test script and it works and I don't have any better suggestions. :) Charles. > +zc () { > + sed -e "/^index/d" \ > + -e "s/$z1000/Q/g" \ > + -e "s/QQQQQQQQQ/Z9000/g" \ > + -e "s/QQQQQQQQ/Z8000/g" \ > + -e "s/QQQQQQQ/Z7000/g" \ > + -e "s/QQQQQQ/Z6000/g" \ > + -e "s/QQQQQ/Z5000/g" \ > + -e "s/QQQQ/Z4000/g" \ > + -e "s/QQQ/Z3000/g" \ > + -e "s/QQ/Z2000/g" \ > + -e "s/Q/Z1000/g" \ > + -e "s/$z100/Q/g" \ > + -e "s/QQQQQQQQQ/Z900/g" \ > + -e "s/QQQQQQQQ/Z800/g" \ > + -e "s/QQQQQQQ/Z700/g" \ > + -e "s/QQQQQQ/Z600/g" \ > + -e "s/QQQQQ/Z500/g" \ > + -e "s/QQQQ/Z400/g" \ > + -e "s/QQQ/Z300/g" \ > + -e "s/QQ/Z200/g" \ > + -e "s/Q/Z100/g" \ > + -e "s/000Z//g" \ > + -e "s/$z10/Q/g" \ > + -e "s/QQQQQQQQQ/Z90/g" \ > + -e "s/QQQQQQQQ/Z80/g" \ > + -e "s/QQQQQQQ/Z70/g" \ > + -e "s/QQQQQQ/Z60/g" \ > + -e "s/QQQQQ/Z50/g" \ > + -e "s/QQQQ/Z40/g" \ > + -e "s/QQQ/Z30/g" \ > + -e "s/QQ/Z20/g" \ > + -e "s/Q/Z10/g" \ > + -e "s/00Z//g" \ > + -e "s/z/Q/g" \ > + -e "s/QQQQQQQQQ/Z9/g" \ > + -e "s/QQQQQQQQ/Z8/g" \ > + -e "s/QQQQQQQ/Z7/g" \ > + -e "s/QQQQQQ/Z6/g" \ > + -e "s/QQQQQ/Z5/g" \ > + -e "s/QQQQ/Z4/g" \ > + -e "s/QQQ/Z3/g" \ > + -e "s/QQ/Z2/g" \ > + -e "s/Q/Z1/g" \ > + -e "s/0Z//g" \ > + ; > +} - 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