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

Initial support for checkout a tree url in addition to pull-request urls. #692

Closed
wants to merge 1 commit into from

Conversation

maxandersen
Copy link
Contributor

Getting used to use git co and then see it fail when using a tree url (ttps://github.com/jbosstools/jbosstools-forge/tree/jbosstools-4.2.x)
always annoyed me.

Here is the basic initial implementation of this.

I would like to write tests for it too, but the current one fails so I'm not sure how to
add tests for it knowing if I broke something.

Any pointers would be appreciated on what to do about that.

@owenthereal
Copy link
Contributor

Getting used to use git co and then see it fail when using a tree url (ttps://github.com/jbosstools/jbosstools-forge/tree/jbosstools-4.2.x)
always annoyed me.

How about just run git checkout jbosstools-4.2.x? But I can see you prob. copy the URL while navigating the branch page on GitHub and paste it to the checkout command in the terminal, expecting it to work.

I would like to write tests for it too, but the current one fails so I'm not sure how to
add tests for it knowing if I broke something.

You could run all tests with ./script/test. We've Go tests (files ending with _test.go) and Cucumber tests. I'd add some Go unit tests and a Cucumber scenario.

@maxandersen
Copy link
Contributor Author

That 'git checkout' won't work if the branch is someone else's remote. I'll have to add the remote first. Exactly like co a pull request finds the remote and adds it if necessary and then checks out the right branch.

And yes, I tried running the tests but there was a lot of failures even before I tried adding my changes.

What is the easiest way to just run the checkout tests ? Then I can at least test that part.

@owenthereal
Copy link
Contributor

That 'git checkout' won't work if the branch is someone else's remote. I'll have to add the remote first. Exactly like co a pull request finds the remote and adds it if necessary and then checks out the right branch.

Ah, got it, I like where this is going

And yes, I tried running the tests but there was a lot of failures even before I tried adding my changes.

Maybe you paste the errors here and I could help you out.

What is the easiest way to just run the checkout tests ? Then I can at least test that part.

There's no Go test for checkout. To run the checkout cuke, try cucumber features/checkout.feature

@maxandersen
Copy link
Contributor Author

sorry for the delay.

I can see the cucumber tests works in master but have some fails in my branch. I'll try find some time to fix those and add new ones.

@mislav mislav added the feature label Dec 20, 2014
@mislav
Copy link
Owner

mislav commented Sep 26, 2015

@maxandersen Do you still want this feature? We've been waiting for an update for a long time 😉

I don't think this feature would get a lot of use. If you don't need it, I suggest you close the PR at your convenience. Thanks!

@maxandersen
Copy link
Contributor Author

I still use it but I couldn't get the tests to reliably pass/fail even before adding my tests so I didn't do more yet ;/

the feature is very useful when PR's aren't opened yet. I'll try look at again but i'll close this and reopen when I have something to not "pollute" the queue.

@mislav
Copy link
Owner

mislav commented Sep 28, 2015

Thanks for the update!

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

Successfully merging this pull request may close these issues.

3 participants