chiark / gitweb /
remove extra refresh_index() call in apply_patches()
authorChuck Lever <cel@netapp.com>
Wed, 2 Nov 2005 21:55:35 +0000 (16:55 -0500)
committerCatalin Marinas <catalin.marinas@gmail.com>
Fri, 4 Nov 2005 21:35:41 +0000 (21:35 +0000)
apply_patches() calles git.merge() and git.switch(), both of which already
invoke refresh_index().

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

index a615ccf8bb8dcecb9a237deb01fe6953d35bdb07..0cdc125995af1b7ab4e950bd41b740deeef5b093 100644 (file)
@@ -638,11 +638,11 @@ def apply_patch(filename = None, base = None):
                 return False
             return True
 
-    refresh_index()
-
     if base:
         orig_head = get_head()
         switch(base)
+    else:
+        refresh_index()         # needed since __apply_patch() doesn't do it
 
     if not __apply_patch():
         if base: