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

Allow scmpuff_status to handle detached git states #24

Merged
merged 2 commits into from
Feb 17, 2017

Conversation

bikezilla
Copy link
Contributor

@bikezilla bikezilla commented Jan 22, 2017

When rebasing a branch and stopping to resolve a conflict, or when
looking at a particular commit, git will be in a detached head state
with git status -bz returning something along the lines of

## HEAD (no branch)UU file_with_conflicts.txt

This fixes the function that parses this output internally for
scmpuff_status to not bail out loudly, but rather pass the HEAD (no branch) state up.

Fixes #18

When rebasing a branch and stopping to resolve a conflict, or when
looking at a particular commit, git will be in a detached head state
with `git status -bz` returning something along the lines of

> ## HEAD (no branch)UU file_with_conflicts.txt

This fixes the function that parses this output internally for
scmpuff_status to not bail out loudly, but rather pass the `HEAD (no
branch)` state up.
@@ -28,6 +28,12 @@
}
end

Given(/^I switch to existing git branch "([^"]*)"$/) do |branch_name|
steps %Q{

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use % instead of %Q.
%Q-literals should be delimited by ( and ).
Use %Q only for strings that contain both single quotes and double quotes, or for dynamic strings that contain double quotes.

As reported by Hound-CI:
- Use % instead of %Q.
- %Q-literals should be delimited by ( and ).
- Use %Q only for strings that contain both single quotes and double
quotes, or for dynamic strings that contain double quotes.
@mroth
Copy link
Owner

mroth commented Jan 23, 2017

This looks great @bikezilla, thanks for putting in the tests!

My plan is to merge this and cut and new binary release once Go 1.8 comes out in a week or two (so that the binaries are built with the new version, since I don't release them that often). Leaving this open for now only so I don't forget to do the binary release quite so easily (feel free to poke me if I haven't gotten to it within a week of the 1.8 release).

@mroth
Copy link
Owner

mroth commented Feb 17, 2017

Merging in preparation for a new release.

@mroth mroth merged commit 499d336 into mroth:master Feb 17, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Puff breaks when a rebase fails to merge
3 participants