From: Junio C Hamano Date: Fri, 16 Feb 2007 07:28:32 GMT Subject: Re: [PATCH] Add git-bundle - pack objects and references for disconnected transfer Message-ID: <7vd54aa7dr.fsf@assigned-by-dhcp.cox.net> In-Reply-To: <20070216044158.GB28894@spearce.org> "Shawn O. Pearce" writes: > Using "test" is a style thing, but using "=" rather than "==" is > a portability issue. "==" is accepted by bash as a synonym for > "=", but its not valid elsewhere. True, I should have stressed that. Thanks. Also in the same sense (but to a lessor degree), "test" vs "[" is also portability issue. > What about: > > parents="$parents $(git-rev-list --max-count=1 --parents $c | cut -b42-)" > > I just used that trick recently. Oh yea it was in git-gui's > GIT-VERSION-GEN script. Though I did not know about using cut > like that... I used to stay away from 'cut' myself, although it is not too bad for portability these days. I would probably have done the above with a single sed process, though.