Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

github pages deployer does not return to current branch #126

Closed
mojavelinux opened this issue Jul 3, 2012 · 2 comments
Closed

github pages deployer does not return to current branch #126

mojavelinux opened this issue Jul 3, 2012 · 2 comments
Assignees
Labels
Milestone

Comments

@mojavelinux
Copy link
Member

The github pages deployer does not return to the current branch correctly. Instead, it always returns to master (which, by chance, may correspond to the current branch).

In the file lib/awestruct/deploy/github_pages_deploy.rb, the current branch is captured using:

current_branch = git.branch

However, the branch() method does a checkout on the specified branch, defaulting to master. The correct function for capturing the current branch is current_branch(). Thus, the line above should be:

current_branch = git.current_branch

See https://github.com/schacon/ruby-git/blob/master/lib/git/base.rb for details.

@mojavelinux
Copy link
Member Author

I think a fix should be accompanied by a test as it's a very testable assertion.

@ghost ghost assigned lance Jul 10, 2012
@lance
Copy link
Member

lance commented Jul 20, 2012

FWIW, I think our strategy should be to always include a test for every issue. It's the best (maybe only) way to start getting some code coverage.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants