[PATCH] Fast-forwarding does a git.switch() even when it forwarded no patches
- From
- Chuck Lever <cel@netapp.com>
- Date
- Dec 2, 2005, 00:15 UTC
- Message-ID
- <20051202001513.9140.14792.stgit@dexter.citi.umich.edu>
- In-Reply-To
- <20051202001141.9140.23252.stgit@dexter.citi.umich.edu>
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 <cel@netapp.com> ---
stgit/stack.py | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/stgit/stack.py b/stgit/stack.py index 3fd6a46..3cc37c5 100644 --- a/stgit/stack.py +++ b/stgit/stack.py @@ -735,6 +735,9 @@ class Series: forwarded+=1 unapplied.remove(name) + if forwarded == 0: + return 0 + git.switch(top) append_strings(self.__applied_file, names[0:forwarded])