Skip to content

Commit

Permalink
Tests for ide/git.py, ide/api/git.py, deleting unreachable code
Browse files Browse the repository at this point in the history
removes an unreachable block of code from ide/api/git.py
  • Loading branch information
math-foo committed Jul 19, 2015
1 parent fb52400 commit 25b5b01
Show file tree
Hide file tree
Showing 6 changed files with 659 additions and 52 deletions.
12 changes: 1 addition & 11 deletions ide/api/git.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,16 +61,6 @@ def set_project_repo(request, project_id):
except:
pass

# Just clear the repo if none specified.
if repo == '':
project.github_repo = None
project.github_branch = None
project.github_last_sync = None
project.github_last_commit = None
project.github_hook_uuid = None
project.save()
return json_response({'exists': True, 'access': True, 'updated': True, 'branch_exists': True})

if not ide.git.git_verify_tokens(request.user):
return json_failure("No GitHub tokens on file.")

Expand Down Expand Up @@ -153,4 +143,4 @@ def remove_hooks(repo, s):
if hook.name != 'web':
continue
if s in hook.config['url']:
hook.delete()
hook.delete()
Loading

0 comments on commit 25b5b01

Please sign in to comment.