Thread (6 messages) flat view 6 messages, 3 authors, 2016-06-15

Re: [BUG] t7004 (master) busted on Leopard

From: Johannes Schindelin <hidden>
Date: 2016-06-15 22:43:51

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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help