* fastest way to check if dir is a workdir
@ 2008-08-12 11:34 Thomas Koch
2008-08-12 13:01 ` Jeff King
0 siblings, 1 reply; 2+ messages in thread
From: Thomas Koch @ 2008-08-12 11:34 UTC (permalink / raw)
To: git
Hi,
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.
Thanks a lot,
--
Thomas Koch, Software Developer
http://www.koch.ro
Young Media Concepts GmbH
Sonnenstr. 4
CH-8280 Kreuzlingen
Switzerland
Tel +41 (0)71 / 508 24 86
Fax +41 (0)71 / 560 53 89
Mobile +49 (0)170 / 753 89 16
Web www.ymc.ch
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: fastest way to check if dir is a workdir
2008-08-12 11:34 fastest way to check if dir is a workdir Thomas Koch
@ 2008-08-12 13:01 ` Jeff King
0 siblings, 0 replies; 2+ messages in thread
From: Jeff King @ 2008-08-12 13:01 UTC (permalink / raw)
To: Thomas Koch; +Cc: git
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-08-12 13:02 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-12 11:34 fastest way to check if dir is a workdir Thomas Koch
2008-08-12 13:01 ` Jeff King
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).