buildpackage: add 'force' option to write_wc()
authorMarkus Lehtonen <markus.lehtonen@linux.intel.com>
Fri, 6 Jul 2012 07:00:27 +0000 (10:00 +0300)
committerGuido Günther <agx@sigxcpu.org>
Wed, 16 Jan 2013 06:02:07 +0000 (07:02 +0100)
To select whether to include file that would otherwise be ignored by
gitignore (.gitignore or .git/info/exclude).

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
gbp/scripts/common/buildpackage.py

index 2c99895..0835711 100644 (file)
@@ -128,9 +128,9 @@ def dump_tree(repo, export_dir, treeish, with_submodules):
     return True
 
 
-def write_wc(repo):
+def write_wc(repo, force=True):
     """write out the current working copy as a treeish object"""
-    repo.add_files(repo.path, force=True, index_file=wc_index)
+    repo.add_files(repo.path, force=force, index_file=wc_index)
     tree = repo.write_tree(index_file=wc_index)
     return tree