jedbrown / git-fat

Simple way to handle fat files without committing them to git, supports synchronization using rsync
BSD 2-Clause "Simplified" License
622 stars 136 forks source link

Expand environment variables in .gitfat #81

Open repnzscasb opened 6 years ago

repnzscasb commented 6 years ago

When the git repository is shared with collaborators, the git-fat remote might be present in different locations. For example, if the remote is a smb mount, we can't assume that all collaborators will mount the share in the same spot.

I worked around that by using return os.path.expandvars(output) rather than return output in the gitconfig_get function. This way, the base address of the remote could be specified by exporting an environment variable, e.g.:

[rsync]
remote = $SMB_ARCHIVE/gitfat/myrepo

Clearly this change would expand all fields, not just "rsync.remote", so you might prefer a different kind of fix.