From: Jonathan Nieder Date: Mon, 30 Aug 2010 16:33:02 GMT Subject: Re: Odd results writing a Git pre-receive hook to syntax check PHP files. Message-ID: <20100830163302.GA13336@burratino> In-Reply-To: Chris Patti wrote: > What if this is the > first time a new ref is being pushed? Then, old-ref is 000000 and git > diff --raw throws up a hairball :) Can't you check for 0{40} and use $(git hash-object -t tree