diff options
author | Lars Wirzenius <liw@liw.fi> | 2017-03-25 16:10:05 +0200 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2017-03-25 16:10:05 +0200 |
commit | d25974cc09b9a69dc326322c9102229a8fbe19cf (patch) | |
tree | f6c23a5ecf61225f8959104ce21231cb2019a8f9 | |
parent | 8394b861a0a05a4256eee265f2ed19e92930667d (diff) | |
download | distix-d25974cc09b9a69dc326322c9102229a8fbe19cf.tar.gz |
Fix: Use xargs to run git add to avoid overlog argv
-rw-r--r-- | distixlib/git.py | 6 |
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) |