From: Chuck Lever Date: Wed, 26 Oct 2005 18:52:00 +0000 (-0400) Subject: Use __run instead of os.system() in git.merge() X-Git-Tag: v0.14.3~602 X-Git-Url: https://git.distorted.org.uk/~mdw/stgit/commitdiff_plain/962ef1c731f01f4d6c146c2af88d69fcc7d023a9?ds=sidebyside Use __run instead of os.system() in git.merge() This is just a little faster, avoiding an unneeded invocation of the shell. Signed-off-by: Chuck Lever --- diff --git a/stgit/git.py b/stgit/git.py index 25d9483..3137797 100644 --- a/stgit/git.py +++ b/stgit/git.py @@ -470,7 +470,7 @@ def merge(base, head1, head2): raise GitException, 'git-read-tree failed (local changes maybe?)' # this can fail if there are conflicts - if os.system('git-merge-index -o -q gitmergeonefile.py -a') != 0: + if __run('git-merge-index -o -q gitmergeonefile.py -a') != 0: raise GitException, 'git-merge-index failed (possible conflicts)' def status(files = [], modified = False, new = False, deleted = False,