Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added rsync.pushremote config parameter, analogous to git's remote.pushu... #17

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions git-fat
Original file line number Diff line number Diff line change
Expand Up @@ -133,16 +133,19 @@ 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 get_rsync(self):
def get_rsync(self,push):
cfgpath = os.path.join(self.gitroot,'.gitfat')
remote = gitconfig_get('rsync.remote', file=cfgpath)
pushremote = gitconfig_get('rsync.pushremote', file=cfgpath)
ssh_port = gitconfig_get('rsync.sshport', file=cfgpath)
ssh_user = gitconfig_get('rsync.sshuser', file=cfgpath)
if push and pushremote is not None:
remote = pushremote
if remote is None:
raise RuntimeError('No rsync.remote in %s' % cfgpath)
return remote, ssh_port, ssh_user
def get_rsync_command(self,push):
(remote, ssh_port, ssh_user) = self.get_rsync()
(remote, ssh_port, ssh_user) = self.get_rsync(push=push)
if push:
self.verbose('Pushing to %s' % (remote))
else:
Expand Down