From c6aa57f72218146cf005f0747c8091ca73e8cf12 Mon Sep 17 00:00:00 2001 From: Jed Brown Date: Sun, 20 Jan 2013 19:05:48 -0600 Subject: Find git-dir so that git-fat can run within a git filter-branch or a bare repository. --- git-fat | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'git-fat') diff --git a/git-fat b/git-fat index 987780c..bdacd4e 100755 --- a/git-fat +++ b/git-fat @@ -64,7 +64,8 @@ class GitFat(object): def __init__(self): self.verbose = verbose_stderr if os.environ.get('GIT_FAT_VERBOSE') else verbose_ignore self.gitroot = subprocess.check_output('git rev-parse --show-toplevel'.split()).strip() - self.objdir = os.path.join(self.gitroot, '.git', 'fat', 'objects') + self.gitdir = subprocess.check_output('git rev-parse --git-dir'.split()).strip() + self.objdir = os.path.join(self.gitdir, 'fat', 'objects') if os.environ.get('GIT_FAT_VERSION') == '1': self.encode = self.encode_v1 else: -- cgit v1.2.1