summaryrefslogtreecommitdiff
path: root/git-fat
diff options
context:
space:
mode:
authorJed Brown <jed@59A2.org>2013-01-20 19:05:48 -0600
committerJed Brown <jed@59A2.org>2013-01-20 19:05:48 -0600
commitc6aa57f72218146cf005f0747c8091ca73e8cf12 (patch)
treeed370f386135c36ee4e8370c694f0b8ed2749717 /git-fat
parent3767f3a60c00d67af42c820a86958e98213b999b (diff)
downloadgit-fat-c6aa57f72218146cf005f0747c8091ca73e8cf12.tar.gz
Find git-dir so that git-fat can run within a git filter-branch or a
bare repository.
Diffstat (limited to 'git-fat')
-rwxr-xr-xgit-fat3
1 files changed, 2 insertions, 1 deletions
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: