From 06dbe79199c668308befef3539a64d2242c861c1 Mon Sep 17 00:00:00 2001 From: Chuck Lever Date: Thu, 1 Dec 2005 19:15:13 -0500 Subject: [PATCH] Fast-forwarding does a git.switch() even when it forwarded no patches The git.switch() in forward_patches() is not needed when no patches have been fast forwarded. This is a significant speed up. Signed-off-by: Chuck Lever --- stgit/stack.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/stgit/stack.py b/stgit/stack.py index dc7c19f..bc5915e 100644 --- a/stgit/stack.py +++ b/stgit/stack.py @@ -635,6 +635,9 @@ class Series: forwarded+=1 unapplied.remove(name) + if forwarded == 0: + return 0 + git.switch(top) append_strings(self.__applied_file, names[0:forwarded]) -- 2.11.0