git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* t5704: problem with OS X sed
@ 2012-03-06 18:10 Brian Gernhardt
  2012-03-06 21:01 ` Jakub Narebski
  0 siblings, 1 reply; 3+ messages in thread
From: Brian Gernhardt @ 2012-03-06 18:10 UTC (permalink / raw)
  To: Git List

t5704's newest test has always failed for my on OS X.  It's taken a little while for me to find the time to try to fix it.  Unfortunately, my sed-fu has proven not up to the task:

sed: 1: "/^-/{p;q}": extra characters at the end of q command
not ok - 7 ridiculously long subject in boundary
#	
#		: >file4 &&
#		test_tick &&
#		git add file4 &&
#		printf "%01200d
#	" 0 | git commit -F - &&
#		test_commit fifth &&
#		git bundle create long-subject-bundle.bdl HEAD^..HEAD &&
#		git bundle list-heads long-subject-bundle.bdl >heads &&
#		test -s heads &&
#		git fetch long-subject-bundle.bdl &&
#		sed -n "/^-/{p;q}" long-subject-bundle.bdl >boundary &&
#		grep "^-$_x40 " boundary
#	

I've tried various bits of whitespace or splitting the commands in two, but haven't hit on the proper combination of commands.

Of course, if I remove the sed invocation, I get the following error from grep: "Regular expression too big"

It seems to me that using sed to find a single line and then grepping for it is somewhat redundant.

If someone else has suggestions on how to make this test work on OS X, I'm happy to help test them.

~~ Brian Gernhardt

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: t5704: problem with OS X sed
  2012-03-06 18:10 t5704: problem with OS X sed Brian Gernhardt
@ 2012-03-06 21:01 ` Jakub Narebski
  2012-03-06 21:18   ` Brian Gernhardt
  0 siblings, 1 reply; 3+ messages in thread
From: Jakub Narebski @ 2012-03-06 21:01 UTC (permalink / raw)
  To: Brian Gernhardt; +Cc: Git List, Thomas Rast, BJ Hargrave

Brian Gernhardt <benji@silverinsanity.com> writes:

> t5704's newest test has always failed for my on OS X.  It's taken a little while for me to find the time to try to fix it.  Unfortunately, my sed-fu has proven not up to the task:
> 
> sed: 1: "/^-/{p;q}": extra characters at the end of q command
> not ok - 7 ridiculously long subject in boundary
> #	
> #		: >file4 &&
> #		test_tick &&
> #		git add file4 &&
> #		printf "%01200d
> #	" 0 | git commit -F - &&
> #		test_commit fifth &&
> #		git bundle create long-subject-bundle.bdl HEAD^..HEAD &&
> #		git bundle list-heads long-subject-bundle.bdl >heads &&
> #		test -s heads &&
> #		git fetch long-subject-bundle.bdl &&
> #		sed -n "/^-/{p;q}" long-subject-bundle.bdl >boundary &&
> #		grep "^-$_x40 " boundary
> #	
> 
> I've tried various bits of whitespace or splitting the commands in
> two, but haven't hit on the proper combination of commands.
> 
> Of course, if I remove the sed invocation, I get the following error
> from grep: "Regular expression too big"
> 
> It seems to me that using sed to find a single line and then
> grepping for it is somewhat redundant.
> 
> If someone else has suggestions on how to make this test work on OS
> X, I'm happy to help test them.

Thomas Rast proposed a patch to fix this issue, as reported by
BJ Hargrave, in

  Re: [ANNOUNCE] Git 1.7.9.3
  Message-ID: <87y5rd4wci.fsf@thomas.inf.ethz.ch>
  http://thread.gmane.org/gmane.linux.kernel/1262318/focus=192355

as

  [PATCH] t5704: fix nonportable sed/grep usages

HTH
-- 
Jakub Narebski

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: t5704: problem with OS X sed
  2012-03-06 21:01 ` Jakub Narebski
@ 2012-03-06 21:18   ` Brian Gernhardt
  0 siblings, 0 replies; 3+ messages in thread
From: Brian Gernhardt @ 2012-03-06 21:18 UTC (permalink / raw)
  To: Jakub Narebski; +Cc: Git List, Thomas Rast, BJ Hargrave


On Mar 6, 2012, at 4:01 PM, Jakub Narebski wrote:

> Thomas Rast proposed a patch to fix this issue, as reported by
> BJ Hargrave, in
> 
>  Re: [ANNOUNCE] Git 1.7.9.3
>  Message-ID: <87y5rd4wci.fsf@thomas.inf.ethz.ch>
>  http://thread.gmane.org/gmane.linux.kernel/1262318/focus=192355
> 
> as
> 
>  [PATCH] t5704: fix nonportable sed/grep usages

Ah, reported and fixed in an announce e-mail while I was working on it myself.

Unsurprisingly, the patch also works for me.

Thanks Thomas and Jakub,
~~ Brian G

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-03-06 21:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-06 18:10 t5704: problem with OS X sed Brian Gernhardt
2012-03-06 21:01 ` Jakub Narebski
2012-03-06 21:18   ` Brian Gernhardt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).