chiark / gitweb /
Use __run instead of os.system() in git.merge()
authorChuck Lever <cel@netapp.com>
Wed, 26 Oct 2005 18:52:00 +0000 (14:52 -0400)
committerCatalin Marinas <catalin.marinas@gmail.com>
Thu, 27 Oct 2005 19:47:13 +0000 (20:47 +0100)
This is just a little faster, avoiding an unneeded invocation of the shell.

Signed-off-by: Chuck Lever <cel@netapp.com>
stgit/git.py

index 25d9483d63870ed8dd46a57a27747a4d46ff7800..313779770da90665ceea4349f1ee60201212dee2 100644 (file)
@@ -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,