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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
-
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

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux