summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJed Brown <jed@59A2.org>2014-05-25 22:47:03 -0600
committerJed Brown <jed@59A2.org>2014-05-25 22:48:16 -0600
commit407ae4d45b81c6f9c8bcec39a7eeff04a98d3c08 (patch)
treedc4d1acfd7cff0550d27d95ad15dcbe096be65e7
parent41fbd824da3c928df416398d2c71d7a237945d76 (diff)
downloadgit-fat-407ae4d45b81c6f9c8bcec39a7eeff04a98d3c08.tar.gz
Move init diagnostics out of cmd_* section
-rwxr-xr-xgit-fat14
1 files changed, 7 insertions, 7 deletions
diff --git a/git-fat b/git-fat
index 7035db7..7d4e8ad 100755
--- a/git-fat
+++ b/git-fat
@@ -135,6 +135,13 @@ class GitFat(object):
self.magiclens = [magiclen(enc) for enc in [self.encode_v1, self.encode_v2]] # All prior versions
def setup(self):
mkdir_p(self.objdir)
+ def is_init_done(self):
+ return gitconfig_get('filter.fat.clean') or gitconfig_get('filter.fat.smudge')
+ def assert_init_done(self):
+ if not self.is_init_done():
+ sys.stderr.write('fatal: git-fat is not yet configured in this repository.\n')
+ sys.stderr.write('Run "git fat init" to configure.\n')
+ sys.exit(1)
def get_rsync(self):
cfgpath = os.path.join(self.gitroot,'.gitfat')
remote = gitconfig_get('rsync.remote', file=cfgpath)
@@ -415,13 +422,6 @@ class GitFat(object):
fname = os.path.join(self.objdir, obj)
print('%10d %s' % (os.stat(fname).st_size, obj))
os.remove(fname)
- def is_init_done(self):
- return gitconfig_get('filter.fat.clean') or gitconfig_get('filter.fat.smudge')
- def assert_init_done(self):
- if not self.is_init_done():
- sys.stderr.write('fatal: git-fat is not yet configured in this repository.\n')
- sys.stderr.write('Run "git fat init" to configure.\n')
- sys.exit(1)
def cmd_verify(self):
"""Print details of git-fat objects with incorrect data hash"""