From: Bert Wesarg Date: Fri, 21 Nov 2008 09:19:01 GMT Subject: Re: [TopGit PATCH] Check for help invocation before setup Message-ID: <36ca99e90811210119s215513a8m7c12c8d55fd54d70@mail.gmail.com> In-Reply-To: <1227110623-4474-2-git-send-email-madduck@debian.org> Hi, On Wed, Nov 19, 2008 at 17:03, martin f. krafft wrote: > The user ought to be able to call `tg help` from anywhere in the > filesystem, not just Git repositories, so the help parsing has to happen > before the calls to git git binary. > > Debian bug: #501982 I really second this. Plus, I think its crucial to check that we are not inside the .git directory before setting up topgit. Because git rev-parse --git-dir only works in the top .git dir, not deeper (i.e. inside .git/refs) and will always return ".". $(git rev-parse --is-inside-work-tree) || die "Not in a git working directory" Bert