X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?p=bup.git;a=blobdiff_plain;f=lib%2Fbup%2Fgit.py;h=4825a19820f813227304131ac79374d899000fb2;hp=543d55d91af6551bccd49b73a7b65347e112d845;hb=33d395fd4ab47aa3b4aa9094e5b220c519d6fc3f;hpb=abd1d110179268a0af899641e6264c035128ad06 diff --git a/lib/bup/git.py b/lib/bup/git.py index 543d55d..4825a19 100644 --- a/lib/bup/git.py +++ b/lib/bup/git.py @@ -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)