]> arthur.barton.de Git - bup.git/blobdiff - lib/bup/git.py
git.py: allow the specification of a repo_dir to update_ref()
[bup.git] / lib / bup / git.py
index 543d55d91af6551bccd49b73a7b65347e112d845..4825a19820f813227304131ac79374d899000fb2 100644 (file)
@@ -871,14 +871,14 @@ def rev_parse(committish, repo_dir=None):
     return None
 
 
-def update_ref(refname, newval, oldval):
+def update_ref(refname, newval, oldval, repo_dir=None):
     """Change the commit pointed to by a branch."""
     if not oldval:
         oldval = ''
     assert(refname.startswith('refs/heads/'))
     p = subprocess.Popen(['git', 'update-ref', refname,
                           newval.encode('hex'), oldval.encode('hex')],
-                         preexec_fn = _gitenv())
+                         preexec_fn = _gitenv(repo_dir))
     _git_wait('git update-ref', p)