On Tue, Sep 2, 2008 at 7:08 PM, HansCz <[EMAIL PROTECTED]> wrote:
>
> is there a better way to identify a git repository as such other than
> looking for a subdirectory named '.git'? 'Better' ideally meaning
> unambiguous.

To check whether you're in a working tree, you can run
"git rev-parse --is-inside-work-tree".  If you're worried about being inside a
subdirectory of a working tree, you can then check for the existence
of a directory named .git/ without feeling like you're doing something
too hacky.

Michael.

(Apologies if this mail arrives twice somehow.  Google groups rejected
the last one.)

-- 
Ma patrie, c'est la langue anglaise.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To post to this group, send email to git-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to