From: Jeff King Date: Tue, 12 Apr 2016 17:22:47 GMT Subject: Re: Hardcoded #!/bin/sh in t5532 causes problems on Solaris Message-ID: <20160412172247.GA2856@sigill.intra.peff.net> In-Reply-To: On Tue, Apr 12, 2016 at 09:58:20AM -0700, Junio C Hamano wrote: > > Looks good and is the minimal change. I kind of wonder if the example > > would be more clear, though, as just: > > > > write_script .git/hooks/pre-commit <<-\EOF && > > exit 1 > > EOF > > echo whatever >file1 && > > ... > > > > I don't think we ever actually need the pre-commit check to pass, as we > > simply override it with --no-verify. But I dunno. Maybe people find it > > easier to read with a pseudo-realistic example (it took me a minute to > > realize the trailing whitespace in the content was important). > > I was mostly worried about closing the door for future enhancement > where there are multiple commits to be replayed, some of which fail > and others pass the test. Unconditional "exit 1" would have to be > reverted when it happens. Yeah, that's fair. It is at least trying to re-create a real-world situation. -Peff