changeset 787:3c3a6505ef8d

git_handler.git_get_incoming: move default refs init to the top This is preparation for moving most of the code into a separate module. These two lines will be left behind in this module.
author Siddharth Agarwal <sid0@fb.com>
date Wed, 15 Oct 2014 16:35:53 -0700
parents 2f6507057987
children 6bf8f8b3cc37
files hggit/git_handler.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/hggit/git_handler.py
+++ b/hggit/git_handler.py
@@ -661,6 +661,8 @@
         return message, git_extra
 
     def get_git_incoming(self, refs):
+        if refs is None:
+            refs = self.git.refs.as_dict()
         # import heads and fetched tags as remote references
         todo = []
         done = set()
@@ -668,8 +670,6 @@
 
         # get a list of all the head shas
         seenheads = set()
-        if refs is None:
-            refs = self.git.refs.as_dict()
         if refs:
             for sha in refs.itervalues():
                 # refs contains all the refs in the server, not just the ones