Skip to content

Commit

Permalink
Forward verbose and fake args to invoked switch command
Browse files Browse the repository at this point in the history
Remove github config info, tests currently do not invoke git.
  • Loading branch information
grahamu committed Mar 11, 2018
1 parent 9efadd4 commit 59992cb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 12 deletions.
6 changes: 0 additions & 6 deletions .travis.yml
Expand Up @@ -12,12 +12,6 @@ install:
# generate some reflog for tests
- ./init-tests-after-clone.sh

# as commits are performed with the default user, it needs to be set for travis too
- git config --local user.email "travis@ci.com"
- git config --local user.name "Travis Runner"
- git config --local github.user "jingweno"
- git config --local github.token "123"

script:
- tox

Expand Down
8 changes: 2 additions & 6 deletions legit/cli.py
Expand Up @@ -133,18 +133,14 @@ def sync(ctx, scm, to_branch, verbose, fake):
is_external = False

if branch in scm.get_branch_names(local=False):

if is_external:
ctx.invoke(switch, to_branch=branch)

ctx.invoke(switch, to_branch=branch, verbose=verbose, fake=fake)
scm.stash_log(sync=True)
scm.status_log(scm.smart_pull, 'Pulling commits from the server.')
scm.status_log(scm.push, 'Pushing commits to the server.', branch)
scm.unstash_log(sync=True)

if is_external:
ctx.invoke(switch, to_branch=original_branch)

ctx.invoke(switch, to_branch=original_branch, verbose=verbose, fake=fake)
else:
click.echo('Branch {0} is not published. Publish before syncing.'
.format(crayons.yellow(branch)))
Expand Down

0 comments on commit 59992cb

Please sign in to comment.