From: Jeff King Date: Tue, 12 Aug 2008 13:01:28 GMT Subject: Re: fastest way to check if dir is a workdir Message-ID: <20080812130128.GA28658@sigill.intra.peff.net> In-Reply-To: <200808121334.57066.thomas@koch.ro> On Tue, Aug 12, 2008 at 01:34:56PM +0200, Thomas Koch wrote: > I'm writing a little php-git-wrapper and would like to have a function > which tells me, whether a given path is part of a git checkout or not. > > What would be the fastest commandline to check, whether the current dir > is part of a checkout? It may be assumed that the repository is at the > standard position. How about "git rev-parse --is-inside-work-tree"? -Peff