From: Johannes Schindelin Date: Thu, 15 Nov 2007 14:37:36 GMT Subject: Re: [BUG] t7004 (master) busted on Leopard Message-ID: In-Reply-To: <17E3F66C-4644-4B64-817C-88062727A2D9@wincent.com> Hi, On Thu, 15 Nov 2007, Wincent Colaiuta wrote: > Commit 4d8b1dc850 added a couple of tests to t7004, and my testing reveals > that this one has been broken on Leopard since then: > > * FAIL 83: message in editor has initial comment > GIT_EDITOR=cat git tag -a initial-comment > actual || true && > test $(sed -n "/^\(#\|\$\)/p" actual | wc -l) -gt 0 I think this is our good old friend, MacOSX' sed. (Wasn't there a question today what's wrong with using sed? I think this issue qualifies.) I imagine that it is that MacOSX' sed is adding a trailing newline (not the regexp like you suggested). Which means that "wc -l" would print "1". (You can see for yourself if you run the script with "sh -x ...".) IMHO a good solution would be test -z "$(grep -e '^#' -e '^$' actual)" Could you test, please? Thanks, Dscho