Re: [TopGit PATCH] Check for help invocation before setup

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On Wed, Nov 19, 2008 at 17:03, martin f. krafft <madduck@xxxxxxxxxx> 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
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux