##// END OF EJS Templates
libgit2: updated code for tests....
marcink -
r730:ef69988e default
parent child Browse files
Show More
@@ -161,9 +161,16 b' class GitRemote(object):'
161 repo = self._factory.repo_libgit2(wire)
161 repo = self._factory.repo_libgit2(wire)
162
162
163 try:
163 try:
164 return not repo.head.name
164 has_head = repo.head.name
165 if has_head:
166 return False
167
168 # NOTE(marcink): check again using more expensive method
169 return repo.is_empty
165 except Exception:
170 except Exception:
166 return True
171 pass
172
173 return True
167
174
168 @reraise_safe_exceptions
175 @reraise_safe_exceptions
169 def add_object(self, wire, content):
176 def add_object(self, wire, content):
@@ -783,8 +790,6 b' class GitRemote(object):'
783
790
784 @reraise_safe_exceptions
791 @reraise_safe_exceptions
785 def get_all_commit_ids(self, wire):
792 def get_all_commit_ids(self, wire):
786 if self.is_empty(wire):
787 return []
788
793
789 cmd = ['rev-list', '--reverse', '--date-order', '--branches', '--tags']
794 cmd = ['rev-list', '--reverse', '--date-order', '--branches', '--tags']
790 try:
795 try:
General Comments 0
You need to be logged in to leave comments. Login now