summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--distixlib/git.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/distixlib/git.py b/distixlib/git.py
index 843384b..648b374 100644
--- a/distixlib/git.py
+++ b/distixlib/git.py
@@ -32,7 +32,11 @@ class Git(object):
self._git(['init', '-q', self._dirname])
def add_and_commit(self, filenames, commit_msg):
- self._git(['add'] + filenames, cwd=self._dirname)
+ cliapp.runcmd(
+ ['xargs', '-0', 'git', 'add'],
+ cwd=self._dirname,
+ feed_stdin='\0'.join(filenames))
+
self._git(
['commit', '-q', '-m', commit_msg] + filenames,
cwd=self._dirname)