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

@ #440 | more correct way to check branch #467

Closed
wants to merge 2 commits into from

Conversation

datphan
Copy link
Contributor

@datphan datphan commented Sep 5, 2018

to resolve some issues like branch name contains \ or ref is at detached HEAD

connect #440

@ghost ghost assigned datphan Sep 5, 2018
@ghost ghost added the stag:under-review label Sep 5, 2018
@datphan datphan changed the title @ #440 | more correct way to check branch @ #440 | more correct way to check branch WIP Sep 5, 2018
@datphan datphan changed the title @ #440 | more correct way to check branch WIP @ #440 | more correct way to check branch Sep 5, 2018
@hoatle hoatle assigned phuonglm and hieptranquoc and unassigned datphan Sep 5, 2018
@hoatle
Copy link
Member

hoatle commented Sep 13, 2018

@phuonglm @hieptranquoc please review this asap

@hoatle hoatle added this to the v0.6.0-a3-dev milestone Sep 13, 2018
@@ -130,11 +131,14 @@ def check_branch(current_ref, desired_branch)

@logger.debug("current_branch: #{current_branch} - desired_branch: #{desired_branch}")

local_branch = `git branch -a | grep -v "HEAD detached" | grep -r "#{desired_branch}"`.strip
Copy link
Member

Choose a reason for hiding this comment

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

I don't think this is the proper way to get the local branch:

teracy-dev hoatle$ git branch -a | grep -v "HEAD detached" | grep -r "develop"
(standard input):* develop
(standard input):  remotes/datphan/develop
(standard input):  remotes/origin/HEAD -> origin/develop
(standard input):  remotes/origin/develop
(standard input):  remotes/upstream/develop

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It is a check for desired branch, not to get it, it is more correct than the current way,

@hoatle
Copy link
Member

hoatle commented Sep 13, 2018

we should handle gitsynch more properly, so I'll close this PR and the proper changes should be addressed on the issue #465 and #469 instead

@hoatle hoatle closed this Sep 13, 2018
@ghost ghost removed the stag:under-review label Sep 13, 2018
@hoatle hoatle removed this from the v0.6.0-a3-dev milestone Sep 13, 2018
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.

4 participants