From d25974cc09b9a69dc326322c9102229a8fbe19cf Mon Sep 17 00:00:00 2001 From: Lars Wirzenius Date: Sat, 25 Mar 2017 16:10:05 +0200 Subject: Fix: Use xargs to run git add to avoid overlog argv --- distixlib/git.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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) -- cgit v1.2.1