From c723126011159cd18b9646e283f58bb4e79abf50 Mon Sep 17 00:00:00 2001 From: "Luis R. Rodriguez" Date: Wed, 2 Apr 2014 10:44:42 +0000 Subject: [PATCH] backports: use --ignore-removal for git add As of git 2.0 --ignore-removal is no longer default so just make it default tool, without which git will warn us about this change. Signed-off-by: Luis R. Rodriguez --- lib/bpgit.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/bpgit.py b/lib/bpgit.py index 15089d748de6..f56e377a9642 100644 --- a/lib/bpgit.py +++ b/lib/bpgit.py @@ -142,7 +142,7 @@ def init(tree=None): _check(process) def add(path, tree=None): - process = subprocess.Popen(['git', 'add', path], + process = subprocess.Popen(['git', 'add', '--ignore-removal', path], stdout=subprocess.PIPE, stderr=subprocess.STDOUT, close_fds=True, universal_newlines=True, cwd=tree) stdout = process.communicate()[0] @@ -266,7 +266,7 @@ def ls_remote(branch, tree=None, remote='origin'): return sha def add(fn, tree=None): - process = subprocess.Popen(['git', 'add', fn], cwd=tree, + process = subprocess.Popen(['git', 'add', '--ignore-removal', fn], cwd=tree, close_fds=True, universal_newlines=True) process.wait() _check(process) -- 2.30.2