Commit d63249c4 authored by Michal Čihař's avatar Michal Čihař

Do not try to push if there is nothing to push (issue #52).

parent beac37b0
......@@ -417,6 +417,10 @@ class SubProject(models.Model):
messages.error(request, _('Push is disabled for %s.') % self.__unicode__())
return False
# Do we have anything to push?
if not self.git_needs_push():
return False
# First check we're up to date
if not self.do_update(request):
return False
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment