From 33d395fd4ab47aa3b4aa9094e5b220c519d6fc3f Mon Sep 17 00:00:00 2001 From: Rob Browning Date: Sun, 23 Mar 2014 13:07:25 -0500 Subject: [PATCH] git.py: allow the specification of a repo_dir to update_ref() Signed-off-by: Rob Browning Tested-by: Rob Browning --- lib/bup/git.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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) -- 2.39.2